Continuity on Baire space as relative computability #
A map F : (ℕ → ℕ) → (ℕ → ℕ) on Baire space, with the product topology of discrete ℕ, is
computable relative to the oracle p when one oracle code c computes every output entry from
the join of p with the input: F x n = Φ_c^{p ⊕ x}(n) for all x and n. This file proves
that the total maps computable relative to some oracle are exactly the continuous ones
(Nat.RecursiveIn.Code.continuous_iff_exists_code).
- Computable implies continuous (
Nat.RecursiveIn.Code.continuous_of_eval). By the use principle (Nat.RecursiveIn.Code.exists_use), a convergent computation relative top ⊕ xreads only finitely many entries ofx, so each output entry is constant on a cylinder. - Continuous implies computable, through one fixed code
(
Nat.RecursiveIn.Code.exists_code_continuous). A single codeeserves every mapFwith an associate (Nat.RecursiveIn.Code.IsAssociate), an oracleαthat answers a query⟨n, σ⟩for a finite sequenceσwith a nonzero value on some prefix of every input, and withF x n + 1whenever it answers a prefix ofxwith a nonzero value. The code searches for the leastksuch thatαanswers the prefix of lengthkof the input with a nonzero value (Nat.RecursiveIn.Code.exists_code_isAssociate). A continuousFhas the associatep_Fthat answers⟨n, σ⟩byv + 1when every input extendingσhasn-th outputv, and by0otherwise.
Main definitions #
Nat.RecursiveIn.Code.IsAssociate: an associate (neighbourhood function) of a total map.
Main results #
Partrec.join_coe: the join of two total functions is total.Nat.RecursiveIn.Code.continuous_iff_forall_exists_cylinder: continuity on Baire space as dependence of each output entry on a finite prefix of the input.Nat.RecursiveIn.Code.prefixOf_eq_iff: equality of finite prefixes as cylinder membership.Nat.RecursiveIn.Code.exists_code_search: one fixed code searches for the least prefix on which an oracle answers with a nonzero value.Nat.RecursiveIn.Code.exists_code_isAssociate: one code computes every map relative to an associate of the map.Nat.RecursiveIn.Code.exists_code_continuous: one code computes every continuous map relative to an oracle that encodes the map.Nat.RecursiveIn.Code.exists_cylinder_of_mem_eval_join: the use principle for the input of a joined oracle.Nat.RecursiveIn.Code.continuous_of_eval: a total map computable relative to an oracle is continuous.Nat.RecursiveIn.Code.continuous_iff_exists_code: the continuity theorem.
Implementation notes #
The statements take a total map with values in ℕ → ℕ in curried form, (ℕ → ℕ) → ℕ → ℕ, and
compare it with code evaluation entry by entry. Partial maps, the definition of a map computable
relative to an oracle, closure under composition and the effective form of the continuity theorem
are in CslibFrontier.Foundations.Computability.RecursiveInStream.
References #
- K. Weihrauch, Computable Analysis: An Introduction: background on type-2 machines and the continuity of computable functions.
- J. van Oosten, Realizability: An Introduction to its Categorical Side: background on Kleene's second model, whose elements code continuous functionals.
A map on Baire space is continuous if and only if each output entry depends only on a finite prefix of the input.
α is an associate of the total map F on Baire space, in Kleene's sense of a
neighbourhood function: α answers the query ⟨n, σ⟩ for a finite sequence σ, every input x
has a prefix on which the answer for n is nonzero, and every nonzero answer on a prefix of x is
F x n + 1.
- exists_ne_zero (x : ℕ → ℕ) (n : ℕ) : ∃ (k : ℕ), α (Nat.pair n (Encodable.encode (prefixOf x k))) ≠ 0
Every input has a prefix on which the answer is nonzero.
- eq_of_ne_zero (x : ℕ → ℕ) (n k : ℕ) : α (Nat.pair n (Encodable.encode (prefixOf x k))) ≠ 0 → α (Nat.pair n (Encodable.encode (prefixOf x k))) = F x n + 1
A nonzero answer on a prefix of
xis one more than then-th output onx.
Prefix-search code. One fixed oracle code searches for the least prefix of x on which
α answers ⟨n, σ⟩ with a nonzero value and returns that answer minus one, whenever some prefix
has a nonzero answer and every nonzero answer on a prefix of x is v + 1.
Maps with an associate are computable through one fixed code. A single oracle code e
computes every total map F on Baire space relative to the join of an associate α of F with
the input: F x n = Φₑ^{α ⊕ x}(n). The code searches for the least k such that α answers the
prefix of length k of x with a nonzero value.
Continuous maps are computable through one fixed code. A single oracle code e computes
every continuous map F on Baire space relative to the join of an oracle p encoding F with
the input: F x n = Φₑ^{p ⊕ x}(n).
The use principle for a joined input. A convergent computation relative to p ⊕ x
converges to the same value relative to p ⊕ y for every y in some cylinder around x.
Computable maps are continuous. A total map on Baire space that one code computes
relative to the join of a fixed oracle p with the input is continuous.
The continuity theorem. A total map on Baire space is continuous if and only if it is computable relative to some oracle: some code computes it from the join of the oracle with the input.