Simulating a machine that walks an expanded universe #
What every exponential class rests on: a walk over an expanded universe,
performed by a machine that only ever holds finitely many points of it, is a
walk over the base – an DescriptiveComplexity.SOTCSpec, since a point of the
expansion is an assignment of a block and k of them are an assignment of one
merged block. This file builds that specification out of a
DescriptiveComplexity.HeadAutomaton and proves the two walks step for step
equivalent.
Why an automaton rather than an FO(TC) specification: the tests a
DescriptiveComplexity.HeadAutomaton performs are quantifier-free by fiat
(DescriptiveComplexity.HeadAutomaton.test_qf), so
DescriptiveComplexity.ExpExpansion.translQF translates them as they stand and
no quantifier over the expanded universe is ever evaluated. Everything else the
machine does is an order primitive – stay, copy, jump to an end, step to a
neighbor – and those are written down in
DescriptiveComplexity.Exponential.Increment.
The one hypothesis #
A move to the immediate successor is the increment of the assignment only
when every tagged assignment is a point, i.e., when the expansion's domain
sentence is trivial. That is the hypothesis htot the correctness theorems
carry; DescriptiveComplexity.ExpExpansion.trivialize is how a general
expansion is brought into that shape, and
DescriptiveComplexity.ExpExpansion.trivialize_domHolds is the hypothesis
discharged.
Slots #
Everything the transition sentence says is about one or two points, sitting
somewhere inside a bigger block: one of the k rounds of the current state, or
one of the k rounds of the next one. A DescriptiveComplexity.ExpExpansion.PtSlot
is that placement – an arity-preserving map of the point block into a host
block – and each of the five things the machine can ask about points is written
once, at an arbitrary slot of an arbitrary host:
DescriptiveComplexity.ExpExpansion.slotTagF– the point at a slot carries a given tag;DescriptiveComplexity.ExpExpansion.slotGuardF– a slot holds a point at all;DescriptiveComplexity.ExpExpansion.eqPtF,DescriptiveComplexity.ExpExpansion.covPtF,DescriptiveComplexity.ExpExpansion.minPtF,DescriptiveComplexity.ExpExpansion.maxPtF– equality, the covering relation and the two endpoints.
The state block is then (repMerged X.pointBlock k).withTag M.State, the two
copies of it that a transition sentence sees are SOBlock.replicate 2, and both
hosts are addressed by the same slot machinery.
Every merged assignment is one assignment per round #
A merged assignment splits into its rounds: the assembly map of
DescriptiveComplexity.repBlockAssign is onto, so a guessed state of the walk
below really is k guessed points.
Dependency graph
Slots #
A slot: where one point of an expanded universe sits inside a host block. Both hosts the simulation uses – the state block and two copies of it – are addressed through this one interface.
- ix : X.pointBlock.ι → H.ι
The relation variable of the host carrying each variable of the point block.
The placement preserves arities.
Instances For
Dependency graph
The vocabulary map reading a sentence about one point at the slot.
Equations
Instances For
Dependency graph
The assignment of the point block a slot reads out of a host assignment.
Equations
- s.read σ = DescriptiveComplexity.SOBlock.homAssign s.ix ⋯ σ
Instances For
Dependency graph
Reading a sentence at a slot is reading it at the slot's assignment.
Dependency graph
The slot of σ holds the point p.
Equations
- s.At σ p = (s.read σ = DescriptiveComplexity.SOBlock.tagAssign p.1 p.2)
Instances For
Dependency graph
What a slot can be asked #
The atom “the point at this slot carries the tag t”.
Equations
- DescriptiveComplexity.ExpExpansion.slotTagF s t = s.lhom.onSentence (X.B.tagBitF X.Tag t)
Instances For
Dependency graph
The guard “this slot holds a point of the expanded universe”.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Two slots at once #
Two slots, read as a placement of the expansion's block replicated twice:
copy 0 is the first slot, copy 1 the second.
Instances For
Dependency graph
Dependency graph
The vocabulary map reading a sentence about two assignments of the expansion's block at two slots.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Reading a two-copy sentence at two slots is reading it at the two assignments those slots hold.
Dependency graph
The static half: facts about tags #
A point is a tag and an assignment, and the tag half of every order question is decided at formula-construction time: there are finitely many tags, so which one is least, which is greatest and which covers which are conditions on the disjunct, not conditions the sentence has to express.
The tag is the least one.
Instances For
Dependency graph
The tag is the greatest one.
Instances For
Dependency graph
The second tag is the immediate successor of the first.
Instances For
Dependency graph
The four questions a machine asks about points #
“The two slots hold the same point”: their tag bits agree, and their assignments hold of the same atoms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
“The point of the second slot is the immediate successor of the point of the first”: one disjunct per pair of tags, the tag comparison decided statically and the assignment half being either the binary increment or the roll-over from the full assignment to the empty one.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
“The point of this slot is the least point”: the least tag, holding of nothing.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
“The point of this slot is the greatest point”: the greatest tag, holding of everything.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Their correctness #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The configurations of a machine, as one block #
A configuration is a control state and k points. The control state is a bit
vector (DescriptiveComplexity.SOBlock.withTag), the k points are the k
rounds of DescriptiveComplexity.repMerged, and the two configurations a
transition sentence compares are the two copies of
DescriptiveComplexity.SOBlock.replicate.
The block whose assignments are the configurations: one bit per control
state, and k rounds each holding one point of the expanded universe.
Equations
- X.cfgBlock k S = (DescriptiveComplexity.repMerged X.pointBlock k).withTag S
Instances For
Dependency graph
The slot of the i-th round inside the configuration block.
Equations
- X.cfgSlot k S i = { ix := fun (x : X.pointBlock.ι) => Sum.inr (DescriptiveComplexity.ExpExpansion.roundOneIx i X x), arity := ⋯ }
Instances For
Dependency graph
The slot of the i-th round of the c-th of two configurations.
Equations
Instances For
Dependency graph
Reading a sentence about one configuration inside the c-th of two
copies.
Equations
- X.copyLHom k S c = (FirstOrder.Language.LHom.id (L.sum FirstOrder.Language.order)).sumMap (DescriptiveComplexity.SOBlock.homLHom (fun (y : (X.cfgBlock k S).ι) => (c, y)) ⋯)
Instances For
Dependency graph
The atom “the control is in the state s”.
Equations
- X.ctrlF k S s = (DescriptiveComplexity.repMerged X.pointBlock k).tagBitF S s
Instances For
Dependency graph
The guard “this assignment is a configuration”: it names a control state,
and each of its k rounds holds a point of the expanded universe.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The configuration assignment: the control state in the tag bits, the
k points in the k rounds.
Equations
Instances For
Dependency graph
A round of a tagged assignment is read past the tag bits.
Dependency graph
The i-th round of a configuration holds the i-th point.
Dependency graph
A round of one of two copies is that round of that copy.
Dependency graph
Reading a configuration sentence in a copy is reading it at that copy's assignment.
Dependency graph
Dependency graph
The guard is exactly “this is a configuration”.
Dependency graph
The walk that simulates the machine #
A quantifier-free formula about the k points of a configuration, read as
a sentence about the configuration.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
“The tests come out as the reading r says.”
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The move of one head, as a sentence about two configurations. Each case is
one of the four questions of DescriptiveComplexity.ExpExpansion.eqPtF and its
siblings, asked of the round the move reads and the round it writes.
Equations
- DescriptiveComplexity.ExpExpansion.moveF M DescriptiveComplexity.HeadMove.stay x✝ = DescriptiveComplexity.ExpExpansion.eqPtF (X.stepSlot k M.State 0 x✝) (X.stepSlot k M.State 1 x✝)
- DescriptiveComplexity.ExpExpansion.moveF M DescriptiveComplexity.HeadMove.toMin x✝ = DescriptiveComplexity.ExpExpansion.minPtF (X.stepSlot k M.State 1 x✝)
- DescriptiveComplexity.ExpExpansion.moveF M DescriptiveComplexity.HeadMove.toMax x✝ = DescriptiveComplexity.ExpExpansion.maxPtF (X.stepSlot k M.State 1 x✝)
- DescriptiveComplexity.ExpExpansion.moveF M (DescriptiveComplexity.HeadMove.copy i) x✝ = DescriptiveComplexity.ExpExpansion.eqPtF (X.stepSlot k M.State 0 i) (X.stepSlot k M.State 1 x✝)
- DescriptiveComplexity.ExpExpansion.moveF M (DescriptiveComplexity.HeadMove.succ i) x✝ = DescriptiveComplexity.ExpExpansion.covPtF (X.stepSlot k M.State 0 i) (X.stepSlot k M.State 1 x✝)
- DescriptiveComplexity.ExpExpansion.moveF M (DescriptiveComplexity.HeadMove.pred i) x✝ = DescriptiveComplexity.ExpExpansion.covPtF (X.stepSlot k M.State 1 x✝) (X.stepSlot k M.State 0 i)
Instances For
Dependency graph
One transition of the machine, as a sentence about two configurations: the control state of each copy, the reading of the first, the guard of the second, and the move of every head.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The transition sentence of the simulation: some transition of the machine, at some control state and some reading.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The walk over the base that simulates the machine: its states are the configurations, its transition sentence is the machine's table, its starting states are the initial configurations and its accepting states are the ones whose control accepts.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Correctness #
With a trivial domain, quantifying over the points of the expanded universe is quantifying over every tagged assignment.
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
A walk of the simulation that starts at a configuration stays at configurations, and is a run of the machine.
Dependency graph
A run of the machine is a walk of the simulation.
Dependency graph
The simulation is correct: the walk over the base accepts exactly when the machine accepts the expanded structure.