lean-golf Lean 4 proof leaderboard

USA1992 P3

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.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Ring.Star
import Mathlib.Data.Finset.Powerset
import Mathlib.Order.Interval.Finset.Nat
import Mathlib.Tactic.IntervalCases
import Mathlib.Tactic.Ring
theorem _root_.LeanGolf.compfiles.usa1992_p3 : IsLeast {x : ℕ | ∃ a : ℕ → ℕ, Good a ∧ x = a 9} answer
Trusted statement context
noncomputable section

namespace Usa1992P3

def Good (a : ℕ → ℕ) : Prop :=
  (∀ i : ℕ, i < 11 → 0 < a i) ∧
  (∀ i : ℕ, i < 10 → a i < a (i + 1)) ∧
  ∀ n : ℕ, 1 ≤ n → n ≤ 1500 → ∃ t : Finset ℕ, t ⊆ Finset.range 11 ∧ ∑ i ∈ t, a i = n

abbrev answer : ℕ := 248