GAME is in PTIME #
The membership half: DescriptiveComplexity.GAME is FO(LFP) definable
(DescriptiveComplexity.game_lfpDefinable), hence in
DescriptiveComplexity.PTIME by the Immerman–Vardi capture theorem the library
already carries.
Why a second relation variable is needed #
The winning set is a least fixed point, and two of its three clauses are Horn rules already. The third is not:
a universal node wins when it has a successor and every successor wins
has a universally quantified body, and a DescriptiveComplexity.HornClause
carries a list of atoms, not a quantified one. The standard repair is to walk
the order: a second variable allge x y – “every successor of x that is
≥ y wins” – is computed by a downward induction along the linear order,
from the greatest element to the least, one immediate predecessor at a time
(DescriptiveComplexity.order_induction_down). At the least element it says
“every successor of x wins”, which is the body the third clause wanted.
That this stays a least fixed point is the point of doing it this way: allge
is derivable exactly when the winners it quantifies over are already derived, so
nothing is derived early and the two variables grow together.
The ordered expansion of the vocabulary of AND/OR graphs.
Equations
Instances For
Dependency graph
The block #
The relation variables the fixed point computes.
- win : GIx
win x: the nodexis winning. - allge : GIx
allge x y: every successor ofxthat is at leastyis winning.
Instances For
Dependency graph
Dependency graph
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
The block of the fixed point: the winning set, and the scan that collects a universal node's successors from the greatest element downwards.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The atom win x.
Equations
- DescriptiveComplexity.Game.winAt x = { idx := DescriptiveComplexity.Game.GIx.win, args := fun (x_1 : Fin (DescriptiveComplexity.Game.gameBlock.arity DescriptiveComplexity.Game.GIx.win)) => x }
Instances For
Dependency graph
The atom allge x y.
Equations
- DescriptiveComplexity.Game.allgeAt x y = { idx := DescriptiveComplexity.Game.GIx.allge, args := ![x, y] }
Instances For
Dependency graph
The guards #
The node x wins outright, as a guard.
Equations
Instances For
Dependency graph
The node x belongs to the universal player, as a guard.
Equations
Instances For
Dependency graph
The node x is a marked start, as a guard.
Equations
Instances For
Dependency graph
There is a move from x to y, as a guard.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The rules #
A node that wins outright is winning.
Equations
- DescriptiveComplexity.Game.rWon = { guard := DescriptiveComplexity.Game.wonG 0, body := [], head := some (DescriptiveComplexity.Game.winAt 0) }
Instances For
Dependency graph
An existential node with a winning successor is winning.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A universal node with a successor, all of whose successors are winning, is winning: the scan has reached the least element.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The scan starts at the greatest element, which is not a successor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The scan starts at the greatest element, which is a winning successor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The scan steps down past an element that is not a successor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The scan steps down past a winning successor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The rules of the definition.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The output #
The output: some marked start is winning.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The intended fixed point #
The assignment the rules are meant to compute.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The intended assignment is closed under the rules, so the least fixed point is contained in it.
Dependency graph
Soundness: everything the rules derive about win is winning.
Dependency graph
Completeness: every winning node is derived #
The arguments of allge x y read out of the three variables.
Dependency graph
The arguments of allge x z read out of the three variables.
Dependency graph
The scan is derivable at every element, by a downward induction along the order: this is the universal body the third rule needs.
Dependency graph
Completeness: every winning node is derived.
Dependency graph
Reading the output: some marked start is in the fixed point.
Dependency graph
GAME is FO(LFP) definable: the winning set is the least fixed point of the three clauses, the universal one carried by a scan of the order.
Dependency graph
GAME is in PTIME, through the formalized translation of FO(LFP) into the Horn fragment.