Documentation

DescriptiveComplexity.Exponential.GamePrefix

The prefix phases play the alternating prefix #

The first of the two correctness halves of the graph game: from a phase pre s tx ty j pol, the game plays exactly j more rounds, alternating from pol, and is then decided by the kernel of the question s (DescriptiveComplexity.ExpExpansion.wins_pre). The proof is a plain induction on j against DescriptiveComplexity.altBlockQuant's own recursion – which is what carrying the polarity in the phase buys.

Two things make the base and the step line up.

Fin.cons at an index known by its value #

theorem DescriptiveComplexity.cons_of_val_zero {α : Type} {k : } (v : α) (τs : Fin kα) (j : Fin (k + 1)) (h : j = 0) :
Fin.cons v τs j = v
Dependency graph
theorem DescriptiveComplexity.cons_of_val_succ {α : Type} {k : } (v : α) (τs : Fin kα) (j : Fin (k + 1)) (m : Fin k) (h : j = m + 1) :
Fin.cons v τs j = τs m
Dependency graph

Filling the last rounds #

noncomputable def DescriptiveComplexity.ExpExpansion.fillRounds {L : FirstOrder.Language} {X : ExpExpansion L} {n : } {A : Type} {k : } (hk : k n) (ρs : Fin nX.pointBlock.Assignment A) (τs : Fin kX.pointBlock.Assignment A) :

The rounds ρs with the last k overwritten by τs, in order.

Equations
Instances For
    Dependency graph
    theorem DescriptiveComplexity.ExpExpansion.fillRounds_zero {L : FirstOrder.Language} {X : ExpExpansion L} {n : } {A : Type} (hk : 0 n) (ρs : Fin nX.pointBlock.Assignment A) (τs : Fin 0X.pointBlock.Assignment A) :
    fillRounds hk ρs τs = ρs
    Dependency graph
    theorem DescriptiveComplexity.ExpExpansion.fillRounds_succ {L : FirstOrder.Language} {X : ExpExpansion L} {n : } {A : Type} (k : ) (hk : k + 1 n) (ρs σs : Fin nX.pointBlock.Assignment A) (τs : Fin kX.pointBlock.Assignment A) (r : Fin n) (hr : r = n - (k + 1)) (hag : ∀ (i : Fin n), i rρs i = σs i) :
    fillRounds hk ρs (Fin.cons (σs r) τs) = fillRounds σs τs

    Filling one more round is filling one fewer round of the state the move enters, provided that state differs from the one it leaves only at the round being filled.

    Dependency graph

    The moves out of a prefix phase #

    theorem DescriptiveComplexity.ExpExpansion.movesFrom_pre_zero {T : Type} [Finite T] {d n Dm : } {hn : n = 2 * d + Dm} {D : SubTT} {hD : ∀ (s : Sub) (tx ty : T), D s tx ty Dm} (hk : 0 < Dm + 1) (s : Sub) (tx ty : T) (pol : Bool) :
    movesFrom hn D hD (Ph.pre s tx ty 0, hk pol) = []
    Dependency graph
    theorem DescriptiveComplexity.ExpExpansion.movesFrom_pre_succ {T : Type} [Finite T] {d n Dm : } {hn : n = 2 * d + Dm} {D : SubTT} {hD : ∀ (s : Sub) (tx ty : T), D s tx ty Dm} (k : ) (hk : k + 1 < Dm + 1) (r : Fin n) (hr : r = n - (k + 1)) (s : Sub) (tx ty : T) (pol : Bool) :
    movesFrom hn D hD (Ph.pre s tx ty k + 1, hk pol) = [{ tgt := Ph.pre s tx ty k, !pol, keep := keepOff n fun (i : Fin n) => decide (i = r), guard := [] }]
    Dependency graph

    The prefix phases #

    theorem DescriptiveComplexity.ExpExpansion.wins_pre {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] {hn : n = 2 * d + Dm} {D : SubTT} {hD : ∀ (s : Sub) (tx ty : T), D s tx ty Dm} {K : SubTT((L.sum FirstOrder.Language.order).sum (repMerged X.pointBlock n).lang).Sentence} (k : ) (hk : k < Dm + 1) (pol : Bool) (s : Sub) (tx ty : T) (ρs : Fin nX.pointBlock.Assignment A) :
    (X.graphGame hn D hD K).Wins (stateAssign (Ph.pre s tx ty k, hk pol) ρs) altBlockQuant A X.pointBlock k (fun (τs : Fin kX.pointBlock.Assignment A) => A K s tx ty) pol

    A prefix phase plays the prefix. From pre s tx ty j pol the game fills the last j rounds, alternating from pol, and the kernel of s decides the leaf.

    Dependency graph