AFTD Auto-Formalizing Theoretical Domains

parity_game_same_parity_upto

def

For a priority map prio : V → ℕ on a finite vertex type V and a natural number d, parity_game_same_parity_upto prio d is the finite set of vertices v with prio v ≤ d and prio v ≡ d (mod 2).

Statement

def parity_game_same_parity_upto {V : Type} [Fintype V] (prio : V → ℕ) (d : ℕ) : Finset V
Defined in
arXiv:2511.03752 (Attractors Is All You Need: Parity Games In Polynomial Time), Section 3 (the set U_d(G))
Verified
19 Nov 2026
Axioms
none listed
Used by 3
  • parity_game_aprimeA game on a finite vertex type V is given by own : V → Bool (own v = true means Even owns v, false means Odd owns v), E : V → V → Bool (E…
  • parity_game_peel_seqA game on a finite vertex type V is given by own : V → Bool (own v = true means Even owns v, false means Odd owns v), E : V → V → Bool (E…
  • parity_game_astarA game on a finite vertex type V is given by own : V → Bool (own v = true means Even owns v, false means Odd owns v), E : V → V → Bool (E…

Read back from the Lean

Given a finite type V, a function prio : V → ℕ, and a natural number d, parity_game_same_parity_upto prio d is defined to be the finite set (Finset V) of all elements v : V such that prio v ≤ d and prio v % 2 = d % 2 (i.e., prio v is at most d and has the same parity as d).

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

/-- The set `U_d(G)` of arXiv:2511.03752: the vertices whose priority is at most `d` and has the parity of `d`. -/
def parity_game_same_parity_upto {V : Type} [Fintype V] (prio : V → ℕ) (d : ℕ) : Finset V :=
  Finset.univ.filter (fun v => prio v ≤ d ∧ prio v % 2 = d % 2)
See it in the graphDiscuss this resultChallenge it