Documentation

DescriptiveComplexity.Problems.Qsat.Complement

The complement of QSAT is in PSPACE #

The walk of DescriptiveComplexity.Problems.Qsat.Membership does not search for an accepting computation: it is deterministic, and its single run computes the value of the quantified formula. That is what makes the complement of QSAT as cheap as QSAT itself – the walk is the same, only the accepting condition changes.

DescriptiveComplexity.qsSpecCo therefore reuses DescriptiveComplexity.qsSpec's transition sentence verbatim and accepts the returning state at the empty branch carrying the value false. One point needs care: a malformed instance is a no-instance of QSAT, hence a yes-instance of its complement, and the run of the walk says nothing about it – on a malformed prefix neither the next nor the last variable of a position need exist. So the source sentence has a second disjunct, which starts a malformed instance directly in an accepting state.

This is the whole content of PSPACE = coPSPACE (DescriptiveComplexity.PSpaceCompl): every SO(TC) definable problem reduces to QSAT, and complementing a reduction is free.

The complementary specification #

The accepting states of the complementary walk: back at the empty branch, returning the value false.

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

    The complementary specification: the depth-first evaluation of the game tree again – the same transition sentence – accepting when the value computed is false, or when the instance is malformed, in which case the walk starts where it would have ended.

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

      Reading the specification back #

      theorem DescriptiveComplexity.qsatWf_iff_conj {A : Type} [FirstOrder.Language.qsat.Structure A] :
      ((∀ (x y : A), QPrec x y → IsQVar x ∧ IsQVar y) ∧ (∀ (x : A), ¬QPrec x x) ∧ (∀ (x y z : A), QPrec x y → QPrec y z → QPrec x z) ∧ ∀ (x y : A), IsQVar x → IsQVar y → x ≠ y → QPrec x y ∨ QPrec y x) ↔ QsatWf A
      Dependency graph

      Correctness #

      Dependency graph

      The complement of QSAT is SO(TC) definable: the walk that decides QSAT is deterministic, so reading its answer the other way round decides the complement.

      Dependency graph

      The complement of QSAT is in PSPACE, i.e., QSAT ∈ coPSPACE.

      Dependency graph