Compfiles/Usa1991P2.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

7 declarations, 0 contain sorry, 0 declared as axioms

USA Mathematical Olympiad 1991, Problem 2

For each non-empty subset of {1, 2, ... , n} take the sum of the elements divided by the product. Show that the sum of the resulting quantities is n² + 2n - (n + 1)sₙ, where sₙ = 1 + 1/2 + 1/3 + ... + 1/n.

Imports (11)
Imported by 1 file
  1. lemma Usa1991P2.icc_one_succ {1, ..., n+1} is {1, ..., n} with n + 1 adjoined line 40 source

    Source documentation

    {1, ..., n+1} is {1, ..., n} with n + 1 adjoined.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Finset, Finset.Icc, OfNat.ofNat, HAdd.hAdd, Insert.insert

    Proof uses: Finset.ext, Eq.mpr, Iff, Membership.mem, And, LE.le, Or, id, congr, congrArg, Eq.trans

    20 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

    lemma icc_one_succ (n : ℕ) : Icc 1 (n + 1) = insert (n + 1) (Icc 1 n) := by
    …
  2. lemma Usa1991P2.not_mem_icc_one line 45 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Not, Membership.mem, Finset, Finset.Icc, OfNat.ofNat, HAdd.hAdd

    Proof uses: Eq.mpr, And, LE.le, id, Eq, congrArg

    17 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  3. lemma Usa1991P2.sum_div_prod_insert Splitting the quantity attached to insert (n + 1) T for T ⊆ {1, ..., n}: the sum of the elements increases by n + 1 while the product is multiplied by n + 1 line 52 source

    Source documentation

    Splitting the quantity attached to insert (n + 1) T for T ⊆ {1, ..., n}: the sum of the elements increases by n + 1 while the product is multiplied by n + 1.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Finset, LE.le, Finset.Icc, OfNat.ofNat, Eq, Rat, HDiv.hDiv, Finset.sum, Insert.insert, HAdd.hAdd, Finset.prod, HMul.hMul

    Proof uses: Not, Membership.mem, Usa1991P2.not_mem_icc_one, LT.lt, Finset.prod_pos, cast, Eq.symm, Eq.trans, congrFun', congrArg, Nat.cast_zero, And.left, Eq.mp, And, Ne, LT.lt.ne', ne_of_gt, Right.add_pos_of_nonneg_of_pos, Nat.cast_nonneg', Mathlib.Meta.Positivity.pos_of_isNat and 59 more

    122 instances, coercions and auxiliary constants left out.

    Tactic trace: 12 steps

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

    lemma sum_div_prod_insert (n : ℕ) {T : Finset ℕ} (hT : T ⊆ Icc 1 n) :
        (∑ i ∈ insert (n + 1) T, (i : ℚ)) / (∏ i ∈ insert (n + 1) T, (i : ℚ)) =
          (1 / (n + 1 : ℚ)) * ((∑ i ∈ T, (i : ℚ)) / (∏ i ∈ T, (i : ℚ))) +
            1 / (∏ i ∈ T, (i : ℚ)) := by
    …
  4. lemma Usa1991P2.prod_one_add_inv The telescoping product ∏ (1 + 1/i) = n + 1 line 70 source

    Source documentation

    The telescoping product ∏ (1 + 1/i) = n + 1.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Rat, Finset.prod, Finset.Icc, OfNat.ofNat, HAdd.hAdd, Inv.inv

    Proof uses: Nat.recAux, of_eq_true, Eq.trans, True, congr, congrArg, Finset.prod_congr, EmptyCollection.emptyCollection, Finset, Finset.Icc_eq_empty_of_lt, LT.lt, eq_self, Membership.mem, Eq.refl, congrFun', CharP.cast_eq_zero, zero_add, Eq.mpr, HMul.hMul, id and 57 more

    104 instances, coercions and auxiliary constants left out.

    Tactic trace: 8 steps

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

    lemma prod_one_add_inv (n : ℕ) : ∏ i ∈ Icc 1 n, (1 + ((i : ℚ))⁻¹) = (n + 1 : ℚ) := by
    …
  5. lemma Usa1991P2.sum_powerset_one_div_prod The sum of 1 / ∏ over all subsets of {1, ..., n} (the empty set contributes 1) telescopes to n + 1 line 81 source

    Source documentation

    The sum of 1 / ∏ over all subsets of {1, ..., n} (the empty set contributes 1) telescopes to n + 1.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Rat, Finset.sum, Finset, Finset.powerset, Finset.Icc, OfNat.ofNat, HDiv.hDiv, Finset.prod, HAdd.hAdd

    Proof uses: Inv.inv, Finset.sum_congr, rfl, Membership.mem, Eq.mpr, id, congrArg, one_div, Eq.symm, Finset.prod_inv_distrib, Eq.refl, Finset.prod_one_add, Usa1991P2.prod_one_add_inv

    53 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

    lemma sum_powerset_one_div_prod (n : ℕ) :
        ∑ T ∈ (Icc 1 n).powerset, (1 : ℚ) / (∏ i ∈ T, (i : ℚ)) = (n + 1 : ℚ) := by
    …
  6. lemma Usa1991P2.main_sum_succ Induction step for the main sum: a subset of {1, ..., n+1} either is a subset of {1, ..., n} or has the form insert (n+1) T with T ⊆ {1, ..., n} line 91 source

    Source documentation

    Induction step for the main sum: a subset of {1, ..., n+1} either is a subset of {1, ..., n} or has the form insert (n+1) T with T ⊆ {1, ..., n}.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Rat, Finset.sum, Finset, Finset.powerset, Finset.Icc, OfNat.ofNat, HAdd.hAdd, HDiv.hDiv, Finset.prod, HMul.hMul

    Proof uses: Insert.insert, Membership.mem, Usa1991P2.sum_div_prod_insert, Eq.mp, LE.le, congrArg, propext, Finset.mem_powerset, Eq.mpr, id, Finset.sum_congr, rfl, Finset.sum_add_distrib, Eq.symm, Finset.mul_sum, Usa1991P2.sum_powerset_one_div_prod, Eq.refl, Usa1991P2.icc_one_succ, Finset.sum_powerset_insert, Usa1991P2.not_mem_icc_one

    49 instances, coercions and auxiliary constants left out.

    Tactic trace: 7 steps

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

    lemma main_sum_succ (n : ℕ) :
        ∑ S ∈ (Icc 1 (n + 1)).powerset, (∑ i ∈ S, (i : ℚ)) / (∏ i ∈ S, (i : ℚ)) =
          (∑ S ∈ (Icc 1 n).powerset, (∑ i ∈ S, (i : ℚ)) / (∏ i ∈ S, (i : ℚ))) +
            ((1 / (n + 1 : ℚ)) *
                (∑ S ∈ (Icc 1 n).powerset, (∑ i ∈ S, (i : ℚ)) / (∏ i ∈ S, (i : ℚ))) +
              (n + 1 : ℚ)) := by
    …

    Mentions: S

  7. problem Usa1991P2.usa1991_p2 line 114 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Rat, Finset.sum, Finset, Finset.erase, Finset.powerset, Finset.Icc, OfNat.ofNat, EmptyCollection.emptyCollection, HDiv.hDiv, Finset.prod, HSub.hSub, HAdd.hAdd, HPow.hPow, HMul.hMul

    Proof uses: Finset.sum_erase, of_eq_true, Eq.trans, True, congrFun', congrArg, div_one, eq_self, Eq.mpr, id, Nat.recAux, congr, Singleton.singleton, Finset.Icc_eq_empty_of_lt, LT.lt, Finset.sum_singleton, CharP.cast_eq_zero, zero_pow, Not, False and 117 more

    151 instances, coercions and auxiliary constants left out.

    Tactic trace: 16 steps

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