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

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
  1. lemma Imo2004P4.dist2 line 33 source

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

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

    56 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  2. lemma Imo2004P4.exists_triangle If a, b, c satisfy the strict triangle inequalities, then there is an (automatically nondegenerate) triangle in the plane with those side lengths line 41 source

    Source documentation

    If a, b, c satisfy 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.points

    Proof 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_mul and 177 more

    190 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
    …
  3. lemma Imo2004P4.card_sq_le Cauchy–Schwarz / AM–HM: for positive reals indexed by a finset s, (card s)² ≤ (∑ tᵢ)(∑ 1/tᵢ) line 96 source

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

    Proof 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.inv and 10 more

    106 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
    …
  4. lemma Imo2004P4.key The heart of the problem: any three of the values satisfy the triangle inequality line 105 source

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

    Proof 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, congrArg and 186 more

    171 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
    …
  5. problem Imo2004P4.imo2004_p4 line 190 source

    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, Exists, Affine.Triangle, EuclideanSpace, ENNReal, And, Eq, Dist.dist, Affine.Simplex.points

    Proof uses: lt_trans, Imo2004P4.key, LT.lt.ne', LT.lt.ne, Imo2004P4.exists_triangle

    79 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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