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

4 declarations, 0 contain sorry, 0 declared as axioms

USA Mathematical Olympiad 1994, Problem 1

a₁, a₂, a₃, ... are positive integers such that aₙ > aₙ₋₁ + 1. Put bₙ = a₁ + a₂ + ... + aₙ. Show that there is always a square in the range bₙ, bₙ+1, bₙ+2, ... , bₙ₊₁-1.

Imports (10)
Imported by 1 file
  1. lemma Usa1994P1.gap_lemma If consecutive terms of a differ by more than one, then terms that are k indices apart differ by at least 2 * k line 38 source

    Source documentation

    If consecutive terms of a differ by more than one, then terms that are k indices apart differ by at least 2 * k.

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

    Statement uses: Nat, LT.lt, HAdd.hAdd, OfNat.ofNat, LE.le, HMul.hMul

    Proof uses: Nat.recAux, of_eq_true, Eq.trans, True, congr, congrArg, MulZeroClass.mul_zero, add_zero, Trans.trans, Eq, Mathlib.Tactic.Ring.of_eq, Nat.rawCast, HPow.hPow, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.Common.atom_pf, rfl, Eq.mpr, id, Eq.symm, Eq.refl and 17 more

    40 instances, coercions and auxiliary constants left out.

    Tactic trace: 7 steps

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

    lemma gap_lemma {a : ℕ → ℕ} (h : ∀ i, a i + 1 < a (i + 1)) (i k : ℕ) :
        a i + 2 * k ≤ a (i + k) := by
    …

    Mentions: h

  2. lemma Usa1994P1.sum_bound The sum of the first n + 1 terms is at most (n + 1) * (a n + 1) - (n + 1)^2; we state it in an addition-only form line 51 source

    Source documentation

    The sum of the first n + 1 terms is at most (n + 1) * (a n + 1) - (n + 1)^2; we state it in an addition-only form.

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

    Statement uses: Nat, LT.lt, HAdd.hAdd, OfNat.ofNat, LE.le, Finset.sum, Finset.range, HMul.hMul

    Proof uses: Nat.recAux, of_eq_true, Eq.trans, True, congr, congrArg, Singleton.singleton, Finset, congrFun', zero_add, Finset.sum_singleton, mul_one, one_mul, mul_le_mul_right, Usa1994P1.gap_lemma, Eq.mpr, id, Eq, Finset.sum_range_succ, le_of_not_gt and 64 more

    93 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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

    lemma sum_bound {a : ℕ → ℕ} (h : ∀ i, a i + 1 < a (i + 1)) (n : ℕ) :
        (∑ i ∈ Finset.range (n + 1), a i) + (n + 1) * (n + 1) ≤
          (n + 1) * (a n + 1) := by
    …

    Mentions: h

  3. lemma Usa1994P1.key The key estimate: 4 * bₙ ≤ (aₙ + 1)² line 63 source

    Source documentation

    The key estimate: 4 * bₙ ≤ (aₙ + 1)².

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

    Statement uses: Nat, LT.lt, HAdd.hAdd, OfNat.ofNat, LE.le, HMul.hMul, Finset.sum, Finset.range, HPow.hPow

    Proof uses: Usa1994P1.sum_bound, Eq.mpr, Int, id, Eq, Eq.trans, congr, congrArg, Nat.cast_mul, Nat.cast_sum, Nat.cast_pow, congrFun', Nat.cast_add, Nat.cast_one, le_of_not_gt, Mathlib.Tactic.Linarith.lt_irrefl, Eq.mp, Neg.neg, HSub.hSub, Mathlib.Tactic.Ring.of_eq and 68 more

    97 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

    lemma key {a : ℕ → ℕ} (h : ∀ i, a i + 1 < a (i + 1)) (n : ℕ) :
        4 * (∑ i ∈ Finset.range (n + 1), a i) ≤ (a n + 1) ^ 2 := by
    …

    Mentions: h

  4. problem Usa1994P1.usa1994_p1 line 71 source

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, HAdd.hAdd, LE.le, Exists, And, Finset.sum, Finset.range, HPow.hPow

    Proof uses: Eq, Exists.intro, HSub.hSub, Nat.sqrt, rfl, Nat.sqrt_le', Or, eq_or_lt_of_le, And.intro, le_of_eq, Eq.symm, Eq.mpr, id, congrArg, Finset.sum_range_succ, Nat.lt_add_of_pos_right, Nat.lt_succ_sqrt', le_of_lt, HMul.hMul, le_trans and 96 more

    104 instances, coercions and auxiliary constants left out.

    Tactic trace: 21 steps

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