CVP is in polynomial time #
Membership is written in FO(LFP) and not in the Horn fragment, and the choice
is the point of the file: the semantics of DescriptiveComplexity.CVP is a
least fixed point (DescriptiveComplexity.GateVal), so the rule system
DescriptiveComplexity.Cvp.cvpRules is the ten gate rules transcribed, one per line
of the inductive definition, and the output sentence is the one first-order
statement the Horn fragment could not make head-on: “some output gate is in the
true rail”. A Horn program accepts when its least model satisfies its goal
clauses, i.e., when something is not derived, so the same definition in the
fragment would have to be written on the false rail and would need the circuit
to be well-formed for the two rails to be complementary. Reading the value at
an unrestricted first-order output formula avoids the detour, and
DescriptiveComplexity.lfpDefinable_iff_mem_PTIME – Immerman–Vardi – turns it
back into membership in the class.
The ≡ between the rule system's least model and the inductive semantics is
proved in both directions in the usual way: the inductive predicate is closed
under the rules (DescriptiveComplexity.Cvp.derives_of_gateVal), and it is a
prefixpoint, so it contains the least one
(DescriptiveComplexity.Cvp.gateVal_of_derives, by
DescriptiveComplexity.lfpAssign_least_of_closed).
The block, the vocabulary of the rules, and their guards #
The two rails of the induction: one unary relation variable per truth
value, true carrying the gates that evaluate to 1. Indexing the block by
Bool rather than by Fin 2 is what lets ρ true and ρ false elaborate;
the block is reducible so that a numeral elaborates at Fin (arity i).
Equations
- DescriptiveComplexity.Cvp.valBlock = { ι := Bool, ιFinite := Bool.instFinite, arity := fun (x : Bool) => 1 }
Instances For
Dependency graph
The vocabulary the rules are written over: circuits, expanded by the order that every FO(LFP) definition may use (this one does not).
Equations
Instances For
Dependency graph
“Is a constant 1 input”, in the rules' vocabulary.
Instances For
Dependency graph
“Is a constant 0 input”, in the rules' vocabulary.
Instances For
Dependency graph
“Is a conjunction gate”, in the rules' vocabulary.
Instances For
Dependency graph
“Is a disjunction gate”, in the rules' vocabulary.
Instances For
Dependency graph
“Is a negation gate”, in the rules' vocabulary.
Instances For
Dependency graph
“Is an output gate”, in the rules' vocabulary.
Instances For
Dependency graph
“Takes as first argument”, in the rules' vocabulary.
Instances For
Dependency graph
“Takes as second argument”, in the rules' vocabulary.
Instances For
Dependency graph
The rules quantify over three variables: the gate and its two arguments.
Equations
Instances For
Dependency graph
A gate-kind guard on one of the three variables.
Equations
Instances For
Dependency graph
A wire guard between two of the three variables.
Equations
Instances For
Dependency graph
The atom “variable i is in the rail b”.
Equations
- DescriptiveComplexity.Cvp.rail b i = { idx := b, args := fun (x : Fin (DescriptiveComplexity.Cvp.valBlock.arity b)) => i }
Instances For
Dependency graph
The rules #
One rule per constructor of DescriptiveComplexity.GateVal, with the gate as
variable 0 and its two arguments as variables 1 and 2.
The ten gate rules, read off the inductive semantics.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The output sentence: some output gate is in the true rail #
The output sentence of the definition: ∃ g, out(g) ∧ T(g), read at the
least fixed point. This is the formula the Horn fragment has no room for.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The FO(LFP) definition of CVP: the gate rules, read at “some output gate is true”.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The least model of the rules is the inductive semantics #
Realization of a kind guard, down to the circuit structure.
Dependency graph
Realization of a wire guard, down to the circuit structure.
Dependency graph
The assignment cut out by the inductive semantics: a gate is in the rail
b when it derives the value b.
Equations
Instances For
Dependency graph
A rail atom holds of the inductive semantics exactly when the variable it names derives the value it names.
Dependency graph
The inductive semantics is closed under the rules, one case per gate rule.
Dependency graph
Everything the rules derive has its value derivable by the gate rules: the least fixed point is contained in the inductive semantics.
Dependency graph
Conversely, every derivable value is derived by the rules. The tuple is
written fun _ => g throughout, which is the shape
DescriptiveComplexity.Derives.rule produces for a unary head.
Dependency graph
The least model of the rules is the inductive semantics.
Dependency graph
The value of the definition #
Realization of the output sentence at the least fixed point: some output gate is in the true rail.
Dependency graph
The FO(LFP) definition computes CVP.
Dependency graph
Definability and membership #
CVP is FO(LFP) definable: the gate rules, read at “some output gate is true”.
Dependency graph
CVP is in polynomial time, by Immerman–Vardi
(DescriptiveComplexity.lfpDefinable_iff_mem_PTIME) applied to the FO(LFP)
definition that transcribes the gate rules.