Documentation

DescriptiveComplexity.Problems.Machine.AltTable

The transition table of the QBF machine is a table #

Before any run is considered: each transition has exactly one destination and one symbol written, and the places where two tags could both apply are identified. A mistake in the table shows up here first, which is why this comes before the correctness proof.

Unlike the SAT machine there are three such places, not two:

The elements of the machine, compared #

theorem DescriptiveComplexity.AltQbf.acstI_eq_iff {k : } {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {t t' : AltBase} {i i' : Fin (k + 1)} :
acstI t i = acstI t' i' t = t' i = i'
Dependency graph
theorem DescriptiveComplexity.AltQbf.aoneI_eq_iff {k : } {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {t t' : AltBase} {i i' : Fin (k + 1)} {a a' : A} :
aoneI t i a = aoneI t' i' a' t = t' i = i' a = a'
Dependency graph
theorem DescriptiveComplexity.AltQbf.altV_ext {k : } {A : Type} {τ τ' : AltV k A} (ht : τ.1 = τ'.1) (h0 : τ.2 0 = τ'.2 0) (h1 : τ.2 1 = τ'.2 1) :
τ = τ'

Two elements agree when their tag and both coordinates do.

Dependency graph

The table is functional #

theorem DescriptiveComplexity.AltQbf.altWrite_functional {k : } {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {τ a a' : AltV k A} (h : AltWrite τ a) (h' : AltWrite τ a') :
a = a'

A transition writes exactly one symbol.

Dependency graph
theorem DescriptiveComplexity.AltQbf.altDst_functional {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] [Finite A] [Nonempty A] {cnf : Bool} {τ q q' : AltV k A} (h : AltDst cnf τ q) (h' : AltDst cnf τ q') :
q = q'

A transition moves to exactly one state. The only case with a choice is the check clause, whose two branches are separated by the flag and by DescriptiveComplexity.QbfLit.

Dependency graph

The three branch points #

theorem DescriptiveComplexity.AltQbf.altTr_next_end_excl {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {cnf : Bool} {τ τ' : AltV k A} (h : AltTr cnf τ) (h' : AltTr cnf τ') ( : τ.1.1 = AltBase.tGNext) (hτ' : τ'.1.1 = AltBase.tGEndAcc τ'.1.1 = AltBase.tGEndChk) (hi : τ.1.2 = τ'.1.2) :

A sweep hands over, or ends: the two are separated by the sweep index.

Dependency graph
theorem DescriptiveComplexity.AltQbf.altTr_end_excl {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {cnf : Bool} {τ τ' : AltV k A} (h : AltTr cnf τ) (h' : AltTr cnf τ') ( : τ.1.1 = AltBase.tGEndAcc) (hτ' : τ'.1.1 = AltBase.tGEndChk) :

The end of the last sweep is not ambiguous: an instance either has a clause to check or has none.

Dependency graph
theorem DescriptiveComplexity.AltQbf.altTr_turn_excl {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {cnf : Bool} {τ τ' : AltV k A} {d d' : Bool} (h : AltTr cnf τ) (h' : AltTr cnf τ') ( : τ.1.1 = AltBase.tTurnNext d) (hτ' : τ'.1.1 = AltBase.tTurnAcc d') (hcnf : cnf = true) (hc : τ.2 0 = τ'.2 0) :

A turn is not ambiguous: for a conjunctive matrix the clause just checked either has a successor or is the last one, and for a disjunctive one the two turns fire at different flags.

Dependency graph

Reading the tag off the state and the symbol #

Which base tag the state a transition applies in carries.

Equations
Instances For
    Dependency graph

    Which base tag the symbol a transition reads carries.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altTr_isTrBase {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {cnf : Bool} {τ : AltV k A} ( : AltTr cnf τ) :
      isTrBase τ.1.1 = true

      Only transitions have transition tags.

      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altSrc_base {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] [Finite A] [Nonempty A] {cnf : Bool} {τ q : AltV k A} ( : AltTr cnf τ) (hs : AltSrc cnf τ q) :
      q.1.1 = stateBase cnf τ.1.1 (isSweepBase τ.1.1 = trueq.1.2 = τ.1.2)

      The state a transition applies in has the base tag its own tag names, and its sweep index.

      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altRead_base {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] [Finite A] [Nonempty A] {cnf : Bool} {τ a : AltV k A} ( : AltTr cnf τ) (hr : AltRead τ a) :
      a.1.1 = readBase τ.1.1

      The symbol a transition reads has the base tag its own tag names.

      Dependency graph

      At most one transition applies, away from the guess #

      Dependency graph
      Dependency graph

      The state and the symbol pin the tag, up to the three branch points: the guessing choice, the end of a sweep and the turn.

      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altTr_index_zero {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {cnf : Bool} {τ : AltV k A} ( : AltTr cnf τ) (h : ¬isSweepBase τ.1.1 = true) :
      τ.1.2 = 0

      Away from the sweeps, a transition's sweep index is 0.

      Dependency graph

      Whether a transition's source is a sweeping state is determined by the base tag of that state.

      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altTr_payload {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] [Finite A] [Nonempty A] {cnf : Bool} {τ τ' q a : AltV k A} ( : AltTr cnf τ) (hτ' : AltTr cnf τ') (hs : AltSrc cnf τ q) (hs' : AltSrc cnf τ' q) (hr : AltRead τ a) (hr' : AltRead τ' a) (hb : τ.1.1 = τ'.1.1) :
      τ = τ'

      Equal base tags force equal transitions: the state and the symbol pin one coordinate and the sweep index, and the promises in DescriptiveComplexity.AltTr pin the other.

      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altSrc_read_guess {k : } {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {cnf : Bool} {τ q a : AltV k A} (hb : τ.1.1 = AltBase.tGKeep false τ.1.1 = AltBase.tGSet) (hs : AltSrc cnf τ q) (hr : AltRead τ a) :
      q = stG τ.1.2 true a = symV false (τ.2 0)

      At a guessing choice, the state and the symbol read are what DescriptiveComplexity.altTr_unique's hypothesis excludes.

      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altTr_turn_pair {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] [Finite A] [Nonempty A] {cnf : Bool} {τ τ' q : AltV k A} ( : AltTr cnf τ) (hτ' : AltTr cnf τ') (hs : AltSrc cnf τ q) (hs' : AltSrc cnf τ' q) {d : Bool} (hb : τ.1.1 = AltBase.tTurnNext d) (hb' : τ'.1.1 = AltBase.tTurnAcc d) :

      The two turns never compete: for a conjunctive matrix the clause just settled is either the last one or has a successor, and for a disjunctive one they fire at different flags, so their source states differ.

      Dependency graph
      theorem DescriptiveComplexity.AltQbf.altTr_unique {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] [Finite A] [Nonempty A] {cnf : Bool} {τ τ' q a : AltV k A} ( : AltTr cnf τ) (hτ' : AltTr cnf τ') (hs : AltSrc cnf τ q) (hs' : AltSrc cnf τ' q) (hr : AltRead τ a) (hr' : AltRead τ' a) (hguess : ¬∃ (i : Fin (k + 1)) (x : A), q = stG i true a = symV false x) :
      τ = τ'

      At most one transition applies, away from the one nondeterministic choice of a guessing sweep: the state and the symbol read pin the base tag (DescriptiveComplexity.base_cases), the base tag pins the rest (DescriptiveComplexity.altTr_payload), and the two remaining ambiguities are the exclusive branch points.

      Dependency graph