Compfiles/Usa2011P6.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
9 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2011, Problem 6
Let A be a set with |A| = 225, meaning that A has 225 elements. Suppose further that there are eleven subsets A₁, A₂, ..., A₁₁ of A such that |Aᵢ| = 45 for 1 ≤ i ≤ 11 and |Aᵢ ∩ Aⱼ| = 9 for 1 ≤ i < j ≤ 11. Prove that |A₁ ∪ A₂ ∪ ··· ∪ A₁₁| ≥ 165, and give an example for which equality holds.
Imports (6)
Imported by 1 file
- lemma
Usa2011P6.sum_card_filter_commDocumented declaration: sum_card_filter_comm line 39 sourceSource documentation
Double counting: for a predicate
pont × u, the sum overa ∈ uof the number of indicesi ∈ tsatisfyingp i aequals the sum overi ∈ tof the number of elementsa ∈ usatisfyingp i a.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Decidable,Eq,Nat,Finset.sum,Finset.card,Finset.filterProof uses:
Eq.mpr,ite,OfNat.ofNat,id,congr,congrArg,Finset.sum_congr,Eq.refl,Membership.mem,Finset.card_filter,Finset.sum_comm5 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma sum_card_filter_comm {ι α : Type*} {t : Finset ι} {u : Finset α} (p : ι → α → Prop) [∀ i a, Decidable (p i a)] : ∑ a ∈ u, (t.filter fun i ↦ p i a).card = ∑ i ∈ t, (u.filter fun a ↦ p i a).card := by … - lemma
Usa2011P6.card_powersetCard_filter_memDocumented declaration: card_powersetCard_filter_mem line 48 sourceSource documentation
There are exactly 45 three-element subsets of an 11-element set containing a given element
i: erasingiputs them in bijection with the 2-element subsets of the remaining 10 elements, andNat.choose 10 2 = 45.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Eq,Finset.card,Finset,Finset.filter,Membership.mem,Finset.powersetCard,Finset.univProof uses:
Finset.erase,Finset.card_bij',Insert.insert,And,LE.le,Eq.mp,congrArg,propext,Finset.mem_powersetCard,Finset.mem_filter,Eq.mpr,id,And.intro,Finset.erase_subset_erase,HSub.hSub,Finset.card_erase_of_mem,Eq.refl,Not,Finset.notMem_erase,Finset.insert_subsetand 19 more22 instances, coercions and auxiliary constants left out.
Tactic trace: 27 steps
Open to load the checked before-and-after goal states.
lemma card_powersetCard_filter_mem (i : Fin 11) : (((Finset.univ : Finset (Fin 11)).powersetCard 3).filter fun T ↦ i ∈ T).card = 45 := by … - lemma
Usa2011P6.card_powersetCard_filter_mem₂Documented declaration: card_powersetCard_filter_mem₂ line 80 sourceSource documentation
There are exactly 9 three-element subsets of an 11-element set containing two given distinct elements
iandj: erasing both puts them in bijection with the 1-element subsets of the remaining 9 elements, andNat.choose 9 1 = 9.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Ne,Eq,Finset.card,Finset,Finset.filter,And,Membership.mem,Finset.powersetCard,Finset.univProof uses:
Finset.erase,Finset.card_bij',Insert.insert,LE.le,Eq.mp,congrArg,propext,Finset.mem_powersetCard,Finset.mem_filter,Iff.mpr,Finset.mem_erase,And.intro,Ne.symm,Eq.mpr,id,Finset.erase_subset_erase,HSub.hSub,Finset.card_erase_of_mem,Eq.refl,Notand 27 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 42 steps
Open to load the checked before-and-after goal states.
lemma card_powersetCard_filter_mem₂ {i j : Fin 11} (hij : i ≠ j) : (((Finset.univ : Finset (Fin 11)).powersetCard 3).filter fun T ↦ i ∈ T ∧ j ∈ T).card = 9 := by … - lemma
Usa2011P6.sum_multiplicityThe sum of the multiplicities of the elements of the union equals the sum of the sizes of the eleven sets,11 * 45 = 495line 128 sourceSource documentation
The sum of the multiplicities of the elements of the union equals the sum of the sizes of the eleven sets,
11 * 45 = 495.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Fin,OfNat.ofNat,Nat,Finset,Eq,Finset.card,Finset.sum,Finset.biUnion,Finset.univ,Finset.filter,Membership.memProof uses:
Eq.mpr,id,congrArg,rfl,LE.le,Iff.mpr,Exists,And,Finset.mem_biUnion,Exists.intro,And.intro,Finset.mem_univ,Finset.filter_mem_eq_of_subset,Trans.trans, Usa2011P6.sum_card_filter_comm,Finset.sum_congr,Eq.refl,HMul.hMul,Finset.sum_const_nat,Fintype.cardand 2 more18 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma sum_multiplicity {α : Type*} [DecidableEq α] (As : Fin 11 → Finset α) (hcard : ∀ i, (As i).card = 45) : ∑ a ∈ Finset.univ.biUnion As, (Finset.univ.filter fun i ↦ a ∈ As i).card = 495 := by … - lemma
Usa2011P6.sum_inter_cardThe sum of the intersection sizes over all ordered pairs of indices equals11 * 45 + 11 * 10 * 9 = 1485line 146 sourceSource documentation
The sum of the intersection sizes over all ordered pairs of indices equals
11 * 45 + 11 * 10 * 9 = 1485.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Fin,OfNat.ofNat,Nat,Finset,Eq,Finset.card,Ne,Inter.inter,Finset.sum,Prod,SProd.sprod,Finset.univ,Prod.fst,Prod.sndProof uses:
Finset.diag,Membership.mem,Eq.mpr,id,congrArg,Eq.symm,And.right,Eq.mp,And,propext,Finset.mem_diag,Finset.inter_self,Eq.refl,HMul.hMul,Finset.sum_const_nat,Finset.diag_card,Fintype.card,Finset.card_univ,Fintype.card_fin,Finset.offDiagand 9 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
lemma sum_inter_card {α : Type*} [DecidableEq α] (As : Fin 11 → Finset α) (hcard : ∀ i, (As i).card = 45) (hinter : ∀ i j, i ≠ j → (As i ∩ As j).card = 9) : ∑ ij ∈ (Finset.univ : Finset (Fin 11)) ×ˢ Finset.univ, (As ij.1 ∩ As ij.2).card = 1485 := by … - lemma
Usa2011P6.sum_sq_multiplicity_eqThe sum of the squares of the multiplicities equals the sum of the intersection sizes over all ordered pairs of indices line 170 sourceSource documentation
The sum of the squares of the multiplicities equals the sum of the intersection sizes over all ordered pairs of indices.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Fin,OfNat.ofNat,Nat,Finset,Eq,Finset.sum,Finset.biUnion,Finset.univ,HPow.hPow,Finset.card,Finset.filter,Membership.mem,Prod,SProd.sprod,Inter.inter,Prod.fst,Prod.sndProof uses:
Eq.mpr,id,congrArg,rfl,And,Finset.ext,Iff,congr,Iff.intro,And.intro,Iff.mpr,Exists,Finset.mem_biUnion,Exists.intro,Finset.mem_univ,of_eq_true,Prod.mk,Eq.trans,True,congrFun'and 10 more38 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
lemma sum_sq_multiplicity_eq {α : Type*} [DecidableEq α] (As : Fin 11 → Finset α) : ∑ a ∈ Finset.univ.biUnion As, (Finset.univ.filter fun i ↦ a ∈ As i).card ^ 2 = ∑ ij ∈ (Finset.univ : Finset (Fin 11)) ×ˢ Finset.univ, (As ij.1 ∩ As ij.2).card := by … - lemma
Usa2011P6.sum_sq_multiplicityThe sum of the squares of the multiplicities equals11 * 45 + 11 * 10 * 9 = 1485line 203 sourceSource documentation
The sum of the squares of the multiplicities equals
11 * 45 + 11 * 10 * 9 = 1485.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Fin,OfNat.ofNat,Nat,Finset,Eq,Finset.card,Ne,Inter.inter,Finset.sum,Finset.biUnion,Finset.univ,HPow.hPow,Finset.filter,Membership.memProof uses:
Eq.trans,Prod,SProd.sprod,Prod.fst,Prod.snd, Usa2011P6.sum_sq_multiplicity_eq, Usa2011P6.sum_inter_card23 instances, coercions and auxiliary constants left out.
lemma sum_sq_multiplicity {α : Type*} [DecidableEq α] (As : Fin 11 → Finset α) (hcard : ∀ i, (As i).card = 45) (hinter : ∀ i j, i ≠ j → (As i ∩ As j).card = 9) : ∑ a ∈ Finset.univ.biUnion As, (Finset.univ.filter fun i ↦ a ∈ As i).card ^ 2 = 1485 := … - problem
Usa2011P6.usa2011_p6line 212 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Finset,Fin,OfNat.ofNat,Nat,Eq,Finset.card,LE.le,Ne,Inter.inter,Finset.biUnion,Finset.univProof uses:
Int,Finset.sum,Finset.filter,Membership.mem,cast,Eq.symm,Eq.trans,congrFun',congrArg, Usa2011P6.sum_multiplicity,HPow.hPow,Finset.sum_congr,Eq.refl, Usa2011P6.sum_sq_multiplicity,HMul.hMul,Finset.sum_mul_sq_le_sq_mul_sq,Eq.mp,congr,mul_one,HSMul.hSMuland 14 more86 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- problem
Usa2011P6.usa2011_p6_sharpline 240 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Exists,Finset,Sum,Fin,OfNat.ofNat,Nat,And,Eq,Finset.card,LE.le,Ne,Inter.inter,Finset.biUnion,Finset.univProof uses:
Finset.powersetCard,rfl,Union.union,Finset.image,Sum.inl,Sum.inr,Finset.filter,Membership.mem,Exists.intro,And.intro,Disjoint,Eq.mpr,Not,id,congrArg,propext,Finset.disjoint_left,False,Iff.mp,Finset.mem_imageand 39 more32 instances, coercions and auxiliary constants left out.
Tactic trace: 56 steps
Open to load the checked before-and-after goal states.