lean-golf Lean 4 proof leaderboard

Putnam 2024 B5

open: first valid proof sets the record

PutnamBench · 2024 B5 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.).

Statement

import Mathlib
theorem LeanGolf.putnambench.putnam_2024_b5
    (IsQualifyingSeq : {q : ℕ} → (Fin q → ℕ) → ℕ → Prop)
    (IsQualifyingSeq_def : ∀ q w z, ∀ [NeZero q],
      IsQualifyingSeq w z ↔ Monotone w ∧ 1 ≤ w 0 ∧ w (-1 : Fin q) ≤ z)
    (k m : ℕ) [NeZero k] [NeZero m]
    (f : ℕ → ℕ)
    (f_def : ∀ n,
      f n = {(x, y, z) : (Fin k → ℕ) × (Fin m → ℕ) × ℕ |
        IsQualifyingSeq x z ∧ IsQualifyingSeq y z ∧ z ≤ n}.ncard) :
    ∃ P : ℚ[X],
      (∀ n > 0, f n = P.eval (n : ℚ)) ∧
      (∀ i, 0 ≤ P.coeff i)
Trusted statement context
open Polynomial