Definition 7.2 (Scott 1981, PRG-19, Β§7) β computable maps and computable #
elements
Following Dana Scott, Lectures on a Mathematical Theory of Computation, PRG-19, Lecture VII, Computability in effectively given domains.
Definition 7.2. Given two recursively presented domains
π = {Xβ β£ n β β}andβ° = {Yβ β£ m β β}, an approximable mappingf : π β β°is said to be computable iff the relationXβ f Yβis recursively enumerable innandm.
Why r.e. (and not recursive)? Scott answers by degenerating π to the one-point
domain {Ξ}: then
f is just a single element y = f({Ξ}) β |β°|, and the condition reduces to the
index set
{m β£ Yβ β y} being r.e. A finite element has a recursive index set, but an
infinite element can
only be approximated "a little at a time" β its approximations can be listed
(r.e.) but membership
need not be decidable. So 7.2 already incorporates the notion of a computable
element
(IsComputableElement).
We model IsComputableMap as REPredβ (fun n m β¦ Xβ f Yβ) over the choice-free
recursion theory of
Recursive.lean (REPred = projection of a recursively decidable relation; see
that file for why we
roll our own and reject Mathlib's classical recursion theory).
Proposition 7.3 is then formalized in full:
idMap_isComputableβ the identity map is computable, becauseXβ I Xβ β Xβ β Xβ(ComputablePresentation.incl_computable) is recursively decidable, hence r.e.comp_isComputableβ the composition of computable maps is computable:Xβ (gβf) Zβisβ Yβ, Xβ f Yβ β§ Yβ g Zβ(surjectivity of the middle presentation letsYrange over indicesl), which is r.e. by the closure lemmasREPred.comp/REPred.and/REPred.proj.apply_isComputableElementβ Scott's stated consequence: a computable map applied to a computable element gives a computable element (f(x) = {Yβ β£ β Xβ β x, Xβ f Yβ}, again r.e. by the closure lemmas).
Two further faithful facts:
principal_isComputableElementβ every finite (principal) elementβXβis computable, since its index set{m β£ Xβ β Xβ}is a recursive slice ofincl_computable(Scott's remark that finite elements have recursive index sets).
Everything here is β {propext, Quot.sound} (choice-free): it is built only from
the choice-free
deciders of Definition 7.1 and the choice-free r.e. layer of Recursive.lean.
Definition 7.2 (Scott 1981, PRG-19) β computable map. Relative to
computable presentations
P of V and Q of W, an approximable map f : V β W is computable iff its
neighbourhood
relation Xβ f Yβ, transported to the integer indices, is recursively enumerable.
Equations
- Domain.Neighborhood.IsComputableMap P Q f = Domain.Recursive.REPredβ fun (n m : β) => f.rel (P.X n) (Q.X m)
Instances For
Definition 7.2 (Scott 1981, PRG-19) β computable element. Specializing to
f : π β W, the
condition becomes: the index set {m β£ Yβ β y} of the element y β |W| is
recursively enumerable.
We take this as the definition of a computable element.
Equations
- Domain.Neighborhood.IsComputableElement Q y = Domain.Recursive.REPred fun (m : β) => y.mem (Q.X m)
Instances For
The identity map is computable (the identity half of Proposition 7.3). The
relation
Xβ I Xβ is Xβ β Xβ (incl_computable), which is recursively decidable,
hence recursively
enumerable.
Proposition 7.3 (Scott 1981, PRG-19) β composition of computable maps is
computable. For
X (gβf) Z β β Y, X f Y β§ Y g Z, surjectivity of the middle presentation Q lets
the witness Y
range over indices l (Y = Yβ); the resulting β l, Xβ f Yβ β§ Yβ g Zβ is
recursively enumerable
by reindexing (REPred.comp), conjunction (REPred.and), and existential
projection
(REPred.proj).
Proposition 7.3 (consequence) (Scott 1981, PRG-19). "If f : π β β° is
computable and
x β |π| is computable, then f(x) β |β°| is also computable." Here f(x) = {Yβ β£ β Xβ β x, Xβ f Yβ}
(toElementMap); surjectivity of P lets the witness X range over indices n,
and the resulting
β n, Xβ β x β§ Xβ f Yβ is r.e. by REPred.and/REPred.proj.
Every finite (principal) element is computable (Scott's remark after 7.2:
"If y were
finite, the set of indices would be recursive"). For the finite element βXβ, the
index set
{m β£ Xβ β Xβ} is a recursive slice of incl_computable (fix the first index to
n by the
primitive-recursive reindex m β¦ β¨n, mβ©), hence r.e.