lean-golf Lean 4 proof leaderboard

Putnam 2023 B3

open: first valid proof sets the record

PutnamBench · 2023 B3 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.).

Statement

import Mathlib
theorem LeanGolf.putnambench.putnam_2023_b3
    (IsZigZag : {k : ℕ} → (Fin k → ℝ) → Prop)
    (IsZigZag_def : ∀ (k : ℕ) [NeZero k] (y : Fin k → ℝ),
      IsZigZag y ↔ k = 1 ∨ ((∀ i : Fin k, i + 1 < k → y (i + 1) ≠ y i)) ∧
        (∀ i : Fin k, i + 2 < k → (y (i + 2) < y (i + 1) ↔ y i < y (i + 1))))
    (n : ℕ)
    (hn : 2 ≤ n)
    (a : (Fin n → Icc (0 : ℝ) 1) → ℕ)
    (ha : ∀ x, IsGreatest {k | ∃ i : Fin k ↪o Fin n, IsZigZag ((↑) ∘ x ∘ i)} (a x)) :
    𝔼[(↑) ∘ a] = putnam_2023_b3_solution n
Trusted statement context
noncomputable section

open ProbabilityTheory Set

noncomputable abbrev putnam_2023_b3_solution : ℕ → ℝ :=
  (fun n : ℕ ↦ (2 * (n : ℝ) + 2) / 3)