Compfiles/Usa1991P2.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
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)
- Mathlib.Algebra.BigOperators.Group.Finset.Powerset
- Mathlib.Algebra.BigOperators.Intervals
- Mathlib.Algebra.BigOperators.Ring.Finset
- Mathlib.Algebra.CharP.Defs
- Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset
- Mathlib.Algebra.Order.Ring.Star
- Mathlib.Data.Rat.Star
- Mathlib.Tactic.FieldSimp
- Mathlib.Tactic.Positivity.Basic
- Mathlib.Tactic.Ring
- ProblemExtraction
Imported by 1 file
- lemma
Usa1991P2.icc_one_succ{1, ..., n+1}is{1, ..., n}withn + 1adjoined line 40 sourceSource documentation
{1, ..., n+1}is{1, ..., n}withn + 1adjoined.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Finset,Finset.Icc,OfNat.ofNat,HAdd.hAdd,Insert.insertProof uses:
Finset.ext,Eq.mpr,Iff,Membership.mem,And,LE.le,Or,id,congr,congrArg,Eq.trans20 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 …
- lemma
Usa1991P2.not_mem_icc_oneline 45 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Not,Membership.mem,Finset,Finset.Icc,OfNat.ofNat,HAdd.hAddProof uses:
Eq.mpr,And,LE.le,id,Eq,congrArg17 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1991P2.sum_div_prod_insertSplitting the quantity attached toinsert (n + 1) TforT ⊆ {1, ..., n}: the sum of the elements increases byn + 1while the product is multiplied byn + 1line 52 sourceSource documentation
Splitting the quantity attached to
insert (n + 1) TforT ⊆ {1, ..., n}: the sum of the elements increases byn + 1while the product is multiplied byn + 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.hMulProof 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_isNatand 59 more122 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 … - lemma
Usa1991P2.prod_one_add_invThe telescoping product∏ (1 + 1/i) = n + 1line 70 sourceSource 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.invProof 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,idand 57 more104 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 …
- lemma
Usa1991P2.sum_powerset_one_div_prodThe sum of1 / ∏over all subsets of{1, ..., n}(the empty set contributes1) telescopes ton + 1line 81 sourceSource documentation
The sum of
1 / ∏over all subsets of{1, ..., n}(the empty set contributes1) telescopes ton + 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.hAddProof 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_inv53 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 … - lemma
Usa1991P2.main_sum_succInduction step for the main sum: a subset of{1, ..., n+1}either is a subset of{1, ..., n}or has the forminsert (n+1) TwithT ⊆ {1, ..., n}line 91 sourceSource documentation
Induction step for the main sum: a subset of
{1, ..., n+1}either is a subset of{1, ..., n}or has the forminsert (n+1) TwithT ⊆ {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.hMulProof 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_one49 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
- problem
Usa1991P2.usa1991_p2line 114 sourcestandard 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.hMulProof 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,Falseand 117 more151 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.