Compfiles/Usa2012P6.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
10 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2012, Problem 6
For integer n ≥ 2, let x₁, x₂, ..., xₙ be real numbers satisfying x₁ + x₂ + ... + xₙ = 0 and x₁² + x₂² + ... + xₙ² = 1. For each subset A ⊆ {1, 2, ..., n}, define S_A = ∑_{i ∈ A} x_i. (If A is the empty set, then S_A = 0.) Prove that for any positive number λ, the number of sets A satisfying S_A ≥ λ is at most 2^(n-3)/λ². For which choices of x₁, x₂, ..., xₙ, λ does equality hold?
Imports (6)
Imported by 1 file
- determine
Usa2012P6.equality_casesEquality holds iffxis a permutation of(1 / √2, -1 / √2, 0, ..., 0)andλ = 1 / √2line 38 sourceSource documentation
Equality holds iff
xis a permutation of(1 / √2, -1 / √2, 0, ..., 0)andλ = 1 / √2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,RealProof uses:
Exists,And,Ne,Eq,HDiv.hDiv,OfNat.ofNat,Real.sqrt,Neg.neg11 instances, coercions and auxiliary constants left out.
determine equality_cases {n : ℕ} (x : Fin n → ℝ) (lam : ℝ) : Prop := … - lemma
Usa2012P6.card_powerset_filter_subsetThe number of subsets ofscontaining a fixed sub-finsettis2 ^ (s.card - t.card)line 46 sourceSource documentation
The number of subsets of
scontaining a fixed sub-finsettis2 ^ (s.card - t.card).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Finset,LE.le,Eq,Nat,Finset.card,Finset.filter,Finset.powerset,HPow.hPow,OfNat.ofNat,HSub.hSubProof uses:
SDiff.sdiff,Eq.mpr,Inter.inter,id,congrArg,Finset.card_sdiff,Iff.mpr,Finset.inter_eq_left,Eq.refl,Eq.symm,Finset.card_powerset,Finset.card_bij,Membership.mem,Finset.mem_powerset,Finset.sdiff_subset_sdiff,And.left,Eq.mp,And,propext,Finset.mem_filterand 17 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 28 steps
Open to load the checked before-and-after goal states.
lemma card_powerset_filter_subset {α : Type*} [DecidableEq α] {s t : Finset α} (hst : t ⊆ s) : (s.powerset.filter (fun A => t ⊆ A)).card = 2 ^ (s.card - t.card) := by … - lemma
Usa2012P6.two_pow_subBridge between natural-number powers2 ^ (n - k)and integer powers(2 : ℝ) ^ ((n : ℤ) - k)line 75 sourceSource documentation
Bridge between natural-number powers
2 ^ (n - k)and integer powers(2 : ℝ) ^ ((n : ℤ) - k).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,Eq,Real,HPow.hPow,OfNat.ofNat,HSub.hSub,IntProof uses:
Eq.mpr,id,congrArg,Nat.cast_sub,Eq.refl,zpow_natCast,Eq.trans57 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma two_pow_sub (n k : ℕ) (hk : k ≤ n) : ((2 ^ (n - k) : ℕ) : ℝ) = (2 : ℝ) ^ ((n : ℤ) - k) := by … - lemma
Usa2012P6.sum_subsetSum_sqMaster identity: the sum ofS_A ^ 2over all subsetsAequals2 ^ (n - 2)line 83 sourceSource documentation
Master identity: the sum of
S_A ^ 2over all subsetsAequals2 ^ (n - 2).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,Eq,Finset.sum,Finset.univ,HPow.hPow,Finset,Finset.powerset,Int,HSub.hSubProof uses:
ite,And,Membership.mem,HMul.hMul,Eq.symm,ite_zero_mul_ite_zero,Trans.trans,Eq.mpr,id,congrArg,pow_two,HMul,Eq.rec,Eq.refl,Inter.inter,Finset.sum_ite_mem,Finset.univ_inter,Finset.sum_mul_sum,Finset.sum_congr,rfland 123 more158 instances, coercions and auxiliary constants left out.
Tactic trace: 69 steps
Open to load the checked before-and-after goal states.
lemma sum_subsetSum_sq {n : ℕ} (hn : 2 ≤ n) (x : Fin n → ℝ) (hsum : ∑ i, x i = 0) (hsq : ∑ i, x i ^ 2 = 1) : ∑ A ∈ univ.powerset, (∑ i ∈ A, x i) ^ 2 = (2 : ℝ) ^ ((n : ℤ) - 2) := by … - lemma
Usa2012P6.sum_pos_subsetSum_sqPairing each subset with its complement: the sum ofS_A ^ 2over the subsets with positive sum equals2 ^ (n - 3)line 184 sourceSource documentation
Pairing each subset with its complement: the sum of
S_A ^ 2over the subsets with positive sum equals2 ^ (n - 3).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,Eq,Finset.sum,Finset.univ,HPow.hPow,Finset,Finset.filter,LT.lt,Finset.powerset,Int,HSub.hSubProof uses:
Compl.compl,Neg.neg,HAdd.hAdd,Finset.sum_add_sum_compl,eq_neg_of_add_eq_zero_right,Eq.mp,congrArg,Eq.mpr,id,rfl,Union.union,Finset.ext,Iff,Membership.mem,True,Or,congr,Eq.trans,And,congrFun'and 125 more163 instances, coercions and auxiliary constants left out.
Tactic trace: 85 steps
Open to load the checked before-and-after goal states.
lemma sum_pos_subsetSum_sq {n : ℕ} (hn : 2 ≤ n) (x : Fin n → ℝ) (hsum : ∑ i, x i = 0) (hsq : ∑ i, x i ^ 2 = 1) : ∑ A ∈ univ.powerset.filter (fun A => 0 < ∑ i ∈ A, x i), (∑ i ∈ A, x i) ^ 2 = (2 : ℝ) ^ ((n : ℤ) - 3) := by … - lemma
Usa2012P6.subsetSum_eq_of_card_eqForward direction of the equality case: if equality holds, then every positive subset sum equalsλline 266 sourceSource documentation
Forward direction of the equality case: if equality holds, then every positive subset sum equals
λ.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,Eq,Finset.sum,Finset.univ,HPow.hPow,LT.lt,Finset.card,Finset,Finset.filter,Finset.powerset,HDiv.hDiv,Int,HSub.hSubProof uses:
rfl,Membership.mem,Eq.mpr,id,congrArg,And,propext,Finset.mem_filter,And.intro,And.left,Eq.mp,lt_of_lt_of_le,And.right,pow_pos,HMul.hMul,div_mul_cancel₀,ne_of_gt,Eq.refl,HSMul.hSMul,Finset.sum_constand 75 more168 instances, coercions and auxiliary constants left out.
Tactic trace: 61 steps
Open to load the checked before-and-after goal states.
lemma subsetSum_eq_of_card_eq {n : ℕ} (hn : 2 ≤ n) (x : Fin n → ℝ) (hsum : ∑ i, x i = 0) (hsq : ∑ i, x i ^ 2 = 1) (lam : ℝ) (hlam : 0 < lam) (heq : ((univ.powerset.filter (fun A => lam ≤ ∑ i ∈ A, x i)).card : ℝ) = (2 : ℝ) ^ ((n : ℤ) - 3) / lam ^ 2) : ∀ A : Finset (Fin n), 0 < ∑ i ∈ A, x i → ∑ i ∈ A, x i = lam := by … - lemma
Usa2012P6.equality_case_of_card_eqForward direction of the equality case: if equality holds, thenxis a permutation of(1 / √2, -1 / √2, 0, ..., 0)andλ = 1 / √2line 335 sourceSource documentation
Forward direction of the equality case: if equality holds, then
xis a permutation of(1 / √2, -1 / √2, 0, ..., 0)andλ = 1 / √2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,Eq,Finset.sum,Finset.univ,HPow.hPow,LT.lt,Finset.card,Finset,Finset.filter,Finset.powerset,HDiv.hDiv,Int,HSub.hSub, Usa2012P6.equality_casesProof uses: Usa2012P6.subsetSum_eq_of_card_eq,
Exists,Decidable.byContradiction,Not,Membership.mem,Iff.mp,Finset.sum_eq_zero_iff_of_nonpos,Eq.mp,Eq.trans,binderNameHint,forall_congr,Finset.mem_univ,Iff.mpr,Finset.sum_sq_eq_zero_iff,one_ne_zero,congrArg,Singleton.singleton,Eq.mpr,id,Finset.sum_singletonand 152 more184 instances, coercions and auxiliary constants left out.
Tactic trace: 134 steps
Open to load the checked before-and-after goal states.
lemma equality_case_of_card_eq {n : ℕ} (hn : 2 ≤ n) (x : Fin n → ℝ) (hsum : ∑ i, x i = 0) (hsq : ∑ i, x i ^ 2 = 1) (lam : ℝ) (hlam : 0 < lam) (heq : ((univ.powerset.filter (fun A => lam ≤ ∑ i ∈ A, x i)).card : ℝ) = (2 : ℝ) ^ ((n : ℤ) - 3) / lam ^ 2) : equality_cases x lam := by …Mentions: Usa2012P6.equality_cases
- lemma
Usa2012P6.card_eq_of_equality_caseBackward direction of the equality case: ifxis a permutation of(1 / √2, -1 / √2, 0, ..., 0)andλ = 1 / √2, then equality holds line 457 sourceSource documentation
Backward direction of the equality case: if
xis a permutation of(1 / √2, -1 / √2, 0, ..., 0)andλ = 1 / √2, then equality holds.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,Ne,Eq,HDiv.hDiv,Real.sqrt,Neg.neg,Finset.card,Finset,Finset.filter,Finset.sum,Finset.powerset,Finset.univ,HPow.hPow,Int,HSub.hSubProof uses:
rfl,LT.lt,Eq.mpr,id,congrArg,Iff.mpr,one_div_pos,Real.sqrt_pos,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_zero,Eq.refl,Mathlib.Meta.NormNum.instAtLeastTwo,Bool,Bool.false,div_pow,Real.sq_sqrt,Mathlib.Meta.NormNum.isNat_le_true,Bool.true,Mathlib.Tactic.Ring.of_eqand 129 more158 instances, coercions and auxiliary constants left out.
Tactic trace: 103 steps
Open to load the checked before-and-after goal states.
lemma card_eq_of_equality_case {n : ℕ} (hn : 2 ≤ n) (x : Fin n → ℝ) (lam : ℝ) (i j : Fin n) (hij : i ≠ j) (hxi : x i = 1 / Real.sqrt 2) (hxj : x j = -(1 / Real.sqrt 2)) (hrest : ∀ k : Fin n, k ≠ i → k ≠ j → x k = 0) (hlam : lam = 1 / Real.sqrt 2) : ((univ.powerset.filter (fun A => lam ≤ ∑ i ∈ A, x i)).card : ℝ) = (2 : ℝ) ^ ((n : ℤ) - 3) / lam ^ 2 := by … - problem
Usa2012P6.usa2012_p6line 557 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,Eq,Finset.sum,Finset.univ,HPow.hPow,LT.lt,Finset.card,Finset,Finset.filter,Finset.powerset,HDiv.hDiv,Int,HSub.hSubProof uses:
Eq.mpr,id,congrArg,rfl,Membership.mem,And,propext,Finset.mem_filter,And.intro,And.left,Eq.mp,lt_of_lt_of_le,And.right,HMul.hMul,HSMul.hSMul,Finset.sum_const,nsmul_eq_mul,Eq.refl,Finset.sum_le_sum,pow_le_pow_left₀and 66 more140 instances, coercions and auxiliary constants left out.
Tactic trace: 22 steps
Open to load the checked before-and-after goal states.
- problem
Usa2012P6.usa2012_p6_equality_casesline 586 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,Eq,Finset.sum,Finset.univ,HPow.hPow,LT.lt,Iff,Finset.card,Finset,Finset.filter,Finset.powerset,HDiv.hDiv,Int,HSub.hSub, Usa2012P6.equality_casesProof uses:
Iff.intro, Usa2012P6.equality_case_of_card_eq,Exists,And,Ne,Real.sqrt,Neg.neg, Usa2012P6.card_eq_of_equality_case62 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.