Documentation

CslibFrontier.Computability.Complexity.Classes.Space.TQBF.Formula

Midpoint formulas #

Reachability in 2 ^ i steps is expressed by a quantified Boolean formula of size linear in i, by the midpoint recursion of Savitch's theorem with a universal quantifier folding the two halves into one copy of the formula of the level below Sipser, Theorem 8.9 Arora and Barak, Theorem 4.13: Φ_{i+1}(a, b) = ∃ m, ∀ x y, ((x = a ∧ y = m) ∨ (x = m ∧ y = b)) → Φ_i(x, y).

The words are held by blocks of w variables (Cslib.Complexity.TQBF.blockVars): at level i the source, the target and the midpoint blocks, numbered by even numbers (Cslib.Complexity.TQBF.blockVar), so that the odd numbers are free for the formula of level 0. Given a formula of level 0 whose value is that of Cslib.Reachability.reach e w 0 on the words held by the source and target blocks of level 0, the midpoint formula of level i (Cslib.Complexity.TQBF.midpoint) has, under every assignment, the value of Cslib.Reachability.reach e w i on the words held by the blocks of level i (Cslib.Complexity.TQBF.eval_midpoint). Fixing the blocks of level d to two words of width w gives a closed formula (Cslib.Complexity.TQBF.savitchFormula) whose value is Cslib.Reachability.reach e w d u v (Cslib.Complexity.TQBF.eval_savitchFormula), as soon as the free variables of the formula of level 0 lie in its two blocks (Cslib.Complexity.TQBF.closed_savitchFormula).

The formulas use the derived connectives of Cslib.Logic.PL.QBF: blocks of quantifiers (Cslib.Logic.PL.QBF.exs, Cslib.Logic.PL.QBF.alls), conjunctions of lists (Cslib.Logic.PL.QBF.conj), implication, equivalence, literals, and formulas in conjunctive normal form (Cslib.Logic.PL.QBF.ofCNF). Their tokens are given here explicitly (Cslib.Logic.PL.QBF.tokens_exs, …), for the polynomial-time construction of the formulas.

Main definitions #

Main results #

References #

Tokens of the derived connectives #

theorem Cslib.Logic.PL.QBF.tokens_exs (vs : List ℕ) (φ : QBF ℕ) :
(exs vs φ).tokens = List.map (fun (v : ℕ) => (Kind.ex, v)) vs ++ φ.tokens
theorem Cslib.Logic.PL.QBF.tokens_alls (vs : List ℕ) (φ : QBF ℕ) :
(alls vs φ).tokens = List.map (fun (v : ℕ) => (Kind.all, v)) vs ++ φ.tokens

Blocks of variables #

The j-th variable of the source (kind = 0), target (kind = 1) or midpoint (kind = 2) block of level i. The variables of the blocks are even.

Instances For

    The variables of the block kind of level i, for words of width w.

    Instances For
      def Cslib.Complexity.TQBF.block (σ : ℕ → Bool) (w kind i : ℕ) :

      The word held by a block under an assignment.

      Instances For
        theorem Cslib.Complexity.TQBF.length_block (σ : ℕ → Bool) (w kind i : ℕ) :
        (block σ w kind i).length = w
        theorem Cslib.Complexity.TQBF.blockVar_mod_two (kind i j : ℕ) :
        blockVar kind i j % 2 = 0

        Block variables are even.

        theorem Cslib.Complexity.TQBF.blockVar_inj {k k' i i' j j' : ℕ} (hk : k < 3) (hk' : k' < 3) (h : blockVar k i j = blockVar k' i' j') :
        k = k' ∧ i = i' ∧ j = j'

        The source and target blocks of a level are disjoint.

        Formulas on blocks #

        The block k of level i holds the same word as the block k' of level i'.

        Instances For

          The block k of level i holds the word u.

          Instances For
            theorem Cslib.Complexity.TQBF.eval_eqBlock (σ : ℕ → Bool) (w k i k' i' : ℕ) :
            Logic.PL.QBF.eval σ (eqBlock w k i k' i') = decide (block σ w k i = block σ w k' i')
            theorem Cslib.Complexity.TQBF.mem_freeVars_eqBlock {w k i k' i' x : ℕ} (hx : x ∈ (eqBlock w k i k' i').freeVars) :
            x ∈ blockVars w k i ∨ x ∈ blockVars w k' i'

            The midpoint formulas #

            The hypothesis of level i + 1: the source and target blocks of level i hold the source of level i + 1 and the midpoint, or the midpoint and the target of level i + 1.

            Instances For

              The midpoint formula of level i: the formula base at level 0, and at level i + 1, some midpoint such that, for all words held by the source and target blocks of level i that form one of the two halves, the formula of level i holds.

              Instances For
                theorem Cslib.Complexity.TQBF.eval_midpoint {e : List Bool → List Bool → Bool} {w : ℕ} {base : Logic.PL.QBF ℕ} (hbase : ∀ (σ : ℕ → Bool), Logic.PL.QBF.eval σ base = Reachability.reach e w 0 (block σ w 0 0) (block σ w 1 0)) (i : ℕ) (σ : ℕ → Bool) :
                Logic.PL.QBF.eval σ (midpoint w base i) = Reachability.reach e w i (block σ w 0 i) (block σ w 1 i)

                The midpoint formulas express reachability by midpoints. If, under every assignment, the formula of level 0 has the value of reach e w 0 on the words held by the source and target blocks of level 0, then so does the formula of every level i, with reach e w i.

                Savitch's formula: the midpoint formula of level d, with its source and target blocks fixed to the words u and v.

                Instances For
                  theorem Cslib.Complexity.TQBF.eval_savitchFormula {e : List Bool → List Bool → Bool} {w : ℕ} {base : Logic.PL.QBF ℕ} (hbase : ∀ (σ : ℕ → Bool), Logic.PL.QBF.eval σ base = Reachability.reach e w 0 (block σ w 0 0) (block σ w 1 0)) (d : ℕ) {u v : List Bool} (hu : u.length = w) (hv : v.length = w) (σ : ℕ → Bool) :

                  Savitch's formula expresses reachability by midpoints, for words of width w.

                  theorem Cslib.Complexity.TQBF.closed_savitchFormula {w : ℕ} {base : Logic.PL.QBF ℕ} (hbase : ∀ x ∈ base.freeVars, x ∈ blockVars w 0 0 ∨ x ∈ blockVars w 1 0) (d : ℕ) (u v : List Bool) :
                  (savitchFormula w d base u v).Closed

                  Savitch's formula is closed, as soon as the free variables of the formula of level 0 lie in the source and target blocks of level 0.

                  Tokens of the midpoint formulas #

                  The tokens of an equivalence of two variables.

                  Instances For

                    The tokens the level i + 1 adds in front of the midpoint formula of level i.

                    Instances For

                      The tokens of the midpoint formula of level d: the levels from d down to 1, then the formula of level 0.