AC⁰ ⊆ PTIME: the numeric predicates are an induction #
AC⁰ ⊆ PTIME (DescriptiveComplexity.ac0Definable_mem_PTIME): first-order
logic with + and × on the ranks is inside polynomial time, because the two
numeric predicates are themselves defined by one simultaneous induction over the
order, and DescriptiveComplexity.StepDef puts an unrestricted first-order
sentence on top of the relations it computes.
Why the fixed-point layer, and not the machine #
The tempting route is FO(DTC): x + y = z is a walk (step two heads in
lockstep), which is deterministic, so addition is one operator. But
DescriptiveComplexity.TCSpec is a single operator over first-order kernels,
with no relation variables; multiplication is a walk whose step needs addition,
and the sentence on top needs both, so the route requires nesting that the
specification-as-data logic does not have. DescriptiveComplexity.StepDef has
exactly the two features that are wanted instead:
- the step formulas may read the variables being computed, so
plusandtimesare one simultaneous induction –timesreadspluspositively, and no stratification (DescriptiveComplexity.StepDef.stratify) is needed; - the output is an arbitrary first-order sentence over the expanded vocabulary, free to negate fixed-point atoms – which is what an AC⁰ sentence needs, its numeric atoms sitting anywhere.
Since the numeric predicates are symbols, no formula recursion is involved
either: the translation of an AC⁰ sentence is a language map
(DescriptiveComplexity.arithToBlock) sending plus and times to the two
relation variables, and FirstOrder.Language.LHom.realize_onSentence does the
rest, once the limit of the induction is proved to be the arithmetic.
The induction #
Two variables of arity 3, plus and times, with the clauses
plus x y z←yis least andx = z; ory' ⋖ y,z' ⋖ z,plus x y' z';times x y z←yandzare least; ory' ⋖ y,times x y' w,plus w x z
read inflationarily. Soundness is an induction on the stages
(DescriptiveComplexity.inflStage_arith_sound); completeness needs no stage
count at all, only that the limit is closed under the step
(DescriptiveComplexity.StepDef.isFixedPt_inflStep_inflLimit), and then an
induction along the order (DescriptiveComplexity.inflLimit_plus_of_eq,
DescriptiveComplexity.inflLimit_times_of_eq).
What this does and does not give #
It gives the inclusion in PTIME, hence in NP and everything above, and it gives
every consumer that a closure of AC⁰ under first-order reductions would (a
problem reducing to an AC⁰ problem is in PTIME, PTIME being closed under
reductions). It does not give the sharper AC⁰ ⊆ LOGSPACE, which needs the
arithmetic computed by a deterministic multi-head automaton
(DescriptiveComplexity.HeadProgram) rather than by an induction.
The block of the two numeric predicates #
The relation variables computing the numeric predicates: two of arity 3,
false for addition and true for multiplication. The index type is Bool
rather than Fin 2 because numerals do not elaborate at a block's ι.
Equations
- DescriptiveComplexity.arithBlock = { ι := Bool, ιFinite := Bool.instFinite, arity := fun (x : Bool) => 3 }
Instances For
Dependency graph
The addition variable, as a symbol of the expanded vocabulary.
Equations
Instances For
Dependency graph
The multiplication variable, as a symbol of the expanded vocabulary.
Equations
Instances For
Dependency graph
An order formula, transported to the vocabulary expanded by the block.
Instances For
Dependency graph
An atom of one of the two numeric relation variables.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The clause of addition: either y is least and z is x, or y and
z both step down and the smaller triple is already there.
Stated at Fin 3 and only then read at Fin (arithBlock.arity i): numerals do
not elaborate through the arity projection of a block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The clause of multiplication: either y and z are least, or y steps
down, x * y' is already there, and one more x is added to it – the addition
variable of the same simultaneous induction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The step formulas of the numeric induction, indexed by the block.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
The definition, and what it is meant to compute #
The numeric induction, with an arbitrary first-order output: the two
variables of DescriptiveComplexity.arithBlock, the clauses of
DescriptiveComplexity.arithStep, and a sentence over the expanded vocabulary.
Reducible, so that the arity of a variable of its block still reduces to 3
where rw works at implicit transparency.
Equations
- DescriptiveComplexity.arithStepDef out = { B := DescriptiveComplexity.arithBlock, step := DescriptiveComplexity.arithStep L, out := out }
Instances For
Dependency graph
One application of the numeric clauses, unfolded: the step formula realized
at the current assignment. Stated because DescriptiveComplexity.StepDef.next is
a def whose equation theorems do not rewrite.
Dependency graph
What the addition clause derives: either the base case, or a step down
on both y and z from a triple already there.
Dependency graph
What the multiplication clause derives: either the base case, or one copy
of x peeled off y and added back with the addition variable.
Dependency graph
Soundness: every stage holds only true facts #
Every stage of the numeric induction is sound: the addition variable holds only triples whose ranks add up, and the multiplication variable only triples whose ranks multiply.
Dependency graph
Completeness: the limit is closed under the clauses #
The limit of the numeric induction is closed under the step formulas: what one clause derives from it is already in it.
Dependency graph
The addition variable holds every true triple, by induction along the order: the clause is applied to the limit, which is closed under it.
Dependency graph
The multiplication variable holds every true triple: the same argument,
one copy of x at a time, using the addition variable for the accumulation.
Dependency graph
The limit of the numeric induction is the arithmetic of the order: the two variables hold exactly the true triples.
Dependency graph
Reading an AC⁰ sentence at the limit #
The translation of an AC⁰ sentence: the numeric symbols go to the two relation variables of the induction, the order symbol and the input symbols to themselves. Being a language map, it needs no recursion over formulas.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The inclusion #
AC⁰ ⊆ FO(IFP): the numeric predicates are the limit of the simultaneous
induction of DescriptiveComplexity.arithStep, and an AC⁰ sentence is its
output, translated by DescriptiveComplexity.arithToBlock.
Dependency graph
AC⁰ ⊆ FO(LFP), through the equivalence of the inflationary and the least fixed point.
Dependency graph
AC⁰ ⊆ PTIME. With DescriptiveComplexity.FODefinable.ac0Definable and
DescriptiveComplexity.exists_ac0Definable_not_foDefinable this places the
arithmetic logic strictly above FO(≤) and inside polynomial time; the sharper
AC⁰ ⊆ LOGSPACE needs the multi-head automaton instead.