Compfiles/Usa2007P3.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned compfiles documentation, Pinned compfiles corpus index
4 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2007, Problem 3
Let S be a set containing n² + n − 1 elements. Suppose that the n-element subsets of S are partitioned into two classes. Prove that there are at least n pairwise disjoint sets in the same class.
Imported by 1 file
- lemma
Usa2007P3.exists_disjoint_familyAny finite setSwithk * n ≤ S.cardcontainskpairwise disjointn-element subsets (here1 ≤ n) line 34 sourceSource documentation
Any finite set
Swithk * n ≤ S.cardcontainskpairwise disjointn-element subsets (here1 ≤ n).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Nat,LE.le,OfNat.ofNat,Finset,HMul.hMul,Finset.card,Exists,And,Eq,Membership.mem,Set.PairwiseDisjoint,idProof uses:
Nat.recAux,Exists.intro,EmptyCollection.emptyCollection,And.intro,Finset.card_empty,False.elim,Finset.notMem_empty,of_eq_true,Eq.trans,Set,True,congrFun',congrArg,Finset.coe_empty,HAdd.hAdd,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat.rawCast,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.add_congrand 47 more58 instances, coercions and auxiliary constants left out.
Tactic trace: 40 steps
Open to load the checked before-and-after goal states.
lemma exists_disjoint_family {n : ℕ} (hn : 1 ≤ n) : ∀ k : ℕ, ∀ S : Finset α, k * n ≤ S.card → ∃ F : Finset (Finset α), F.card = k ∧ (∀ A ∈ F, A ⊆ S ∧ A.card = n) ∧ (F : Set (Finset α)).PairwiseDisjoint id := by …Mentions: S
- lemma
Usa2007P3.color_eqDocumented declaration: color_eq line 79 sourceSource documentation
If every
(n+1)-element subsetUofSis monochromatic (i.e. all of itsn-element subsets have the same color), then alln-element subsets ofShave the same color: any twon-element sets can be joined by a chain in which consecutive sets differ in exactly one element, so induction on the size of the symmetric difference applies.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Finset,Bool,Nat,LE.le,Eq,Finset.card,HAdd.hAdd,OfNat.ofNat,SDiff.sdiffProof uses:
Nat.recAux,Eq.mpr,EmptyCollection.emptyCollection,id,congrArg,Eq.symm,propext,Finset.sdiff_eq_empty_iff_subset,Finset.card_eq_zero,Nat.eq_zero_of_le_zero,Finset.eq_of_subset_of_card_le,Eq.refl,dite,Not,Membership.mem,Finset.Nonempty,LT.lt,Finset.card_pos,Nat.succ_pos,HSub.hSuband 25 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 50 steps
Open to load the checked before-and-after goal states.
lemma color_eq (col : Finset α → Bool) {n : ℕ} {S : Finset α} (H : ∀ U : Finset α, U ⊆ S → U.card = n + 1 → ∀ A B : Finset α, A ⊆ U → B ⊆ U → A.card = n → B.card = n → col A = col B) : ∀ m : ℕ, ∀ A B : Finset α, A ⊆ S → B ⊆ S → A.card = n → B.card = n → (A \ B).card ≤ m → col A = col B := by …Mentions: S
- lemma
Usa2007P3.mainDocumented declaration: main line 138 sourceSource documentation
The strengthened statement, proved by induction on
k: ifShask * (n + 1) - 1elements and then-element subsets ofSare two-colored (bycol), then one can findkpairwise disjointn-element subsets ofShaving the same color.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Finset,Bool,Nat,LE.le,OfNat.ofNat,Eq,Finset.card,HSub.hSub,HMul.hMul,HAdd.hAdd,Exists,And,Membership.mem,Set.PairwiseDisjoint,idProof uses:
Nat.recAux,Exists.intro,EmptyCollection.emptyCollection,And.intro,Nat.zero_le,False.elim,Finset.notMem_empty,of_eq_true,Eq.trans,Set,True,congrFun',congrArg,Finset.coe_empty,Bool.true,Classical.byContradiction,Not,SDiff.sdiff,Eq.mpr,Finset.card_sdiff_of_subsetand 59 more70 instances, coercions and auxiliary constants left out.
Tactic trace: 75 steps
Open to load the checked before-and-after goal states.
lemma main (col : Finset α → Bool) {n : ℕ} (hn : 1 ≤ n) : ∀ k : ℕ, ∀ S : Finset α, S.card = k * (n + 1) - 1 → ∃ F : Finset (Finset α), k ≤ F.card ∧ (∀ A ∈ F, A ⊆ S ∧ A.card = n) ∧ (F : Set (Finset α)).PairwiseDisjoint id ∧ ∃ b : Bool, ∀ A ∈ F, col A = b := by …Mentions: S
- problem
Usa2007P3.usa2007_p3line 218 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,DecidableEq,Finset,Eq,Finset.card,HSub.hSub,HAdd.hAdd,HPow.hPow,Bool,Exists,And,LE.le,Membership.mem,Set.PairwiseDisjoint,idProof uses:
HMul.hMul,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.mpr,congrArg,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Tactic.Ring.Common.add_pf_add_gt,Mathlib.Tactic.Ring.Common.add_pf_add_zero,Mathlib.Tactic.Ring.Common.add_mul,Mathlib.Tactic.Ring.Common.mul_add,Mathlib.Tactic.Ring.Common.mul_pf_left,Mathlib.Meta.NormNum.IsNat.to_raw_eq,Mathlib.Meta.NormNum.isNat_muland 15 more44 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.