Type Theory

ECIC is Inconsistent

…probably. To be clear, ECIC1 refers to Monnier and Bos’ Erasable CIC2, with erasable in the sense of erasable pure type systems (EPTS)3. I’ll argue that even with erased impredicative fields, Coquand’s paradox of trees4 is still typeable.

  1. Not to be confused with their eCIC, the erasable CIC. 

  2. Stefan Monnier; Nathaniel Bos. Is Impredicativity Implicitly Implicit? TYPES 2019. doi:10.4230/LIPIcs.TYPES.2019.9

  3. Nathan Mishra-Linger; Tim Sheard. Erasure and polymorphism in pure type systems. FOSSACS 2008. doi:10.5555/1792803.1792828

  4. Thierry Coquand. The paradox of trees in type theory. BIT 32 (1992). doi:10.1007/BF01995104

More …

Designing Stratified Type Theory

I’ve wanted to write an informal (but technical!) post1 about my current research in progress on Stratified Type Theory (StraTT), but we’ve been occupied with writing up a paper draft for submission to CPP 2024, then writing a talk for NJPLS Nov 2023, then being rejected from CPP, then I’ve just been randomly distracted for two weeks but I’m so back now.

That paper draft along with the supplementary material will have all the details, but I’ve decided that what I want to focus on in this post is all the other variations on the system we’ve tried that are either inconsistent or less expressive. This means I won’t cover a lot of motivation or examples (still a work in progress), or mention any metatheory unless where relevant; those can be found in the paper. Admittedly, these are mostly notes for myself, and I go at a pace that sort of assumes enough familiarity with the system to be able to verify well-typedness mentally, but this might be interesting to someone else too.

  1. A draft of this post was first published on Cohost. 

More …

Notes on Guarded Types


Work Summary
Nakano [0] STLC + recursive types + guarded types
Birkdeal, Møgelberg, Schwinghammer, Stovring [1] dependent types + recursive types + guarded types
Atkey and McBride [2] STLC + recursive types + guarded types + clocks
Birkedal and Møgelberg [3] dependent types + guarded types
Møgelberg [4] dependent types + guarded types + clocks
GDTT [6] dependent types + guarded types + clocks + delayed substitution
CloTT [7] dependent types + guarded types + ticks + clocks
GCTT [8] cubical type theory + guarded types + delayed substitution
TCTT [9] cubical type theory + guarded types + ticks
CCTT [10] cubical type theory + guarded types + ticks + clocks
More …

An Analysis of An Analysis of Girard's Paradox

While it’s rather difficult to accidentally prove an inconsistency in a well-meaning type theory that isn’t obviously inconsistent (have you ever unintentionally proven that a type corresponding to an ordinal is strictly larger than itself? I didn’t think so), it feels like it’s comparatively easy to add rather innocent features to your type theory that will suddenly make it inconsistent. And there are so many of them! And sometimes it’s the interaction among the features rather than the features themselves that produce inconsistencies.

More …

How to Use Sized Types?
Let Me Count the Ways

This post is inspired by this thread from the Agda mailing list.

Because Agda treats Size like a first-class type, there’s quite a bit of freedom in how you get to use it. This makes it a bit unclear where you should start: should Size be a parameter or an index in your type? What sizes should the constructors’ recursive arguments’ and return types have? Here are two options that are usually used (and one that doesn’t work.) The recommended one is using inflationary sized types and Size<.

More …

The State of Sized Types

Sized types hold great potential as a very practically useful way to do type-based termination checking, but sufficiently expressive sized types in dependent type theory come with a host of problems, mostly related to its incompatibility with the infinite size found in most simpler or nondependent type systems. This post attempts to describe some potential but ultimately unsatisfying solutions.

More …

Ramblings on the Coq Kernel

Back during the summer of 2019, I worked a bit on the Coq kernel. At the same time, I posted a lot of toots on Mastodon about whatever random problems I was encountering. I’ve decided to collect them here, as it might just be that some of these will be useful to me again at some point.

More …