RE is recursively enumerable #
DescriptiveComplexity.RE_subset_rePred: a problem in the logically
defined class DescriptiveComplexity.RE denotes, through the encoding of
FirstOrder.Language.FinStruct, an REPred in the sense of Mathlib's
computability layer. It is what makes the name of the class a theorem rather
than a convention, and it needs no machine model at all.
The argument #
∃SO[new]-definability says
P A ↔ ∃ m : ℕ, ∃ ρ : B.Assignment (A ⊕ Fin m), φ holds in the extended structure
with φ a fixed first-order sentence. Both existentials are absorbed into a
single unbounded search over a Primcodable witness: the number m of
invented values, and a list of Boolean tables standing for the assignment ρ.
Given the witness, the extended structure is built as data
(DescriptiveComplexity.extStruct) and φ is evaluated on it by the
primitive recursive evaluator of DescriptiveComplexity.Computability.Eval.
Unbounded search over a decidable test is exactly REPred.
Two facts carry the proof:
- every list of Booleans denotes an assignment and every assignment is denoted
by one (
DescriptiveComplexity.exists_tab), because the extended universe is finite – this is where the certificate being a finite object is used; - the structure built from the witness is isomorphic to the extended structure
of the logic (
DescriptiveComplexity.extIso), so the fixed sentence says the same thing about both.
The converse #
That every REPred is in RE is proved one layer up, in
DescriptiveComplexity.Computability.CodeHaltComplete
(DescriptiveComplexity.mem_RE_iff_rePred). It needs a target whose programs
already exist, so that the reduction can draw a semi-decision procedure inside
the instance rather than build one.
Unbounded search over a coded witness #
A predicate found by unbounded search over a coded witness is
recursively enumerable. The witness type is any Primcodable type; the
search is Mathlib's Nat.rfind over its codes.
Dependency graph
The vocabularies of the second-order machinery #
The one-symbol vocabulary marking the original elements, presented.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The number of relation variables of a block.
Equations
Instances For
Dependency graph
A numbering of the relation variables of a block.
Equations
Instances For
Dependency graph
The vocabulary of a second-order quantifier block, presented: one symbol per relation variable.
Equations
Instances For
Dependency graph
Dependency graph
The vocabulary an ∃SO[new] kernel is read over: the instance's, the mark
of the original elements, and the block's.
Equations
Instances For
Dependency graph
The extended structure, as data #
The numbering of the extended universe: the instance first, the invented values after it.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The relations of the extended structure, read off the instance and the guessed table: an original symbol holds of a tuple of original elements exactly where it holds in the instance, the mark holds of the original elements, and a relation variable reads its guessed table.
Equations
- One or more equations did not get rendered due to their size.
- DescriptiveComplexity.extRel V B s m tab (Sum.inl (Sum.inr FirstOrder.Language.oldRel.old)) x_3 = decide (↑(x_3 0) < s.card)
Instances For
Dependency graph
Dependency graph
The only symbol of the marking vocabulary has arity one.
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The extended structure as data: the instance, m invented values, and
the guessed relations, encoded as one concrete finite structure over the
vocabulary the ∃SO[new] kernel is read in.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
The assignment of the relation variables a guessed table denotes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The data is the extended structure of the logic #
The tuple of values of an original tuple.
Dependency graph
The original symbols of the extended structure read the instance, on original elements only.
Dependency graph
The extended structure as data is the extended structure of the logic:
the numbering of DescriptiveComplexity.extEquivFin is an isomorphism, for
the assignment the guessed table denotes.
Equations
- DescriptiveComplexity.extIso V B s m tab = { toEquiv := DescriptiveComplexity.extEquivFin s m, map_fun' := ⋯, map_rel' := ⋯ }
Instances For
Dependency graph
Every assignment is denoted by a table #
The extended universe is finite, so an assignment of the relation variables is
a finite object: it is the reading of some list of Boolean tables. This is
the step that turns the second-order existential of ∃SO[new] into a search
over a Primcodable witness.
Dependency graph
The witness is read primitive recursively #
Dependency graph
The theorem #
A recursively enumerable problem denotes a recursively enumerable set of
concrete instances. The class DescriptiveComplexity.RE is defined by a
logic – definability in ∃SO[new] – and this is the statement that the name is
honest: through the encoding of FirstOrder.Language.FinStruct, its problems
are exactly semi-decidable in Mathlib's sense.
No machine model is involved. The ∃SO[new] witness – a number of invented
values and an assignment of the relation variables – is a finite object, so it
is searched for; the first-order kernel is checked on it by the primitive
recursive evaluator of DescriptiveComplexity.Computability.Eval.