- Book Chapter
- 10.1201/9781439863763-15
Computational complexity and induction for partial computable functions in type theory
- Aug 16, 2002
Computational complexity and induction for partial computable functions in type theory
An adequate theory of partial computable functions should provide a basis for defining computational complexity measures and should justify the principle of computational induction for reasoning about programs on the basis of their recursive calls. There is no practical account of these notions in type theory, and consequently such concepts are not available in applications of type theory where they are greatly needed. It is also not clear how to provide a practical and adequate account in programming logics based on set theory.This paper provides a practical theory supporting all these concepts in the setting of constructive type theories. We first introduce an extensional theory of partial computable functions in type theory. We then add support for intensional reasoning about programs by explicitly reflecting the essential properties of the underlying computation system. We use the resulting intensional reasoning tools to justify computational induction and to define computational complexity classes. Complexity classes take the formof complexity-constrained function types. These function types are also used in conjunction with the propositions-as-types principle to define a resource-bounded logic in which proofs of existence can guarantee feasibility of construction.
Computational complexity and induction for partial computable functions in type theory
Computational complexity and induction for partial computable functions in type theory
A Type of Partial Recursive Functions
Our goal is to define a type of partial recursive functions in constructive type theory. In a series of previous articles, we studied two different formulations of partial functions and general recursion. We could obtain a type only by extending the theory with either an impredicative universe or with coinductive definitions. Here we present a new type constructor that eludes such entities of dubious constructive credentials. We start by showing how to break down a recursive function definition into three components: the first component generates the arguments of the recursive calls, the second evaluates them, and the last computes the output from the results of the recursive calls. We use this dissection as the basis for the introduction rule of the new type constructor. Every partial recursive function is associated with an inductive domain predicate; evaluation of the function requires a proof that the input values satisfy the predicate. We give a constructive justification for the new construct by interpreting it into the base type theory. This shows that the extended theory is consistent and constructive.
Read moreFibrational Modal Type Theory
This paper describes a fibrational categorical semantics for the modal necessity-only fragment of constructive modal type theory, both with and without dependent types. Constructive type theory does not usually discuss logical modalities, and modalities tend to be mostly studied within classical logic, not within type theory. But modalities should be very useful in type theory, as they are very useful in modelling theoretical computing systems. Providing constructive versions of modal logics and their associated Curry-Howard modal type theories is also a very productive program, e.g. helpful when dealing with computational effects, staged computation, and functional reactive types, for example. There seems to be renewed interest in the notion of constructive modal type theory (and in notions of linear type theory), in part because of the interest in homotopy type theory. The modal type theory presented here uses dependent types, in the style of Ritter's categorical models of the Calculus of Constructions. To build up to these, we first discuss the kinds of constructive modal type theory in the literature. Then we provide a non-dependent modal type theory, introduced in previous work, that we generalize to dependent types in the following section. Dependent type theories are usually but not always given categorical semantics in terms of fibrations. We provide semantics in terms of fibrations for both the non-dependent and the dependent type systems discussed and prove them sound and complete, thereby providing evidence that the type theory is meaningful. These fibrational models should be also applicable to the homotopy type theory setting.
Read moreA Simple Nominal Type Theory
A Simple Nominal Type Theory
Preliminary Remarks
The aim of this book is to show how constructive type theory, in the form developed by Per Martin-Löf, helps us to understand the structure of natural language. The study of similar questions within simple (=classical) type theory was inaugurated by Frege and given a standard of technical detail by Montague. The point of shifting to constructive type theory is not in the constructivist criticism against classical reasoning, but in the positive observation that constructive type theory has new things to say. Some of the problems to which grammars based on classical type theory have not found satisfactory solutions will be shown to require precisely these new things. These problems appear in a simple form in what is known, since Geach, as donkey sentences. But they are repeated in other guises, for example, in the functioning of tenses, and in a larger scale, such as in the progressive structure of texts, and in the significance of context in communication.
Read moreA Set Theory with Support for Partial Functions
Partial functions can be easily represented in set theory as certain sets of ordered pairs. However, classical set theory provides no special machinery for reasoning about partial functions. For instance, there is no direct way of handling the application of a function to an argument outside its domain as in partial logic. There is also no utilization of lambda-notation and sorts or types as in type theory. This paper introduces a version of von-Neumann-Bernays-Godel set theory for reasoning about sets, proper classes, and partial functions represented as classes of ordered pairs. The underlying logic of the system is a partial first-order logic, so class-valued terms may be nondenoting. Functions can be specified using lambda-notation, and reasoning about the application of functions to arguments is facilitated using sorts similar to those employed in the logic of the IMPS Interactive Mathematical Proof System. The set theory is intended to serve as a foundation for mechanized mathematics systems.
Read moreEditorial
This issue of the Journal of Functional Programming is dedicated to work presented at the Workshop on Implicit Computational Complexity in Programming Languages, affiliated with the 1998 meeting of the International Conference on Functional Programming in Baltimore. Several machine-independent approaches to computational complexity have been developed in recent years; they establish a correspondence linking computational complexity to conceptual and structural measures of complexity of declarative programs and of formulas, proofs and models of formal theories. Examples include descriptive complexity of finite models, restrictions on induction in arithmetic and related first order theories, complexity of set-existence principles in higher order logic, and specifications in linear logic. We refer to these approaches collectively as Implicit Computational Complexity. This line of research provides a framework for a streamlined incorporation of computational complexity into areas such as formal methods in software development, programming language theory, and database theory. A fruitful thread in implicit computational complexity is based on exploring the computational complexity consequences of introducing various syntactic control mechanisms in functional programming, including restrictions (akin to static typing) on scoping, data re-use (via linear modalities), and iteration (via ramification of data). These forms of control, separately and in combination, can certify bounds on the time and space resources used by programs. In fact, all results in this area establish that each restriction considered yields precisely a major computational complexity class. The complexity classes thus obtained range from very restricted ones, such as NC and Alternating logarithmic time, through the central classes Poly-Time and Poly-Space, to broad classes such as the Elementary and the Primitive Recursive functions. Considerable effort has been invested in recent years to relax as much as possible the structural restrictions considered, allowing for more exible programming and proof styles, while still guaranteeing the same resource bounds. Notably, more exible control forms have been developed for certifying that functional programs execute in Poly-Time. The 1998 workshop covered both the theoretical foundations of the field and steps toward using its results in various implemented systems, for example in controlling the computational complexity of programs extracted from constructive proofs. The five papers included in this issue nicely represent this dual concern of theory and practice. As they are going to print, we should note that the field of Implicit Computational Complexity continues to thrive: successful workshops dedicated to it were affiliated with both the LICS'99 and LICS'00 conferences. Special issues, of Information and Computation dedicated to the former, and of Theoretical Computer Science to the latter, are in preparation.
Read moreThe extended predicative Mahlo universe in Martin-Löf type theory
This paper addresses the long-standing question of the predicativity of the Mahlo universe. A solution, called the extended predicative Mahlo universe, has been proposed by Kahle and Setzer in the context of explicit mathematics. It makes use of the collection of untyped terms (denoting partial functions) which are directly available in explicit mathematics but not in Martin-Löf type theory. In this paper, we overcome the obstacle of not having direct access to untyped terms in Martin-Löf type theory by formalizing explicit mathematics with an extended predicative Mahlo universe in Martin-Löf type theory with certain indexed inductive-recursive definitions. In this way, we can relate the predicativity question to the fundamental semantics of Martin-Löf type theory in terms of computation to canonical form. As a result, we get the first extended predicative definition of a Mahlo universe in Martin-Löf type theory. To this end, we first define an external variant of Kahle and Setzer’s internal extended predicative universe in explicit mathematics. This is then formalized in Martin-Löf type theory, where it becomes an internal extended predicative Mahlo universe. Although we make use of indexed inductive-recursive definitions that go beyond the type theory $\mathbf {IIRD}$ of indexed inductive-recursive definitions defined in previous work by the authors, we argue that they are constructive and predicative in Martin-Löf’s sense. The model construction has been type-checked in the proof assistant Agda.
Read moreComputational higher-dimensional type theory
Formal constructive type theory has proved to be an effective language for mechanized proof. By avoiding non-constructive principles, such as the law of the excluded middle, type theory admits sharper proofs and broader interpretations of results. From a computer science perspective, interest in type theory arises from its applications to programming languages. Standard constructive type theories used in mechanization admit computational interpretations based on meta-mathematical normalization theorems. These proofs are notoriously brittle; any change to the theory potentially invalidates its computational meaning. As a case in point, Voevodsky's univalence axiom raises questions about the computational meaning of proofs.
Read moreQuotient topologies in constructive set theory and type theory
Quotient topologies in constructive set theory and type theory
Machine-checked Proof of the Church-Rosser Theorem for the Lambda Calculus Using the Barendregt Variable Convention in Constructive Type Theory
In this article we continue the work started in [Ernesto Copello, Álvaro Tasistro, Nora Szasz, Ana Bove, and Maribel Fernández. Alpha-structural induction and recursion for the λ-calculus in constructive type theory. Electronic Notes in Theoretical Computer Science, 323:109–124, 2016], deriving in Constructive Type Theory new induction principles for the λ-calculus, using (the historical) first order syntax with only one sort of names for both bound and free variables, and with α-conversion based upon name swapping. The principles provide a flexible framework for mimicking pen-and-paper proofs within the rigorous formal setting of a proof assistant. We here report on one successful application, namely a complete proof of the Church-Rosser Theorem. The whole development has been machine-checked using the system Agda [Ulf Norell. Towards a Practical Programming Language Based on Dependent Type Theory. PhD thesis, Department of Computer Science and Engineering, Chalmers University of Technology, September 2007].
Read moreConstructive Notions of Set. Part I. Sets in Martin-Löf Type Theory
This is the first of two articles dedicated to the notion of constructive set. In them we attempt a comparison between two different notions of set which occur in the context of the foundations for constructive mathematics. We also put them under perspective by stressing analogies and differences with the notion of set as codified in the classical theory Zermelo–Fraenkel. In the current article we illustrate in some detail the notion of set as expressed in Martin–L¨of type theory and present the essential characters of this theory. In a second article we shall explore a distinct notion of set, as arising in the context of intuitionistic versions of Zermelo–Fraenkel set theory. The theory we shall analyse there is Aczel’s CZF (Constructive Zermelo– Fraenkel) and we shall supplement its exposition by a succinct account of Aczel’s interpretation of CZF in type theory. This will enable us to compare the two notions in a more precise sense.
Read moreDoes Homotopy Type Theory Provide a Foundation for Mathematics?
Homotopy Type Theory (HoTT) is a putative new foundation for mathematics grounded in constructive intensional type theory, that offers an alternative to the foundations provided by ZFC set theory and category theory. This paper explains and motivates an account of how to define, justify and think about HoTT in a way that is self-contained, and argues that it can serve as an autonomous foundation for mathematics. We first consider various questions that a foundation for mathematics might be expected to answer, and find that the standard formulation of HoTT as presented in the ``HoTT Book'' does not answer many of them. More importantly, the way HoTT is developed in the HoTT Book suggests that it is not a candidate \emph{autonomous} foundation since it explicitly depends upon other fields of mathematics, in particular homotopy theory. We give an alternative presentation of HoTT that does not depend upon sophisticated ideas from other parts of mathematics, and in particular makes no reference to homotopy theory (but is compatible with the homotopy interpretation). Our elaboration of HoTT is based on a new interpretation of types as \emph{mathematical concepts}, which accords with the intensional nature of the type theory.
Read moreComplexity classes of partial recursive functions
Complexity classes of partial recursive functions
Coercion completion and conservativity in coercive subtyping
Coercion completion and conservativity in coercive subtyping