Documentation

DescriptiveComplexity.Exponential.GameNodes

The node phases play the AND/OR graph #

The second correctness half: from main tx, the graph game wins exactly when the existential player wins the interpreted AND/OR graph at the node the state carries (DescriptiveComplexity.ExpExpansion.target_of_wins and DescriptiveComplexity.ExpExpansion.wins_of_winsOn). Both directions are inductions – on DescriptiveComplexity.SOGameSpec.Wins one way, on DescriptiveComplexity.WinsOn the other – and the first goes through DescriptiveComplexity.ExpExpansion.Target, which says what each of the five node phases is for.

The two places the simulation could have gone wrong, and how it does not:

States whose rounds are all points #

def DescriptiveComplexity.ExpExpansion.nodeState {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] (p : Ph T Dm) (pts : Fin nX.Map A) :
(X.gameBlock n T Dm).Assignment A

The state at a phase whose rounds carry the given points.

Equations
Instances For
    Dependency graph
    Dependency graph
    theorem DescriptiveComplexity.ExpExpansion.exists_nodeState {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] {p : Ph T Dm} {σs : Fin nX.pointBlock.Assignment A} (h : ∀ (i : Fin n), IsPointAssign (σs i)) :
    ∃ (pts : Fin nX.Map A), stateAssign p σs = nodeState p pts σs = fun (i : Fin n) => pointAssign (pts i)

    A state all of whose rounds are points carries points, and they are determined.

    Dependency graph

    The nodes a state carries #

    theorem DescriptiveComplexity.ExpExpansion.nodeAt_congr {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} {d n : } {A : Type} [instL : L.Structure A] [LinearOrder A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) (t : T) (a : Fin 2) (pts pts' : Fin nX.Map A) (hag : ∀ (b : Fin d), pts (paramIx d n hdn a b) = pts' (paramIx d n hdn a b)) :
    nodeAt I hdn t a pts = nodeAt I hdn t a pts'
    Dependency graph
    theorem DescriptiveComplexity.ExpExpansion.nodeAt_zero_congr {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} {d n : } {A : Type} [instL : L.Structure A] [LinearOrder A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) (t : T) (pts pts' : Fin nX.Map A) (hag : ∀ (i : Fin n), i < dpts i = pts' i) :
    nodeAt I hdn t 0 pts = nodeAt I hdn t 0 pts'

    The first node only reads the rounds below d.

    Dependency graph
    theorem DescriptiveComplexity.ExpExpansion.nodeAt_shift {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} {d n : } {A : Type} [instL : L.Structure A] [LinearOrder A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) (t : T) (pts : Fin nX.Map A) :
    (nodeAt I hdn t 0 fun (i : Fin n) => pts (shiftIx d n hdn i)) = nodeAt I hdn t 1 pts

    Shifting the second node's rounds onto the first's reads the same node.

    Dependency graph
    theorem DescriptiveComplexity.ExpExpansion.exists_pts_of_node {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} {d n : } {A : Type} [instL : L.Structure A] [LinearOrder A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) (z : I.Map (X.Map A)) (pts : Fin nX.Map A) :
    ∃ (pts' : Fin nX.Map A), (∀ (i : Fin n), ¬(d i i < 2 * d) → pts' i = pts i) nodeAt I hdn z.1 1 pts' = z

    Every node of the graph sits in the second node's rounds of some tuple agreeing with a given one outside them.

    Dependency graph

    What each node phase is for #

    def DescriptiveComplexity.ExpExpansion.Target {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) :
    Ph T Dm(Fin nX.Map A)Prop

    What a node phase promises. The prefix phases promise nothing: they are DescriptiveComplexity.ExpExpansion.wins_pre's business.

    Equations
    Instances For
      Dependency graph

      The moves out of the node phases #

      theorem DescriptiveComplexity.ExpExpansion.movesFrom_startPick {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} (tx : T) :
      movesFrom hn D hD (Ph.startPick tx) = [preEntry D hD Sub.st tx tx, { tgt := Ph.main tx, keep := keepAll n, guard := [] }]
      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.movesFrom_main {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} (tx : T) :
      movesFrom hn D hD (Ph.main tx) = preEntry D hD Sub.won tx tx :: List.flatMap (fun (ty : T) => [{ tgt := Ph.exStep tx ty, keep := keepOff n (isMid d n), guard := midRounds d n }, { tgt := Ph.allCert tx ty, keep := keepOff n (isMid d n), guard := midRounds d n }]) (finEnum T)
      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.movesFrom_exStep {T : Type} [Finite T] {d n Dm : } (hdn : 2 * d n) {hn : n = 2 * d + Dm} {D : SubTT} {hD : ∀ (s : Sub) (tx ty : T), D s tx ty Dm} (tx ty : T) :
      movesFrom hn D hD (Ph.exStep tx ty) = [preEntry D hD Sub.notuniv tx tx, preEntry D hD Sub.mv tx ty, { tgt := Ph.main ty, keep := keepShift d n hdn, guard := [] }]
      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.movesFrom_allCert {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} (tx ty : T) :
      movesFrom hn D hD (Ph.allCert tx ty) = preEntry D hD Sub.univ tx tx :: preEntry D hD Sub.mv tx ty :: List.map (fun (ty' : T) => { tgt := Ph.allStep tx ty', keep := keepOff n (isMid d n), guard := midRounds d n }) (finEnum T)
      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.movesFrom_allStep {T : Type} [Finite T] {d n Dm : } (hdn : 2 * d n) {hn : n = 2 * d + Dm} {D : SubTT} {hD : ∀ (s : Sub) (tx ty : T), D s tx ty Dm} (tx ty : T) :
      movesFrom hn D hD (Ph.allStep tx ty) = [preEntry D hD Sub.notmv tx ty, { tgt := Ph.main ty, keep := keepShift d n hdn, guard := [] }]
      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.moveTo_keepAll {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] {q : Ph T Dm} {pts : Fin nX.Map A} {σs : Fin nX.pointBlock.Assignment A} (hkeep : ekeepAll n, pointAssign (pts e.1) = σs e.2) :
      stateAssign q σs = nodeState q pts

      A move that keeps every round lands on the same points.

      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.moveTo_keepShift {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] (hdn : 2 * d n) {q : Ph T Dm} {pts : Fin nX.Map A} {σs : Fin nX.pointBlock.Assignment A} (hkeep : ekeepShift d n hdn, pointAssign (pts e.1) = σs e.2) :
      stateAssign q σs = nodeState q fun (i : Fin n) => pts (shiftIx d n hdn i)

      A shifting move carries the second node's points onto the first node's rounds.

      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.moveTo_keepMid {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] {q : Ph T Dm} {pts : Fin nX.Map A} {σs : Fin nX.pointBlock.Assignment A} (hkeep : ekeepOff n (isMid d n), pointAssign (pts e.1) = σs e.2) (hguard : imidRounds d n, IsPointAssign (σs i)) :
      ∃ (pts' : Fin nX.Map A), stateAssign q σs = nodeState q pts' ∀ (i : Fin n), ¬(d i i < 2 * d) → pts' i = pts i

      A move that guesses the second node's rounds lands on points agreeing outside them.

      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.move_keepAll {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} (p : Ph T Dm) (m : MoveTo T Dm n) (hm : m movesFrom hn D hD p) (hk : m.keep = keepAll n) (hg : m.guard = []) (pts : Fin nX.Map A) :
      (X.graphGame hn D hD K).Move (nodeState p pts) (nodeState m.tgt pts)

      Making a move that keeps every round.

      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.move_keepShift {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] (hdn : 2 * d n) {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} (p : Ph T Dm) (m : MoveTo T Dm n) (hm : m movesFrom hn D hD p) (hk : m.keep = keepShift d n hdn) (hg : m.guard = []) (pts : Fin nX.Map A) :
      (X.graphGame hn D hD K).Move (nodeState p pts) (nodeState m.tgt fun (i : Fin n) => pts (shiftIx d n hdn i))

      Making a shifting move.

      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.move_keepMid {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} (p : Ph T Dm) (m : MoveTo T Dm n) (hm : m movesFrom hn D hD p) (hk : m.keep = keepOff n (isMid d n)) (hg : m.guard = midRounds d n) (pts pts' : Fin nX.Map A) (hag : ∀ (i : Fin n), ¬(d i i < 2 * d) → pts' i = pts i) :
      (X.graphGame hn D hD K).Move (nodeState p pts) (nodeState m.tgt pts')

      Making a move that guesses the second node's rounds.

      Dependency graph

      Entering a prefix decides its question #

      theorem DescriptiveComplexity.ExpExpansion.wins_preEntry {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) {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} (hK : ∀ (s : Sub) (tx ty : T), KernelSpec I hdn (n - D s tx ty) (D s tx ty) s tx ty (K s tx ty)) (s : Sub) (tx ty : T) (pts : Fin nX.Map A) :
      (X.graphGame hn D hD K).Wins (nodeState (preEntry D hD s tx ty).tgt pts) SubHolds I hdn s tx ty pts

      Entering a prefix wins exactly when its question holds.

      Dependency graph

      The node phases play the graph #

      theorem DescriptiveComplexity.ExpExpansion.target_of_wins {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) {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} (hK : ∀ (s : Sub) (tx ty : T), KernelSpec I hdn (n - D s tx ty) (D s tx ty) s tx ty (K s tx ty)) (τ : (X.graphGame hn D hD K).State A) :
      (X.graphGame hn D hD K).Wins τ∀ (p : Ph T Dm) (pts : Fin nX.Map A), τ = nodeState p ptsTarget I hdn p pts

      Every node phase keeps its promise.

      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.wins_of_winsOn {L : FirstOrder.Language} {X : ExpExpansion L} {T : Type} [Finite T] {d n Dm : } {A : Type} [instL : L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (I : FOInterpretation (X.E.sum FirstOrder.Language.order) FirstOrder.Language.andOrGraph T d) (hdn : 2 * d n) {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} (hK : ∀ (s : Sub) (tx ty : T), KernelSpec I hdn (n - D s tx ty) (D s tx ty) s tx ty (K s tx ty)) (x : I.Map (X.Map A)) :
      WinsOn (I.Map (X.Map A)) x∀ (tx : T) (pts : Fin nX.Map A), x = nodeAt I hdn tx 0 pts(X.graphGame hn D hD K).Wins (nodeState (Ph.main tx) pts)

      Every win of the interpreted graph is a win of the game.

      Dependency graph