lean-golf Lean 4 proof leaderboard

Putnam 1991 B5

open: first valid proof sets the record

PutnamBench · 1991 B5 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.).

Statement

import Mathlib
theorem LeanGolf.putnambench.putnam_1991_b5
(p : ℕ)
(podd : Odd p)
(pprime : Prime p)
: ({z : ZMod p | ∃ x : ZMod p, z = x ^ 2} ∩ {z : ZMod p | ∃ y : ZMod p, z = y ^ 2 + 1}).encard = putnam_1991_b5_solution p
Trusted statement context
noncomputable section

open Filter Topology

abbrev putnam_1991_b5_solution : ℕ → ℕ :=
  (fun p : ℕ => Nat.ceil ((p : ℝ) / 4))