Universität Potsdam
On monadic backward induction and extensional equality preservation in intensional type theory
Abstract
dc:description.abstractThis thesis is concerned with theoretical and applied aspects of Intensional Type Theory (ITT). ITT is a variant of Martin-Löf Type Theory (MLTT), a constructive foundational theory that has its roots in the controversies about the consistency of mathematics at the beginning of the 20th century. First proposed by Martin-Löf in 1972, it provides an alternative to set theory, and is inspired by Brouwer’s intuitionistic logic, by earlier type theories (Russell, Church) and by Church’s λ-calculus. As such, MLTT is particularly well-suited for computer science, since its logical propositions correspond to data types, proofs to terminating programs, and proof transformations to program evaluation. It thus offers a unified framework for specification, programming and proving. By now, the theory is well-established and there are several mature implementations of MLTT- variants in theorem provers (or dependently typed programming languages) like Coq, NuPRL, Agda, Idris or Lean, providing a huge body of formalised mathematics and computer science. Yet there are still many theoretical and practical aspects of MLTT, its variants and its implementations to be better understood. The present thesis seeks to contribute to this objective. It involves both theory and application of dependently typed programming languages based on (the intensional variant) ITT. As a syntax we use the implementation of ITT in Idris, and the thesis manuscript is compiled from “literate” Idris source code. Consequently, our results are fully formalised and machine-checkable (they are moreover additionally formalised in Coq, where it is relevant due to nuances of the theory). In the first part of the thesis, we use ITT as mathematical meta-theory to establish a correctness result for monadic backward induction (MBI). By so doing, we build on a line of work by Botta, Jansson and Ionescu in the context of dynamical systems science and control theory, in particular with application to climate science and climate policy. Central to the work of Botta et al. is the use of monads to capture a generic notion of “uncertainty”, and they introduce MBI as a generalised version of Bellman’s 1957 backward induction algorithm for solving monadic sequential decision problems (MSDPs). These decision problems generalise their deterministic, non-deterministic and stochastic counterparts, and allow to recover any of the standard notions by instantiation with an appropriate monad (and some further ingredients like a measure function). Botta et al. provide a partial verification result for MBI, but, as we show in the first part of this thesis (based on a collaboration with Nicola Botta), this result is not sufficient to guarantee that MBI is well-behaved for arbitrary MSDPs. Nevertheless, we can formulate reasonable correctness conditions, identifying a class of MSDPs for which MBI is indeed correct. These conditions moreover allow for a neat category-theoretical description in terms of Eilenberg-Moore algebras. The main theorem of this part of the thesis is the correctness proof for MBI which is a new original result. We however observe that the formal proof in ITT requires – besides the general correctness conditions for MBI – an additional property of the monad, or, more precisely, of the underlying functor. This property concerns the preservation of extensional equality and is different from the other conditions since it depends on the meta-theory. If the theory validates function extensionality (functions are propositionally equal if they coincide on all inputs), then this property is provable for any functor. In standard mathematics and often also in computer science, function extensionality is assumed per default. But it is independent of ITT, and some of the models which refute function extensionality seem particularly relevant for computer science because they involve functions carrying additional information. Interestingly, even if we cannot prove in ITT that arbitrary functors preserve extensional equality, we can prove this property for individual concrete functors, like the List functor. Such functors have been called extensional functors by Matthes. The observation that there are provably extensional functors in ITT, allows for a more local approach to dealing with extensionality. The contribution of the second part of the thesis (based on a collaboration with Nicola Botta, Patrik Jansson and Tim Richter) is therefore to explore and illustrate the relevance of extensional functors for designing abstract data types and proving properties of generic programs in ITT. We show, for example, that extensionality is needed for proving closure properties for functors, or proving different representations of monads equivalent. The last part of the thesis contributes a clarification of the relation between extensional functors and function extensionality. We show that the logical statement expressing “all functors are extensional” is independent of ITT because it is equivalent to function extensionality for simple functions of the form A → B. But in ITT, there are also dependent functions, corresponding to universally quantified statements of the form ∀x:A,Px. What about these? It has been shown by Voevodsky that in ITT, function extensionality for simple functions implies function extensionality for dependent functions. The original proof is however strongly inspired by homotopy theory and difficult to follow without a background in this domain (or in Homotopy Type Theory). The last contribution of this thesis is therefore the development of a stand-alone proof of the result, emphasising the role of extensional functors and of notions that are familiar from generic functional programming. It turns out that the proof of dependent function extensionality neatly factors through the preservation of equivalences by extensional functors – which provides an interesting new perspective on this result.
Degree
thesis:*- Level thesis:degree_level
- thesis.doctoral
- Grantor dc:publisher
- Universität Potsdam
- Year dc:date.issued
- 2024
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Brede, Nuria
- Advisors dc:contributor.advisor
-
- Kreitz, Christoph
- Bordihn, Henning
- Person Identifier Gnd person:identifier.gnd
-
- 1326314181
- 1330155300
- 1138128538
- ORCID person:identifier.orcid
Subjects
dc:subject × 16- intensional type theory
- intensionale Typentheorie
- dependently typed programming
- Programmiersprachen mit abhängigen Typen
- monadic backward induction
- monadische Rückwärtsinduktion
- extensional equality preservation
- Erhaltung extensionaler Gleicheit
- function extensionality
- Extensionalität von Funktionen
- extensional functors
- extensionale Funktoren
- monadic sequential decision problems
- monadische sequentielle Entscheidungsprobleme
- Idris
- Coq
Rights
dc:rights.accessrights- Statement dc:rights.accessrights
-
- free
- CC-BY - Namensnennung 4.0 International
- Language dc:language.dcterms_iso639_2
- eng