lean-golf Lean 4 proof leaderboard

IMO1978 P3

open: first valid proof sets the record

Compfiles · Imo · Apache-2.0
Copyright (c) 2026 The Compfiles Contributors. All rights reserved. Authors: David Renshaw

Statement

import Mathlib
theorem _root_.LeanGolf.compfiles.imo1978_p3
    (f g : ℕ → ℕ)
    (hfpos : ∀ n, 0 < n → 0 < f n)
    (hgpos : ∀ n, 0 < n → 0 < g n)
    (hfmono : ∀ n m, 0 < n → n < m → f n < f m)
    (hgmono : ∀ n m, 0 < n → n < m → g n < g m)
    (hdisjoint : ∀ n m, 0 < n → 0 < m → f n ≠ g m)
    (hcover : ∀ k, 0 < k → (∃ n, 0 < n ∧ f n = k) ∨ (∃ n, 0 < n ∧ g n = k))
    (hgf : ∀ n, 0 < n → g n = f (f n) + 1) :
    f 240 = solution
Trusted statement context
noncomputable section

namespace Imo1978P3

abbrev solution : ℕ := 388

open scoped goldenRatio

open Real