Documentation

DescriptiveComplexity.Problems.Machine.AltRel

The ladder, written with the relations a second-order block guesses #

A second-order block cannot guess a function A → Config A; it guesses the three relations of DescriptiveComplexity.tmGuessBlockQ t q, “the state at time t is q”, H t p, “the head is on p”, and T t p a, “the cell p holds a”. DescriptiveComplexity.Problems.Machine.Walk already relates the two forms existentially (DescriptiveComplexity.TMData.exists_relWalk_iff_exists_walk); the ladder needs more, because its rounds alternate: a universal round quantifies over all assignments and must be able to assume that the one it is given is functional.

So this file is the pointwise dictionary. DescriptiveComplexity.Graphs ρ w says the assignment ρ is the graph of the walk w; every assignment that is functional is a graph (DescriptiveComplexity.exists_graphs) and every walk has one (DescriptiveComplexity.graphOf), and each condition the game puts on a walk gets a relational twin that agrees with it along the dictionary. The transfer of a whole quantifier is DescriptiveComplexity.bareQ_transfer, and the result is DescriptiveComplexity.ATMData.altLadder_iff_runAltLadder.

One condition is not a transcription: “the walk stands still because it is stuck” quantifies over the successor configurations, which a first-order formula cannot do. It does not have to: DescriptiveComplexity.TMData.exists_step_iff_appTr says a successor exists exactly when an applicable transition does – the successor configuration can be assembled from the transition's own data – and that is a first-order condition on the transition table.

Applicable transitions #

A transition applies to the configuration c: it fires on the state and the symbol under the head, it has a target state and a symbol to write, and the head has somewhere to move. Unlike “c has a successor” this quantifies only over elements of the universe.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Dependency graph
    theorem DescriptiveComplexity.TMData.exists_step_iff_appTr {A : Type} {M : TMData A} {c : Config A} :
    (∃ (c' : Config A), M.Step c c') M.AppTr c

    Having a successor is having an applicable transition: the successor configuration is assembled from the transition, writing under the head and leaving every other cell alone.

    Dependency graph

    A guessed run, and the walk it is the graph of #

    The state relation of a guessed run: at time t the state is q.

    Equations
    Instances For
      Dependency graph

      The head relation of a guessed run: at time t the head is on p.

      Equations
      Instances For
        Dependency graph

        The tape relation of a guessed run: at time t the cell p holds a.

        Equations
        Instances For
          Dependency graph

          The guess is functional, the six clauses that make it read as one configuration per time.

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

            The guess is the graph of the walk w.

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

              The graph of a walk, as an assignment of the guessing block.

              Equations
              Instances For
                Dependency graph
                @[simp]
                Dependency graph
                theorem DescriptiveComplexity.eq_of_iff_eq {α : Type} {x y : α} (h : ∀ (a : α), a = x a = y) :
                x = y

                Two values with the same graph are equal.

                Dependency graph
                theorem DescriptiveComplexity.RunFun.of_graphs {A : Type} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) :

                A graph is functional.

                Dependency graph
                theorem DescriptiveComplexity.exists_graphs {A : Type} {ρ : tmGuessBlock.Assignment A} (h : RunFun ρ) :
                ∃ (w : AConfig A), Graphs ρ w

                A functional guess is a graph: the configuration at each time is the one its three relations single out.

                Dependency graph

                Transferring a quantifier #

                theorem DescriptiveComplexity.bareQ_transfer {A : Type} (pol : Bool) {Cw Pw : (AConfig A)Prop} { : tmGuessBlock.Assignment AProp} (hC : ∀ (ρ : tmGuessBlock.Assignment A) (w : AConfig A), Graphs ρ w → ( ρ Cw w)) (hP : ∀ (ρ : tmGuessBlock.Assignment A) (w : AConfig A), Graphs ρ w → ( ρ Pw w)) :
                bareQ pol Cw Pw bareQ pol (fun (ρ : tmGuessBlock.Assignment A) => RunFun ρ ρ)

                A quantifier over walks is a quantifier over functional guesses. The guard picks up the functionality clauses; everything else is read through the dictionary.

                Dependency graph

                The conditions of the game, relationally #

                The state at time t is accepting.

                Equations
                Instances For
                  Dependency graph

                  The state at time t is in block j.

                  Equations
                  Instances For
                    Dependency graph

                    The state at time t is in a block below i.

                    Equations
                    Instances For
                      Dependency graph

                      The configuration at time t is initial.

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

                        Some transition applies to the configuration at time t.

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

                          The configuration at time t' of ρ' is the one at time t of ρ.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            Dependency graph
                            @[reducible, inline]

                            The step clause, relationally, is DescriptiveComplexity.TMData.RelStep of the three relations.

                            Equations
                            Instances For
                              Dependency graph

                              The blocks of a guessed run never decrease.

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

                                A guessed run legal below block i.

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

                                  The guessed run accepts: its state at the highest time is accepting.

                                  Equations
                                  Instances For
                                    Dependency graph

                                    The guessed run ρ' reproduces what ρ committed below block i.

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

                                      The condition round i puts on its guess.

                                      Equations
                                      Instances For
                                        Dependency graph

                                        The dictionary #

                                        theorem DescriptiveComplexity.ATMData.runAcc_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (t : A) :
                                        M.RunAcc ρ t M.Acc (w t).state
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runBlk_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (j : ) (t : A) :
                                        M.RunBlk ρ j t M.Blk j (w t).state
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runBlkLt_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (i : ) (t : A) :
                                        M.RunBlkLt ρ i t M.BlkLt i (w t).state
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runInit_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (t : A) :
                                        M.RunInit ρ t M.IsInit (w t)
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runSame_iff {A : Type} {ρ ρ' : tmGuessBlock.Assignment A} {w w' : AConfig A} (hg : Graphs ρ w) (hg' : Graphs ρ' w') (t t' : A) :
                                        RunSame ρ ρ' t t' w' t' = w t
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runAppTr_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (t : A) :
                                        M.RunAppTr ρ t M.AppTr (w t)
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runStuck_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (t : A) :
                                        ¬M.RunAppTr ρ t M.Stuck (w t)
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runStep_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (t t' : A) :
                                        M.RunStep t t' M.Step (w t) (w t')
                                        Dependency graph
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runLegalBelow_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) (i : ) :
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runAccAt_iff {A : Type} {M : ATMData A} {ρ : tmGuessBlock.Assignment A} {w : AConfig A} (h : Graphs ρ w) :
                                        M.RunAccAt ρ M.AccAt w
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runAgreeBelow_iff {A : Type} {M : ATMData A} {ρ ρ' : tmGuessBlock.Assignment A} {w w' : AConfig A} (hg : Graphs ρ w) (hg' : Graphs ρ' w') (i : ) :
                                        M.RunAgreeBelow ρ ρ' i M.AgreeBelow i w' w
                                        Dependency graph
                                        theorem DescriptiveComplexity.ATMData.runRoundCond_iff {A : Type} {M : ATMData A} {ρ ρ' : tmGuessBlock.Assignment A} {w w' : AConfig A} (hg : Graphs ρ w) (hg' : Graphs ρ' w') (i : ) :
                                        M.RunRoundCond ρ ρ' i M.RoundCond i w w'
                                        Dependency graph

                                        The ladder over guesses #

                                        The ladder from round i on, over guessed runs.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        • M.runLadder start i 0 x✝ = M.RunAccAt x✝
                                        Instances For
                                          Dependency graph

                                          The whole ladder, over guessed runs: the sentence's semantics.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          • M.RunAltLadder start 0 = False
                                          Instances For
                                            Dependency graph
                                            theorem DescriptiveComplexity.ATMData.gameLadder_iff_runLadder {A : Type} (M : ATMData A) (start : Bool) (m i : ) (ρprev : tmGuessBlock.Assignment A) (prev : AConfig A) :
                                            Graphs ρprev prev → (M.gameLadder start i m prev M.runLadder start i m ρprev)

                                            The ladder over walks is the ladder over guesses, from round i on.

                                            Dependency graph
                                            theorem DescriptiveComplexity.ATMData.altLadder_iff_runAltLadder {A : Type} (M : ATMData A) (start : Bool) (n : ) :
                                            M.AltLadder start n M.RunAltLadder start n

                                            The whole ladder over walks is the whole ladder over guesses.

                                            Dependency graph