First-order reductions are computable #
The last step of the bridge that does not need a machine:
a first-order interpretation induces a computable map of concrete
structures, so ¬ComputablePred transfers backwards along every reduction
notion of the library – ≤ᶠᵒ, ≤ᶠᵒ[≤] and ≤ʳᶠᵒ[≤].
Everything is proved for the most general notion, the relativized ordered
reduction; the other two are special cases of it
(DescriptiveComplexity.FOReduction.toOrdered,
DescriptiveComplexity.OrderedFOReduction.toRel).
What has to be computed #
Three things, in this order.
- The order. An ordered reduction reads its input over
L.sum Language.order. The universe of a concrete instance isFin (n + 1), which is already linearly ordered, so the ordered expansion is built by appending one row to the table (DescriptiveComplexity.ordStruct) – there is no order to choose and none to encode. - The renumbering. The target universe of a relativized interpretation is
the subtype of
Tag × (Fin dim → A)cut out by the domain formula, so the surviving points have to be listed (DescriptiveComplexity.goodList) and re-indexed into an initial segment ofℕ. This is where thePrimrecwork concentrates, exactly as the design predicted. - The tags. A defining formula depends on the tags of its arguments, which
are known only at run time. There are finitely many tag tuples, so the row of
a target symbol evaluates all
|Tag|ⁿfixed formulas and selects by an index computed from the decoded tags.
The defining formulas have free variables indexed by Fin n × Fin dim, while
the evaluator of DescriptiveComplexity.Computability.Eval is written for
sentences; DescriptiveComplexity.flatFormula flattens the former into the
latter through Fin.finProdFinEquiv and
FirstOrder.Language.BoundedFormula.relabel.
The ordered expansion of an instance, as data #
The one-symbol vocabulary of the order, presented.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The rows of the table of an instance, cut to exactly one row per symbol. Appending anything to a raw table could otherwise be read as the row of a symbol whose row was missing.
Equations
- DescriptiveComplexity.rowsOf V s = List.map (fun (k : ℕ) => s.table.getD k []) (List.range V.numSyms)
Instances For
Dependency graph
Dependency graph
Dependency graph
The ordered expansion of an instance, as data: the same universe, the
same rows, and one more row for the order of Fin (n + 1).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The data is the ordered expansion: the identity is an isomorphism from the encoded ordered expansion to the instance's universe with its own linear order.
Equations
- DescriptiveComplexity.ordIso V s = { toEquiv := Equiv.refl (DescriptiveComplexity.ordStruct V s).Univ, map_fun' := ⋯, map_rel' := ⋯ }
Instances For
Dependency graph
Dependency graph
Numbering the tagged tuples #
A point of the target universe of an interpretation is a tag together with a
dim-tuple of elements of the instance. It is numbered by putting the tag in
the units digit, base |Tag|, and the tuple above it.
The number of a tagged tuple.
Equations
- DescriptiveComplexity.ptIdx T tagEq s p = ↑(tagEq.symm p.1) + (T + 1) * FirstOrder.Language.tupleIdx s.card (List.ofFn fun (j : Fin dim) => ↑(p.2 j))
Instances For
Dependency graph
The tagged tuple with a given number.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Flattening the defining formulas #
The evaluator of DescriptiveComplexity.Computability.Eval is written for
formulas with no free variables, while a defining formula has free variables
indexed by Fin n × Fin dim and a domain formula by Fin dim. Both are
relabelled into bound variables, the pairs through finProdFinEquiv.
A defining formula, with its free variables turned into bound ones.
Equations
Instances For
Dependency graph
A domain formula, with its free variables turned into bound ones.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Evaluating the defining formulas at numbered points #
Evaluating a formula on the encoded ordered expansion is realizing it on the instance's universe with its own linear order.
Dependency graph
The valuation read off a list of digits is the tuple those digits are.
Dependency graph
Does the point numbered u survive the domain formula? The tag is only
known at run time, so all |Tag| domain formulas are evaluated and the right
one is selected.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
The value of a defining formula at a tuple of numbered points. The tags
are only known at run time, so all |Tag|ⁿ instances of the formula are
evaluated and the right one is selected.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The valuation read off the pair-indexed list of digits.
Dependency graph
Dependency graph
The surviving points, and the image instance #
The numbers of the points that survive the domain formula, in increasing order: the renumbering of the target universe is the position in this list.
Equations
- DescriptiveComplexity.goodList I T tagEq V s = List.filter (DescriptiveComplexity.domBool I T tagEq V s) (List.range ((T + 1) * s.card ^ dim))
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The image of an instance under a relativized interpretation, as data. The universe is the list of surviving points, renumbered by position; a relation holds of a tuple exactly when the defining formula does of the points it names.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
Everything above is primitive recursive #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The data is the image structure #
Dependency graph
The renumbering is an isomorphism: the encoded image of an instance is the relativized interpretation of that instance.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Decidability transfers along reductions #
A relativized ordered reduction is a computable many-one reduction of the induced sets of concrete instances: if the target is decidable, so is the source.
The renumbering forced by the definable domain is the whole content; the
interpretation itself is an evaluation of fixed formulas, primitive recursive
by FirstOrder.Language.FinStruct.primrec_evalBF.
Dependency graph
¬ComputablePred transfers backwards along a relativized ordered
reduction.
Dependency graph
The same for an ordered reduction.
Dependency graph
The same for a plain first-order reduction.