Documentation

DescriptiveComplexity.PSpaceHierarchy

PH ⊆ PSPACE #

The theorem: every level of the polynomial hierarchy is inside polynomial space (DescriptiveComplexity.PH_subset_PSPACE). A Σₖ sentence is not a walk, so this is not a syntactic inclusion; it is two closure properties of SO(TC) put together, alternated along the quantifier prefix:

The second is the construction of this file. The state of DescriptiveComplexity.SOTCSpec.exBlock is an assignment of the merged block DescriptiveComplexity.SOBlock.cons; its transition sentence is the conjunction of DescriptiveComplexity.fixedS – the guessed component is unchanged, one universally quantified equivalence per relation variable of it – with the inner transition sentence read through DescriptiveComplexity.consTwoLHom; and its endpoints are the inner ones read through DescriptiveComplexity.consOneLHom. Because a step never moves the guessed component, a whole walk keeps it fixed (DescriptiveComplexity.exBlock_reach), so accepting is accepting the inner walk under some assignment of it (DescriptiveComplexity.exBlock_accepts_iff).

The prefix is then peeled one block at a time (DescriptiveComplexity.sotcDefinable_soProblem), the base case being that a first-order sentence is a walk with a trivial block and no step. Level 0 of the hierarchy is not second-order at all and goes through PTIME ⊆ NP ⊆ PSPACE.

Reading a spec over a block expansion through the merge #

The renaming of a one-copy expansion: the symbols of the guessed block B land in the left component of the merged block.

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

    The renaming of a two-copy expansion: the symbols of the guessed block land in the left component of the first copy of the merged block.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph
      Dependency graph
      theorem DescriptiveComplexity.consTwoLHom_isExpansionOn {L : FirstOrder.Language} {B M : SOBlock} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ₀ σ₀ : B.Assignment A) (ρ₁ σ₁ : M.Assignment A) :
      Dependency graph

      The guessed block does not change #

      @[reducible, inline]

      The relation variable i of the guessed block, in the first copy of the merged block.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The relation variable i of the guessed block, in the second copy.

        Equations
        Instances For
          Dependency graph

          The relation variable i of the guessed block has the same value in the two copies of the merged block.

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

            The whole guessed block is unchanged by a step.

            Equations
            Instances For
              Dependency graph
              theorem DescriptiveComplexity.realize_fixedAtS {L : FirstOrder.Language} {B M : SOBlock} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ₀ σ₀ : B.Assignment A) (ρ₁ σ₁ : M.Assignment A) (i : B.ι) :
              A fixedAtS L B M i ∀ (x : Fin (B.arity i)A), ρ₀ i x σ₀ i x
              Dependency graph
              theorem DescriptiveComplexity.realize_fixedS {L : FirstOrder.Language} {B M : SOBlock} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ₀ σ₀ : B.Assignment A) (ρ₁ σ₁ : M.Assignment A) :
              A fixedS L B M ρ₀ = σ₀
              Dependency graph

              Prefixing a specification with a guessed block #

              The walk that guesses a block first: its state is an assignment of the merged block, its transition sentence says that the guessed part does not change and that the rest takes a step of spec, and its endpoints are those of spec.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                theorem DescriptiveComplexity.exBlock_isSrc_iff {L : FirstOrder.Language} {B : SOBlock} {spec : SOTCSpec (L.sum B.lang)} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ₀ : B.Assignment A) (ρ₁ : spec.B.Assignment A) :
                (SOTCSpec.exBlock B spec).IsSrc (consAssign ρ₀ ρ₁) spec.IsSrc ρ₁
                Dependency graph
                theorem DescriptiveComplexity.exBlock_isTgt_iff {L : FirstOrder.Language} {B : SOBlock} {spec : SOTCSpec (L.sum B.lang)} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ₀ : B.Assignment A) (ρ₁ : spec.B.Assignment A) :
                (SOTCSpec.exBlock B spec).IsTgt (consAssign ρ₀ ρ₁) spec.IsTgt ρ₁
                Dependency graph
                theorem DescriptiveComplexity.exBlock_step_iff {L : FirstOrder.Language} {B : SOBlock} {spec : SOTCSpec (L.sum B.lang)} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ₀ σ₀ : B.Assignment A) (ρ₁ σ₁ : spec.B.Assignment A) :
                (SOTCSpec.exBlock B spec).Step (consAssign ρ₀ ρ₁) (consAssign σ₀ σ₁) ρ₀ = σ₀ spec.Step ρ₁ σ₁
                Dependency graph
                theorem DescriptiveComplexity.exBlock_step_split {L : FirstOrder.Language} {B : SOBlock} {spec : SOTCSpec (L.sum B.lang)} {A : Type} [instL : L.Structure A] [LinearOrder A] (c d : (B.cons spec.B).Assignment A) (h : (SOTCSpec.exBlock B spec).Step c d) :
                ((fun (i : B.ι) => c (Sum.inl i)) = fun (i : B.ι) => d (Sum.inl i)) spec.Step (fun (j : spec.B.ι) => c (Sum.inr j)) fun (j : spec.B.ι) => d (Sum.inr j)
                Dependency graph
                theorem DescriptiveComplexity.exBlock_reach {L : FirstOrder.Language} {B : SOBlock} {spec : SOTCSpec (L.sum B.lang)} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ σ : (B.cons spec.B).Assignment A) (h : (SOTCSpec.exBlock B spec).Reach ρ σ) :
                ((fun (i : B.ι) => ρ (Sum.inl i)) = fun (i : B.ι) => σ (Sum.inl i)) spec.Reach (fun (j : spec.B.ι) => ρ (Sum.inr j)) fun (j : spec.B.ι) => σ (Sum.inr j)

                The guessed block is the same all along a walk, and the rest of the state walks in the inner specification.

                Dependency graph
                theorem DescriptiveComplexity.exBlock_reach_of {L : FirstOrder.Language} {B : SOBlock} {spec : SOTCSpec (L.sum B.lang)} {A : Type} [instL : L.Structure A] [LinearOrder A] (ρ₀ : B.Assignment A) {ρ₁ σ₁ : spec.B.Assignment A} (h : spec.Reach ρ₁ σ₁) :
                (SOTCSpec.exBlock B spec).Reach (consAssign ρ₀ ρ₁) (consAssign ρ₀ σ₁)
                Dependency graph
                theorem DescriptiveComplexity.exBlock_accepts_iff {L : FirstOrder.Language} {B : SOBlock} {spec : SOTCSpec (L.sum B.lang)} {A : Type} [instL : L.Structure A] [LinearOrder A] :
                (SOTCSpec.exBlock B spec).Accepts A ∃ (ρ₀ : B.Assignment A), spec.Accepts A

                What the guessing walk accepts: exactly what the inner walk accepts, under some assignment of the guessed block.

                Dependency graph
                theorem DescriptiveComplexity.SOTCDefinable.exBlock {L : FirstOrder.Language} {B : SOBlock} {Q : DecisionProblem (L.sum B.lang)} (hQ : SOTCDefinable Q) {P : DecisionProblem L} (h : ∀ (A : Type) [inst : L.Structure A] [Finite A] [Nonempty A], P.Holds A ∃ (ρ : B.Assignment A), Q.Holds A) :

                SO(TC) is closed under prefixing an existential second-order block: the walk carries the guessed block in its own state and never touches it again.

                Dependency graph

                Down the quantifier prefix #

                The decision problem defined by a second-order sentence with a given quantifier prefix: isomorphism-invariant by DescriptiveComplexity.sorealize_iso.

                Equations
                Instances For
                  Dependency graph

                  The base case: a first-order sentence is an SO(TC) condition – a walk with a trivial block and no step.

                  Dependency graph

                  Every second-order sentence defines an SO(TC) condition: peel the prefix one block at a time, guessing an existential block into the state of the walk and complementing at a universal one.

                  Dependency graph

                  PH ⊆ PSPACE #

                  Every Σₖ-definable problem is SO(TC) definable.

                  Dependency graph

                  Every level of the polynomial hierarchy is inside PSPACE.

                  Dependency graph

                  PH ⊆ PSPACE: the polynomial hierarchy is inside polynomial space.

                  Dependency graph

                  Πₖᵖ ⊆ PSPACE as well, since PSPACE is closed under complement.

                  Dependency graph