Documentation

DescriptiveComplexity.Savitch

Savitch's recursive doubling #

The combinatorial half of Savitch's theorem (Savitch 1970), stated for an arbitrary relation and independent of any logic: reachability in a graph whose vertices are only known up to a classifying map into a finite type.

The setting is a relation R on a type St of presentations, together with a map cls : St → T into a finite type of classes, such that R only depends on its endpoints through their classes (DescriptiveComplexity.SavInv). That extra generality is what the reduction of SUCCINCT-REACH to QSAT needs: a state of a succinctly described transition system is a predicate on the whole universe, but the clauses only read it on the state variables, so the honest vertex set is the (finite) quotient.

Three notions of bounded reachability live here:

The two stagings agree, DescriptiveComplexity.savPow_iff_savLe : SavPow k = SavLe (2 ^ k), and the pigeonhole DescriptiveComplexity.savLe_card says that SavLe saturates at Nat.card T moves – a walk that revisits a class can be shortened. Together they give the statement a reduction uses, DescriptiveComplexity.savPow_of_reflTransGen: as soon as 2 ^ k classes are enough, SavPow k is reachability.

Moves, and the two stagings #

def DescriptiveComplexity.SavStep {St T : Type} (cls : StT) (R : StStProp) (X Y : St) :

One move of the walk: a step of R, or standing still inside a class. The reflexive part is cls-equality rather than equality because a class, not a presentation, is what the walk really visits.

Equations
Instances For
    Dependency graph
    def DescriptiveComplexity.SavLe {St T : Type} (cls : StT) (R : StStProp) :
    StStProp

    Reachability in at most n moves: the linear staging.

    Equations
    Instances For
      Dependency graph
      def DescriptiveComplexity.SavPow {St T : Type} (cls : StT) (R : StStProp) :
      StStProp

      Savitch's staging: SavPow k is “reachable through a midpoint, twice at level k - 1”, which is reachability in at most 2 ^ k moves (DescriptiveComplexity.savPow_iff_savLe) written with k nested midpoints.

      Equations
      Instances For
        Dependency graph
        def DescriptiveComplexity.SavInv {St T : Type} (cls : StT) (R : StStProp) :

        The walk only depends on its endpoints through their classes: the hypothesis that makes the classes, rather than the presentations, the vertices.

        Equations
        Instances For
          Dependency graph

          Class-invariance of the stagings #

          theorem DescriptiveComplexity.savStep_congr {St T : Type} {cls : StT} {R : StStProp} (h : SavInv cls R) {X X' Y Y' : St} (hX : cls X = cls X') (hY : cls Y = cls Y') (hs : SavStep cls R X Y) :
          SavStep cls R X' Y'
          Dependency graph
          theorem DescriptiveComplexity.savLe_congr {St T : Type} {cls : StT} {R : StStProp} (h : SavInv cls R) (n : ) {X X' Y Y' : St} :
          cls X = cls X'cls Y = cls Y'SavLe cls R n X YSavLe cls R n X' Y'
          Dependency graph
          theorem DescriptiveComplexity.savPow_congr {St T : Type} {cls : StT} {R : StStProp} (h : SavInv cls R) (k : ) {X X' Y Y' : St} :
          cls X = cls X'cls Y = cls Y'SavPow cls R k X YSavPow cls R k X' Y'
          Dependency graph

          The linear staging #

          theorem DescriptiveComplexity.savLe_succ {St T : Type} {cls : StT} {R : StStProp} {n : } {X Y : St} (hs : SavLe cls R n X Y) :
          SavLe cls R (n + 1) X Y
          Dependency graph
          theorem DescriptiveComplexity.savLe_of_le {St T : Type} {cls : StT} {R : StStProp} {m n : } (hmn : m n) {X Y : St} (hs : SavLe cls R m X Y) :
          SavLe cls R n X Y
          Dependency graph
          theorem DescriptiveComplexity.savLe_of_savStep {St T : Type} {cls : StT} {R : StStProp} {X Y : St} (hs : SavStep cls R X Y) :
          SavLe cls R 1 X Y
          Dependency graph
          theorem DescriptiveComplexity.savLe_add {St T : Type} {cls : StT} {R : StStProp} (h : SavInv cls R) (a b : ) {X Y : St} :
          SavLe cls R (a + b) X Y ∃ (Z : St), SavLe cls R a X Z SavLe cls R b Z Y

          The linear staging composes: walking a + b moves is walking a and then b.

          Dependency graph

          The two stagings agree #

          theorem DescriptiveComplexity.savPow_iff_savLe {St T : Type} {cls : StT} {R : StStProp} (h : SavInv cls R) (k : ) {X Y : St} :
          SavPow cls R k X Y SavLe cls R (2 ^ k) X Y

          Savitch's staging is the linear one at 2 ^ k: k nested midpoints describe a walk of exponentially many moves.

          Dependency graph

          Reachability, and the pigeonhole #

          theorem DescriptiveComplexity.exists_savLe_of_reflTransGen {St T : Type} {cls : StT} {R : StStProp} {X Y : St} (hr : Relation.ReflTransGen R X Y) :
          ∃ (n : ), SavLe cls R n X Y
          Dependency graph
          theorem DescriptiveComplexity.reflTransGen_of_savLe {St T : Type} {cls : StT} {R : StStProp} (h : SavInv cls R) (n : ) {X Y : St} :
          SavLe cls R n X Y∃ (Y' : St), cls Y' = cls Y Relation.ReflTransGen R X Y'

          A bounded walk is a genuine walk, up to the class of its endpoint.

          Dependency graph
          theorem DescriptiveComplexity.savLe_card {St T : Type} {cls : StT} {R : StStProp} [Finite T] (h : SavInv cls R) (X : St) (n : ) {Y : St} :
          SavLe cls R n X YSavLe cls R (Nat.card T) X Y

          The pigeonhole: a walk saturates after as many moves as there are classes. The set of classes reached in at most n moves grows with n, and as soon as it stops growing it stops growing for good, so it is stable by the time n reaches Nat.card T.

          Dependency graph
          theorem DescriptiveComplexity.savPow_of_reflTransGen {St T : Type} {cls : StT} {R : StStProp} [Finite T] (h : SavInv cls R) {k : } (hk : Nat.card T 2 ^ k) {X Y : St} (hr : Relation.ReflTransGen R X Y) :
          SavPow cls R k X Y

          Savitch's staging computes reachability, as soon as it is deep enough for the number of classes.

          Dependency graph