The intended run: the check phase #
Once the k sweeps have written DescriptiveComplexity.qbfVal in every cell,
the machine walks the clauses one by one, sweeping the tape and accumulating a
flag. The tape never changes again, so the frame condition of every step here
is rfl.
The flag means two different things, and that is the whole of the disjunctive
case. For a conjunctive matrix it records that some literal of the clause is
satisfied; for a disjunctive one, that some literal of the term is
violated. The two are the same test at the flipped truth value
(DescriptiveComplexity.xorB), so one transition family serves both, and the
accepting turn fires at the flag cnf: set for a conjunctive matrix, where it
means the clause is satisfied, clear for a disjunctive one, where it means no
literal of the term is violated.
A sweep alternates direction with each clause, as in
DescriptiveComplexity.Problems.Machine.Hardness: the first runs rightwards
from the first cell, having been entered by
DescriptiveComplexity.step_toChk.
What the check tests #
The literal test of the check phase: for a conjunctive matrix, that the
cell of x holding v satisfies the clause c; for a disjunctive one, that
it violates it.
Equations
- DescriptiveComplexity.AltQbf.QGood k cnf c x v = DescriptiveComplexity.AltQbf.QbfLit k c x (DescriptiveComplexity.AltQbf.xorB cnf v)
Instances For
Dependency graph
The value the tape holds in the cell of x once every sweep has run.
Equations
Instances For
Dependency graph
The tape of the check phase reads a real cell as the truth value of its variable.
Dependency graph
A rightward check sweep #
The flag of a rightward check sweep with the head at p: some cell already
visited – that is, strictly below p – is good for the clause c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The configuration during a rightward check sweep of the clause c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A rightward sweep starts with an empty flag: nothing lies below the lowest cell.
Dependency graph
Stepping up adds exactly one literal to the flag. Moving the head from
p to the position above it brings p's own cell into view and nothing else,
because DescriptiveComplexity.SuccPos leaves no room between them.
Dependency graph
One step of a rightward check sweep. The machine reads the cell it is on, folds that literal into the flag, and moves one place right.
Dependency graph
A whole rightward check sweep: from the lowest cell to the right
marker, the flag accumulating the literals of c met along the way.
Dependency graph
A leftward check sweep #
The flag of a leftward check sweep with the head at p: some cell already
visited – that is, strictly above p – is good for the clause c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The configuration during a leftward check sweep of the clause c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A leftward sweep starts with an empty flag: nothing lies above the highest cell.
Dependency graph
Stepping down adds exactly one literal to the flag.
Dependency graph
One step of a leftward check sweep.
Dependency graph
A whole leftward check sweep: from the highest cell down to the left marker.
Dependency graph
The turns #
The turn at the right marker, when another clause follows.
Dependency graph
The turn at the right marker, when the clause settles the run.
Dependency graph
The turn at the left marker, when another clause follows.
Dependency graph
The turn at the left marker, when the clause settles the run.
Dependency graph
One clause, checked end to end #
At the far marker the flag has seen every cell.
Dependency graph
At the far marker the flag has seen every cell.
Dependency graph
The left marker has rank 0.
Dependency graph
The right marker sits one step above the last cell.
Dependency graph
The first cell has rank 1.
Dependency graph
Checking c rightwards and moving on to the next clause.
Dependency graph
Checking c leftwards and moving on to the next clause.
Dependency graph
Checking c rightwards and accepting.
Dependency graph
Checking c leftwards and accepting.
Dependency graph
Walking the clauses #
Every clause but the last has a next one.
Dependency graph
Passing to the next clause removes exactly one clause from those still to be checked.
Dependency graph
A conjunctive matrix: the machine checks every remaining clause and accepts, in at most one sweep's worth of steps per clause.
Dependency graph
A disjunctive matrix: the machine walks the terms until one has no
violated literal, and accepts there. The flag is clear at such a term,
which is exactly what the accepting turn fires at when cnf is false.
Dependency graph
A deterministic run accepts at either polarity #
The check phase is deterministic, so its run is a legitimate move for the universal player as much as for the existential one: “every successor accepts” and “some successor accepts” say the same thing when there is exactly one.
A deterministic run accepts whatever the polarity of its block. The
existential half is DescriptiveComplexity.ATMData.altAcc_of_steps; this is
the version that also serves a universal block, and could be hoisted to
DescriptiveComplexity.MachinesAltPlay.
Dependency graph
The check phase is deterministic #
Being in the check phase: the state is a checking state or the accepting one.
Equations
- DescriptiveComplexity.AltQbf.InCheck c = ((∃ (f : Bool) (d : Bool) (cl : A), c.state = DescriptiveComplexity.AltQbf.stChk f d cl) ∨ c.state = DescriptiveComplexity.AltQbf.stAcc)
Instances For
Dependency graph
The check phase never returns to a sweep.
Dependency graph
The check phase is deterministic: none of its configurations is a guessing choice.
Dependency graph
The check phase accepts, at either polarity of its block, as soon as a run through it reaches an accepting state.
Dependency graph
The run is short enough #
The budget of DescriptiveComplexity.ATMData.AltAccepts counts the positions
of the tape, of which the fillers alone supply 8(k+1)n². A sweep, by
contrast, costs about as many steps as the instance has elements: only the
left marker and the cells lie below the right marker.
Only the three bracketing base tags are at or below the right marker's.
Dependency graph
A sweep is short. Proved by injecting the positions below the right
marker into Option A rather than by counting.