lean-golf Lean 4 proof leaderboard

USA2002 P5

open: first valid proof sets the record

Compfiles · Usa · Apache-2.0
Copyright (c) 2026 The Compfiles Contributors. All rights reserved. Authors: Kimi K3

Statement

import Mathlib.Algebra.Order.Ring.Star
import Mathlib
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Tactic.LinearCombination
import Mathlib.Tactic.NormNum.Ineq
import Mathlib.Tactic.Ring
theorem _root_.LeanGolf.compfiles.usa2002_p5 (a b : ℤ) (ha : 2 < a) (hb : 2 < 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)
Trusted statement context
noncomputable section

namespace Usa2002P5

inductive Linked : ℤ → ℤ → Prop where
  | refl {a : ℤ} (ha : 0 < a) : Linked a a
  | snoc {a b c : ℤ} (hab : Linked a b) (hc : 0 < c) (hbc : b + c ∣ b * c) :
      Linked a c

scoped notation a " ~ " b => Linked a b