(Link)
Author: Per Martin-Löf (University of Stockholm)
Reference: Per Martin-Löf, Intuitionistic Type Theory, Notes by Giovanni Sambin of a series of lectures given in Padua, June 1980 (1984)
Why this paper? Cited by A conservativity result for homotopy elementary types in dependent type theory, Topological Quantum Gates in Homotopy Type Theory, and A parametricity-based formalization of semi-simplicial and semi-cubical sets
5 years on from Martin-Löf’s seminal paper on type theory (on which I have written before; I will try to avoid repeating myself), he presented his approach to a mixed audience of computer scientists, mathematicians, and philosophers. As such, these notes are quite accessible to a range of audiences, with time spent on questions like “What is it we must know in order to have the right to judge something to be a set?”, plenty of examples, and a fairly light touch on metatheorems about his system. However this is not merely a teaching course on his 1975 material, and we see two major new ideas enter his type theory here (and also in his almost simultaneously published paper Constructive mathematics and computer programming, which covers similar ground but is much briefer).
The first is the reflection rule, which allows ‘propositional’ equalities proved within the system to be used freely to replace equals by equals anywhere (as a fully fledged ‘definitional’ equality). This captures the strong extensional view of equality, as opposed to the intensional view of the older work in which objects enjoy first class equality only if they are described the same way, up to some automatic conversions. This is an old concept from philosophy of language, where Superman and Clark Kent are extensionally but not intensionally equal, because there are places in language for which they are not interchangeable: “Clark Kent is a civilian identity” does not imply “Superman is a civilian identity”. Martin-Löf notably does not discuss the reasons for this change or its ramifications. In fact it is known to have unfortunate consequences computationally, violating one of the keystone theorems of his earlier paper – the decidability of type checking – among other troublesome aspects. This does not make extensional type theory useless; it is the right tool for much ‘pen and paper’ type theory in which we want to work synthetically in a particular mathematical setting but use the strong form of equality usually preferred by mathematicians.
The second new idea is the introduction of W-types (at least, I believe this is their first appearance), which gives a general tree-like syntax for inductive types such as natural numbers and lists.
Finally, I would note the interesting fact that, linguistically at least, Martin- Löf repeatedly conflates the terms ‘type’ and ‘set’. This does not reflect most modern practice, in which category theory is usually the language of choice for defining denotational semantics, opening the way for the interpretation of type theory in mathematical settings others than sets. Indeed, in homotopy type theory (invented in part to find an interesting middle way between extensional and intensional equality) the notion of type is strictly more general than that of set: a set is a type without interesting equalities.
Wednesday, 3 January 2024
Discussing "Intuitionistic Type Theory"
Sunday, 2 April 2023
Discussing "Normalization for Multimodal Type Theory"
(Link)
Author: Daniel Gratzer (Aarhus University)
Reference: Daniel Gratzer. 2022. Normalization for Multimodal Type Theory. In Proceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS '22). Association for Computing Machinery, New York, NY, USA, Article 2, 1–13. https://doi.org/10.1145/3531130.3532398
Why this reference? Cited by Semantics of Multimodal Adjoint Type Theory, A Categorical Normalization Proof for the Modal Lambda-Calculus, and For the Metatheory of Type Theory, Internal Sconing Is Enough
While my reading program for this blog often sends me bouncing around from subject to subject, this blog post is exactly the sequel to the last one, as one of the authors of the Multimodal Type Theory paper tackles the question of normalisation for these systems. Normalisation is the property that all programs in a language terminate; this is not a typical property of programming languages but is important for dependent types: as terms can appear in types, type checking can require execution of arbitrary code, and so termination of type checking in general requires termination of all possible programs. Terminating type checking is a standard requirement, but is particularly desirable when we use type theories to formalise mathematics. In this paradigm type checking corresponds to proof checking, and it seems a bizarre violation of usual practice for it to be impossible to decide whether a putative proof of a theorem is indeed valid.
Proving normalisation of even quite simple type theories, such as the simply typed lambda calculus, is not easy (although the techniques are now well studied and understood). While evaluation is sometimes called ‘reduction’, in fact terms do not reduce in size, or in any other obvious sense, as they compute. Matters get even more difficult in this paper, which refers to not one system, but multiple different type theories depending on one’s choice of mode theory. A recent proof of the property for one particular modal type theory was not encouraging, requiring a 77 page technical report to state all details. This paper also has a companion technical report weighing in at a comparatively svelte 39 pages, and yet proves the result for all modal type theories in the framework (provided that the mode theory chosen is not itself undecidable). How is this possible?
The technology behind this is Synthetic Tait Computability, as developed quite recently by Sterling and Harper. I am not yet entirely on top of this material, and frankly probably need to become so to appreciate the technical details of this quite dense paper (at least the Aarhus group, to which I used to belong, are good about publishing longer follow-ups in journals rather than leaving work in ultra-terse conference-truncated form, as sometimes happens with important or promising work in our field, so a more approachable but still reviewed version of this work might well be coming).
Given the technical prerequisites, perhaps a blow-by-blow of the development will not be so illuminating in a short blog post. Suffice it to say that the approach is deeply category theoretic; even the syntax is defined (it is claimed as a theorem, but looks more like a definition to me) to be an initial model, where model is defined as a certain 2-functor (this would provide a form of ‘fully annotated’ syntax which would probably be the target of an elaboration algorithm rather than pleasant to work with directly, but this is outside the bounds of this paper). Similarly, the normalisation algorithm is defined via the construction of a 'normalisation cosmos' (a cosmos is a weaker notion of model, avoiding some strictness requirements). While I am used to the denotational semantics (‘mathematical meaning’) of type theory being expressed in such terms, and syntax as initial model is OK as well, defining syntactic algorithms via category theory is a bit of a new one on me. It’s always good to have plenty to learn!
Tuesday, 24 January 2023
Discussing "An Intuitionistic Theory of Types: Predicative Part"
(Link), although I downloaded a free copy here.
Author: Per Martin-Löf (University of Stockholm)
Reference: Per Martin-Löf, An Intuitionistic Theory of Types: Predicative Part, Editor(s): H.E. Rose, J.C. Shepherdson, Studies in Logic and the Foundations of Mathematics, Elsevier, Volume 80, 1975, Pages 73-118, https://doi.org/10.1016/S0049-237X(08)71945-1.
Why this paper? Cited by Encoding Dependently-Typed Constructions into Simple Type Theory and Normalization and coherence for ∞-type theories
After covering a few advanced and recent papers on type theory recently, this week we look at the first ever fully realised paper on type theory for formalised mathematics (previous work was either incomplete or suffered from errors). It is stated from the very first sentence that the work of this paper is “intended to be a full scale system for formalizing intuitionistic mathematics”. Charmingly, the paper ends with the self-effacing remark “What is doubtful at present is not whether computerization is possible, because we already know that, but rather whether these proof-theoretical computation procedures are at all useful in practice. So far, they do not seem to have found a single significant application”. Almost 50 years on, the vision of this paper has been thoroughly vindicated by the development of sophisticated proof assistants such as Coq and Lean capable of formalising complex mathematics such as proofs of the Four-Colour Theorem and the Odd Order Theorem.
The basic idea is to exploit the Curry-Howard isomorphism, only recently worked out in detail by William Howard (see Howard’s comments on his influence on Martin-Löf here), which identifies propositions with types and (intuitionistic) proofs with programs, to develop a (at this stage, paper-only) programming language for which which proof checking is type checking. Each logical symbol, familiar from any introductory logic course, becomes associated with a type former, as well as program formers which allow programs with that type to be introduced and eliminated (used). Less familiar to logicians, a universe (type of types) is essential to formalise many mathematical arguments, but care must be taken to avoid paradoxes that would crop up if the universe is taken to be a member of itself (very similar paradoxes must be avoided in set theory); this is the predicativity of the title. Crucially (and again, perhaps not so familiar from an introductory logical course) the decidability and other good properties of algorithms related to the type theory – reduction and type checking – is proved, paving the way for type theory to jump off the page and into real implementation.
This paper is quite a readable introduction to this brand new area, as Martin-Löf does not assume familiarity with the underlying idea of performing mathematics inside type theory, as a more recent paper might, but rather must justify his approach. The paper is full of pithy quotes (some original, some adapted from other sources) to motivate the work, such as “A proposition is defined by prescribing how we are allowed to prove it” and, justifying the importance of type checking being decidable, “we recognize a proof when we see one”.