Compfiles/Usa2012P6.lean

GitHub source file

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
  1. determine Usa2012P6.equality_cases Equality holds iff x is a permutation of (1 / √2, -1 / √2, 0, ..., 0) and λ = 1 / √2 line 38 source

    Source documentation

    Equality holds iff x is 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, Real

    Proof uses: Exists, And, Ne, Eq, HDiv.hDiv, OfNat.ofNat, Real.sqrt, Neg.neg

    11 instances, coercions and auxiliary constants left out.

    determine equality_cases {n : ℕ} (x : Fin n → ℝ) (lam : ℝ) : Prop :=
    …
  2. lemma Usa2012P6.card_powerset_filter_subset The number of subsets of s containing a fixed sub-finset t is 2 ^ (s.card - t.card) line 46 source

    Source documentation

    The number of subsets of s containing a fixed sub-finset t is 2 ^ (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.hSub

    Proof 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_filter and 17 more

    29 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
    …
  3. lemma Usa2012P6.two_pow_sub Bridge between natural-number powers 2 ^ (n - k) and integer powers (2 : ℝ) ^ ((n : ℤ) - k) line 75 source

    Source 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, Int

    Proof uses: Eq.mpr, id, congrArg, Nat.cast_sub, Eq.refl, zpow_natCast, Eq.trans

    57 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
    …
  4. lemma Usa2012P6.sum_subsetSum_sq Master identity: the sum of S_A ^ 2 over all subsets A equals 2 ^ (n - 2) line 83 source

    Source documentation

    Master identity: the sum of S_A ^ 2 over all subsets A equals 2 ^ (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.hSub

    Proof 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, rfl and 123 more

    158 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
    …
  5. lemma Usa2012P6.sum_pos_subsetSum_sq Pairing each subset with its complement: the sum of S_A ^ 2 over the subsets with positive sum equals 2 ^ (n - 3) line 184 source

    Source documentation

    Pairing each subset with its complement: the sum of S_A ^ 2 over the subsets with positive sum equals 2 ^ (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.hSub

    Proof 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 more

    163 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
    …
  6. lemma Usa2012P6.subsetSum_eq_of_card_eq Forward direction of the equality case: if equality holds, then every positive subset sum equals λ line 266 source

    Source 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.hSub

    Proof 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_const and 75 more

    168 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
    …
  7. lemma Usa2012P6.equality_case_of_card_eq Forward direction of the equality case: if equality holds, then x is a permutation of (1 / √2, -1 / √2, 0, ..., 0) and λ = 1 / √2 line 335 source

    Source documentation

    Forward direction of the equality case: if equality holds, then x is 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_cases

    Proof 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_singleton and 152 more

    184 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

  8. lemma Usa2012P6.card_eq_of_equality_case Backward direction of the equality case: if x is a permutation of (1 / √2, -1 / √2, 0, ..., 0) and λ = 1 / √2, then equality holds line 457 source

    Source documentation

    Backward direction of the equality case: if x is 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.hSub

    Proof 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_eq and 129 more

    158 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
    …
  9. problem Usa2012P6.usa2012_p6 line 557 source

    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

    Proof 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 more

    140 instances, coercions and auxiliary constants left out.

    Tactic trace: 22 steps

    Open to load the checked before-and-after goal states.

  10. problem Usa2012P6.usa2012_p6_equality_cases line 586 source

    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, Iff, Finset.card, Finset, Finset.filter, Finset.powerset, HDiv.hDiv, Int, HSub.hSub, Usa2012P6.equality_cases

    Proof uses: Iff.intro, Usa2012P6.equality_case_of_card_eq, Exists, And, Ne, Real.sqrt, Neg.neg, Usa2012P6.card_eq_of_equality_case

    62 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

    Open to load the checked before-and-after goal states.