Documentation

DescriptiveComplexity.Exponential.GameInterp

The machine, written in first-order logic #

DescriptiveComplexity.Exponential.GameMachine builds the machine of a specification as an DescriptiveComplexity.ATMData on tagged tuples; this file writes it down, as an DescriptiveComplexity.FOInterpretation of the alternating-machine vocabulary in the ordered source vocabulary.

Why the reduction is not relativized #

One might expect the unused coordinates of a tagged tuple to be pinned by a domain formula. The machine as built does not need that: its Posn is machPosn ∧ machDom, so the junk tuples are already excluded by a relation rather than by the universe, and every promise – the order is linear, the input is functional, there is one blank – was proved on the whole tagged-tuple type. So the interpretation is an ordinary one, and DescriptiveComplexity.OrderedFOReduction.toRel widens it at the very end.

What is static and what is not #

A defining formula receives the tags of its arguments, so anything decided by a tag is decided when the formula is built: that is posn, acc, right, blank, start, the block marks, and the family of every transition rule. What is left is small:

Side conditions decided by the tags #

A condition decided when the formula is built.

Equations
Instances For
    Dependency graph
    @[simp]
    theorem DescriptiveComplexity.GameProg.realize_sideF {L : FirstOrder.Language} {γ A : Type} [L.Structure A] [LinearOrder A] {v : γA} {p : Prop} :
    (sideF γ p).Realize v p
    Dependency graph

    The formulas #

    @[reducible, inline]
    abbrev DescriptiveComplexity.GameProg.argVar {B : SOBlock} {V : } (n : ) (i : Fin n) :
    Fin (gameDim B V)Fin n × Fin (gameDim B V)

    The coordinates of the i-th argument.

    Equations
    Instances For
      Dependency graph

      Being a position: a tape tag whose coordinates beyond its own arity are pinned.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph

        Being an accepting state: decided by the tag.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Dependency graph

          Moving the head right: decided by the tag.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph

            Being the blank: the left mark, at the constant tuple.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Dependency graph

              Being the start state: the initial sweep, at the constant tuple.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.GameProg.blkF {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) (i : Fin 2) (t : GameTag B V M) :

                The i-th block mark: which player owns a state is a function of its tag.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Dependency graph

                  The state a transition applies in: the tags name it, and the tuple must agree with the transition's below the arity the phase declares.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  • prog.tsrcF t t' =
                  Instances For
                    Dependency graph

                    The state a transition moves to, the same with dst.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    • prog.tdstF t t' =
                    Instances For
                      Dependency graph
                      noncomputable def DescriptiveComplexity.GameProg.addrIx {B : SOBlock} {V : } (i : B.ι) :
                      Fin (B.arity i)Fin (gameDim B V)

                      The coordinates of a transition's tuple that hold the address of a cell of the relation variable i.

                      Equations
                      Instances For
                        Dependency graph
                        noncomputable def DescriptiveComplexity.GameProg.cellIx {B : SOBlock} {V : } (i : B.ι) :
                        Fin (B.arity i)Fin (gameDim B V)

                        The coordinates of a cell's own tuple that hold its address.

                        Equations
                        Instances For
                          Dependency graph

                          The symbol a transition reads: a mark, or a cell's symbol at the address the transition's own tuple carries.

                          Equations
                          Instances For
                            Dependency graph

                            The symbol a transition writes, the same with wr.

                            Equations
                            Instances For
                              Dependency graph

                              The initial contents of a cell: every cell starts empty, carrying its own address, and the sentinels carry their marks.

                              Equations
                              Instances For
                                Dependency graph
                                def DescriptiveComplexity.GameProg.eqIxF {L : FirstOrder.Language} {B : SOBlock} {V : } {γ : Type} {m : } (f g : Fin mFin (gameDim B V)) (u : Fin (gameDim B V)γ) :

                                Two families of coordinates of the same argument are equal, as a formula.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Dependency graph

                                  The guard of a concluding transition: the residual formula of the question, relabeled onto the coordinates the phase declares. This is the one place a defining formula reads the source structure.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Dependency graph

                                    The test a seek makes: the symbol is the one the challenged atom addresses, and the address is the atom's arguments at the valuation.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Dependency graph

                                      The nine rule families, written down: seven of them are decided by the transition's tag, and the two hooks into the source structure are the guard of a concluding transition and the seek's test.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        Dependency graph

                                        Being a transition: a transition tag whose rule fires.

                                        Equations
                                        Instances For
                                          Dependency graph

                                          Their realization #

                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_posnF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {t : GameTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (prog.posnF t).Realize v machPosn (t, fun (j : Fin (gameDim B V)) => v (0, j)) machDom (ctrlArity prog.vars) (t, fun (j : Fin (gameDim B V)) => v (0, j))
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_accF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {t : GameTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (accF t).Realize v ∃ (ph : MachPh V M), (t, fun (j : Fin (gameDim B V)) => v (0, j)).1 = Sum.inr (Sum.inl ph) ph.kind = PhKind.acc
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_rightF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {t : GameTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (rightF t).Realize v ∃ (tr : TrTag B V M), (t, fun (j : Fin (gameDim B V)) => v (0, j)).1 = Sum.inr (Sum.inr tr) tr.right = true
                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_blankF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} (h₀ : IsBot a₀) {t : GameTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (blankF t).Realize v (t, fun (j : Fin (gameDim B V)) => v (0, j)) = markPt a₀ false
                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_startF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} (h₀ : IsBot a₀) {t : GameTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (startF t).Realize v (t, fun (j : Fin (gameDim B V)) => v (0, j)) = phasePt (startPh V M) fun (x : Fin (gameDim B V)) => a₀
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_blkF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {i : Fin 2} {t : GameTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (prog.blkF i t).Realize v i = 1 isUnivPt prog.pol (t, fun (j : Fin (gameDim B V)) => v (0, j)) i = 0 ¬isUnivPt prog.pol (t, fun (j : Fin (gameDim B V)) => v (0, j))
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_tsrcF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {t t' : GameTag B V M} {v : Fin 2 × Fin (gameDim B V)A} :
                                          (prog.tsrcF t t').Realize v ∃ (tr : TrTag B V M), (t, fun (j : Fin (gameDim B V)) => v (0, j)).1 = Sum.inr (Sum.inr tr) (t', fun (j : Fin (gameDim B V)) => v (1, j)).1 = Sum.inr (Sum.inl tr.src) (Canon (MachPh.arity prog.vars tr.src) fun (j : Fin (gameDim B V)) => v (1, j)) Agree (MachPh.arity prog.vars tr.src) (fun (j : Fin (gameDim B V)) => v (0, j)) fun (j : Fin (gameDim B V)) => v (1, j)
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_tdstF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {t t' : GameTag B V M} {v : Fin 2 × Fin (gameDim B V)A} :
                                          (prog.tdstF t t').Realize v ∃ (tr : TrTag B V M), (t, fun (j : Fin (gameDim B V)) => v (0, j)).1 = Sum.inr (Sum.inr tr) (t', fun (j : Fin (gameDim B V)) => v (1, j)).1 = Sum.inr (Sum.inl tr.dst) (Canon (MachPh.arity prog.vars tr.dst) fun (j : Fin (gameDim B V)) => v (1, j)) Agree (MachPh.arity prog.vars tr.dst) (fun (j : Fin (gameDim B V)) => v (0, j)) fun (j : Fin (gameDim B V)) => v (1, j)
                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_constF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} (h₀ : IsBot a₀) {n : } {i : Fin n} {t' τ : GameTag B V M} {v : Fin n × Fin (gameDim B V)A} :
                                          (sideF (Fin n × Fin (gameDim B V)) (t' = τ)canonF 0 (argVar n i)).Realize v (t', fun (j : Fin (gameDim B V)) => v (i, j)) = (τ, fun (x : Fin (gameDim B V)) => a₀)

                                          A tag and a constant tuple: the shape every mark and every phase of the game has.

                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.padTup_iff_eq_pad {A : Type} [LinearOrder A] {a₀ : A} (h₀ : IsBot a₀) {m D : } (f : Fin mFin D) (u x : Fin DA) :
                                          PadTup f u x x = pad a₀ fun (l : Fin m) => u (f l)

                                          A tuple satisfies DescriptiveComplexity.PadTup exactly when it is the padding it names.

                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.argsOf_addrIx {B : SOBlock} {V : } {A : Type} (i : B.ι) (w : Fin (gameDim B V)A) :
                                          (fun (l : Fin (B.arity i)) => w (addrIx i l)) = argsOf i (addrOf w)

                                          The address a symbol reads is the second half of a transition's tuple.

                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.pref_cellIx {B : SOBlock} {V : } {A : Type} (i : B.ι) (w : Fin (gameDim B V)A) :
                                          (fun (l : Fin (B.arity i)) => w (cellIx i l)) = pref w

                                          And a cell's own address is the first half of its tuple.

                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_symF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} (h₀ : IsBot a₀) {s : SymTag B} {t' : GameTag B V M} {v : Fin 2 × Fin (gameDim B V)A} :
                                          (match s with | SymTag.mark b => sideF (Fin 2 × Fin (gameDim B V)) (t' = Sum.inl (TapeTag.mark b))canonF 0 (argVar 2 1) | SymTag.val b r i => sideF (Fin 2 × Fin (gameDim B V)) (t' = Sum.inl (TapeTag.val b r i))padTupF (addrIx i) (argVar 2 0) (argVar 2 1)).Realize v (t', fun (j : Fin (gameDim B V)) => v (1, j)) = gameSymPt a₀ s (addrOf fun (j : Fin (gameDim B V)) => v (0, j))
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_treadF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {t t' : GameTag B V M} {v : Fin 2 × Fin (gameDim B V)A} (h₀ : IsBot a₀) :
                                          (treadF t t').Realize v ∃ (tr : TrTag B V M), (t, fun (j : Fin (gameDim B V)) => v (0, j)).1 = Sum.inr (Sum.inr tr) (t', fun (j : Fin (gameDim B V)) => v (1, j)) = gameSymPt a₀ tr.rd (addrOf fun (j : Fin (gameDim B V)) => v (0, j))
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_twriteF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {t t' : GameTag B V M} {v : Fin 2 × Fin (gameDim B V)A} (h₀ : IsBot a₀) :
                                          (twriteF t t').Realize v ∃ (tr : TrTag B V M), (t, fun (j : Fin (gameDim B V)) => v (0, j)).1 = Sum.inr (Sum.inr tr) (t', fun (j : Fin (gameDim B V)) => v (1, j)) = gameSymPt a₀ tr.wr (addrOf fun (j : Fin (gameDim B V)) => v (0, j))
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_inpF {L : FirstOrder.Language} {B : SOBlock} {V M : } {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {t t' : GameTag B V M} {v : Fin 2 × Fin (gameDim B V)A} (h₀ : IsBot a₀) (hdim : blockArityBound B gameDim B V) :
                                          (inpF t t').Realize v machInp a₀ hdim (t, fun (j : Fin (gameDim B V)) => v (0, j)) (t', fun (j : Fin (gameDim B V)) => v (1, j))
                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_eqIxF {L : FirstOrder.Language} {B : SOBlock} {V : } {A : Type} [L.Structure A] [LinearOrder A] {γ : Type} {m : } {f g : Fin mFin (gameDim B V)} {u : Fin (gameDim B V)γ} {v : γA} :
                                          (eqIxF f g u).Realize v (fun (l : Fin m) => v (u (f l))) = fun (l : Fin m) => v (u (g l))
                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_concOkF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {p : MachPh V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (prog.concOkF p).Realize v prog.concOk p fun (j : Fin (gameDim B V)) => v (0, j)
                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_isTargetF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {p : MachPh V M} {s : SymTag B} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (prog.isTargetF p s).Realize v prog.isTarget p s fun (j : Fin (gameDim B V)) => v (0, j)
                                          Dependency graph
                                          theorem DescriptiveComplexity.GameProg.realize_ruleF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {tr : TrTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (prog.ruleF tr).Realize v gameRule prog.vars prog.natoms prog.concOk prog.isTarget tr fun (j : Fin (gameDim B V)) => v (0, j)
                                          Dependency graph
                                          @[simp]
                                          theorem DescriptiveComplexity.GameProg.realize_trF {L : FirstOrder.Language} {B : SOBlock} {V M : } {prog : GameProg (L.sum FirstOrder.Language.order) B V M} {A : Type} [L.Structure A] [LinearOrder A] {t : GameTag B V M} {v : Fin 1 × Fin (gameDim B V)A} :
                                          (prog.trF t).Realize v ∃ (tr : TrTag B V M), (t, fun (j : Fin (gameDim B V)) => v (0, j)).1 = Sum.inr (Sum.inr tr) gameRule prog.vars prog.natoms prog.concOk prog.isTarget tr fun (j : Fin (gameDim B V)) => v (0, j)
                                          Dependency graph

                                          The interpretation, and the machines agree #

                                          The machine of a program, written down: an interpretation of the alternating-machine vocabulary in the ordered source vocabulary, tagged by the machine's own tags.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            Dependency graph

                                            The interpreted universe is the machine's own, with nothing added.

                                            Equations
                                            Instances For
                                              Dependency graph
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_one {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {R : (FirstOrder.Language.turingAlt 2).Relations 1} {p : GamePt B V M A} {φ : GameTag B V M(L.sum FirstOrder.Language.order).Formula (Fin 1 × Fin (gameDim B V))} (hR : prog.gameInterp.relFormula R = fun (t : Fin 1GameTag B V M) => φ (t 0)) :
                                              FirstOrder.Language.Structure.RelMap R ![prog.gameMapEquiv p] (φ p.1).Realize fun (q : Fin 1 × Fin (gameDim B V)) => p.2 q.2

                                              The valuation a unary relation's argument supplies.

                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_two {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {R : (FirstOrder.Language.turingAlt 2).Relations 2} {p q : GamePt B V M A} {φ : GameTag B V MGameTag B V M(L.sum FirstOrder.Language.order).Formula (Fin 2 × Fin (gameDim B V))} (hR : prog.gameInterp.relFormula R = fun (t : Fin 2GameTag B V M) => φ (t 0) (t 1)) :
                                              FirstOrder.Language.Structure.RelMap R ![prog.gameMapEquiv p, prog.gameMapEquiv q] (φ p.1 q.1).Realize fun (x : Fin 2 × Fin (gameDim B V)) => (if x.1 = 0 then p.2 else q.2) x.2

                                              The valuation a binary relation's arguments supply.

                                              Dependency graph

                                              The machines agree #

                                              theorem DescriptiveComplexity.GameProg.relMap_posn {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (p : GamePt B V M A) :
                                              ATMPosn (prog.gameMapEquiv p) (prog.machine a₀ hdim).Posn p
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_tr {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (p : GamePt B V M A) :
                                              ATMTr (prog.gameMapEquiv p) (prog.machine a₀ hdim).Tr p
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_start {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (h₀ : IsBot a₀) (p : GamePt B V M A) :
                                              ATMStart (prog.gameMapEquiv p) (prog.machine a₀ hdim).Start p
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_acc {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (p : GamePt B V M A) :
                                              ATMAcc (prog.gameMapEquiv p) (prog.machine a₀ hdim).Acc p
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_blank {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (h₀ : IsBot a₀) (p : GamePt B V M A) :
                                              ATMBlank (prog.gameMapEquiv p) (prog.machine a₀ hdim).Blank p
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_right {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (p : GamePt B V M A) :
                                              ATMRight (prog.gameMapEquiv p) (prog.machine a₀ hdim).Right p
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_le {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (p q : GamePt B V M A) :
                                              ATMLe (prog.gameMapEquiv p) (prog.gameMapEquiv q) (prog.machine a₀ hdim).Le p q
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_tsrc {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (p q : GamePt B V M A) :
                                              ATMSrc (prog.gameMapEquiv p) (prog.gameMapEquiv q) (prog.machine a₀ hdim).Src p q
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_tdst {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (p q : GamePt B V M A) :
                                              ATMDst (prog.gameMapEquiv p) (prog.gameMapEquiv q) (prog.machine a₀ hdim).Dst p q
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_tread {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (h₀ : IsBot a₀) (p q : GamePt B V M A) :
                                              ATMRead (prog.gameMapEquiv p) (prog.gameMapEquiv q) (prog.machine a₀ hdim).Read p q
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_twrite {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (h₀ : IsBot a₀) (p q : GamePt B V M A) :
                                              ATMWrite (prog.gameMapEquiv p) (prog.gameMapEquiv q) (prog.machine a₀ hdim).Write p q
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_inp {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (h₀ : IsBot a₀) (p q : GamePt B V M A) :
                                              ATMInp (prog.gameMapEquiv p) (prog.gameMapEquiv q) (prog.machine a₀ hdim).Inp p q
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.relMap_blk {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (j : ) (p : GamePt B V M A) :
                                              ATMBlk j (prog.gameMapEquiv p) (prog.machine a₀ hdim).Blk j p
                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.altAgree_gameMachine {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (h₀ : IsBot a₀) :
                                              ATMData.AltAgree prog.gameMapEquiv (prog.machine a₀ hdim) (atmData 2 (prog.gameInterp.Map A))

                                              The interpreted structure describes the machine: every field of DescriptiveComplexity.atmData on it agrees, along the identity, with the machine of the program.

                                              Dependency graph
                                              theorem DescriptiveComplexity.GameProg.altAgree_gameMachine' {L : FirstOrder.Language} {B : SOBlock} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) B V M) {A : Type} [L.Structure A] [LinearOrder A] {a₀ : A} {hdim : blockArityBound B gameDim B V} (h₀ : IsBot a₀) :
                                              ATMData.AltAgree prog.gameMapEquiv.symm (atmData 2 (prog.gameInterp.Map A)) (prog.machine a₀ hdim)

                                              The agreement in the other direction, along the same identity.

                                              Dependency graph

                                              The instance, and the reduction #

                                              theorem DescriptiveComplexity.GameProg.atmAcceptSpace_map_iff {L : FirstOrder.Language} {spec : SOGameSpec L} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) spec.B V M) (hplays : ∀ (q : GameQuestion), (prog.data q).Plays (spec.question q)) (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] :

                                              The interpreted structure is a yes-instance exactly when the game is won. The machine is well formed and its marks split its states by construction, so the only content is the simulation DescriptiveComplexity.altAcceptsSpace_iff_accepts, carried across the identity by DescriptiveComplexity.ATMData.AltAgree. The bottom element the machine is built over is the structure's own minimum, which exists because the universe is finite and nonempty.

                                              Dependency graph
                                              noncomputable def DescriptiveComplexity.GameProg.soGame_ordered_fo_reduction_atmAcceptSpace {L : FirstOrder.Language} [L.IsRelational] {spec : SOGameSpec L} {V M : } (prog : GameProg (L.sum FirstOrder.Language.order) spec.B V M) {P : DecisionProblem L} (hspec : ∀ (A : Type) [inst : L.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A], P.Holds A spec.Accepts A) (hplays : ∀ (q : GameQuestion), (prog.data q).Plays (spec.question q)) :

                                              A second-order alternating game reduces to alternating acceptance in bounded space: the machine of the program, written down.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                Dependency graph

                                                EXPTIME-hardness #

                                                Every SO-GAME definable problem reduces to alternating acceptance in bounded space.

                                                Dependency graph

                                                Alternating acceptance in bounded space is EXPTIME-hard. Every SO(≤, LFP) definable problem is a second-order alternating game (DescriptiveComplexity.SOLFPDefinable.soGameDefinable), every such game has a program (DescriptiveComplexity.exists_gameProg), and the machine of that program is first-order definable in the instance.

                                                Dependency graph

                                                Alternating acceptance in bounded space is EXPTIME-complete, which is Chandra, Kozen and Stockmeyer's APSPACE = EXPTIME: an alternating machine that may use as much space as its input has positions decides exactly the problems of deterministic exponential time.

                                                Dependency graph