lean-golf Lean 4 proof leaderboard

Putnam 2022 A2

open: first valid proof sets the record

PutnamBench · 2022 A2 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.).

Statement

import Mathlib
theorem LeanGolf.putnambench.putnam_2022_a2
(n : ℕ)
(hn : n ≥ 2)
(S : Set ℝ[X])
(hS : S = {P | natDegree P = n})
(negs : ℝ[X] → ℕ)
(hnegs : ∀ P : ℝ[X], negs P = ∑ i ∈ Finset.range (P.natDegree + 1), if P.coeff i < 0 then 1 else 0)
: sSup {negs (P^2) | P ∈ S} = putnam_2022_a2_solution n
Trusted statement context
noncomputable section

open Polynomial

abbrev putnam_2022_a2_solution : ℕ → ℕ :=
  fun n => 2*n - 2