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

16 declarations, 0 contain sorry, 0 declared as axioms

USA Mathematical Olympiad 2002, Problem 5

Let a, b be integers greater than 2. Prove that there exists a positive integer k and a finite sequence n₁, n₂, ..., nₖ of positive integers such that n₁ = a, nₖ = b, and nᵢ + nᵢ₊₁ divides nᵢnᵢ₊₁ for each i (1 ≤ i < k).

Imports (8)
Imported by 1 file
  1. inductive Usa2002P5.Linked Linked a b means that a can be connected to b by a finite chain of positive integers in which any two consecutive terms x, y satisfy x + y ∣ x * y line 53 source

    Source documentation

    Linked a b means that a can be connected to b by a finite chain of positive integers in which any two consecutive terms x, y satisfy x + y ∣ x * y.

    no axioms what this means

    Statement uses: Int

    inductive Linked : ℤ → ℤ → Prop where
    …
  2. theorem Usa2002P5.Linked.pos_left line 62 source

    no axioms what this means

    Statement uses: Int, Usa2002P5.Linked, LT.lt, OfNat.ofNat

    Proof uses: Usa2002P5.Linked.rec, Dvd.dvd, HAdd.hAdd, HMul.hMul

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  3. theorem Usa2002P5.Linked.pos_right line 67 source

    no axioms what this means

    Statement uses: Int, Usa2002P5.Linked, LT.lt, OfNat.ofNat

    Proof uses: Usa2002P5.Linked.rec, Dvd.dvd, HAdd.hAdd, HMul.hMul

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  4. theorem Usa2002P5.Linked.trans line 73 source

    no axioms what this means

    Statement uses: Int, Usa2002P5.Linked

    Proof uses: Usa2002P5.Linked.rec, LT.lt, OfNat.ofNat, id, Dvd.dvd, HAdd.hAdd, HMul.hMul, Usa2002P5.Linked.snoc

    7 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

  5. instance Usa2002P5.Linked.(instance at line 79) line 79 source
  6. theorem Usa2002P5.Linked.symm line 81 source

    standard axioms: propext what this means

    Statement uses: Int, Usa2002P5.Linked

    Proof uses: Usa2002P5.Linked.rec, LT.lt, OfNat.ofNat, Usa2002P5.Linked.refl, Dvd.dvd, HAdd.hAdd, HMul.hMul, Usa2002P5.Linked.trans, Usa2002P5.Linked.snoc, Usa2002P5.Linked.pos_right, Eq.mpr, id, Eq, congrArg, add_comm, mul_comm

    16 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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

  7. theorem Usa2002P5.link_pred_mul Basic link: t ~ t * (t - 1) for 1 < t, as t + t * (t - 1) = t ^ 2 line 91 source

    Source documentation

    Basic link: t ~ t * (t - 1) for 1 < t, as t + t * (t - 1) = t ^ 2.

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Usa2002P5.Linked, HMul.hMul, HSub.hSub

    Proof uses: mul_pos, Usa2002P5.Linked.snoc, Usa2002P5.Linked.refl, Exists.intro, Eq, HAdd.hAdd, Mathlib.Tactic.Ring.of_eq, HPow.hPow, Nat, Nat.rawCast, Int.rawCast, inferInstance, Ring, Int.negOfNat, Mathlib.Tactic.Ring.Common.mul_congr, Mathlib.Tactic.Ring.Common.atom_pf, rfl, Eq.mpr, id, congrArg and 34 more

    49 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

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

    theorem link_pred_mul {t : ℤ} (ht : 1 < t) : Linked t (t * (t - 1)) := by
    …

    Mentions: Usa2002P5.Linked

  8. theorem Usa2002P5.link_two_mul_pred Basic link: 2 * t ~ t * (t - 2) for 2 < t, as 2 * t + t * (t - 2) = t ^ 2 line 97 source

    Source documentation

    Basic link: 2 * t ~ t * (t - 2) for 2 < t, as 2 * t + t * (t - 2) = t ^ 2.

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Usa2002P5.Linked, HMul.hMul, HSub.hSub

    Proof uses: mul_pos, Usa2002P5.Linked.snoc, Usa2002P5.Linked.refl, Exists.intro, Eq, HAdd.hAdd, Mathlib.Tactic.Ring.of_eq, HPow.hPow, Nat, Nat.rawCast, Int.rawCast, inferInstance, Ring, Int.negOfNat, Mathlib.Tactic.Ring.Common.mul_congr, Mathlib.Tactic.Ring.cast_pos, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Mathlib.Tactic.Ring.Common.atom_pf, rfl and 35 more

    50 instances, coercions and auxiliary constants left out.

    Tactic trace: 7 steps

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

    theorem link_two_mul_pred {t : ℤ} (ht : 2 < t) : Linked (2 * t) (t * (t - 2)) := by
    …

    Mentions: Usa2002P5.Linked

  9. theorem Usa2002P5.link_mul_left Scaling: a ~ b implies m * a ~ m * b for 0 < m line 103 source

    Source documentation

    Scaling: a ~ b implies m * a ~ m * b for 0 < m.

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Usa2002P5.Linked, HMul.hMul

    Proof uses: Usa2002P5.Linked.rec, Usa2002P5.Linked.refl, mul_pos, Dvd.dvd, HAdd.hAdd, Usa2002P5.Linked.snoc, Eq, Exists.intro, Mathlib.Tactic.LinearCombination.eq_of_eq, Mathlib.Tactic.LinearCombination.mul_const_eq, Mathlib.Tactic.LinearCombination.eq_rearrange, Mathlib.Tactic.Ring.of_eq, HSub.hSub, Mathlib.Tactic.Ring.Common.sub_congr, HPow.hPow, Nat, Nat.rawCast, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.Common.mul_congr, Mathlib.Tactic.Ring.Common.atom_pf and 41 more

    66 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

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

    theorem link_mul_left {m : ℤ} (hm : 0 < m) {a b : ℤ} (h : Linked a b) :
        Linked (m * a) (m * b) := by
    …

    Mentions: h, Usa2002P5.Linked

  10. theorem Usa2002P5.link_two_mul Doubling: every 2 < t links to 2 * t line 113 source

    Source documentation

    Doubling: every 2 < t links to 2 * t.

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Usa2002P5.Linked, HMul.hMul

    Proof uses: HSub.hSub, Usa2002P5.link_pred_mul, Trans.trans, Eq, rfl, Usa2002P5.link_mul_left, Eq.mp, HAdd.hAdd, congrArg, Eq.symm, mul_assoc, Int.sub_sub, Usa2002P5.Linked.symm, Iff.mpr, Int.sub_pos, Int.mul_comm, mul_comm, Usa2002P5.link_two_mul_pred

    25 instances, coercions and auxiliary constants left out.

    Tactic trace: 9 steps

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

    theorem link_two_mul {t : ℤ} (ht : 2 < t) : Linked t (2 * t) := by
    …

    Mentions: Usa2002P5.Linked

  11. theorem Usa2002P5.link_pred Reduction: every 3 < t links to t - 1 line 127 source

    Source documentation

    Reduction: every 3 < t links to t - 1.

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Usa2002P5.Linked, HSub.hSub

    Proof uses: HMul.hMul, Usa2002P5.link_pred_mul, Eq.mp, congrArg, Eq, Mathlib.Tactic.Ring.of_eq, HAdd.hAdd, Int.rawCast, inferInstance, Ring, Int.negOfNat, HPow.hPow, Nat, Nat.rawCast, Mathlib.Tactic.Ring.Common.sub_congr, Mathlib.Tactic.Ring.Common.atom_pf, rfl, Eq.mpr, id, Eq.symm and 43 more

    58 instances, coercions and auxiliary constants left out.

    Tactic trace: 30 steps

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

    theorem link_pred {t : ℤ} (ht : 3 < t) : Linked t (t - 1) := by
    …

    Mentions: Usa2002P5.Linked

  12. theorem Usa2002P5.linked_to_three Every integer ≥ 3 links to 3 line 156 source

    Source documentation

    Every integer ≥ 3 links to 3.

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

    Statement uses: Nat, Int, Eq, HAdd.hAdd, OfNat.ofNat, Usa2002P5.Linked

    Proof uses: Nat.recAux, Usa2002P5.Linked.refl, Mathlib.Meta.NormNum.isNat_lt_true, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Mathlib.Meta.NormNum.isNat_add, Mathlib.Meta.NormNum.isNat_natCast, Bool, Bool.false, Eq.symm, Usa2002P5.Linked.trans, HSub.hSub, Usa2002P5.link_pred

    31 instances, coercions and auxiliary constants left out.

    Tactic trace: 9 steps

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

    theorem linked_to_three : ∀ n : ℕ, ∀ t : ℤ, t = n + 3 → Linked t 3 := by
    …

    Mentions: Usa2002P5.Linked

  13. theorem Usa2002P5.linked_of_two_lt line 166 source

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Usa2002P5.Linked

    Proof uses: Usa2002P5.linked_to_three, Int.toNat, HSub.hSub, Eq, Int.toNat_of_nonneg

    10 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

  14. theorem Usa2002P5.linked_any Any two integers greater than 2 are linked (via 3) line 172 source

    Source documentation

    Any two integers greater than 2 are linked (via 3).

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Usa2002P5.Linked

    Proof uses: Usa2002P5.Linked.trans, Usa2002P5.linked_of_two_lt, Usa2002P5.Linked.symm

    4 instances, coercions and auxiliary constants left out.

    theorem linked_any {a b : ℤ} (ha : 2 < a) (hb : 2 < b) : Linked a b :=
    …

    Mentions: Usa2002P5.Linked

  15. theorem Usa2002P5.exists_seq_of_linked Unfold Linked into an explicit sequence line 176 source

    Source documentation

    Unfold Linked into an explicit sequence.

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

    Statement uses: Int, Usa2002P5.Linked, Exists, Nat, And, Eq, OfNat.ofNat, LE.le, LT.lt, Dvd.dvd, HAdd.hAdd, HMul.hMul

    Proof uses: Usa2002P5.Linked.rec, Exists.intro, And.intro, rfl, Nat.eq_zero_of_le_zero, Eq.symm, absurd, Nat.not_lt_zero, Function.update, Eq.mpr, id, congrArg, Function.update_of_ne, Function.update_self, Eq.refl, dite, Not

    33 instances, coercions and auxiliary constants left out.

    Tactic trace: 40 steps

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

    theorem exists_seq_of_linked {a b : ℤ} (h : Linked a b) :
        ∃ k : ℕ, ∃ n : ℕ → ℤ, n 0 = a ∧ n k = b ∧
          (∀ i, i ≤ k → 0 < n i) ∧ ∀ i, i < k → n i + n (i + 1) ∣ n i * n (i + 1) := by
    …

    Mentions: h, Usa2002P5.Linked

  16. problem Usa2002P5.usa2002_p5 line 208 source

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

    Statement uses: Int, LT.lt, OfNat.ofNat, Exists, Nat, And, Eq, LE.le, Dvd.dvd, HAdd.hAdd, HMul.hMul

    Proof uses: Usa2002P5.exists_seq_of_linked, Usa2002P5.linked_any

    13 instances, coercions and auxiliary constants left out.