AFTD Auto-Formalizing Theoretical Domains

parity_game_aprime

def

A 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 v w = true means there is an edge from v to w) and prio : V → ℕ (the priority of each vertex). A player is a Boolean: true is Even, false is Odd. parity_game_aprime own E prio d A (arguments in this order; A is a finite set of vertices) is parity_game_attractor own E q T, where the player q is the opponent of the player of the parity of d (q is Odd if d is even and Even if d is odd, q = !decide (d % 2 = 0)) and T is the set of vertices v of A with prio v < d that are neither in parity_game_astar own E prio d nor in parity_game_same_parity_upto prio d. This is the set A'_d(G, A) of arXiv:2511.03752.

Statement

def parity_game_aprime {V : Type} [Fintype V] [DecidableEq V] (own : V → Bool)
    (E : V → V → Bool) (prio : V → ℕ) (d : ℕ) (A : Finset V) : Finset V
Defined in
arXiv:2511.03752 (Attractors Is All You Need: Parity Games In Polynomial Time), Section 3 (the set A'_d(G, A))
Verified
19 Nov 2026
Axioms
none listed
Built on 3
  • parity_game_attractorA 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_same_parity_uptoFor 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…
  • 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…
Used by 2
  • 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_peel_claimed_dominion_counterexampleConsider the parity game on the four vertices 0, 1, 2, 3 in which Even owns vertices 0 and 1, Odd owns vertices 2 and 3, the priorities…

Read back from the Lean

Given a finite type V with decidable equality, an ownership function own : V → Bool, an edge relation E : V → V → Bool, a priority function prio : V → ℕ, a bound d : ℕ, and a subset A : Finset V, parity_game_aprime own E prio d A is defined as the attractor for player !decide (d % 2 = 0) (i.e., player false if d is even, and true if d is odd) of the set of vertices v ∈ A satisfying: 1. v ∉ parity_game_astar own E prio d, 2. v ∉ parity_game_same_parity_upto prio d, and 3. prio v < 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 `A'_d(G, A)` of arXiv:2511.03752: the attractor, for the opponent of the player of the parity of `d`, of the vertices of `A` of priority below `d` that are neither in `A*_d(G)` nor in `U_d(G)`. -/
def parity_game_aprime {V : Type} [Fintype V] [DecidableEq V] (own : V → Bool)
    (E : V → V → Bool) (prio : V → ℕ) (d : ℕ) (A : Finset V) : Finset V :=
  parity_game_attractor own E (!decide (d % 2 = 0))
    (A.filter (fun v => v ∉ parity_game_astar own E prio d ∧ v ∉ parity_game_same_parity_upto prio d ∧ prio v < d))
See it in the graphDiscuss this resultChallenge it