AFTD Auto-Formalizing Theoretical Domains

parity_game_peel_seq

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. Let pl be the player of the parity of d (Even if d is even, Odd if d is odd) and q the other player. parity_game_peel_seq own E prio d (arguments in this order) is the sequence, indexed by k ∈ ℕ, of pairs (U^k, A^k) of finite sets of vertices defined by recursion on k: U^0 = parity_game_same_parity_upto prio d (the vertices of priority at most d with the parity of d) and A^0 = parity_game_attractor own E pl U^0; and U^{k+1} = U^k \ parity_game_attractor own E q ((V \ A^k) ∪ parity_game_aprime own E prio d A^k) and A^{k+1} = parity_game_attractor own E pl U^{k+1}, where V \ A^k is the complement of A^k in the set of all vertices. The first component of the k-th pair is U^k and the second is A^k. These are the sets U^k(G, d) and A^k(G, d) of arXiv:2511.03752, whose set A(G, d) is the intersection of all the A^k.

Statement

def parity_game_peel_seq {V : Type} [Fintype V] [DecidableEq V] (own : V → Bool)
    (E : V → V → Bool) (prio : V → ℕ) (d : ℕ) : ℕ → Finset V × Finset V
Defined in
arXiv:2511.03752 (Attractors Is All You Need: Parity Games In Polynomial Time), Section 3 (the sets U^k(G, d) and A^k(G, d) defining A(G, d))
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_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…
Used by 2

Read back from the Lean

Given a finite type V with decidable equality, an ownership function own : V → Bool, a directed edge relation E : V → V → Bool, a priority function prio : V → ℕ, and a natural number d : ℕ, parity_game_peel_seq own E prio d is a recursively defined sequence of pairs of vertex subsets (Finset V × Finset V) indexed by k : ℕ: - For k = 0: The pair is (P₀, A₀) where: - P₀ = parity_game_same_parity_upto prio d, which is the set of vertices v ∈ V with prio(v) ≤ d and prio(v) % 2 = d % 2. - A₀ = parity_game_attractor own E (decide (d % 2 = 0)) P₀, which is the attractor for player (d % 2 = 0) to P₀. - For k + 1: Letting (P_k, A_k) = parity_game_peel_seq own E prio d k, the pair is (P_{k+1}, A_{k+1}) where: - P_{k+1} is P_k minus the attractor for the opposing player (!decide (d % 2 = 0)) towards the union of: 1. the complement of A_k in V (Finset.univ \ A_k), and 2. parity_game_aprime own E prio d A_k. - A_{k+1} is the attractor for player (decide (d % 2 = 0)) towards P_{k+1}.

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 sequence of pairs `(U^k(G, d), A^k(G, d))` of arXiv:2511.03752, whose second components intersect to the set `A(G, d)` that the paper claims is a dominion. -/
def parity_game_peel_seq {V : Type} [Fintype V] [DecidableEq V] (own : V → Bool)
    (E : V → V → Bool) (prio : V → ℕ) (d : ℕ) : ℕ → Finset V × Finset V
  | 0 => (parity_game_same_parity_upto prio d,
      parity_game_attractor own E (decide (d % 2 = 0)) (parity_game_same_parity_upto prio d))
  | k + 1 =>
      (((parity_game_peel_seq own E prio d k).1 \ parity_game_attractor own E (!decide (d % 2 = 0))
          ((Finset.univ \ (parity_game_peel_seq own E prio d k).2) ∪
            parity_game_aprime own E prio d (parity_game_peel_seq own E prio d k).2)),
       parity_game_attractor own E (decide (d % 2 = 0))
        ((parity_game_peel_seq own E prio d k).1 \ parity_game_attractor own E (!decide (d % 2 = 0))
          ((Finset.univ \ (parity_game_peel_seq own E prio d k).2) ∪
            parity_game_aprime own E prio d (parity_game_peel_seq own E prio d k).2)))
See it in the graphDiscuss this resultChallenge it