Computable topology is a discipline in mathematics that studies the topological and algebraic structure of computation. Computable topology is not to be confused with algorithmic or computational topology, which studies the application of computation to topology.
As shown by Alan Turing and Alonzo Church, the λ-calculus is strong enough to describe all mechanically computable functions (see Church–Turing thesis).[1] [2] [3] Lambda-calculus is thus effectively a programming language, from which other languages can be built. For this reason when considering the topology of computation it is common to focus on the topology of λ-calculus. Note that this is not necessarily a complete description of the topology of computation, since functions which are equivalent in the Church-Turing sense may still have different topologies.
The topology of λ-calculus is the Scott topology, and when restricted to continuous functions the type free λ-calculus amounts to a topological space reliant on the tree topology. Both the Scott and Tree topologies exhibit continuity with respect to the binary operators of application (f applied to a = fa) and abstraction ((λx.t(x))a = t(a)) with a modular equivalence relation based on a congruency. The λ-algebra describing the algebraic structure of the lambda-calculus is found to be an extension of the combinatory algebra, with an element introduced to accommodate abstraction.
Type free λ-calculus treats functions as rules and does not differentiate functions and the objects which they are applied to, meaning λ-calculus is type free. A by-product of type free λ-calculus is an effective computability equivalent to general recursion and Turing machines.[4] The set of λ-terms can be considered a functional topology in which a function space can be embedded, meaning λ mappings within the space X are such that λ:X → X.[5] Introduced November 1969, Dana Scott's untyped set theoretic model constructed a proper topology for any λ-calculus model whose function space is limited to continuous functions. The result of a Scott continuous λ-calculus topology is a function space built upon a programming semantic allowing fixed point combinatorics, such as the Y combinator, and data types.[6] [7] By 1971, λ-calculus was equipped to define any sequential computation and could be easily adapted to parallel computations.[8] The reducibility of all computations to λ-calculus allows these λ-topological properties to become adopted by all programming languages.
Based on the operators within lambda calculus, application and abstraction, it is possible to develop an algebra whose group structure uses application and abstraction as binary operators. Application is defined as an operation between lambda terms producing a λ-term, e.g. the application of λ onto the lambda term a produces the lambda term λa. Abstraction incorporates undefined variables by denoting λx.t(x) as the function assigning the variable a to the lambda term with value t(a) via the operation ((λ x.t(x))a = t(a)). Lastly, an equivalence relation emerges which identifies λ-terms modulo convertible terms, an example being beta normal form.
The Scott topology is essential in understanding the topological structure of computation as expressed through the λ-calculus. Scott found that after constructing a function space using λ-calculus one obtains a Kolmogorov space, a
To
Complete partial orders are defined as follows:
First, given the partially ordered set D=(D,≤), a nonempty subset X ⊆ D is directed if ∀ x,y ∈ X ∃ z ∈ X where x≤ z & y ≤ z.
D is a complete partial order (cpo) if:
⋅ Every directed X ⊆D has a supremum, and:
∃ bottom element ⊥ ∈ D such that ∀ x ∈ D ⊥ ≤ x.
We are now able to define the Scott topology over a cpo (D, ≤).
O ⊆ D is open if:
Using the Scott topological definition of open it is apparent that all topological properties are met.
⋅∅ and D, i.e. the empty set and whole space, are open.
⋅Arbitrary unions of open sets are open:
Proof: Assume
Ui
Ui
Ui
Ui
Likewise, if D is a directed set with a supremum in U, then by assumption sup(D) ∈
Ui
Ui
Ui\capD\subseteqU\capD
Ui
⋅Open sets under intersection are open:
Proof: Given two open sets, U and V, we define W = U∩V. If W = ∅ then W is open. If non-empty say b ∈ upset(W) (the upper set of W), then for some a ∈ W, a ≤ b. Since a ∈ U∩V, and b an element of the upper set of both U and V, then b ∈ W.
Finally, if D is a directed set with a supremum in W, then by assumption sup(D) ∈
U\capV
U\capD
V\capD
a\lec,b\lec
U\capV
Though not shown here, it is the case that the map
f:D → D'
D'
Before we begin explaining that application as common to λ-calculus is continuous within the Scott topology we require a certain understanding of the behavior of supremums over continuous functions as well as the conditions necessary for the product of spaces to be continuous namely
{fi}i\subseteq[D → D']
f(x)=\cupifi(x)
\subseteq[D → D']
[D → D']
We now show the continuity of application. Using the definition of application as follows:
Ap:
[D → D'] x D → D'
Ap is continuous with respect to the Scott topology on the product (
[D → D'] x D → D'
Proof: λx.f(x) = f is continuous. Let h = λ f.f(x). For directed F
\subseteq[D → D']
h(sup(F)) = sup(F)(x)
= sup
= sup
= sup(h(F))
By definition of Scott continuity h has been shown continuous. All that is now required to prove is that application is continuous when it's separate arguments are continuous, i.e.
[D → D']
D → D'
Now abstracting our argument to show
f:D x D' → D''
g=λx.f(x,x0)
d=λx'
' | |
.f(x | |
0,x |
)
D'
g(\sup(X))=f(\sup(X),
' | |
x | |
0 |
))
= f(sup((x,
' | |
x | |
0 |
(since f is continuous and) is directed):
= sup
= sup(g(X))
g is therefore continuous. The same process can be taken to show d is continuous.
It has now been shown application is continuous under the Scott topology.
In order to demonstrate the Scott topology is a suitable fit for λ-calculus it is necessary to prove abstraction remains continuous over the Scott topology. Once completed it will have been shown that the mathematical foundation of λ-calculus is a well defined and suitable candidate functional paradigm for the Scott topology.
With
f\in[D x D' → D'']
\check{f}
D'
(i)
\check{f}
\check{f}
[D → [D' → D'']
(ii) λ
f.\check{f}:[D x D' → D''] → [D → [D' → D'']
Proof (i): Let X ⊆ D be directed, then
\check{f}
= λ y.
\supx
=
\supx
= sup(
\check{f}
Proof (ii): Defining L = λ
f.\check{f}
\subseteq[D x D' → D'']
L(sup(F)) = λ x λ y. (sup(F))(x,y))
= λ x λ y.
\supy
=
\supy
= sup(L(F))
It has not been demonstrated how and why the λ-calculus defines the Scott topology.
Böhm trees, easily represented graphically, express the computational behavior of a lambda term. It is possible to predict the functionality of a given lambda expression from reference to its correlating Böhm tree. Böhm trees can be seen somewhat analogous to
R
Böhm trees are defined by a mapping of elements within a sequence of numbers with ordering (≤, lh) and a binary operator * to a set of symbols. The Böhm tree is then a relation among a set of symbols through a partial mapping ψ.
Informally Böhm trees may be conceptualized as follows:
Given: Σ =
\perp\cup