## RZ: A tool for bringing constructive and computable mathematics closer to programming practice (2007)

### Cached

### Download Links

- [www.cs.hmc.edu]
- [www.cs.hmc.edu]
- [www.cs.hmc.edu]
- [math.andrej.com]
- [www.cs.hmc.edu]
- [math.andrej.com]
- DBLP

### Other Repositories/Bibliography

Venue: | CiE 2007: Computation and Logic in the Real World, volume 4497 of LNCS |

Citations: | 6 - 3 self |

### BibTeX

@INPROCEEDINGS{Bauer07rz:a,

author = {Andrej Bauer and Christopher A. Stone},

title = {RZ: A tool for bringing constructive and computable mathematics closer to programming practice},

booktitle = {CiE 2007: Computation and Logic in the Real World, volume 4497 of LNCS},

year = {2007},

pages = {28--42}

}

### OpenURL

### Abstract

Abstract. Realizability theory can produce code interfaces for the data structure corresponding to a mathematical theory. Our tool, called RZ, serves as a bridge between constructive mathematics and programming by translating specifications in constructive logic into annotated interface code in Objective Caml. The system supports a rich input language allowing descriptions of complex mathematical structures. RZ does not extract code from proofs, but allows any implementation method, from handwritten code to code extracted from proofs by other tools. 1

### Citations

490 |
Interactive Theorem Proving and Program Development
- Bertot, Casteran
- 2004
(Show Context)
Citation Context ...ned as a lightweight system supporting a rich input language. Although transforming complete proofs into complete code is possible [8], we have not implemented this. Other good systems, including Coq =-=[9]-=- and Minlog [10], can extract programs from proofs. But they work best managing the entire task, from specification to code generation. In contrast, interfaces generated by RZ can be implemented in an... |

353 |
Complexity and Real Computation
- Blum, Cucker, et al.
- 1998
(Show Context)
Citation Context ...nted with datatypes for real numbers [33, 34] and topological algebras [2], or machine models augmented with (suitably chosen subsets of) real numbers such as Real RAM [35], the Blum-Shub-Smale model =-=[36]-=-, and the Exact Geometric 27Computation model [37]. The motivation behind these ranges from purely theoretical concerns about computability and complexity to practical issues in the design of program... |

244 |
Computable Analysis
- Weihrauch
- 2000
(Show Context)
Citation Context ...zed by infinite Cauchy sequences). 5 And there is a third view, as a partial surjection δA : ⊆[[|A|]] ↠ 〈A〉, with δA(v) = x when v �A x. This is how realizability is presented in Type Two Effectivity =-=[1]-=-. 3sUnderlying types of realizers: Realizers: |⊤| = unit |⊥| = unit |x = y| = unit |φ ∧ ψ| = |φ| × |ψ| |φ ⇒ ψ| = |φ| → |ψ| |φ ∨ ψ| = ‘or0 of |φ0| + ‘or1 of |φ1| |∀x:A. φ| = |A| → |φ| |∃x:A. φ| = |A| ×... |

221 |
Data Types as lattices
- Scott
- 1976
(Show Context)
Citation Context ...lity over the 9 There are models of λ-calculus which validate the choice principle AC2,0, but this contradicts the existence of a modulus of continuity functional, see [20, 9.6.10]. 15sgraph model Pω =-=[27]-=-. A common feature is that they use models of computation which are well suited for the theoretical studies of computability. Approaches based on simple programming languages augmented with datatypes ... |

192 |
Admissible Sets and Structures
- Barwise
- 1975
(Show Context)
Citation Context ...ensional Axiom of Choice is in fact just an instance of the usual Axiom of Choice applied to rz A and B. Combined with the fact that rz A covers A, this establishes the validity of Presentation Axiom =-=[19]-=-, which states that every set is an image of one satisfying the axiom of choice. 7.4 Modulus of Continuity As a last example we show how certain constructive principles require the use of computationa... |

140 | Toward formal development of programs from algebraic speci implementations revisited
- Sannella, Tarlecki
- 1988
(Show Context)
Citation Context ...de the theory of a vector space parameterized by a field of scalars, or the theory of the real numbers parameterized by a model of the natural numbers. Following Sannella, Sokolowski, and Tarlecki 12 =-=[17]-=- RZ supports two forms of parameterization. A theory of a parameterized implementation [m:Θ1]→Θ2 describes a uniform family of models (i.e., a single implementation; a functor in OCaml) that maps ever... |

138 | Higher-order modules and the phase distinction
- Harper, Mitchell, et al.
- 1990
(Show Context)
Citation Context ...put more readable. Some redundancy may remain, but in practice the optimization pass helps significantly. Finally, the user can specify two optional steps occur. RZ can perform a phase-splitting pass =-=[17]-=-. This is an experimental implementation of an transformation that can replace a functor (a relatively heavyweight language construct) by parameterized types and/or polymorphic values. The other optio... |

120 |
Categorical Logic and Type Theory
- Jacobs
- 1999
(Show Context)
Citation Context ...ategory of pers has a very rich structure, namely that of a regular locally cartesian closed category [13]. This suffices for the interpretation of first-order logic and (extensional) dependent types =-=[14]-=-. Not all pers are decidable, i.e., there may be no algorithm for deciding when two values are equivalent. Examples include implementations of semigroups with an undecidable word problem [15] and impl... |

101 |
The Computational Complexity of Algebraic and Numeric Problems
- Borodin, Munro
- 1975
(Show Context)
Citation Context ...mple programming languages augmented with datatypes for real numbers [29, 30] and topological algebras [2], or machine models augmented with (suitably chosen subsets of) real numbers such as Real RAM =-=[31]-=-, the Blum-Smale-Shub model [32], and the Exact Geometric Computation model [33]. The motivation behind these ranges from purely theoretical concerns about computability and complexity to practical is... |

97 | Martin-Löf Type Theory
- Nordstrom, Petersson, et al.
- 2000
(Show Context)
Citation Context ... ≈s y). In other words eq is a decision procedure. 7.2 Inductive types To demonstrate the use of dependent types we show how RZ handles general inductive types, also known as W-types or general trees =-=[18]-=-. Recall that a W-type is a set of well-founded trees, where the branching types of trees are described by a family of sets B = {T (x)}x∈S. Each node in a tree has a branching type x ∈ S, which determ... |

82 |
On the interpretation of intuitionistic number theory
- Kleene
- 1945
(Show Context)
Citation Context ... though they were not initially developed, (nor are they usually presented) within the framework of realizability: Recursive Mathematics [21] is based on the original realizability by Turing machines =-=[22]-=-; Type Two Effectivity [1] on function realizability [23] and relative function realizability [24], while topological and domain representations [25, 26] are based on realizability over the 9 There ar... |

76 |
Recursive unsolvability of a problem of Thue
- Post
- 1947
(Show Context)
Citation Context ...nt types [14]. Not all pers are decidable, i.e., there may be no algorithm for deciding when two values are equivalent. Examples include implementations of semigroups with an undecidable word problem =-=[15]-=- and implementations of computable real numbers (which might be realized by infinite Cauchy sequences). 5 And there is a third view, as a partial surjection δA : ⊆[[|A|]] ↠ 〈A〉, with δA(v) = x when v ... |

70 |
The Objective Caml system: Documentation and user’s manual
- Leroy
- 2000
(Show Context)
Citation Context ... as a bridge between the logical world and the programming world. 3 RZ translates specifications in constructive logic into standard interface code in a programming language (currently Objective Caml =-=[7]-=-, but other languages could be used). 3 RZ is publicly available for download at http://math.andrej.com/rz/, together with an extended version of this paper.sThe constructive part of the original spec... |

48 | Constructivism in Mathematics, An Introduction, Volume - Troelstra, Dalen - 1988 |

47 | PCF Extended with Real numbers
- Escardó
- 1997
(Show Context)
Citation Context ...e is that they use models of computation which are well suited for the theoretical studies of computability. Approaches based on simple programming languages augmented with datatypes for real numbers =-=[28, 29]-=- and topological algebras [2], and machines augmented with (suitably chosen subsets of) real numbers [30–32] are motivated by issues ranging from purely theoretical concerns about computability and co... |

41 | The Realizability Approach to Computable Analysis and Topology
- Bauer
- 2000
(Show Context)
Citation Context ... v ′ represent the same morphism if, for all u, u ′ ∈ �A�, u ≈A u ′ implies v u ≈B v ′ u ′ . The category of pers has a very rich structure, namely that of a regular locally cartesian closed category =-=[13]-=-. This suffices for the interpretation of first-order logic and (extensional) dependent types [14]. Not all pers are decidable, i.e., there may be no algorithm for deciding when two values are equival... |

38 | Constructive analysis, volume 279 of Grundlehren der Mathematischen Wissenschaften - Bishop, Bridges - 1985 |

37 |
The Foundations of Intuitionistic Mathematics, Especially in Relation to Recursive Functions
- Kleene, Vesley
- 1965
(Show Context)
Citation Context ...usually presented) within the framework of realizability: Recursive Mathematics [21] is based on the original realizability by Turing machines [22]; Type Two Effectivity [1] on function realizability =-=[23]-=- and relative function realizability [24], while topological and domain representations [25, 26] are based on realizability over the 9 There are models of λ-calculus which validate the choice principl... |

36 | The definition of Extended ML: A gentle introduction
- Kahrs, Sannella, et al.
- 1997
(Show Context)
Citation Context ...; quantification over theories; and parameterized theories) that goes well beyond simple predicate logic over integers and lists. The idea of annotating ML signatures with assertions is not new (e.g. =-=[20]-=-). 8.2 Other models of computability Many formulations of computable mathematics are based on realizability models [2], even though they were not initially developed, (nor are they usually presented) ... |

35 |
Domain representability of metric spaces
- Blanck
- 1997
(Show Context)
Citation Context ... (a Cauchy-complete Archimedean ordered field)? Or choose the operations for a compact metric space or a space of smooth functions? Significant research goes into finding satisfactory representations =-=[12, 15, 36, 37]-=-, while implementations of exact real arithmetic [24, 29] show that theory can be put into practice quite successfully. The theory of realizability provides guidance in development of computable mathe... |

32 | Equilogical spaces
- Bauer, Birkedal, et al.
(Show Context)
Citation Context ...d on the original realizability by Turing machines [22]; Type Two Effectivity [1] on function realizability [23] and relative function realizability [24], while topological and domain representations =-=[25, 26]-=- are based on realizability over the 9 There are models of λ-calculus which validate the choice principle AC2,0, but this contradicts the existence of a modulus of continuity functional, see [20, 9.6.... |

30 |
Computable functions and semicomputable sets on many sorted algebras
- Tucker, Zucker
(Show Context)
Citation Context ...tation which are well suited for the theoretical studies of computability. Approaches based on simple programming languages augmented with datatypes for real numbers [28, 29] and topological algebras =-=[2]-=-, and machines augmented with (suitably chosen subsets of) real numbers [30–32] are motivated by issues ranging from purely theoretical concerns about computability and complexity to practical questio... |

27 | Proof theory at work: Program development in the Minlog system
- Benl, Berger, et al.
- 1998
(Show Context)
Citation Context ...eight system supporting a rich input language. Although transforming complete proofs into complete code is possible [8], we have not implemented this. Other good systems, including Coq [9] and Minlog =-=[10]-=-, can extract programs from proofs. But they work best managing the entire task, from specification to code generation. In contrast, interfaces generated by RZ can be implemented in any fashion as lon... |

25 | Constructivism in Mathematics: An introduction - Troelstra, Dalen - 1988 |

20 |
Domain theory and differential calculus (functions of one variable
- Edalat, Lieutier
(Show Context)
Citation Context ...uses a pair of lists (ℓV , ℓA), where ℓV is the list of vertex labels and ℓA is the adjacency list representing the arrows by pairing the labels of each source and target. For the above graph G, ℓV = =-=[1; 2; 3; 4]-=- and ℓA = [(1, 2); (2, 2); (2, 3); (3, 2); (3; 1)]. Thus we define the datatype of graphs as 5 type graph = int list ∗ (int ∗ int) list However, this is not a complete description of the intended repr... |

19 | When is a functional program not a functional program
- Longley
- 1999
(Show Context)
Citation Context ...nd value of type t2. 2sLet Type be the collection of all (non-parametric) OCaml types. To each type t ∈ Type we assign the set [t] of values of type t that behave functionally in the sense of Longley =-=[12]-=-. Such values are represented by terminating expressions that do not throw exceptions or return different results on different invocations. They may use exceptions, store, and other computational effe... |

18 | The iRRAM: Exact arithmetic in C
- Müller
- 2000
(Show Context)
Citation Context ...hoose the operations for a compact metric space or a space of smooth functions? Significant research goes into finding satisfactory representations [1–4], and implementations of exact real arithmetic =-=[5, 6]-=- show that the theory can be put into practice quite successfully. Realizability theory can be used to produce a description of the data structure (a code interface) directly corresponding to a mathem... |

17 |
Matching typed and untyped realizability
- Longley
- 1999
(Show Context)
Citation Context ... “purely functional” subset. Or, the output can serve as a basis for theorem-proving and code extraction using another system. 2 Typed realizability RZ is based on typed realizability by John Longley =-=[11]-=-. This variant of realizability corresponds most directly to programmers’ intuition about implementations. We approach typed realizability and its relationship to real-world programming by way of exam... |

13 |
Semantics of a sequential language for exact realnumber computation
- Marcial-Romero, Escardó
- 2004
(Show Context)
Citation Context ...e is that they use models of computation which are well suited for the theoretical studies of computability. Approaches based on simple programming languages augmented with datatypes for real numbers =-=[28, 29]-=- and topological algebras [2], and machines augmented with (suitably chosen subsets of) real numbers [30–32] are motivated by issues ranging from purely theoretical concerns about computability and co... |

12 |
Computability on Topological Spaces by Effective Domain Representations
- Blanck
- 1997
(Show Context)
Citation Context ...d on the original realizability by Turing machines [22]; Type Two Effectivity [1] on function realizability [23] and relative function realizability [24], while topological and domain representations =-=[25, 26]-=- are based on realizability over the 9 There are models of λ-calculus which validate the choice principle AC2,0, but this contradicts the existence of a modulus of continuity functional, see [20, 9.6.... |

9 | Developing Theories of Types and Computability
- Birkedal
- 1999
(Show Context)
Citation Context ...f realizability: Recursive Mathematics [21] is based on the original realizability by Turing machines [22]; Type Two Effectivity [1] on function realizability [23] and relative function realizability =-=[24]-=-, while topological and domain representations [25, 26] are based on realizability over the 9 There are models of λ-calculus which validate the choice principle AC2,0, but this contradicts the existen... |

7 |
Domain representability of metric spaces. Annals of Pure and Applied Logic 83
- Blanck
- 1997
(Show Context)
Citation Context ...uses a pair of lists (ℓV , ℓA), where ℓV is the list of vertex labels and ℓA is the adjacency list representing the arrows by pairing the labels of each source and target. For the above graph G, ℓV = =-=[1; 2; 3; 4]-=- and ℓA = [(1, 2); (2, 2); (2, 3); (3, 2); (3; 1)]. Thus we define the datatype of graphs as 5 type graph = int list ∗ (int ∗ int) list However, this is not a complete description of the intended repr... |

5 |
RealLib: an efficient implementation of exact real arithmetic
- Lambov
- 2007
(Show Context)
Citation Context ...hoose the operations for a compact metric space or a space of smooth functions? Significant research goes into finding satisfactory representations [1–4], and implementations of exact real arithmetic =-=[5, 6]-=- show that the theory can be put into practice quite successfully. Realizability theory can be used to produce a description of the data structure (a code interface) directly corresponding to a mathem... |

4 |
A.: The definition of Extended ML: A gentle introduction. Theoretical Computer Science 173(2
- Kahrs, Sannella, et al.
- 1997
(Show Context)
Citation Context ... quantification over theories; and parameterized theories) that goes well beyond simple predicate logic over integers and lists. The idea of annotating ML signatures with assertions is not new (e.g., =-=[22]-=-). 8.2 Other Models of Computability Many formulations of computable mathematics are based on realizability models [14], even though they were not initially developed, (nor are they usually presented)... |

3 | Implementing real numbers with RZ
- Bauer, Kavkler
- 2007
(Show Context)
Citation Context ...tion we look at several small examples which demonstrate various points of RZ. For a serious case study from computable mathematics see the implementation of real numbers with RZ by Bauer and Kavkler =-=[20]-=-. The main theme is that constructively reasonable axioms yield computationally reasonable operations. 7.1 Decidable sets A set S is said to be decidable when, for all x, y ∈ S, x = y or ¬(x = y). In ... |

2 | Implementation of intuitionistic type theory and realizability theory
- Komagata, Schmidt
- 1995
(Show Context)
Citation Context ...ammers and mathematicians accustomed to classical logic. RZ was designed as a lightweight system supporting a rich input language. Although transforming complete proofs into complete code is possible =-=[8]-=-, we have not implemented this. Other good systems, including Coq [9] and Minlog [10], can extract programs from proofs. But they work best managing the entire task, from specification to code generat... |

2 | Constructive Analysis, vol. 279 of Grundlehren der mathematischen Wissenschaften, A series of Comprehensive Studies in Mathematics - Bishop, Bridges - 1985 |

1 |
A.: Domain of differentiable functions
- Edalat, Lieutier
- 2000
(Show Context)
Citation Context ...entation is a pair of lists (ℓV , ℓA), where ℓV is the list of vertex labels and ℓA is the adjacency list representing the arrows by pairing the labels of each source and target. In our example, ℓV = =-=[1; 2; 3; 4]-=- and ℓA = [(1, 2); (2, 2); (2, 3); (3, 2); (3; 1)]. Thus we define the datatype of graphs as 5 type graph = int list ∗ (int ∗ int) list However, this is not a complete description of the representatio... |

1 |
Theory of real computation according to EGC (2006) To appear in LNCS Volume based on the Dagstuhl Seminar “Reliable Implementation of Real Number Algorithms: Theory and Practice
- Yap
(Show Context)
Citation Context ...opological algebras [2], or machine models augmented with (suitably chosen subsets of) real numbers such as Real RAM [35], the Blum-Shub-Smale model [36], and the Exact Geometric 27Computation model =-=[37]-=-. The motivation behind these ranges from purely theoretical concerns about computability and complexity to practical issues in the design of programming languages and algorithms in computational geom... |

1 | Specifications via realizability
- Bauer, Stone
- 2006
(Show Context)
Citation Context ...ge features rather than a “purely functional” subset. Or, the output can serve as a basis for theorem-proving and code extraction using another system. An earlier description of or RZ work appears in =-=[11]-=-; since then, the input syntax and underlying implementation has been significantly revised and improved, and the support for dependent types and hoisting is completely new. 2 Typed realizability RZ i... |

1 |
Theory of real computation according to EGC, 2006
- Yap
- 2006
(Show Context)
Citation Context ...d topological algebras [36], or machine models augmented with (suitably chosen subsets of) real numbers such as Real RAM [14], the Blum–Shub–Smale model [13] and the Exact Geometric Computation model =-=[38]-=-. The motivation behind these ranges from purely theoretical concerns about computability and complexity to practical issues in the design of programming languages and algorithms in computational geom... |