Manuscript Offprint
arXiv:2610.37498Global Choice without Excluded Middle in Dependent Type Theory
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Diaconescu's theorem derives excluded middle from the axiom of choice, using propositional extensionality. We show that in dependent type theory without propositional extensionality, global choice alone does not imply excluded middle. We consider extensional Martin-Löf type theory with an impredicative universe of propositions included in the universe of types, extended with a global choice operator. We construct a consistent model of this type theory and show that the model refutes excluded middle and propositional extensionality. The model is built from staged sets, sets whose elements appear at stages of a well-order. It further validates proof irrelevance, inductive families, quotients with soundness, and a cumulative hierarchy of universes, which together cover a large fragment of the type theory of the proof assistant Lean. Even together with these features, global choice does not imply excluded middle.
Keywords: Diaconescu's theorem, global choice, propositional extensionality, dependent type theory, models of type theory, Lean proof assistant
1 Introduction
Diaconescu's theorem states that the axiom of choice implies the law of excluded middle in every topos [Dia75]. The proof uses propositional extensionality, the principle that equivalent propositions are equal. Propositional extensionality holds in all toposes, but in dependent type theory it is an optional axiom. For example, the core library of Lean [dMKA 15] assumes propositional extensionality and uses it to derive excluded middle from global choice [Lea26]. We show that in dependent type theory global choice alone does not imply excluded middle.
We consider extensional Martin-Löf type theory [ML84] with an impredicative universe Prop of propositions. The universe Prop is included in the universe Type of types, with identity types : Prop for a type and : . In this type theory, global choice is an operator
where is the propositional truncation of , encoded using the impredicativity of Prop.
Theorem 1.1. The type theory above with a global choice operator is consistent with
We prove Theorem 1.1 with a model built from staged sets. We first describe the model informally. Sections 2 to 4 give the precise definitions. A staged set is a set whose elements appear at stages 0, 1, 2, …. We interpret a proposition as the stage at which it becomes true, or as if it never becomes true. Thus two propositions and that become true at different stages are equivalent from stage on. The universe Prop is the staged set of the stages together with , each appearing at stage 0. Hence the identity proposition compares the stages themselves: it holds from stage 0 on when and coincide, and it never holds otherwise. For example, for and , the equivalence holds from stage 1 on, while never holds. Hence propositional extensionality fails in the model.
Excluded middle fails for a similar reason. For a proposition that becomes true, the disjunction holds only from stage on. To prove at a stage , we assume . Since every proposition in Prop appears at stage 0, assuming does not increase the stage. Hence has to hold at stage for every . When there is no last stage, this fails at every stage .
Types are staged sets as well. The truncation of a type X becomes true at the stage at which the first element of X appears. The choice operator maps each nonempty type to one of the elements that appear first, chosen in the classical metatheory. Hence the chosen element is available as soon as becomes true.
Theorem 1.1 applies to intensional Martin-Löf type theory as well, because the rules of the intensional theory are derivable in the extensional one. Since the model is a counter-model, every further rule that it validates strengthens the result. The model also validates proof irrelevance, inductive families, quotients with soundness, and a cumulative hierarchy of universes that contain Prop. That means global choice does not imply excluded middle even together with these rules. These rules cover a large fragment of the type theory of Lean, as specified in Carneiro's thesis [Car19].
Section 2 introduces staged sets. Section 3 lists the extra rules of the type theory for completeness, and then constructs the model as a category with families (CwF) [Hof97] of families of staged sets. Section 4 computes the logic of the model and proves Theorem 1.1. Section 5 shows further features that the model validates and relates them to Lean's type theory. Section 6 discusses related work. Appendix A lists the proof obligations of the model, as verified in Rocq [Roc25b].
Definition 2.1. A staged set is a set together with a function . A staged map is a function such that for all .
We call the birthday of , and say that is available at a stage if . A staged map thus sends each element to one that is available when the element is born.
For a staged set , we write for the underlying set and for the function . When there is no ambiguity, we write for and for . For a set , let .
A family Y of staged sets over a staged set X assigns a staged set to each .
For a family Y over X:
- the staged sum is the staged set with
- the staged product is the staged set whose underlying set consists of the functions with for all such that, for some ,
and is the least such , which exists since is well-ordered;
- a section is an element of whose birthday is 0.
In words, the staged set consists of the set-theoretic dependent functions that map each to an element of that is available once both and are. Not all set-theoretic dependent functions are included in . For example, for , and the constant family with value , the function sends each , born at 0, to , born at . These birthdays are unbounded, and hence has no birthday and is not an element of .
Staged sets are, up to equivalence, the presheaves on with injective restriction maps. The presheaf of a staged set maps a stage to the set of elements available at . Since is a chain, these are the -separated presheaves, and staged sets form a quasitopos [Joh02, Theorem A4.4.5]. (Under this equivalence, is the constant presheaf with value , which explains the notation.) However, we interpret the type theory with the concrete description of staged sets, instead of the structure of the quasitopos. First, staged sets are simple to calculate with directly. Second, the model differs from the structure of the quasitopos: Prop is not the strong subobject classifier , which would validate excluded middle, and type families are not objects of the slice category, as Section 3.4 explains.
2.1 Truth values
Let , with as the top element. For , let
Up to isomorphism, every staged set with at most one element is for a unique . These are all the subobjects of the terminal staged set . We read as a truth value that holds from stage on, that is, at every stage . Thus is true from the start, is never true, and a smaller truth value is truer. Since is well-ordered, every subset of has a supremum.
The birthday of a staged set X is the earliest birthday of the elements of X,
with .
3 The model
Hofmann [Hof97] explains in detail how a CwF interprets a type theory and works out the conditions for several type formers. We give the constructions of the CwF and the non-routine verifications. Appendix A lists the remaining verifications.
3.1 The extra rules
The type theory of Theorem 1.1 extends the rules of [ML84] as follows. The universes Type and Prop are presented à la Tarski, with decoding El. The universe Prop has a code in Type, and an inclusion
The universe Prop is impredicative: for every type A and every ,
with introduction and elimination rules as for -types, including the judgmental - and -rules. For a type A and a, b : A, the identity proposition
decodes to the identity type of [ML84], with equality reflection. The global choice operator has the type given in Section 1. We interpret global choice in Section 4, where we also refute excluded middle and propositional extensionality.
3.2 Category with families
The CwF of families of staged sets has the following structure.
-
A context is a staged set, and a context morphism is a staged map. The empty context is the terminal staged set .
-
A type over is a family of staged sets over .
-
A term of type A over is a section of the family A.
-
The context extension of by a type over is the staged sum , with the projection and the variable .
-
The substitution along of a type over is , and that of a term of type is .
3.3 Type formers
Universes. Fix an inaccessible cardinal , and let be the set of sets of rank below , a Grothendieck universe. We assume . We call a staged set -small if , and write for the set of -small staged sets. A family over is -small if every is -small, that is, if is a function . Over a context , the universe Type is the constant family . Since every element of is born at 0, a term of type Type is a function , that is, a -small family over , and we put
The decoding El commutes with substitution because both and are .
Propositions. The universe Prop is the constant family . Thus a term of type Prop is a function , and
Hence a term of type exists iff for every . In particular, a proposition in the empty context has a closed term iff it has value 0. The inclusion of Prop into Type sends P to the same family,
Π-types. For a context , a type over and a type over . , write for the family over , and define
Since the definition is pointwise in , the type former commutes with substitution.
Lemma 3.1. For a type A over and a type B over .A, there is a bijection, commuting with substitution,
The two inverse laws are the - and -rules.
Proof. A term of type over . is a function with
By currying, these are the functions assigning to each an element of available at , that is, the terms of type . The maps and app are currying and uncurrying, which are mutually inverse. Both maps commute with substitution because they are defined pointwise in .
Impredicative quantification. For a type A over and P of type Prop over , let
a term of type Prop over .
The staged set has at most one element, born at by definition. Hence it is isomorphic to , naturally in , and the types and are isomorphic. The introduction and elimination rules are and app of Lemma 3.1, composed with this isomorphism. Since every has at most one element, these rules satisfy the substitution laws and the - and -rules.
Remark 3.2. Inside the type theory, the rules of give an isomorphism
The model can also be modified to validate this isomorphism as a judgmental equality when is defined by a case distinction, decided in the classical metatheory:
The new still commutes with substitution because the condition is pointwise in . Since the new replaces the staged product by an isomorphic staged set at each , Lemma 3.1 carries over. Nonetheless, we use the staged product because the description is simpler.
A similar technique can be found in [MW03, §4], where the distinction is made syntactically by the sort of B, and in an argument of Shulman [Coq23, Appendix A], where it is made structural by tagging the types that come from propositions.
Σ-types and finite types. We define as the staged sum . The finite types 0, 1, 2 are the constant families , and .
Identity propositions. For a type A over and terms a, b of type A, the identity proposition is the term of type Prop
The term refl_a of type is . We write when is clear.
A term of type exists only if . Thus the model validates equality reflection.
W-types. For a type over and a type over . , let consist of the well-founded trees , with and , born at
This is a definition by well-founded recursion on the trees of the set-theoretic W-type of the underlying sets. Since is born no later than the point , the constructor is a term of type over the context , , .
For a type over and a term of type over the context , , , the precursor is defined by well-founded recursion,
An induction on trees shows , and hence is a term of type . The precursor commutes with substitution because the definition is pointwise in . The computation rule holds by definition.
Codes. The codes in Type of -types, -types, finite types and W-types are the constructions themselves. They are -small because is a Grothendieck universe. The code of Prop in Type is the constant function with value , which is -small because . The required equations hold by definition.
3.4 Universes classifying types
Following Hofmann and Streicher [HS97], a universe classifies the types if decoding is a bijection, natural in , between the codes : Type and the -small types over . The universe Type of the model classifies the -small types in this sense, although it is constant, unlike the universe constructed in [HS97], whose values vary with the stage. Indeed, a -small type over and a code in Type over are the same function , with El the identity. Hence Type is a Russell universe [Kov22, Definition 21], presented à la Tarski, and Prop classifies the propositions through the bijection .
The standard interpretation in the locally cartesian closed category of staged sets, however, lacks this property. There, a type over is a map into and substitution is pullback. A type over is then a family whose fiber over has no elements born before . Pulling back along a morphism raises the birthdays of the elements of the fiber over a point to at least . The universe Type can still be constant, to include the constant universe Prop that the refutations of excluded middle and propositional extensionality require. In this case, El raises the birthdays of a code to the stage of the point. It then classifies the types only weakly. That is, every type is the decoding of a code, but no choice of codes is natural in .
4 The logic of the model
For a proposition and a code in Type, we write for ElP and for ElX, and for . Impredicativity encodes the logical connectives as follows, see for example [AFS18, §3.1].
together with and . Each connective is the impredicative encoding of the corresponding inductive proposition. For example, the propositional truncation of Section 1 encodes the inductive proposition Nonempty X of Lean, with one constructor .
The values of these encodings can be computed from the definition of .
Lemma 4.1. For truth values p, q, a staged set X and ,
In particular, quantification over Prop, whose elements are all born at 0, is a supremum: for every . Hence the encodings take the values
with and .
Proof. By definition, is the birthday of : the least with for all , and if there is none. For , this is the least with , which is 0 if and otherwise. Since iff , the general case is the stated supremum. The values of the encodings follow by computing the suprema over . For example, for with , the summand is if and 0 otherwise, and the supremum is .
4.1 Propositional extensionality
For propositions and , the identity proposition is decided at stage 0, while the equivalence may hold only from a later stage on. In the context , , by
Lemma 4.1,
while is 0 if and coincide and otherwise. Hence,
When L has at least two elements, the supremum over p, q is , and hence
4.2 Excluded middle
By Lemma 4.1,
When has no greatest element, in particular when , this is , and
When L has a greatest element, excluded middle takes the value , which is 0 if L has one element. Excluded middle is thus independent of the type theory of Section 1 with global choice.
4.3 Global choice
For each nonempty -small staged set , choose in the metatheory an element of least birthday. By Lemma 4.1,
By Lemma 3.1, applied twice, a closed term of type
is the same as a term of type in the context , . A point of this context is a pair with nonempty, born at , since every code is born at 0. Such a term is thus a function with and , and
defines one. The corresponding closed term interprets choice and, being closed, commutes with substitution.
4.4 Proof of Theorem 1.1
Let . By Lemma 4.1, , and hence has no closed term. The model is thus consistent. It interprets the type theory of Section 1 and global choice by Sections 3 and 4.3. The negations of propositional extensionality and of excluded middle have closed terms by Sections 4.1 and 4.2.
5 Further features and Lean
The model of Section 3 with validates the following rules beyond those of the type theory of Section 1:
-
proof irrelevance;
-
a cumulative hierarchy of universes with codes for the type formers, the inclusion of Prop into , and a global choice operator at every level;
-
inductive families of types and of propositions;
-
quotients with soundness.
Proof irrelevance holds because every has at most one element.
5.1 Universes
Fix inaccessible cardinals with . The universe is the constant family , with El the identity, as in Section 3 with in place of . This is the standard construction of a cumulative hierarchy of universes in a set-theoretic model. The code of in is the constant function with value , and the code of Prop in is the constant function with value . For , the lift from to is given by the inclusion .
Each universe classifies the -small types in the sense of Section 3.4, with El the identity. The construction of Section 4.3 applies to each with in place of , and gives a global choice operator choice at every level.
5.2 Inductive families
Inductive types are encoded with W-types [Dyb97], and inductive families reduce to W-types using function extensionality and uniqueness of identity proofs [AGH 15, §7.1]. The computation rules hold by equality reflection.
Inductive families of propositions are encoded impredicatively, as in [PPM90, AFS18], and proof irrelevance gives dependent elimination into Prop from the non-dependent one.
An inductive proposition with at most one constructor, whose arguments are propositions or indices of the result, also eliminates into types. This is the subsingleton elimination of Lean [Car19, §2.6.2], which extends singleton elimination [GCST19]. Global choice derives it in the type theory. For such a proposition P, let T be the inductive family of types obtained by replacing P with T in the type of the constructor. Then is equivalent to P, using global choice. The eliminator is then given by that of T and global choice. The type T is a subsingleton, by induction on T using proof irrelevance and function extensionality. Hence the computation rule holds judgmentally, by equality reflection.
5.3 Quotients
Quotients are as in Lean. For there is a type with , lifting, induction and soundness,
Lean derives exactness,
for an equivalence relation R, from propositional extensionality. The model does not validate exactness, which with global choice would give excluded middle [Mai99].
For a type over and of type Prop over . . , let be the equivalence relation on generated by , and
Since a class is born no later than any member, is a term.
For a type over , a term of type over . and a term of type . , lifting is given by . It is well defined since identity propositions take only the values and . It is a term since every class has a member born with it, and induction holds for the same reason.
Soundness holds by the definition of .
5.4 Lean
Carneiro’s thesis [Car19] specifies the type theory of Lean. The type theory of Section 1 with the rules of Section 5 covers the type theory of Carneiro’s thesis except propositional extensionality. The universes, proof irrelevance, quotients and global choice of Lean are those of Section 5, with Sort 0 as Prop. The inductive families of Lean, with elimination of subsingleton propositions into types, are given by Section 5.2. The current version of Lean, 4.33.1, also provides mutual and nested inductive types and for structures. The rule for structures holds in Carneiro’s type theory up to propositional equality [Car26, §6.1], and hence judgmentally by equality reflection. We expect most mutual and nested inductive types to be derivable as well. Lean reduces nested inductive types to mutual ones [Car26, §6], and finitary mutual inductive families reduce to indexed W-types [KvR20, Theorem 9].
6 Related work
Goodman and Myhill [GM78] derive excluded middle from choice in intuitionistic set theory, also using extensionality. Later work isolates the extensionality principle that the derivation needs. Bell [Bel08] works in a weak intuitionistic set theory without extensionality, where excluded middle follows from choice with extensionality for subsets of 2 or with quotient sets. In first-order logic, Bell [Bel93, §3] shows that Hilbert's -operator gives excluded middle when it takes formulas with the same extension to the same witness. In type theory, choice gives excluded middle when extensionality is assumed: of the choice function [ML09, Car04], of propositions [Roc25a, Lea26], [Uni13, Theorem 10.1.14], or of quotients, as exactness [Mai99].
Earlier counter-models with -operators interpret first-order or higher-order logic, but not dependent types. In first-order logic, Bell [Bel93] constructs a counter-model to excluded middle for the plain -operator, with inversely well-ordered truth values [Bel93, §7], of which the truth values of the model of Section 3 are an instance. In higher-order logic, Maietti, Pasquali and Rosolini [MPR17, Example 5.14, Theorem 6.6] use the same truth values: the localic tripos of a well-order with a greatest element has -operators without validating excluded middle. The topos presented by this tripos interprets dependent types, but it has no -operators. The model of Section 3 interprets dependent type theory with global choice, the guarded form of the -operator.
In type theory, the only model known to us with a choice axiom in which excluded middle fails is the intuitionistic set-theoretic model of Sato and Garrigue [SG23] for CC , which also refutes propositional extensionality [SG23, §4.4]. The type theory CC lacks general inductive types, -types and the inclusion of Prop into the universes. In contrast, the core type theories of Lean and Rocq have inductive types and internalize propositions as types, Rocq by the inclusion and Lean through PLift. Sato and Garrigue interpret a proposition as an open set of an Alexandroff space and a type as a plain set. Hence a proposition included in a universe forgets this structure, and the interpretation breaks [SG23, §6]. In the model of Section 3, types and propositions are both staged sets, and a proposition is a staged set with at most one element. The inclusion of Prop into the universes is then the identity on staged sets.
Acknowledgment
The author thanks Andrew Swan for discussions and for guidance on how to formally verify a model of type theory, and Andrej Bauer for suggestions on the presentation of this paper.
This work was supported by the AI For Math Fund, a program of Renaissance Philanthropy. It was also supported by the Slovenian Research and Innovation Agency award P1-0294.
Software use
Claude Opus 5.5 (Anthropic) was used in developing the model and in formalizing it in Rocq (Appendix A).
References
[AFS18] Steve Awodey, Jonas Frey, and Sam Speight. Impredicative encodings of (higher) inductive types. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS '18, page 76–85, New York, NY, USA, 2018. Association for Computing Machinery. doi:10.1145/3209108.3209130.
[AGH 15] Thorsten Altenkirch, Neil Ghani, Peter Hancock, Conor McBride, and Peter Morris. Indexed containers. Journal of Functional Programming, 25:e5, 2015. doi:10.1017/S095679681500009X.
[Bel93] J. L. Bell. Hilbert’s -operator and classical logic. Journal of Philosophical Logic, 22:1–18, 1993. doi:10.1007/BF01049178.
[Bel08] John L. Bell. The axiom of choice and the law of excluded middle in weak set theories. Mathematical Logic Quarterly, 54(2):194–201, 2008. doi:10.1002/malq.200710030.
[Car04] Jesper Carlström. EM + Ext_ + AC_int is equivalent to AC_ext. Mathematical Logic Quarterly, 50(3):236–240, 2004. doi:10.1002/malq.200410100.
[Car19] Mario Carneiro. The type theory of Lean. Master's thesis, Carnegie Mellon University, 2019.
[Car26] Mario Carneiro. Lean4Lean: Verifying a Typechecker for Lean, in Lean. In Fredrik Nordvall Forsberg and James McKinna, editors, 31st International Conference on Types for Proofs and Programs (TYPES 2025), volume 384 of Leibniz International Proceedings in Informatics (LIPIcs), pages 2:1–2:23, Dagstuhl, Germany, 2026. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.TYPES.2025.2.
[Coq23] Thierry Coquand. Reduction free normalisation for a proof irrelevant type of propositions. Logical Methods in Computer Science, Volume 19, Issue 3, Jul 2023. URL: https://lmcs.episciences.org/8818, doi:10.46298/lmcs-19(3:5)2023.
[Dia75] Radu Diaconescu. Axiom of choice and complementation. Proceedings of the American Mathematical Society, 51:176–178, 1975. doi:10.1090/S0002-9939-1975-0373893-X.
[dMKA 15] Leonardo de Moura, Soonho Kong, Jeremy Avigad, Floris van Doorn, and Jakob von Raumer. The Lean theorem prover (system description). In Automated Deduction – CADE-25, volume 9195 of Lecture Notes in Computer Science, pages 378–388. Springer, 2015.
[Dyb97] Peter Dybjer. Representing inductively defined sets by wellorderings in Martin-Löf's type theory. Theoretical Computer Science, 176(1–2):329–335, 1997. doi:10.1016/S0304-3975(96)00145-4.
[GCST19] Gaëtan Gilbert, Jesper Cockx, Matthieu Sozeau, and Nicolas Tabareau. Definitional proof-irrelevance without K. Proceedings of the ACM on Programming Languages, 3(POPL):3:1–3:28, 2019. doi:10.1145/3290316.
[GM78] N. Goodman and J. Myhill. Choice implies excluded middle. Mathematical Logic Quarterly, 24(25-30):461, 1978. doi:10.1002/malq.19780242514.
[Hof97] Martin Hofmann. Syntax and semantics of dependent types. In Andrew M. Pitts and Peter Dybjer, editors, Semantics and Logics of Computation, Publications of the Newton Institute, pages 79–130. Cambridge University Press, Cambridge, 1997.
[HS97] Martin Hofmann and Thomas Streicher. Lifting Grothendieck universes. Unpublished note, available at https://www2.mathematik.tu-darmstadt.de/~streicher/NOTES/lift.pdf, 1997.
[Joh02] Peter T. Johnstone. Sketches of an Elephant: A Topos Theory Compendium, Volume 1, volume 43 of Oxford Logic Guides. Oxford University Press, Oxford, 2002.
[Kov22] András Kovács. Type-Theoretic Signatures for Algebraic Theories and Inductive Types. PhD thesis, Eötvös Loránd University, Budapest, Hungary, 2022. doi:10.15476/ELTE.2022.070.
[KvR20] Ambrus Kaposi and Jakob von Raumer. A Syntax for Mutual Inductive Families. In Zena M. Ariola, editor, 5th International Conference on Formal Structures for Computation and Deduction (FSCD 2020), volume 167 of Leibniz International Proceedings in Informatics (LIPIcs), pages 23:1–23:21, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.FSCD.2020.23.
[Lea26] The Lean 4 core library, module Init.Classical. https://github.com/leanprover/lean4/blob/v4.33.1/src/Init/Classical.lean, 2026. Lean 4.33.1, theorem Classical.em.
[Mai99] Maria Emilia Maietti. About effective quotients in constructive type theory. In Thorsten Altenkirch, Bernhard Reus, and Wolfgang Naraschewski, editors, Types for Proofs and Programs, volume 1657 of Lecture Notes in Computer Science, pages 164–178, Berlin, Heidelberg, 1999. Springer Berlin Heidelberg. doi:10.1007/3-540-48167-2_12.
[ML84] Per Martin-Löf. Intuitionistic Type Theory. Bibliopolis, Napoli, 1984. Notes by Giovanni Sambin.
[ML09] Per Martin-Löf. 100 years of Zermelo's axiom of choice: What was the problem with it? In Sten Lindström, Erik Palmgren, Krister Segerberg, and Viggo Stoltenberg-Hansen, editors, Logicism, Intuitionism, and Formalism: What has Become of Them?, pages 209–219, Dordrecht, 2009. Springer Netherlands. doi:10.1007/978-1-4020-8926-8_10.
[MPR17] Maria Emilia Maietti, Fabio Pasquali, and Giuseppe Rosolini. Triposes, exact completions, and Hilbert's -operator. Tbilisi Mathematical Journal, 10(3):141–166, 2017. doi:10.1515/tmj-2017-0106.
[MW03] Alexandre Miquel and Benjamin Werner. The not so simple proof-irrelevant model of CC. In Types for Proofs and Programs, TYPES 2002, volume 2646 of Lecture Notes in Computer Science, pages 240–258. Springer, 2003. doi:10.1007/3-540-39185-1_14.
[PPM90] Frank Pfenning and Christine Paulin-Mohring. Inductively defined types in the Calculus of Constructions. In M. Main, A. Melton, M. Mislove, and D. Schmidt, editors, Mathematical Foundations of Programming Semantics, volume 442 of Lecture Notes in Computer Science, pages 209–228, New York, NY, 1990. Springer-Verlag. doi:10.1007/BFb0040259.
[Roc25a] The Rocq standard library, module Logic.Diaconescu. https://github.com/rocq-prover/stdlib/blob/V9.1.0/theories/Logic/Diaconescu.v, 2025. Rocq 9.1.
[Roc25b] Rocq Development Team. The Rocq Prover, version 9.1. Zenodo, September 2025. doi:10.5281/zenodo.17473943.
[SG23] Masahiro Sato and Jacques Garrigue. An intuitionistic set-theoretical model of fully dependent CC . Mathematical Structures in Computer Science, 33(1):1–32, 2023. doi:10.1017/S0960129523000087.
[Uni13] The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics. https://homotopytypetheory.org/book, Institute for Advanced Study, 2013.
A Proof obligations
We checked in Rocq 9.1.1 [Roc25b], with the standard library, that the CwF of Section 3 satisfies the rules of the type theory of Section 1, together with proof irrelevance and quotients from Section 5. The file Model.v, available at https://github.com/park-sewon/Diaconescu/tree/arxiv, defines the structure CwF of a CwF, and the structure TModel of the rules on a CwF. It then defines the CwF stagedCwF of staged sets and, for any well-ordered L without a greatest element, an instance stagedModel of TModel on it, which is instantiated at as natModel. It uses four axioms, all of the classical metatheory: excluded middle, propositional extensionality, dependent function extensionality, and global choice.
Rocq's universes play the role of the Grothendieck universe .
Below, is the set of types over , and is the set of terms of type over . The projection and the variable of the context extension (Section 3) are and . For a context morphism , we write and for substitution along , and for the extension of . For a type over and , we write for .
Throughout, and . Each rule is an operation on types, an operation on terms, or an equation. Within an item, a variable keeps the range given in the sentence that introduces it. An operation on types, such as “ ”, is where we define the type over for all and . Similarly, an operation on terms, such as “ for ”, is where we define the term . An equation, such as “ ”, is what we verify for these definitions. We further verify that every operation is natural: it commutes with substitution along every . For types, this is an equation such as . For terms, the two sides have types that are equal only by such an equation, and naturality is stated with transport along it. For example, has type , and transported to it equals .
The substitution laws of the introduction and elimination rules of and of refl are derived in the specification from proof irrelevance. The - and -rules of are instances of proof irrelevance. The eliminator J and function extensionality follow from equality reflection. We did not formalize these derivations, the universe hierarchy, or the inductive families of Section 5.
Category with families
- Substitution: Composition of context morphisms is associative, with identities id. For , and . For , and .
Specification: CwF (ty_sub_id, ty_sub_comp, tm_sub_id, tm_sub_comp, id_comp, comp_id, comp_assoc); model: stagedCwF
- Comprehension: For , . . . For , . The empty context is terminal.
Specification: CwF (pair_proj, pair_var, pair_eta, isEmpty_unique); model: sPair_proj, sPair_var, sPair_eta, sToEmpty_unique
Universe
- Type ∈ Ty(Γ). For , .
Specification: UnivBase (U, U_sub, El, El_sub), TModel (tU); model: stUnivB
Propositions
- Propositions: Prop ∈ Ty(Γ). For , . . . For , . .
Specification: PropF (prop, prop_sub, prfT, prf_sub), Codes (propCode, El_propCode, propCode_sub, inclCode, El_inclCode, inclCode_sub); model: stProp, stCodes
- Proof irrelevance: For and , .
Specification: PropF (prf_irrel)
- Impredicativity: For , . For , . For , .
Specification: PropF (all, all_sub, allIntro, allElim), allIntro_sub, allElim_sub; model: sAll, sAllIntro, sAllElim
and
- -types: . For , . For , . . .
Specification: PiF (pi_sub, lam, app, pi_beta, pi_eta, lam_sub); model: stPi, PiS, sLam, sApp, piExt
- -types: . For and , . For , and . . . .
Specification: SigmaF (sigma_sub, spair, sfst, ssnd, sigma_fst, sigma_snd, sigma_eta, spair_sub, sfst_sub, ssnd_sub); model: stSigma
Finite types
- Empty type: . For and , .
Specification: FinF (zero, zero_sub, zero_elim, zero_elim_sub); model: stFin
- Unit type: . . For , . The eliminator of and the computation rule of the eliminator follow from this equation.
Specification: FinF (one, one_sub, star, star_sub, one_eta), one_elim, one_elim_star; model: stFin
- Booleans: . . For , , and , if . if . if .
Specification: FinF (two, two_sub, ttT, ffT, tt_sub, ff_sub, two_elim, two_elim_tt, two_elim_ff, two_elim_sub); model: stFin, sTwoElim
Identity propositions
- Identity propositions: For , . For , .
Specification: IdF (idP, idP_sub, refl), refl_sub; model: sIdP, sRefl
- Reflection: For , if is nonempty.
Specification: IdF (reflection); model: sReflection
W-types
For , . Here is the double projection, which makes a type over and over .
For and , where
The computation rule is
Specification: WF (wty, wty_sub, sup, sup_sub, wrec, wrec_sup, wrec_sub); model: sW, supVal, sSupT, wrecF, wNodeAt, wrecF_node, wrecF_sub
Quotients
- Quotients: For , , with . .
Specification: QuotF (quot, quot_sub, qmk, qmk_sub); model: sQuot, sQuot_sub, sQmk, QS, cls, rep
- Lifting: For , and a term of
Specification: QuotF (qlift, qlift_mk, qlift_sub), respIn; model: sqlift, resp_eqc
- Induction: For and , .
Specification: QuotF (qind), qind_sub; model: sQind
- Soundness: sound ∈ Tm(Γ, El(∀a, b: A. Rab ⇒ Id(mk a, mk b))).
Specification: QuotF (qsound), respIn, qsound_sub; model: sQsound
Codes
- For each type former, a code in Type whose El is the former applied to the decodings. For example, for and . . The formers are , W-types and quotients.
Specification: Codes (piCode, El_piCode, piCode_sub, sigmaCode, zeroCode, oneCode, twoCode, wCode, quotCode), TModel (tCodes); model: stCodes
Choice, excluded middle and propositional extensionality
- Global choice: A closed term choice of .
Specification: TModel (choiceT), truncT; model: sChoice, trunc_le, chooseAt
- Refutation of excluded middle: A closed term of .
Specification: TModel (notEM), EMT, negT; model: sNotEM, em_not_le
- Refutation of propositional extensionality: A closed term of .
Specification: TModel (notPropext), propextT; model: sNotPropext, propext_not_le, stageNZ
Consistency
There is no closed term of .
Specification: TModel (consistent), botT; model: sConsistent, bot_none
The lemmas sEl_mkCode, mkCode_sEl and mkCode_sub state that the universe Type classifies the -small types in the sense of Section 3.4: decoding is a bijection between codes and -small types, natural in the context. The lemma univ_classifies packages the three.