Skip to content

Commit

Permalink
Add Lean statement for 2023 A6
Browse files Browse the repository at this point in the history
  • Loading branch information
ocfnash committed Sep 25, 2024
1 parent 43fa3ce commit 5bbfb1e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lean4/src/putnam_2023_a6.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Mathlib

open Finset

abbrev putnam_2023_a6_solution : Set ℕ := sorry
-- {n : ℕ | 0 < n}

theorem putnam_2023_a6
(IsValidGame : List ℕ → Prop)
(IsValidGame_def : ∀ g, IsValidGame g ↔ g.Nodup ∧ (∀ i ∈ g, i ∈ Icc 1 g.length))
(parityOf : List ℕ → ZMod 2)
(parityOf_def : ∀ g, parityOf g = ((range g.length).filter fun i ↦ g[i]! = i + 1).card)
(ConformsToStrategy : List ℕ → (List ℕ → ℕ) → Prop)
(ConformsToStrategy_def : ∀ g s, ConformsToStrategy g s ↔
∀ (i) (h : i < g.length), Odd i → g[i] = s (g.take i))
(IsWinningFor : ℕ → (List ℕ → ℕ) → Prop)
(IsWinningFor_def : ∀ n s, IsWinningFor n s ↔
∃ p, ∀ g, g.length = n → IsValidGame g → ConformsToStrategy g s → parityOf g = p) :
{n : ℕ | 0 < n ∧ ∃ s, IsWinningFor n s} = putnam_2023_a6_solution :=
sorry

0 comments on commit 5bbfb1e

Please sign in to comment.