lean-golf Lean 4 proof leaderboard

USA2022 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.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Ring.Star
import Mathlib.AlgebraicTopology.SimplexCategory.Basic
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Nat.Bitwise
import Mathlib.Data.Nat.Log
import Mathlib
import Mathlib.Tactic.IntervalCases
theorem _root_.LeanGolf.compfiles.usa2022_p5 : IsLeast {k | Good k} solution
Trusted statement context
noncomputable section

namespace Usa2022P5

def EssentiallyIncreasing (f : ℝ → ℝ) : Prop :=
  ∀ s t : ℝ, s ≤ t → f s ≠ 0 → f t ≠ 0 → f s ≤ f t

def Good (k : ℕ) : Prop :=
  ∀ x : Fin 2022 → ℝ, ∃ f : Fin k → ℝ → ℝ,
    (∀ i, EssentiallyIncreasing (f i)) ∧
    ∀ n : Fin 2022, ∑ i, f i (n.val + 1) = x n

abbrev solution : ℕ := 11