Compfiles/Imo2004P4.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
5 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2004, Problem 4
Let n ≥ 3 be an integer. Let t₁, t₂, ..., tₙ be positive real numbers such that
n² + 1 > (t₁ + t₂ + ⋯ + tₙ) (1/t₁ + 1/t₂ + ⋯ + 1/tₙ).
Show that tᵢ, tⱼ, tₖ are the side lengths of a triangle for all i, j, k with 1 ≤ i < j < k ≤ n.
Imports (2)
Imported by 1 file
- lemma
Imo2004P4.dist2line 33 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq,Dist.dist,WithLp,OfNat.ofNat,ENNReal,Nat,Fin,WithLp.toLp,Matrix.vecCons,Matrix.vecEmpty,Real.sqrt,HAdd.hAdd,HPow.hPow,HSub.hSubProof uses:
Eq.mpr,Finset.sum,Finset.univ,WithLp.ofLp,id,congrArg,EuclideanSpace,EuclideanSpace.dist_eq,Fin.sum_univ_two,of_eq_true,Eq.trans,True,congrFun',congr,sq_abs,eq_self56 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2004P4.exists_triangleIfa,b,csatisfy the strict triangle inequalities, then there is an (automatically nondegenerate) triangle in the plane with those side lengths line 41 sourceSource documentation
If
a,b,csatisfy the strict triangle inequalities, then there is an (automatically nondegenerate) triangle in the plane with those side lengths.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LT.lt,OfNat.ofNat,HAdd.hAdd,Exists,Affine.Triangle,EuclideanSpace,Fin,Nat,ENNReal,And,Eq,Dist.dist,Affine.Simplex.pointsProof uses:
HDiv.hDiv,HSub.hSub,HPow.hPow,HMul.hMul,rfl,Eq.mpr,id,congrArg,of_eq_true,Eq.trans,inferInstance,GroupWithZero,CommGroupWithZero,True,Mathlib.Tactic.FieldSimp.eq_eq_cancel_eq,Mathlib.Tactic.FieldSimp.NF.eval,List.nil,Prod,Int,Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_muland 177 more190 instances, coercions and auxiliary constants left out.
Tactic trace: 58 steps
Open to load the checked before-and-after goal states.
lemma exists_triangle {a b c : ℝ} (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) (hab : c < a + b) (hbc : a < b + c) (hca : b < c + a) : ∃ T : Affine.Triangle ℝ (EuclideanSpace ℝ (Fin 2)), dist (T.points 0) (T.points 1) = a ∧ dist (T.points 1) (T.points 2) = b ∧ dist (T.points 2) (T.points 0) = c := by … - lemma
Imo2004P4.card_sq_leCauchy–Schwarz / AM–HM: for positive reals indexed by a finsets,(card s)² ≤ (∑ tᵢ)(∑ 1/tᵢ)line 96 sourceSource documentation
Cauchy–Schwarz / AM–HM: for positive reals indexed by a finset
s,(card s)² ≤ (∑ tᵢ)(∑ 1/tᵢ).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,Real,Membership.mem,LT.lt,OfNat.ofNat,LE.le,HPow.hPow,Finset.card,HMul.hMul,Finset.sum,HDiv.hDivProof uses:
Finset.sum_sq_le_sum_mul_sum_of_sq_le_mul,LT.lt.le,le_of_lt,div_pos,Mathlib.Meta.Positivity.pos_of_isNat,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_one,Eq.refl,Bool,Nat.ble,Eq.mpr,id,Eq,congrArg,one_pow,mul_one_div,div_self,LT.lt.ne',le_refl,Inv.invand 10 more106 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma card_sq_le {n : ℕ} (s : Finset (Fin n)) (t : Fin n → ℝ) (ht : ∀ i ∈ s, 0 < t i) : (s.card : ℝ)^2 ≤ (∑ i ∈ s, t i) * (∑ i ∈ s, 1 / t i) := by … - lemma
Imo2004P4.keyThe heart of the problem: any three of the values satisfy the triangle inequality line 105 sourceSource documentation
The heart of the problem: any three of the values satisfy the triangle inequality.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,LT.lt,HMul.hMul,Finset.sum,Finset.univ,HDiv.hDiv,HAdd.hAdd,HPow.hPow,NeProof uses:
Decidable.byContradiction,Not,Finset,Insert.insert,Singleton.singleton,Eq,rfl,Finset.card,Iff.mpr,Exists,And,Finset.card_eq_three,Exists.intro,And.intro,Compl.compl,Eq.symm,Finset.sum_add_sum_compl,Eq.mpr,id,congrArgand 186 more171 instances, coercions and auxiliary constants left out.
Tactic trace: 84 steps
Open to load the checked before-and-after goal states.
lemma key {n : ℕ} (hn : 3 ≤ n) (t : Fin n → ℝ) (ht : ∀ i, 0 < t i) (hsum : (∑ i, t i) * (∑ i, 1 / t i) < n ^ 2 + 1) (p q r : Fin n) (hpq : p ≠ q) (hpr : p ≠ r) (hqr : q ≠ r) : t p < t q + t r := by … - problem
Imo2004P4.imo2004_p4line 190 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Real,LT.lt,HMul.hMul,Finset.sum,Finset.univ,HDiv.hDiv,HAdd.hAdd,HPow.hPow,Exists,Affine.Triangle,EuclideanSpace,ENNReal,And,Eq,Dist.dist,Affine.Simplex.pointsProof uses:
lt_trans, Imo2004P4.key,LT.lt.ne',LT.lt.ne, Imo2004P4.exists_triangle79 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.