User:Samuel lev/sandbox
Computational Topology
[edit]Computation in computer science can be reduced to a specific functional based mathematics, lambda calculus. As shown by Allan 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 then a principle programming language from which others can be built. One interpretation is due to the fact bound variables in λ-calculus correspond to formal parameters in a procedure, and the type free principle related to the fact that within a machine, both program and data are the same, namely bits. For this reason when considering the topology of computation it is suitable to focus on the topology of λ-calculus. Functional programming, e.g. type free lambda Calculus, originated as a theoretical foundation of mathematics. The premise relies on functional computability, where objects and functions are of the same type. 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 topological spaces 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 congruence relation. Openness within the Scott topology is defined such that if a set O is an open subset of the complete partial order D with relation ≤, then for x ∈ O and x le; y then y ∈ O. Secondly, if the supremum of X is in O with X ≤ D a directed set, then X ∩ O ≠ Ø.
Computational topology is λ calculus topology
[edit]Type free λ-calculus treats functions as rules and does not differentiate functions and the objects to which they are applied by type, i.e.data type free. A by-product of type free λ-Calculus is an effective computability equivalent to recursion [4]. The set of λ -terms is then a functional topology in which a function space can be embedded, X → X [5][6]. Introduced November 1969 Scott's untyped set theoretic model constructed a proper topology for any λ-calculus model whose function space is limited to continuous functions [7][8]. The result of a Scott continuous λ-calculus topology implies a programming semantic allowing fixed point combinatorics, such as the Y Combinator, and data types [9][10]. By 1971 λ-calculus was equipped to define any sequential computation and could be easily adapted to parallel computations [11]. The reducibility of all computations to λ-calculus allows topological properties within itself to be applicable to all programming languages [12].
Based on the operators within lambda calculus, application and abstraction, it is possible to develop a algebra with group structure using application and abstraction as binary operators, as well as use the continuity such operators provide to produce the Scott topology . 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 a lambda term with value t(a) via the operation ((λ x.t(x))a = t(a)). Lastly, an equivalence relation emerges identifying λ-terms modulo convertible terms, an example being beta normal form. The resulting topology consists of recursive functions that are definable when restricted to numerals with an infinite or singleton range when acting on a lambda term [13]. The applicable topology for λ-calculus is the tree topology.
Scott Topology
[edit]The Scott Topology is essential in understanding the topological structure of computation as expressed using λ-calculus. Scott found that after constructing a function space using using λ-calculus one obtains a Kolmogorov space, T_o topological space which is homeomorphic to itself and exhibits pointwise convergence, in short the product topology [14]. It is the ability of self homeomorphism as well as the ability to embed every space into such a space, denoted Scott continuous, as previously described which allows Scott's topology to be applicable to logic and recursive function theory. Scott approaches his derivation using a complete lattice, resulting in a topology dependent on the lattice structure. It is possible to generalise Scott's theory with the use of complete partial orders. For this reason a more general understanding of the computational topology is provided through complete partial orders. We will re-iterate to familiarize ourselves with the notation to be used during the discussion of Scott topology.
Complete partial orders are defined as follows:
First, given the partially ordered set D=(D,≤) where a subset X of D, X ≤ D is directed, i.e.:
- if X &neq; and
- x,y ∈ X z &issin; X where x≤ z & y ≤ z
D is a complete partial order (cpo) if:
- bottom element such that ∈ D & x ∈ D ≤ x
- Every directed X D there exists a supremum.
We are now able to define the Scott Topology over a cpo (D, ≤ ).
O D is open if:
- (1) for x ∈ O, and x ≤ y, then y ∈ O, i.e. O is an upper set.
- (2) for a directed set X D, and supremum(X) ∈ O, then X O .
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.
- Open sets are open under arbitrary unions and under intersection:
- Proof: Assume is open where i ∈ I, I being the index set. We define U = { ; i ∈ I}. Take b as an element of the upper set of U, therefore a ≤ b for some a ∈ U It must be that a ∈ for some i, likewise b ∈ upset(). U must therefore be upper as well since ∈ U.
- Open sets are open under arbitrary unions and under intersection:
- Lastly, if D is a directed set with a supremum in U, then by assumption sup(D) ∈ where is open. There is necessarily a b ∈ D where upper(b) D U. The union of open sets is therefore open.
- Open sets under intersection are open:
- Proof: Given two open sets, U and V, we define W = UV. 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. W being open implies the intersection of open sets is open.
- Open sets under intersection are open:
Though not shown here, it is the case that the map is continuous iff f(sup(X)) = sup(f(X)) for all directed X D, where f(X) = {f(x) | x ∈ X} and the second supremum in [15].
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
- (1) With be a directed family of maps, then if well defined and continuous.
- (2) If F is directed and cpo and a cpo where sup({f(x) | f ∈ F).
We now show the continuity of application. Using the definition of application as follows:
- Ap: where Ap(f,x) = f(x).
Ap is continuous with respect to the Scott topology on the product () :
- Proof: λx.f(x) = f is continuous. Let h = λ f.f(x). For directed F
- h(sup(F)) = sup(F)(x)
- = sup( {f(x) | f ∈ F} )
- = sup( {h(f) | f ∈ F} )
- = sup( h(F) )
- By definition of Scott continuity h is therefore continuous. All that is now required to prove is that application is continuous when it's separate arguments are continuous, i.e. and D are continuous, in our case f and h.
- Now abstracting our argument to show with g = λ x.f(x,x_{0}) and d = λ as the arguments for D and respectively, then for a directed X D
- g(sup(X)) = f( sup(X), )
- = f( sup( {x,) | x ∈ X} ))
- (since f is continuous and {(x,) | x ∈ X}) is directed):
- = sup( {f(x,) | x ∈ X} )
- = 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 well defined within a function space that is allotted by the Scott topology.
With f ∈ [D ] we define (x) =λ y ∈ f(x,y)We will show:
- (i) is continuous, meaning ∈
- (ii) λ is continuous.
- Proof (i): Let X D be directed, then
- (sup(X)) = λ y.f( sup(X),y )
- = λ y.( f(x,y) )
- = ( λy.f(x,y) )
- = sup((X))
- Proof (ii): Defining L = λ then for F directed
- L(sup(F)) = λ x λ y. (sup(F))(x,y))
- = λ x λ y. f(x,y)
- = λx λy.f(x,y)
- = sup(L(F))
Böhm trees and Computational Topology
[edit]Böhm trees, easily represented graphically, express the computational behavior of a lambda term. It is possible, from reference to the correlating Böhm tree, to predict the functionality of a given lambda expression[16]. Böhm trees can be seen somewhat analogous to . The Böhm tree of a given set is similar to the continued fraction of a real number, and similar to the rational subset of the Reals, the Böhm tree corresponding to a sequence in normal form is finite.
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: = { λ x_{1} x_{n} . y | n ∈ y are variables and denoting BT(M) as the Böhm tree for a lambda term M we then have:
- BT(M) = if M is unsolvable (therefore a single node)
- BT(M) = λ.y
- BT( BT( ) ; if M is solvable
More Formally:
is defined as a set of symbols. The Böhm tree of a λ term M, denoted BT(M), is the labelled tree defined as follows:
- If M is unsolvable:
- BT(M)(< >) = ,
- BT(M)() is unsolvable
If M is solvable, where M = λ x_{1}:
- BT(M)(< >) = λ x_{1}
- BT(M)() = BT(M_k)() and k < m
- = undefined and k m
We may now move on to show that Böhm trees act as suitable mappings from the tree topology to the scott topology. Allowing one to see computational constructs, be it within the Scott or tree topology, as Böhm tree formations.
Böhm tree and tree topology
[edit]It is found that Böhm tree's allow for a continuous mapping from the tree topology to the Scott topology. More specifically:
We begin with the cpo B = (B,) on the Scott topology, with ordering of Böhm tree's meaning M N, where M, N are trees, if M results from N. The tree topology on the set is the smallest set allowing for a continuous map
- BT:B.
An equivalent definition would be to say the open sets of are the image of the inverse Böhm tree (O) where O is Scott open in B.
The applicability of the Bömh trees and the tree topology has many interesting consequences to λ-terms expressed topologically:
- Normal forms are found to exist as isolated points.
- Unsolvable λ-terms are compactification points.
- Application and abstraction, similar to the Scott topology, are continuous on the tree topology.
Algebraic structure of Computation
[edit]New methods of interpretation of the λ-calculus are not only interesting in themselves, but provide great incite into the behaviors of computer science. A λ-calculus algebra can allow to have provably equal terms as equivalent within the algebra. Group structures then illuminate relations between λ-terms, reductions, and applicative forms. The binary operator within the a λ-algebra A is the application operator giving structure In order to allow for abstraction a combinatory algebra results. The λ algebra is then a combinatory algebra M combined with a syntactic operator λ* that transforms a term B(x,y), with constants in M, into C() λ* x.B(x,). It is also possible to define an extension model to circumvent the need of the λ* operator by allowing x fx =gx) f =g .
To accomplish the necessary assumption that there exist solutions to equations such as axy = xyy | a = λ xy.xyy there is need for the combinatory algebra. Combinatory algebras can be defined as follows:
(I)M = (X, )is an applicative structure if is a binary operation on X.
- M is extensional if for f, ∈ X then ( x ∈ X f.x = f =
(II) If M = (X,), then we write a ∈ M instead of a ∈ X
Within combinatory algebra there exists applicative structures. An applicative structure W is a combinatory algebra provided:
- W is non-trival, meaning W has cardinality > 1
- W exibits combinatory completeness (see completeness of the S-K basis). More specifically: for every term A ∈ the set of terms of W, and with the free variables of A within then:
Important results of the combiniatory algebra show they:
- Never commute
- Never are associative.
- Never are finite.
- and never are recursive.
Combinatory algebras remain unable to act as the algebraic structure for λ-calculus. However the existence of an applicative term A(x, ) provides a good starting point to build a λ-calculus algebra. What is needed is the introduction of a lambda terms, i.e. include λx.A(x, ).
We begin by exploiting the fact that within a combinatory algebra M with A(x, ) within the set of terms then:
- s.t. bx = A(x, ).
We then require b have a dependence on resulting in:
- B()x = A(x, ).
B() becomes equivilent to a λ term, and is therefore suitably defined as follows: B( λ*.
A pre-λ-algebra (pλA) can now be defined.
- pλA is an applicative structure W = (X,) such that for each term A within the set of terms within W and for every x there is a term λ*x.A ∈ T(W) (T(W) the terms of W) where (the set of free variables of λ*x.A) = (the set of free variables of A) - {x}. W must also demonstrate:
- (λ*x.A)x = A
- λ*x.A λ*x.A[x:=y] provided y is not a free variable of A
- (λ*x.A)[y:=z]λ*x.A[x:=y] provided y,z ≠ x and z is not a free variable of A
Before defining the full λ-algebra we must introduce the following definition for the set of λ-terms within W denoted with the following requirements:
- a ∈ W
- x ∈ for x ∈ {)
- M,N ∈ (MN) ∈
- M ∈ (λx.M) ∈
A mapping from the terms within to all λ terms within W, denoted * : , can then be designed as follows:
- (MN)* = M* N*
- (λx.M)* = λ* x*.M*
We now define λ(M) to denote the extension after evaluating the terms within .
- λx.(λy.yx) = λx.x in λ(W).
Finally we obtain the full λ-algebra through the following definition:
Though arduous, the foundation has been set for a proper algebraic framework for which the λ-calculus, and therefore computation, may be investigated in a group theoretic manner.
References
[edit]- ^ Church 1934:90 footnote in Davis 1952
- ^ Turing 1936–7 in Davis 1952:149
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981.
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981.
- ^ D. S. Scott. Models for the λ-calculus. Informally distributed, 1969. Notes, December 1969, Oxford Univ.
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981.
- ^ D. S. Scott. Models for the λ-calculus. Informally distributed, 1969. Notes, December 1969, Oxford Univ.
- ^ Gordon, M.J.C., The Denotational Description of Programming Languages. Springer Verlag, Berlin. 1979.
- ^ Scott, D. S. and Strachey, C. Toward a Mathematical Semantics for Computer Languages, Proc. Symp. on Computers and Automata, Polytechnic Institute of Brooklyn, 21, pp. 19-46. 1971.
- ^ G. Berry, Sequential algorithms on concrete data structures, Theoretical Computer Science 20, 265-321 (1982).
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981.
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981.
- ^ D. S. Scott. “Continuous Lattices.” Oxford University Computing Laboratory August, 1971.
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981.
- ^ Barendregt, H.P., The Lambda Calculus Syntax and Semantics. North-Holland Publishing Company. 1981.