Putnam 2019 B1
open: first valid proof sets the record
PutnamBench · 2019 B1 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.).
Statement
import Mathlib
theorem LeanGolf.putnambench.putnam_2019_b1
(n : ℕ)
(Pn : Set (Fin 2 → ℤ))
(pZtoR : (Fin 2 → ℤ) → EuclideanSpace ℝ (Fin 2))
(sPnsquare : Finset (Fin 2 → ℤ) → Prop)
(hPn : Pn = {p | (p 0 = 0 ∧ p 1 = 0) ∨ (∃ k ≤ n, (p 0) ^ 2 + (p 1) ^ 2 = 2 ^ k)})
(hpZtoR : ∀ p i, (pZtoR p) i = p i)
(sPnsquare_def : ∀ sPn : Finset (Fin 2 → ℤ), sPnsquare sPn ↔ (sPn.card = 4 ∧ ∃ p4 : Fin 4 → (Fin 2 → ℤ), Set.range p4 = sPn ∧ (∃ s > 0, ∀ i : Fin 4, dist (pZtoR (p4 i) : EuclideanSpace ℝ (Fin 2)) (pZtoR (p4 (i + 1))) = s) ∧ (dist (pZtoR (p4 0)) (pZtoR (p4 2)) = dist (pZtoR (p4 1)) (pZtoR (p4 3)))))
: {sPn : Finset (Fin 2 → ℤ) | (sPn : Set (Fin 2 → ℤ)) ⊆ Pn ∧ sPnsquare sPn}.encard = putnam_2019_b1_solution nTrusted statement context
noncomputable section
open Topology Filter
abbrev putnam_2019_b1_solution : ℕ → ℕ :=
(fun n : ℕ => 5 * n + 1)