nLab
Kleene's second algebra

Kleene’s second algebra is a partial combinatory algebra based on Baire space.

Let be the set of natural numbers equipped with the discrete topology, so that the function space is a countable product of copies of . By means of continued fractions?, this space is homeomorphic to the Baire space B of irrational numbers between 0 and 1.

To define Kleene’s second algebra, we need several ingredients:

  1. There is a function p:B1+ which takes the constant function at 0 to *1, and any other function α: to the predecessor of the first non-zero α(k).

  2. Each irrational number βB releases a stream of rational approximants q 1(β),q 2(β), by successive truncations of the continued fraction of β. By coding rational numbers by natural numbers, we get a corresponding stream of natural numbers (β 1,β 2,) . The map

    ϕ:BB\phi \colon B \to B

    that sends β to (β 1,β 2,) is continuous.

  3. B is the terminal coalgebra of the endofunctor × on Top, so there is an isomorphism ξ:BB× whose inverse is denoted prefix.

  4. Composition of functions defines a map comp:B×BB.

Now consider the composite

B×B×1 B×prefixB×B1 B×ϕB×BcompBp1+B \times B \times \mathbb{N} \stackrel{1_B \times prefix}{\to} B \times B \stackrel{1_B \times \phi}{\to} B \times B \stackrel{comp}{\to} B \stackrel{p}{\to} 1 + \mathbb{N}

and curry this to a map ψ:B×B(1+) . Let i:1+ be the inclusion map.

Kleene’s second algebra is the applicative structure or partial binary operation on B defined by the pullback

D i B×B ψ (1+) \array{ D & \to & \mathbb{N}^\mathbb{N} \\ \downarrow & & \downarrow^\mathrlap{i^\mathbb{N}} \\ B \times B & \underset{\psi}{\to} & (1 + \mathbb{N})^\mathbb{N} }
Created on September 8, 2012 02:16:18 by Todd Trimble (67.81.93.25)