Documentation

DescriptiveComplexity.MachinesAltPlay

One block at a time: collapsing the moves of a player into a single play #

The mathematical content of the machine bridge for the polynomial hierarchy. DescriptiveComplexity.ATMData.AltAcc recurses one step at a time, handing each move to the owner of the current state's block; a Σₖ definition, and the k-round game it describes, hands each player all of its moves at once. That the two agree is the content of this file, and it is where the alternation bound is spent: because a transition never decreases the block index and never raises it by more than one (DescriptiveComplexity.ATMData.BlocksWellFormed), the times at which a given player moves form one contiguous stretch of the run – a play of the block – and the whole stretch may be committed in a single quantifier.

The two collapses #

A play of block i from c (DescriptiveComplexity.ATMData.BlockPlay) is a sequence of genuine steps whose configurations are, up to the last one, in block i and not accepting: it stops exactly when the machine accepts or hands over to block i + 1.

Both statements are equivalences, and both are proved by induction on the budget with the play generalized, so no strategy tree is ever built.

Reading the block structure #

theorem DescriptiveComplexity.ATMData.blk_unique {A : Type} {M : ATMData A} {k : } (hbwf : M.BlocksWellFormed k) {q : A} {j j' : } (h : M.Blk j q) (h' : M.Blk j' q) :
j = j'

A state has only one block.

Dependency graph
theorem DescriptiveComplexity.ATMData.not_isUniv_of_blk {A : Type} {M : ATMData A} {k : } (hbwf : M.BlocksWellFormed k) {start : Bool} {i : } {q : A} (h : M.Blk i q) (hpol : blockPol start i = true) :
¬M.IsUniv start q

A state of an existential block belongs to the existential player.

Dependency graph
theorem DescriptiveComplexity.ATMData.isUniv_of_blk {A : Type} {M : ATMData A} {start : Bool} {i : } {q : A} (h : M.Blk i q) (hpol : blockPol start i = false) :
M.IsUniv start q

A state of a universal block belongs to the universal player.

Dependency graph
theorem DescriptiveComplexity.ATMData.blk_step {A : Type} {M : ATMData A} {k : } (hbwf : M.BlocksWellFormed k) {i : } {c d : Config A} (hstep : M.Step c d) (hi : M.Blk i c.state) :
M.Blk i d.state M.Blk (i + 1) d.state

A step stays in its block or moves to the next one: the alternation bound, read on a single step.

Dependency graph

Plays of a block #

def DescriptiveComplexity.ATMData.BlockPlay {A : Type} (M : ATMData A) (i : ) (c : Config A) ( : ) (f : Config A) :

A play of block i from c: genuine steps, whose configurations before the last one are in block i and not accepting. A play therefore stops as soon as the machine accepts or hands over to the next block, and its last configuration is the one the next round of the game starts from.

Equations
Instances For
    Dependency graph
    def DescriptiveComplexity.ATMData.PlayEnds {A : Type} (M : ATMData A) (start : Bool) (i n : ) (f : Config A) :

    A play of an existential block ends well: accepting, or handing an accepting configuration over to block i + 1.

    Equations
    Instances For
      Dependency graph
      def DescriptiveComplexity.ATMData.UnivPlayOk {A : Type} (M : ATMData A) (start : Bool) (i n : ) (f : Config A) :

      A play of a universal block is all right: what it hands over to block i + 1 accepts, and if it is still inside the block without having accepted then it can – and must – go on, so the universal player can neither get stuck nor run the budget out inside the block.

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

        Prepending and shifting a play #

        The play f with c prepended.

        Equations
        Instances For
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.ATMData.consPlay_zero {A : Type} (c : Config A) (f : Config A) :
          consPlay c f 0 = c
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.ATMData.consPlay_succ {A : Type} (c : Config A) (f : Config A) (j : ) :
          consPlay c f (j + 1) = f j
          Dependency graph
          theorem DescriptiveComplexity.ATMData.BlockPlay.cons {A : Type} {M : ATMData A} {i : } {c d : Config A} { : } {f : Config A} (h : M.BlockPlay i d f) (hstep : M.Step c d) (hblk : M.Blk i c.state) (hacc : ¬M.Acc c.state) :
          M.BlockPlay i c ( + 1) (consPlay c f)

          Prepending a step to a play of the same block.

          Dependency graph
          theorem DescriptiveComplexity.ATMData.BlockPlay.tail {A : Type} {M : ATMData A} {i : } {c : Config A} { : } {f : Config A} (h : M.BlockPlay i c ( + 1) f) :
          M.BlockPlay i (f 1) fun (j : ) => f (j + 1)

          The play f with its first configuration dropped.

          Dependency graph

          Running an existential play #

          theorem DescriptiveComplexity.ATMData.altAcc_of_steps {A : Type} {M : ATMData A} {start : Bool} (n : ) (f : Config A) :
          n(∀ j < , M.Step (f j) (f (j + 1)))(∀ j < , ¬M.IsUniv start (f j).state)M.AltAcc start (n - ) (f )M.AltAcc start n (f 0)

          A run of moves that all belong to the existential player accepts as soon as its end does. This is the “easy” half of both collapses: the budget is spent one step at a time, and each step is a legitimate existential choice.

          Dependency graph

          The existential collapse #

          theorem DescriptiveComplexity.ATMData.altAcc_iff_exists_play {A : Type} {M : ATMData A} {k : } (hbwf : M.BlocksWellFormed k) {start : Bool} {i : } {c : Config A} (hpol : blockPol start i = true) (hi : M.Blk i c.state) (n : ) :
          M.AltAcc start n c n, ∃ (f : Config A), M.BlockPlay i c f M.PlayEnds start i n f

          The moves of an existential block collapse into one play.

          Dependency graph

          The universal collapse #

          theorem DescriptiveComplexity.ATMData.altAcc_iff_forall_play {A : Type} {M : ATMData A} {k : } (hbwf : M.BlocksWellFormed k) {start : Bool} {i : } {c : Config A} (hpol : blockPol start i = false) (hi : M.Blk i c.state) (n : ) :
          M.AltAcc start n c n, ∀ (f : Config A), M.BlockPlay i c fM.UnivPlayOk start i n f

          The moves of a universal block collapse into one play.

          Dependency graph