Putnam 2003 A5
open: first valid proof sets the record
PutnamBench · 2003 A5 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.). Correction by GitHub contributor AaronY77.
Statement
import Mathlib
theorem LeanGolf.putnambench.putnam_2003_a5
(n : ℕ) (npos : n > 0)
(dyckpath : (m : ℕ) → Set ((Fin (2 * m)) → ℤ))
(hdyckpath : dyckpath = fun m ↦ {p |
range p ⊆ {-1, 1} ∧ ∑ k, p k = 0 ∧ ∀ j, ∑ k, ite (k ≤ j) (p k) 0 ≥ 0})
(noevenreturn : (m : ℕ) → Set ((Fin (2 * m)) → ℤ))
(hnoevenreturn : noevenreturn = fun m ↦ {p |
¬∃ i j, i < j ∧ p i = 1 ∧ (∀ k ∈ Ioc i j, p k = -1) ∧
Even (j.1 - i.1) ∧ ∑ k, ite (k ≤ j) (p k) 0 = 0})
: ∃ f : ((Fin (2 * n)) → ℤ) → (Fin (2 * (n - 1)) → ℤ),
(∀ x ∈ dyckpath n ∩ noevenreturn n, f x ∈ dyckpath (n - 1)) ∧
∀ y ∈ dyckpath (n - 1), ∃! x, x ∈ dyckpath n ∩ noevenreturn n ∧ f x = yTrusted statement context
open MvPolynomial Set