AFTD Auto-Formalizing Theoretical Domains

parity_game_even_wins_play

def

For a priority map prio : V → ℕ and an infinite sequence of vertices π : ℕ → V, Even wins the play π (min-parity condition) if there is an even natural number k such that prio (π n) = k for infinitely many n (for every N there is n ≥ N with prio (π n) = k) and every j < k occurs as prio (π n) for only finitely many n (there is N with prio (π n) ≠ j for all n ≥ N); that is, the least priority occurring infinitely often along π exists and is even. No condition that π follows edges is part of this definition.

Statement

def parity_game_even_wins_play {V : Type} (prio : V → ℕ) (π : ℕ → V) : Prop
Defined in
arXiv:2511.03752 (Attractors Is All You Need: Parity Games In Polynomial Time), Section 2 (Even wins a play iff the least priority occurring infinitely often is even)
Verified
19 Nov 2026
Axioms
none listed
Used by 5

Read back from the Lean

Given a type V, a priority function prio : V → ℕ, and a sequence (play) π : ℕ → V, parity_game_even_wins_play prio π asserts that there exists a natural number k such that: 1. k is even (k % 2 = 0), 2. k appears infinitely often in the sequence of priorities (prio (π n))_{n ∈ ℕ} (i.e., for every N : ℕ, there exists n ≥ N with prio (π n) = k), and 3. every natural number j < k appears only finitely often in the sequence of priorities (i.e., for every j < k, there exists N : ℕ such that for all n ≥ N, prio (π n) ≠ j). Equivalently, the minimum priority occurring infinitely often along π exists and is even.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- Even wins the infinite play `π` under the min-parity condition: the least priority seen infinitely often along `π` is even. -/
def parity_game_even_wins_play {V : Type} (prio : V → ℕ) (π : ℕ → V) : Prop :=
  ∃ k, k % 2 = 0 ∧ (∀ N, ∃ n, N ≤ n ∧ prio (π n) = k) ∧
    ∀ j, j < k → ∃ N, ∀ n, N ≤ n → prio (π n) ≠ j
See it in the graphDiscuss this resultChallenge it