---PAGE_BREAK---
Consistency of the Predicative Calculus of Cumulative Inductive Constructions (pCuIC)
Amin Timany, Matthieu Sozeau
► To cite this version:
Amin Timany, Matthieu Sozeau. Consistency of the Predicative Calculus of Cumulative Inductive Constructions (pCuIC). [Research Report] RR-9105, KU Leuven, Belgium; Inria Paris. 2017, pp.32. hal-01615123v3
HAL Id: hal-01615123
https://hal.inria.fr/hal-01615123v3
Submitted on 13 May 2020
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. ---PAGE_BREAK---
Consistency of the Predicative Calculus of Cumulative Inductive Constructions (pCuIC)
Amin Timany
imec-Distrinet, KU Leuven, Belgium
Matthieu Sozeau
Inria Pi.R2 & IRIF, Université Paris 7 Denis Diderot
RESEARCH REPORT
N° 9105
October 2017
Project-Team Pi.R2 ---PAGE_BREAK---
---PAGE_BREAK---
Consistency of the Predicative Calculus of Cumulative Inductive Constructions (pCuIC)
Amin Timany*
imec-Distrinet, KU Leuven, Belgium amin.timany@cs.kuleuven.be
Matthieu Sozeau Inria Pi.R2 & IRIF, Université Paris 7 Denis Diderot matthieu.sozeau@inria.fr
Project-Team Pi.R2
Research Report n° 9105 — version 2 — initial version October 2017 — revised version May 2020 — 32 pages
Abstract: In order to avoid well-known paradoxes associated with self-referential definitions, higher-order dependent type theories stratify the theory using a countably infinite hierarchy of universes (also known as sorts), Type₀: Type₁: ... Such type systems are called cumulative if for any type A we have that A: Typeᵢ implies A: Typeᵢ₊₁. The predicative calculus of inductive constructions (pCIC) which forms the basis of the Coq proof assistant, is one such system. In this paper we present and establish the soundness of the predicative calculus of cumulative inductive constructions (pCuIC) which extends the cumulativity relation to inductive types.
Key-words: logic, metatheory, Coq, calculus of constructions, set theory
- This research was partly carried out while I was visiting Inria Paris and Université Paris Diderot and partly while I was visiting Aarhus university. ---PAGE_BREAK---
Cohérence du Calcul Prédicatif des Constructions
Inductives Cumulatives
Résumé : Les théories des types d'ordre supérieur sont stratifiées afin d'éviter les paradoxes bien connus associés aux définitions circulaires. Elles utilisent une hiérarchie dénombrable d'univers (aussi appelé sortes), Type₀ : Type₁ : ... . Ces systèmes de types sont appelés cumulatifs si pour tout type A on a A : Typeᵢ implique A : Typeᵢ₊₁. Le calcul prédicatif des constructions inductives (pCIC), qui forme la base de l'assistant de preuve Coq, est un tel système.
Dans cet article, nous présentons une extension du calcul, dont nous prouvons la cohérence relative vis à vis de la théorie des ensembles. Ce nouveau calcul étend la relation de cumulativité aux types inductifs.
Mots-clés : logique, métathéorie, Coq, calcul des constructions, théorie des ensembles ---PAGE_BREAK---
1 Introduction
We construct a model for pCuIC based inspired by the model of Lee and Werner [2011] establishing consistency of pCuIC. In loc. cit. authors present a model of pCIC without inductive types in the sort Prop. Similarly, the model that we shall construct also does not feature inductive types in the sort Prop. We note, however, that most inductive types in Prop can be encoded using their Church encoding. For instance, the type False and conjunction of two predicates can be defined as follows:
The model of Lee and Werner [2011] does not support the sort Set, neither the predicative version nor the impredicative one. In this paper, we treat the predicative sort Set simply as a shorthand for Type₀. Note that in Coq it does not hold that Prop : Set. However, in our model the interpretation of Prop is an element of the interpretation of Type₀ but this does not preclude our model from being sound for the typing rules of the system. In addition, the model of Lee and Werner [2011] does support η-expansion yet this is not included in their rules for judgemental equality. We do include η-expansion in our system.
The main difference between our system and the one by Lee and Werner [2011], apart from cumulativity for inductive types which is a new contribution to pCIC, is that in Lee and Werner [2011] the system features case analysis and fixpoints (recursive functions on inductive types) for inductive types while ours features eliminators. It is well-known that all functions written using fixpoints and case analysis on inductive types are representable using eliminators. However, the former is closer to actual implementation in Coq. On the other hand, the occurrences of recursive calls in recursive functions are may be hidden under some computations. That is, in order to obtain the position and arguments of recursive calls, which are crucial for constructing the model of recursive functions, in general requires normalizing the body of the recursive function. It so appears that the intention of Lee and Werner [2011] is to construct a set theoretic model for Coq, assuming the normalization property which already implies soundness of their system. This, however, is not possible when constructing a model that is intended to establish the soundness of the system. Indeed, our model, similarly to the model of Lee and Werner [2011], does not imply normalization of well-typed terms. Therefore, when modeling recursive functions, i.e., fixpoints in Coq, we cannot assume that we can normalize the body of the fixpoint. This is the main reason why we opted for formalizing our system with eliminators instead.
1.1 Contributions
Timany and Jacobs [2015] give an account of then work-in-progress on extending pCIC with a single cumulativity rule for cumulativity of inductive types. The authors show a rather restricted subsystem of the system that they present to be sound. This subsystem roughly corresponds to the fragment where terms of cumulative inductive types do not appear as dependent arguments in other terms. The proof given in Timany and Jacobs [2015] is done by giving a syntactic translation from that subsystem to pCIC. In this paper, we extend and complete the work that was initiated by Timany and Jacobs [2015].
In particular, in this work, we consider a more general version of the cumulativity rule for inductive types. Adding to this, we also consider related rules for judgemental equality of inductive types which are given rise to by the mutual cumulativity relation and also judgemental equality of the terms constructors of types in the cumulativity relation. ---PAGE_BREAK---
In this work, we present the system pCuIC in its full details and prove that the system as presented to be sound. We do this by constructing a set-theoretic model in ZFC, together with the axiom that there are countably many uncountable strongly inaccessible cardinals, inspired by the model of Lee and Werner [2011]. The cumulativity of inductive types as presented in this paper is now supported in Coq 8.7 [The Coq Development Team, 2017].
Notations for different equalities and the like:
| a ≜ b | a is defined as b |
| a = b | equality of mathematical objects, e.g., sets, sequences, etc. |
| t ≡ t' | Syntactically identical terms |
| Γ ⊢ t ≃ t' : A | Judgemental equality, i.e., t and t' are judgementally equal terms of type A under context Γ |
2 pCuIC
The terms and contexts of the language pCuIC is as follows:
$x, y, z, \dots$ (Variables)
$s ::= \textcolor{red}{\mathbf{Prop}, \mathbf{Type}_0, \mathbf{Type}_1, \dots}$ (Sorts)
$t, u, \dots, M, N, \dots,$
$A, B, \dots ::= x \mid s \mid \mathbf{\Pi}x : A. B \mid \lambda x : A. t$
$\mathbf{let} x := t : A \mathbf{in} u \mid M N$ (Terms)
$\mathcal{D}.x \mid \mathbf{Elim}(t; \mathcal{D}.d_i; \vec{u}; Q_{d_1}, \dots, Q_{d_n}) {f_{c_1}, \dots, f_{c_m}}$
$\mathcal{D} ::= \mathbf{Ind}_n {\Delta_I := \Delta_C}$ (Inductive blocks)
$\Delta ::= \cdot \mid \Delta, x : A$ (Declarations)
$\Gamma ::= \cdot \mid \Gamma, x : A, \mid \Gamma, x := t : A \mid \Gamma, \mathcal{D}$ (Contexts)
Note that although by abuse of notation we write $x: A \in \Gamma$, $x := t: A \in \Gamma$ or $x: A \in \Delta$, contexts and declarations are not sets. In particular, the order in declarations is important, this is even the case for declarations where there can be no dependence among the elements. We write $\Delta(x)$ to refer to $A$ whenever $x: A \in \Delta$.
Here, $\mathbf{Ind}n{\Delta_I := \Delta_C}$ is a block of mutual inductive definitions where $n$ is the number of parameters, the declarations in $\Delta_I$ are the inductive types of the block and declarations in $\Delta_C$ are constructors of the block. The term $\mathbf{Ind}n{\Delta_I := \Delta_C}$. $x$ is an inductive definition whenever $x \in \Delta_I$ and a constructor whenever $x \in \Delta_C$. The term $\mathbf{Elim}(t; \mathcal{D}.d_k; \vec{u}; Q{d_1}, \dots, Q{d_n}){f_{c_1}, \dots, f_{c_m}}$ is the elimination of $t$ (a term of the inductive type $\mathcal{D}.d_k$ applied to parameters $\vec{u}$), $Q_{d_i}$'s are the motives of elimination, i.e., the result of the elimination will have type $Q_{d_k} \xrightarrow{\vec{u}} \vec{d}$ $t$ whenever the term being eliminated, $t$, has type $\mathcal{D}.d_k \xrightarrow{\vec{u}} \vec{d}$. The term $f_{c_i}$ in the eliminator above is a case-eliminator corresponding to the case where $t$ is constructed using constructor $\mathcal{D}.c_i$.
We write $\mathrm{len}(\vec{s})$, $\mathrm{len}(p)$, $\mathrm{dom}(f)$, $\mathrm{dom}(\Delta)$ and $\mathrm{dom}(\Gamma)$ respectively for the length of a sequence $\vec{s}$, length of a tuple $p$, the domain of a partial map $f$, domain of a declaration $\Delta$ or domain of a context $\Gamma$. Notice crucially that the inductive types and constructors of an inductive block are not part of the domain of the context that they appear in. We write nil for the empty sequence. We write $\mathrm{Inds}(\Gamma)$ for the sequence of inductive types in the context $\Gamma$. We write tuples as $\langle a_1; a_2; \dots; a_n \rangle$.
---PAGE_BREAK---
Definition 2.1 (Free variables).
Free variables of terms
Free variables of inductive blocks
Free variables of sequences of terms
Free variables of declarations
We define simultaneous substitution for terms as follows:
Definition 2.2 (Simultaneous substitution). We assume that $\vec{x}$ is a sequence of distinct variables. In this definition for the sake of simplicity we use $y$ for all bound variables.
Substitution for terms
---PAGE_BREAK---
Substitution for inductive blocks
Substitution for sequences
Substitution for declarations
Substitution for context
where $\vec{x}' = \vec{x}$ and $\vec{t}' = \vec{t}$ if $y$ does not appear in $\vec{x}$ and is as follows whenever $x_i = y$:
2.1 Basic constructions
Figure 1 shows typing rules for the basic constructions, i.e., well-formedness of contexts (WF(Γ)), sorts, let bindings, dependent products (also referred to as dependent functions), lambda ab- stractions and applications. It also contains the rules for the judgemental equality for these constructions. In this figure, the relation $\mathcal{R}_s$ indicates the sort that a (dependent) product type belongs to. The sort Prop is impredicative and therefore any product type with codomain in Prop also belongs to Prop.
2.2 Inductive types and their eliminators
The typing rules for inductive types, their constructors and eliminators are depicted in Figure 2.
Well-formedness of inductive types The first rule in this figure is the well-formedness of inductive types. It states that in order to have that the context Γ is well-formed after adding the mutual inductive block Indn {ΔI := ΔC} , i.e., WF(Γ, Indn {ΔI := ΔC}), all inductive types in the block as well as all constructors need to be well-typed terms. In addition, we must have that the well-formedness side condition In(Γ, ΔI, ΔC) holds. The well-formedness side condition In(Γ, ΔI, ΔC) holds whenever: ---PAGE_BREAK---
Figure 1: Basic construction ---PAGE_BREAK---
IND-WF
\begin{array}{l@{\quad}l} \mathcal{I}_n(\Gamma, \Delta_I, \Delta_C) & (A \equiv \Pi p : P. \Pi m : M. A_d \qquad \Gamma \vdash A : s_d \text{ for all } (d : A) \in \Delta_I) \\ T \equiv \Pi p : P.T' & \Gamma, \Delta_I, p : P \vdash T' : A_d \text{ for all } (c : T) \in \Delta_C \text{ if } c \in \text{Constrs}(\Delta_C, d) \end{array}
IND-TYPE
IND-CONSTR
IND-ELIM
\begin{array}{l@{\quad}l@{\quad}l} \mathcal{W}\mathcal{F}(\Gamma) & \mathcal{D} \equiv \mathbf{Ind}_n\{\Delta_I := \Delta_C\} \in \Gamma & \\ \mathrm{dom}(\Delta_I) = \{d_1, \dots, d_l\} & \mathrm{dom}(\Delta_C) = \{c_1, \dots, c_{l'}\} & \\ \Gamma \vdash Q_{d_i} : \Pi \vec{x} : A. (d_i \vec{x}) \to s' & \text{where } \Delta_I(d_i) = \Pi \vec{x} : A. s & \text{for all } 1 \le i \le l \\ \Gamma \vdash t : D.d_k \vec{u} \vec{m} & \mathrm{len}(\vec{u}) = n & \Gamma \vdash f_{c_i} : \xi_D^{\vec{Q}}(c_i, \Delta_C(c_i)) & \text{for all } 1 \le i \le l' \\ \hline \Gamma \vdash & \mathbf{Elim}(t; D.d_k; \vec{u}; Q_{d_1}, \dots, Q_{d_l}) & \{f_{c_1}, \dots, f_{c_{l'}}\} : Q_{d_k} \vec{u} \vec{m} t & \end{array}
IND-ELIM-EQ
Figure 2: Inductive types and eliminators ---PAGE_BREAK---
All variables in $\Delta_I$ and $\Delta_C$ are distinct.
The first $n$ arguments of all inductive types and constructors in the block are the parameters. In other words, there is a sequence of terms $\vec{P}$ such that $\text{len}(\vec{P}) = n$ and for all $x: T \in \Delta_I, \Delta_C$ we have $T \equiv \mathbf{\Pi}\vec{p}: \vec{P}.U$ for some $U$.
Parameters are parametric. In other words, for all $c: T \in \Delta_C$ we have $T \equiv \mathbf{\Pi}\vec{p}: \vec{P}.\mathbf{\Pi}\vec{x}: \vec{B}.d\vec{p}\vec{v}$. That is, every constructor constructs a term of some inductive type in the block where values applied for parameter arguments of the inductive type are parameter arguments of the constructor.
Every inductive type is just a type (an element of a universe) that depends on a number of arguments beginning with parameters. The non-parameter arguments are called the arity of the inductive type. In other words, for all $d \in \text{dom}(\Delta_I)$ we have $\Delta_I(d) \equiv \mathbf{\Pi}\vec{x}: \vec{P}.\mathbf{\Pi}\vec{m}: \vec{M}.A_d$ where $\vec{M}$ are called the indices of the inductive type and $A_d$ is a sort called the arity of the inductive type $d$. We require that $A_d \neq \text{\textcolor{red}{Prop.}}$
Every constructor is a constructs terms of an inductive type in the block. In other words, for all $c \in \text{dom}(\Delta_C)$ we have $c \in \text{Constrs}(\Delta_C, d)$ for some $d \in \Delta_I$ where $\text{Constrs}(\Delta_C, d)$ is the set of constructors in $\Delta_C$ that construct terms of the inductive type $d$.
- All inductive types in the block appear only strictly positively in constructors. In other words, for all $c \in \text{dom}(\Delta_C)$, $\text{Pos}_{\text{dom}(\Delta_I)}(\Delta_C(c))$ where $\text{Pos}_S(t)$ is determined by the following rules:
Inductive types and constructors Rules IND-TYPE and IND-CONSTR indicate, respectively, the type of inductive types and constructs in a block of mutually inductive types. The type of an inductive type of a block is exactly the same as declared in the block. The type of constructors of a block is determined by the type declared in the block except that inductive types in block are replaced by their proper (global) names.
Example 2.3. The following is the definition natural numbers inpCuIC.
---PAGE_BREAK---
Example 2.4. The following is the definition of universe polymorphic lists (for level i) in pCuIC.
Example 2.5. Definition of a finitely branching tree as a mutual inductive block in pCuIC.
\begin{array}{l} \mathbf{Ind}_0 \left\{ \begin{array}{@{}l@{}} FTree : \textcolor{red}{\mathbf{Type}}_0, \\ Forest : \textcolor{red}{\mathbf{Type}}_0 := \\ \quad leaf : FTree, \\ \quad node : Forset \rightarrow FTree, \end{array} \right. \\ Fnil : Forest, Fcons : FTree \rightarrow Forest \rightarrow Forest \end{array}
Eliminators The term Elim(t; D.dk; u; Qd1, ..., Qdl) {fc1, ..., fcl} is the elimination of the term t (which is of type dk (in some inductive block D) applied to parameters u) where the result of elimination of inductive types in the block, i.e., motives of eliminations, is given by Q and f are functions for elimination of terms constructed using particular constructors. The term, above, has type Qdk u m t if t has type dk u m t.
Each case-eliminator $f_{c_i}$ is the recipe for generating a term of the appropriate type (according to the corresponding motive) out of arguments of the constructor $c_i$ under the assumption that all (mutually) recursive arguments are already appropriately eliminated. This is perhaps best seen in the rule IOTA below which describes the judgemental equality corresponding to the (intended) operational behavior of eliminators.
The function $\xi_D^{\vec{Q}}(c_i, \Delta_C(c_i))$ ascribes a type to the case-eliminator $f_{c_i}$ in the manner explained above. That is, $\xi_D^{\vec{Q}}(c_i, \Delta_C(c_i))$ is a function type that given arguments of the constructor $c_i$ (and their eliminated version if they are (mutually) recursive arguments) produces a term of the appropriate type according to the motives. It is formally defined as follows by recursion on derivation of $\mathrm{Pos}_{\mathrm{dom}(\Delta_I)}(\Delta_C(c_i))$:
If $P \equiv \Pi \vec{x} : \vec{A}. d_i m$ and we have $\mathrm{Pos}{\mathrm{dom}\Delta_I}^\dagger(P)$ and $\mathrm{Pos}{\mathrm{dom}\Delta_I}(B)$
Otherwise,
Otherwise, if $d \in \operatorname{dom}(\Delta_I)$
Example 2.6. The following is the definition of the recursive function corresponding to the principle of mathematical induction on natural numbers in pCuIC.
---PAGE_BREAK---
The term nat_ind above has the type
Example 2.7. The following is the definition the recursive function to add two natural numbers in pCuIC.
Example 2.8. The following is the definition the polymorphic and universe polymorphic recursive function to compute the length of a list in pCuIC.
Remark 2.9. From the definition of eliminators, it might appear that they limit expressivity of our system. It might so appear that they only allow us to define recursive functions that are paramtrically polymorphic in the parameters of the inductive block. This, however is not the case, as existence of inductive types allows for breaking this paramtricity. In order to demonstrate this, the next example defines a function that sums up a list of natural numbers, where list is the polymorphic type of lists defined above.
It is necessary to formulate eliminators such that motives and case-eliminators include parameters. This is due to the way inductive types are defined. In particular, a constructor is only required to produce a term of the inductive type with the parameters the same as the whole block. When an inductive type (including the one that the constructor in question is producing) appears as an argument of the constructor it needs not be with the same parameters as that of the inductive block. This is also the case in the practical implementation of inductive types in Coq. An example of such an inductive type is the following definition of lists where one can instead of an element of the list store some code in the list representing that element as a list of natural numbers.
Example 2.10. The following is the definition a function that sums up a list of natural numbers in pCuIC. Notice that this is a non-paramtrically-polymorphic recursive function defined in our system for a polymorphic definition of lists.
We first define an inductive type that can determine when a type is the type of natural numbers.
The elimination of this type allows us to write a function that given a type A and an element of the type isNat *A* we can construct a function from A to the natural numbers.
---PAGE_BREAK---
Figure 3: The main judgementsal equality rules
Now we can use these constructions to define the basis for our sum function.
Using this helper function we can define the non-polymorphic function that given a list of natural numbers computes the sum of all its elements.
2.3 Judgemental equality
The main typing rules for judgemental equality, except for those related to cumulativity, are presented in Figure 3.
The rules EQ-REF, EQ-SYM and EQ-TRANS make the judgemental equality an equivalence relation. The rule BETA corresponds to the operational rule for β-reduction in lambda calculus. The rules DELTA and ZETA correspond to the operation of expansion of global definitions (defined in the context) and let-bindings, respectively. The rule ETA corresponds to η-expansion for (dependent) functions.
The rule IOTA corresponds to the operation of reduction of recursive functions and case analysis (in systems featuring these, e.g., Coq itself) and that of eliminators as in our case. Notice that this rule only applies if the term on which elimination is being performed is a constructor ---PAGE_BREAK---
applied to some terms¹. This rule specifies that, as expected, the eliminator, applied to a term that is constructed out of a constructor (of the corresponding type or any of its sub-types, see Remark 2.11 below) applied to some terms, is equivalent to the corresponding case-eliminator applied arguments of the constructor, after (mutually) recursive arguments are appropriately eliminated. This is exactly what the cursor $\mu_D^{\vec{Q};\vec{f}}$ does, applying arguments of the constructor to the corresponding case-eliminator after eliminating (mutually) recursive arguments as necessary. Recursors are defined as follows by recursion on the derivation of $Pos_{dom(\Delta_I)}(\Delta_C(c_i))$:
If $P \equiv \Pi \vec{x} : \vec{A}. d_i \vec{m}$ and we have $Pos_{dom\Delta_I}^\dagger (P)$ and $Pos_{dom\Delta_I} (B)$
where $\vec{y}$ are the first variables in $\vec{x}$ corresponding to parameters.
Otherwise,
Otherwise, if $d \in \text{dom}(\Delta_I)$
Remark 2.11 (IOTA and subtyping of cumulativity for inductive types). We, in addition, stipulate here that the eliminators can eliminate terms constructed using the corresponding constructor of any inductive type that is a sub-type of the inductive type for which the elimination is specified. Note that in the Coq implementation of cumulativity for inductive types, cumulativity is only considered for different instances of the same inductive type at different universe levels. That is, only for two instances of the same universe polymorphic inductive type. In those settings, the inductive types being sup-types of one another are instance of the same inductive types and the eliminators, and in general the operational semantics, simply ignore the universes in terms. Here, we have to consider this side condition to achieve a similar result.
2.4 Cumulativity
Figures 4 and 5 show the rules for cumulativity in pCuIC. Rules in Figure 5 pertain to cumulativity of inductive types. These are novel additions to the predicative calculus of constructions (pCIC). The main purpose of the model constructed in this paper is to prove these rules correct.
The rule IND-LEQ specifies when we say a blocks of inductive types $\mathcal{D}$ is included in another block $\mathcal{D}'$. Intuitively, this holds when corresponding arguments of the inductive type (only the arity and not the parameters) of corresponding inductive types have the appropriate subtyping relation and also for all corresponding arguments of corresponding constructors, except for those that are parameters of the inductive types. Excluding parameters has interesting consequences. For instance, let us consider the following example that shows the polymorphic definition of lists of elements of a type $A : Type_i$ are independent of the level of the type, $i$. Notice that cumulativity, implies that $A$ also has type $Type_j$ for any $i \le j$.
¹This restriction is indeed necessary in Coq so as to guarantee strong normalization. ---PAGE_BREAK---
Figure 4: Cumulativity
Figure 5: Cumulativity and judgementsal equality for inductive types ---PAGE_BREAK---
Example 2.12. Consider the universe polymorphic definition of lists from Example 2.3. This definitions allows us to use rules INT-LEQ and C-IND to conclude that $\mathcal{L}_i, \mathcal{L}_j, \Gamma \vdash \text{List}_i A \preceq \text{List}_j A$ for all types $A$ regardless of $i$ and $j$ which would not be the case if we were to compare parameters. This result in turn allows us to use the rule IND-EQ to conclude that $\mathcal{L}_i, \mathcal{L}_j, \Gamma \vdash \text{List}_i A \simeq \text{List}_j A:$ Type$_i$ and use the rule CONSTR-EQ-L to conclude $\mathcal{L}_i, \mathcal{L}_j, \Gamma \vdash \text{nil}_i A \simeq \text{nil}_j A:$ List$_i$ both regardless of $i$ and $j$. Similarly, we can conclude that $\mathcal{L}_i, \mathcal{L}_j, \Gamma \vdash \text{cons}_i A a l \simeq \text{nil}_j A a' l'$: List$_i$ $A$ whenever $\mathcal{L}_i, \mathcal{L}_j, \Gamma \vdash l \simeq l'$: List$_i$ $A$ $\mathcal{L}_i, \mathcal{L}_j, \Gamma \vdash a \simeq a'$: $A$.
Notice that rules C-IND, IND-EQ, CONSTR-EQ-L and CONSTR-EQ-R are only applicable if the inductive type or the constructor in the latter case are fully applied. This is mainly because subtyping only makes sense for types (elements of a sort).
3 Set-theoretic background
In this section we shortly explain the set-theoretic axioms and constructions that form the basis of our model. We assume that the reader is familiar with the ZFC set theory. This is very similar to the theory that Lee and Werner [2011] use as the basis for their model. In particular, we use Zermelo-Fraenkel set theory with the axiom of choice (ZFC) together with an axiom that there is a countably infinite strictly increasing hierarchy of uncountable strongly inaccessible cardinals. In particular, we assume that we have a hierarchy of strongly inaccessible cardinals $\kappa_0, \kappa_1, \kappa_2, \dots$ where $\kappa_0 > \omega$.
3.1 Von Neumann cumulative hierarchy and models of ZFC
The von Neumann cumulative hierarchy is a sequence of sets (indexed by ordinal numbers) that is cumulative. That is, each set in the hierarchy is a subset of the all sets after it. These sets are also referred to as von Neumann universes. This hierarchy is defined as follows for ordinal number $\alpha$:
It is well-known [Drake, 1974] that whenever $\alpha$ is a strongly inaccessible cardinal number of a cardinality strictly greater than $\omega$, as is the case for $\kappa_0, \kappa_2, \dots$, $\mathcal{V}_\alpha$ is a model for ZFC. The von Neumann universe $\mathcal{V}_\omega$ satisfies all axioms of ZFC except for the axiom of infinity. This is due to the fact that all sets in $\mathcal{V}_\omega$ are finite. This is why we have assumed that our hierarchy of strongly inaccessible cardinals starts at one strictly greater than $\omega$. In particular, if $A$ and $B$ are two sets in $\mathcal{V}_\kappa$ then $B^A \in \mathcal{V}_\kappa$ where $B^A$ is the set of all functions from $B$ to $A$. This allows us to use von Neumann universes to model the predicative pCuIC universes. For more details about strongly inaccessible cardinals and von Neumann universes refer to Drake [1974].
3.2 Rule sets and fixpoints: inductive constructions in set theory
Following Lee and Werner [2011], who follow Dybjer [1991] and Aczel [1999], we use inductive definitions (in set theory) constructed through rule sets to model inductive types. Here, we give a very short account of rule sets for inductive definitions. For further details refer to Aczel [1977].
A pair $(A, a)$ is a rule based on a set $U$ where $A \subseteq U$ is the set of premises and $a \in U$ is the conclusion. We usually write $\frac{A}{a}$ for a rule $(A, a)$. A rule set based on $U$ is a set $\Phi$ of rules based on $U$. We say a set $X \subseteq U$ is $\Phi$-closed, closed$_$\Phi(X)$ for a $U$ based rule set $\Phi$ if we have:
---PAGE_BREAK---
The operator $\mathcal{O}_\Phi$ corresponding to a rule set $\Phi$ is the operation of collecting all conclusions for a set whose premises are available in that set. That is,
Hence, a set $X$ is $\Phi$-closed if $\mathcal{O}{\Phi}(X) \subseteq X$. Notice that $\mathcal{O}{\Phi}$ is a monotone function on $\mathcal{P}(U)$ which is a complete lattice. Therefore, for any $U$ based rule set $\Phi$, the operator $\mathcal{O}_{\Phi}$ has a least fixpoint, $\mathcal{I}(\Phi) \subseteq U$:
We define by transfinite recursion a sequence, indexed by ordinal numbers $\mathcal{O}_\Phi^\alpha$ for an ordinal number $\alpha$:
Obviously, for $\beta \le \alpha$ we have $\mathcal{O}{\Phi}^{\beta} \subseteq \mathcal{O}{\Phi}^{\alpha}$.
Theorem 3.1 (Aczel [1977]). For any rule set $\Phi$ there exists an ordinal number ClOrd($\Phi$) called the closing ordinal of $\Phi$ such that it is the smallest ordinal number for which we have $I(\Phi) = \mathcal{O}{\Phi}^{ClOrd(\Phi)}$ is the least fixpoint of $\mathcal{O}{\Phi}$. In other words, $\mathcal{O}{\Phi}^{ClOrd(\Phi)+1} = \mathcal{O}{\Phi}(\mathcal{O}{\Phi}^{ClOrd(\Phi)}) = \mathcal{O}{\Phi}^{ClOrd(\Phi)}$.
Lemma 3.2 (Aczel [1977]). Let $\Phi$ be a rule set based on some set $U$ and $\beta$ a regular cardinal such that for every rule $\frac{A}{a} \in \Phi$ we have that $|A| < \beta$ then
In other words, $\mathcal{O}_\Phi^\beta$ is the least fixpoint of $\mathcal{O}_\Phi$.
3.3 Fixpoints of large functions
A set theoretic construction is called large with respect to a set theoretic (von Neumann) universe if it does not belong to that universe. As we shall see, the functions that we will consider for interpreting of inductive types (operators of certain rule sets) are indeed large. That is, they map subsets of the universe to subsets of the universe. As a result, the fixpoint of these functions might not have a fixpoint within the universe in question as the universe with the subset relation on it is not a complete lattice. The following lemmas show that under certain conditions, the fixpoint of the function induced by rule sets does exist in the desired universe. We will use this lemma to show that the interpretations of inductive types do indeed fall in the universe that they are supposed to.
Lemma 3.3. Let $\Phi$ be a rule set based on the set-theoretic universe $\mathcal{V}$ and $\alpha \in \mathcal{V}$ be a cardinal number such that for all $\frac{A}{a} \in \Phi$ we have $|A| \le \alpha$. Then,
Proof. By Lemma 3.2, it suffices to show that there is a regular cardinal $\beta \in V$ such that $|A| < \beta$ for any $\frac{A}{a} \in \Phi$. Take $\beta$ to be $\aleph_{\alpha+1}$. By the fact that $V$ is a model of ZFC we know that $\aleph_{\alpha+1} \in V$. By the fact that $\alpha < \aleph_{\alpha+1}$ we know that $|A| < \aleph_{\alpha+1}$ for any $\frac{A}{a} \in \Phi$. It is well known that under axioms of ZFC (this crucially uses axiom of choice) $\aleph_{\alpha+1}$ is a regular cardinal for any ordinal number $\alpha$ – see Drake [1974] for a proof. This concludes our proof. ☐ ---PAGE_BREAK---
Lemma 3.4. Let $\Phi$ be a rule set based on the set-theoretic universe $\mathcal{V}$ and $\alpha \in \mathcal{V}$ be a cardinal number such that for all $\frac{\Delta}{a} \in \Phi$ we have $|A| \leq \alpha$. Then,
Proof. By Lemma 3.2 we know that $\mathcal{I}(\Phi) = \mathcal{O}{\Phi}^{\text{ClOrd}(\Phi)}$. We know that $\mathcal{O}{\Phi}^{\text{ClOrd}(\Phi)} \in \mathcal{V}$ as it is constructed by transfinite recursion up to $\text{ClOrd}(\Phi)$ and that we crucially know that $\text{ClOrd}(\Phi) \in \mathcal{V}$ by Lemma 3.3. More precisely, this can be shown using transfinite induction up to $\text{ClOrd}(\Phi)$ showing that every stage belongs to $\mathcal{V}$. Notice that it is crucial for an ordinal to belong to the universe in order for transfinite induction to be valid. $\square$
3.4 The use of axiom of choice
The only place in this work that we make use of axiom of choice is in the proof of Lemma 3.3. We use this axiom to show the following statement which we could have alternatively taken as a (possibly) weaker axiom.
In any von Neumann universe $\mathcal{V}$ for any cardinal number $\alpha$ there is a regular cardinal $\beta$ such that $\alpha < \beta$.
Note that his statement is independent of ZF and certain axiom, e.g., choice as we have taken here, needs to be postulated. This is due to the well-known fact proven by Gitik [1980] that under the assumption of existence of strongly compact cardinals, any uncountable cardinal is singular!
3.5 Modeling the impredicative sort Prop: trace encoding
One of the challenges in constructing a model for a system like pCuIC is treatment of an impredicative proof-irrelevant sort Prop. This can be done by simply modeling Prop as the set {$\emptyset, {\emptyset}$} where provable propositions are modeled as {$\emptyset$} and non-provable propositions as $\emptyset$. This however, will only work where we don't have the cumulativity relation between Prop and Type. In presence of such cumulativity relations, such a naïve treatment of Prop breaks interpretation of the (dependent) function spaces as sets of functions. The following example should make the issue plain.
Example 3.5 (Werner [1997]). Let's consider the interpretation of the term $I \equiv \lambda(P : \text{Type}_0). P \rightarrow P$. In this case, the semantics of $[I True]$ will be {$\emptyset$} or {$\emptyset$$^{{\emptyset}}$} depending on whether True : Prop or True : Type_0 is considered, respectively. And hence we should have {$\emptyset$} = {$\emptyset$$^{{\emptyset}}$} which is not the case, even though the two sets are isomorphic (bijective).
In order to circumvent this issue, we follow Lee and Werner [2011], who in turn follow Aczel [1999], in using the method known as trace encoding for representation of functions.
Definition 3.6 (Trace encoding). The following two functions, Lam and App, are used for trace encoding and application of trace encoded functions respectively.
Lemma 3.7. Let $f: X \to Y$ be a set theoretic function then for any $x \in X$ we have
---PAGE_BREAK---
Note that using the trace encoding technique the problem mentioned in Example 3.5 is not present anymore. That is, we have:
Lemma 3.8 (Aczel [1999]). Let A be a set and assume the set $B(x) \subseteq 1$ for $x \in A$.
${\text{Lam}(f)|f \in \Pi x \in A.B(x)} \subseteq 1$
${\text{Lam}(f)|f \in \Pi x \in A.B(x)} = 1 \text{ iff } \forall x \in A.B(x) = 1$
4 Set-theoretic model and consistency of pCuIC
We construct a model for pCuIC by interpreting predicative universes using von Neumann universes and Prop as ${0, 1} = {\emptyset, {\emptyset}}$. We use the trace encoding technique presented earlier for (dependent) function types. We will construct the interpretation of inductive types and their eliminators using rule sets for inductive definitions in set theory. We shall first define a size function on terms, typing contexts, and pairs of a context and a term which we write as $size(\Gamma \vdash t)$. We will then define the interpretation of typing contexts and terms (in appropriate context) by well-founded recursion on their size.
Definition 4.1. We define a function size on terms, contexts, declarations and pairs consisting of a context and a term (which we write as $size(\Gamma \vdash t)$) mutually recursively as follows:
Size for typing contexts and declarations
Size for term
Size for pairs consisting of a context and a term
---PAGE_BREAK---
Size for judgements
In the definition above, which is similar to that by Lee and Werner [2011] and Miquel and Werner [2003], the $\pm 1/2$ is added to make sure $size(\Gamma \vdash t) < size(\Gamma, x : t)$ and that $size(\Gamma) < size(\Gamma \vdash t)$.
Definition 4.2 (The model). We define the interpretations for contexts and terms by well-founded recursion on their sizes.
Interpretation of contexts
Above, we assume that $x \notin \mathrm{dom}(\Gamma)$, otherwise, both $[[\Gamma, x : A]]$ and $[[\Gamma, x := t : A]]$ are undefined.
Interpretation of terms
Interpretation of inductive types, constructors and eliminators is defined below
4.1 Modeling inductive types
We define the interpretation for inductive blocks by constructing a rule set which will interpret the whole inductive block. We will define interpretation of individual inductive types and constructors of the block based on the fixpoint of this rule set. ---PAGE_BREAK---
Definition 4.3 (Interpretation of the inductive types). Let $\mathcal{D} \equiv \mathbf{Ind}n{\Delta_I := \Delta_C}$ be an arbitrary but fixed inductive block such that $\Delta_I = d_0 : A_0, \dots, d_l : A_l$ and $\Delta_C = c_0 : T_0, \dots, c{l'} : T_{l'}$. Where $A_i \equiv \Pi \vec{p} : \vec{P} \cdot \Pi \vec{x} : \vec{B}i$. $s$ for some sequence of types $\vec{B}$ and some sort $s$. Here, $\vec{P}$ are parameters of the inductive block. The type of constructors are of the following form: $T_k \equiv \Pi \vec{p} : \vec{P} \cdot \Pi \vec{x} : \vec{V}k$. $d{i_k} \vec{p} \vec{t}k$ for some $\vec{t}k$. Notice that $\vec{V}k$ is a sequence itself. That is, it is of the form $\vec{V}k \equiv V{k,1}, \dots, V{k,\text{len}(\vec{V}K)}$. That is, each constructor $c_k$, takes a number of arguments, first parameters $\vec{P}$ and then some more $\vec{V}k$. The strict positivity condition implies that for any non-parameter argument $V{k,i}$ of a constructor $c_k$, either $d \in \text{dom}(\Delta_I)$ does not appear in $V{k,i}$ or we have $V{k,i} \equiv \Pi \vec{x} : \overrightarrow{W{k,i}} \cdot d{I_{k,i}} \vec{q} \vec{t}$ where $\text{len}(\vec{q}) = \text{len}(\vec{p})$. That is, each argument of a constructor where an inductive type (of the same block) appears, is a (dependent) function with codomain being that inductive type. In this case, no inductive type of the block appears the domain(s) of the function, $\overrightarrow{W_{k,i}}$. Notice that the codomain of the function is an inductive type in the block but not necessarily of the same family as the one being defined – the parameters applied are $\vec{q}$ instead of $\vec{p}$! We write $\text{rec}(V_{k,i})$ if some inductive of the block appears in $V_{k,i}$ in which case it will be of the form just described.
\begin{gather*} [\Gamma \vdash D]_\gamma \triangleq I(\Phi_{\Gamma,D}^\gamma) \\ \Phi_{\Gamma,D}^\gamma \triangleq \bigcup_{d_i \in \text{dom}(\Delta_I)} \bigcup_{c_k \in \text{Constrs}(d_i)} \left\{ \frac{\Psi_{d_i,c_k}}{\psi_{d_i,c_k}} \middle| \begin{array}{@{}l@{}} \vec{a} \in [(\Gamma \vdash \vec{P})]_\gamma, \\ \vec{m} \in [(\Gamma, \vec{p} : \vec{P}, \vec{d}' : \vec{s} \vdash \vec{V}_k')]_{\gamma, \vec{a}, \vec{b}} \end{array} \right\} \end{gather*}
Where, $\vec{d}'$ is the sequence of $d'{I{k,j}}$'s occurring within $\overrightarrow{V'k}$ below and $s_i \equiv A{d_i}$ is the arity of the inductive type $d_i$, $\vec{b} \in [(\Gamma, \vec{p} : \vec{P} \vdash \vec{s})]_{\gamma, \vec{a}}$ and,
\begin{align*} \psi_{d_i, c_k} &\triangleq \langle i; \vec{a}; [\Gamma, \vec{p} : \vec{P}, \vec{d}' : \vec{s}, \vec{x} : \vec{V}'_k \vdash \vec{t}_k]_{\gamma, \vec{a}, \vec{b}, \vec{m}} ; \langle k; \vec{m} \rangle \rangle \\ \Psi_{d_i, c_k} &\triangleq \bigcup_{\text{rec}(V_{k,j})} \left\{ \begin{array}{@{}l@{}} \langle I_{k,j}; [\Gamma_{k,j}, \vec{y} : \overrightarrow{W}_{k,j} \vdash \vec{q}]_{\gamma, \vec{a}, \vec{b}, \vec{e}, \vec{u}} ; \\[2ex] [\Gamma_{k,j}, \vec{y} : \overrightarrow{W}_{k,j} \vdash \vec{t}]_{\gamma, \vec{a}, \vec{b}, \vec{e}, \vec{u}} ; \\[2ex] \overrightarrow{\text{App}}(m_{I_{k,j}}, \vec{u}) \end{array} \middle| \begin{array}{@{}l@{}} \vec{u} \in [(\Gamma_{k,j} \vdash \overrightarrow{W}_{k,j})_{\gamma, \vec{a}, \vec{b}, \vec{e}}] \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \end{array} \right\} \end{align*}
For $\Psi_k$ we assume that $V_{k,j} = \Pi^{\vec{y}} : W_{k,j} . d_{I_{k,j}} . (\vec{q} . (\vec{t}))$
The types $V'{k,j}$ are defined based on $V{k,j}$ as follows:
---PAGE_BREAK---
We define the interpretation of the inductive types in the block as follows:
We define the interpretation of the constructors in the block as follows:
Let us first discuss the intuitive construction of Definition 4.3 above. In this definition the most important part is the interpretation of the inductive block. We have defined this as the fixpoint of the rule sets corresponding to constructors of the inductive type. This rule set basically spells out the following. Take, some set $d'{I{k,j}}$ in the universe as a candidate for the interpretation of $j^{th}$ occurrence of inductive type $d_{I_{k,j}}$ in the $k^{th}$ constructor. This candidate, $d'{I{k,j}}$, is taken to be a candidate element of the inductive type $d_{I_{k,j}}$ in case $\vec{W}{k,i} = \text{nil}$, i.e., intuitively, if the recursive occurrence embeds an element of $d{I_{k,j}}$ in the type being constructed. On the other hand, if the recursive occurrence of $d_{I_{k,j}}$ is, intuitively, embedding a function with codomain $d_{I_{k,j}}$ into the type being constructed then $d'{I{k,j}}$ is to be understood as the codomain of the function being embedded by the constructor. In each of these two cases, we need to make sure the candidate element and or function is correctly chosen, i.e., we need to make sure that the element or the range of the function chosen is indeed in the interpretation of the inductive type. This is where the rule sets come to play, so to speak. The premise set $\Psi_k$ makes sure that all candidate recursive occurrences are indeed correctly chosen. This is done by making sure that for any of the arguments of the function being embedded (here an element is treated as a function with no arguments!) the result of applying the candidate function to the arguments is indeed in the interpretation of the corresponding inductive type. Do notice that $\overrightarrow{\mathrm{App}}(a, \mathrm{nil}) = a$.
Example 4.4 (Rule set for construction of natural numbers).
Example 4.5 (Rule set for construction of lists).
Lemma 4.6. Values for arguments of arities are uniquely determined by the values for arguments each constructor (including values for parameters) in OΦγΓ,D and in particular in [[Gamma &diarr; D]]γ. That is, if
then, $\vec{t}' = (\vec{t})$. Analogously for $[[\Gamma \vdash D]]_{\gamma}$ we have that if
then, $\vec{t}' = (\vec{t})$. ---PAGE_BREAK---
Proof. This immediately follows from the fact that for any two rules
in $\Phi_{\Gamma,D}^{\gamma}$ we have $\vec{t} = \vec{t}'$. $\square$
We shall show that the interpretation of the inductive types in a block are each in the universe corresponding to their arity. Notice that whenever two inductive types appear in one another the syntactic criteria for typing enforce that they are both have the same arity.² Therefore, we assume without loss of generality that all inductive types in the block have the same arity. In case it is not the case, it must be that there are some inductive types in the block that are not necessarily mutually inductive with the rest of the block. Hence, those inductive types (and their interpretations) can be considered prior to considering the block as a whole. Therefore, in the following theorem, we assume, without loss of generality that the all of the inductive types of a block are of the same arity.
Remark 4.7. We have considered inductive types with heterogeneous parameters in this work. However, we can only prove the fact that each inductive type is in the set-theoretic universe corresponding to its arity for inductive types with uniform parameters, i.e., inductive types where parameters are fixed for the whole mutual inductive block.
Lemma 4.8. Let $\mathcal{D} \equiv \mathrm{Ind}n{\Delta_I := \Delta_C}$ be a block of inductive types with uniform parameters such that all inductive types of arity Typei. Furthermore, let us assume that all the terms (and particularly types) appearing in the body of the block are well defined under the context $\Gamma$ and environment $\gamma$ and interpretation of each of these terms (and types) is in the interpretation of the type (correspondingly sort) that is expected based on the typing derivation.3 Then, $[[\Gamma \vdash \mathcal{D}]{\gamma}\downarrow, [[\Gamma \vdash \mathcal{D}]{\gamma} \in V{\kappa_j}],$ where Typej is the maximal sort of the inductive types in the block, and $[[\Gamma \vdash \mathcal{D}.d_j]{\gamma} \in [[\Gamma \vdash \Delta_I(d_j)]{\gamma}}.$
Proof. The construction of $[[\Gamma \vdash \mathcal{D}]{\gamma}]$ depends only on the interpretation of terms $[[\Gamma \vdash u]{\gamma}]$ where $u$ appears in $\Delta_I$ or $\Delta_C$ and by our assumptions these are all defined. Therefore, we can easily see that $[[\Gamma \vdash \mathcal{D}]{\gamma}\downarrow]$. We show that $[[\Gamma \vdash \mathcal{D}]{\gamma} \in V_{\kappa_j}$. This follows by Lemma 3.4. Notice that as all terms appearing in the inductive block have types that are in Typej we know that the cardinality of premises of rules in the rule set for constructing $[[\Gamma \vdash \mathcal{D}]{\gamma}]$ are also all in $V{\kappa_j}$. Since there are finitely many such terms we can take the maximum of these cardinalities which allows us to use Lemma 3.4.
Let $\vec{b}$ be a sequence of sets that are in the interpretation for parameters of the mutual inductive block. Let $\mathcal{F}(\Phi) = {a = (i; \vec{b}; \vec{t}; c) | \frac{A}{a} \in \Phi}$ and $\mathcal{G}(A) = {a = (i; \vec{b}; \vec{t}; c) | a \in A}$. That is, $\mathcal{F}$ filters a rule set so that only those rules are retained that produce inductive types in the family indexed by parameter values $\vec{b}$. Similarly, $\mathcal{G}$ filters the fixpoint of such a rule set.
We show, by transfinite induction up to the closing ordinal of $\Phi_{\Gamma,D}^{\gamma}$, that
Notice that this crucially depends on the fact that parameters are uniform. Now, non-parameter arguments of constructors need to be in the sort (see the typing rule for inductive types). Therefore, for each fixed set of parameters, e.g., $\vec{b}$ above, for each constructor there is a fixed cardinality
²Note that this is the case in our work as there are no inductive types in Prop.
³These conditions will hold by induction hypotheses when this lemma is used in practice. ---PAGE_BREAK---
$\alpha \in \mathcal{V}\kappa_i$ (cardinality corresponding to the type of non-parameter arguments) such that the cardinality of premises of rules in $\mathcal{F}(\Phi_{\Gamma,D}^{\gamma})$ corresponding to that constructor is less than or to $\alpha$. Since, there are finitely many such cardinalities we can take the maximum of these cardinalities which is again in $\mathcal{V}\kappa_i$. Hence, the closing ordinal of $\mathcal{I}(\mathcal{F}(\Phi_{\Gamma,D}^{\gamma}))$ is in $\mathcal{V}\kappa_i$. Notice, that this does not imply that $\mathcal{I}(\mathcal{F}(\Phi_{\Gamma,D}^{\gamma}))$ is in $\mathcal{V}\kappa_i$ as there are parameters can values for indices in the tuples in $\mathcal{I}(\mathcal{F}(\Phi_{\Gamma,D}^{\gamma}))$.
Finally, we show that for each sequence $\vec{c}$ of sets that are in the interpretation for the indices of an inductive type $d_i$, ${a| \langle i; \vec{b}; \vec{c}; a \rangle \mathcal{I}(\mathcal{F}(\Phi_{\Gamma,D}^{\gamma}))} \in \mathcal{V}\kappa_i$. We show this by transfinite induction up to the closing ordinal of $\mathcal{I}(\mathcal{F}(\Phi_{\Gamma,D}^{\gamma}))$ which, crucially, we know that is in $\mathcal{V}\kappa_i$. $\square$
Lemma 4.9. Let $\mathcal{D} \equiv \mathrm{Ind}_n{\Delta_I := \Delta_C}$ and $\mathcal{D}' \equiv \mathrm{Ind}_n{\Delta'_I := \Delta'_C}$ be two blocks of inductive types with $\mathrm{dom}(\Delta_I) = \mathrm{dom}(\Delta'_I)$ and $\mathrm{dom}(\Delta_C) = \mathrm{dom}(\Delta'_C)$. Furthermore, assume that the for each $d \in \mathrm{dom}(\Delta_I)$ the interpretation of the arguments of the arity of $\Delta_C(d)$ are subsets of the interpretation of corresponding arguments of the arity of $\Delta_C(d')$. Similarly for the arguments of the constructors. In addition, assume that in each case, the interpretation of values given as parameters and arities in the resulting type of each corresponding constructors (the inductive type being constructed by that constructor) are equal. These are conditions in the rule INDEEQ in Figure 5 where cumulativity (subtyping) relation is replaced with subset relation on the interpretation and the judgemental equality is replaced with equality of interpretations.⁴
Let $\vec{P}$ and $\vec{P}'$ be parameters of inductive blocks $\mathcal{D}$ and $\mathcal{D}'$, respectively. In this case,
Proof. Expanding the definition of $[\vec{\Gamma} \vdash \mathcal{D}.d]{\gamma}$ and $[\vec{\Gamma} \vdash \mathcal{D}'.d]{\gamma}$ in the statement above gives us:
In order to show this, we show, by transfinite induction on $\alpha$ up to the closing ordinal of $\Phi_{\Gamma,D}^{\gamma}$, that the following holds
The base case, and the case for limit ordinals are trivial. In case of a successor ordinal, $\alpha^+$, let a $k$ be in ${c| i; a; b; c}^+$. Then it must be generated by a rule in $\Phi_{\Gamma,D}^\gamma$. By the premise of this rule, we know that all the recursive (the same or other inductive types of the block) arguments are required to be in the previous stage, $O_{\Phi_{\Gamma,D}}^\alpha$. By induction hypothesis, we
⁴These conditions will hold by the induction hypothesis when we shall use this lemma. ---PAGE_BREAK---
know that those tuples should also belong to $\mathcal{O}{\Phi{\Gamma, D'}}^{\alpha}$. Hence, the corresponding rule exists in $\Phi_{\Gamma, D'}^{\gamma}$ and is applicable. Therefore, the tuple $k$ must also be in ${c | \langle i; \vec{a}; \vec{b}; c \rangle \in \mathcal{O}{\Phi{\Gamma, D'}}^{+\alpha}}$. $\square$
4.2 Modeling eliminators
We define the interpretation for eliminators by constructing a rule set which will interpret the eliminators for the whole inductive block. We will define interpretation of individual eliminators based on the fixpoint of this rule set.
Definition 4.10 (Interpretation of recursors). Let $\mathcal{D} \equiv \text{Ind}n{\Delta_I := \Delta_C}$ be an arbitrary but fixed inductive block and assume, without loss of generality, that $\Delta_I = d_0 : A_0, \dots, d_l : A_l$ and $\Delta_C = c_0 : T_0, \dots, c{l'} : T_{l'}$. Where $A_i \equiv \Pi \vec{p} : \vec{P} . \Pi \vec{x} : \vec{B}. s$ for some types $\vec{B}$ and some sort $s$. Here, $\vec{P}$ are parameters of the inductive block. The type of constructors are of the following form: $T_k \equiv \Pi \vec{p} : \vec{P} . \Pi \vec{x} : \vec{V}k . d{i_k} \vec{p} \vec{t}k$ for some $\vec{t}k$. For the sake of simplicity of presentation, let us write ELB $\equiv \text{Elim}^\mathcal{D}(Q{d_1}, \dots, Q{d_l}) {f_{c_1}, \dots, f_{c_{l'}}}$ for the block of eliminators being interpreted. Furthermore, let $\xi_D^{Q_{d_1}, \dots, Q_{d_l}}(c_k, T_k) \equiv \Pi \vec{x} : \vec{U}k . Q{d_{i_k}} \vec{u}$ for some terms $\vec{u}$. Notice that $\xi_D^{Q_{d_1}, \dots, Q_{d_l}}$ is simply the type of the constructor where after each (mutually) recursive argument, an argument is added for the result of the elimination of that (mutually) recursive argument. Let us write $J_{k,i}$ for the index of the $i^{th}$ argument of the $k^{th}$ constructor, $V_{k,i}$, in $\vec{U}k$ above. More precisely, whenever rec($V{k,i}$) holds, we have $U_{J_{k,i}+1}$ is the argument of $\xi_D^{Q_{d_1}, \dots, Q_{d_l}}(c_k, T_k)$ that corresponds to the result of the elimination of $V_{k,i} = U_{J_{k,i}}$. We first define a rule set $\Phi_{\Gamma, ELB}^\gamma$ for this interpretation:
Let $\vec{b}$ be the subsequence of $\vec{a}$ corresponding to arguments of the constructor, i.e., it is obtained from $\vec{a}$ by dropping any term in the sequence that corresponds to some $U_{J_{k,j}+1}$ whenever rec($V_{k,j}$).
\begin{align*} \psi_{d_i, c_k} &\triangleq \langle\langle c_k; \vec{b} \rangle\rangle; \overrightarrow{\text{App}}([\Gamma \vdash f_{c_k}]_\gamma, \vec{a}) \\ \Psi_{d_i, c_k} &\triangleq \bigcup_{\text{rec}(V_{k,j})} \left\{ \left\langle \overrightarrow{\text{App}}([\Gamma_{k,j} \vdash U_{J_{k,j}}]_\gamma, \vec{e}, \vec{u}); \\ &\phantom{\overrightarrow{\text{App}}([\Gamma_{k,j} \vdash U_{J_{k,j}}]_\gamma, } \overrightarrow{\text{App}}([\Gamma_{k,j} \vdash U_{J_{k,j}+1}]_\gamma, \vec{e}, \vec{u}) \right\rangle \middle| \vec{u} \in [\Gamma_{k,j} \vdash \overrightarrow{W_{k,j}}]_\gamma, \vec{e} \right\} \\ \Gamma_{k,j} &\triangleq \Gamma, \vec{p}: \vec{P}, x_1: V_{k,1}, \dots, x_{j-1}: V_{k,j-1} \\ \vec{e} &\triangleq b_1, \dots, b_{j-1} \end{align*}
For $\Psi_k$ we assume that $V_{k,j} = \Pi \vec{y} : \overrightarrow{W_{k,j}} . d_{I_{k,j}}$, $\vec{q}, \vec{t}$.
We define the interpretation individual eliminators as follows:
if $[\Gamma \vdash t]_\gamma = (\langle k, m \rangle$, and there is a unique $u$ such that $\langle\langle k; [\Gamma \vdash v]\gamma, m \rangle\rangle; u] \in I(\Phi^{\gamma}{\Gamma, ELB})$.
The following lemma shows that in Definition 4.10 above we have indeed captured and interpreted all of the elements of all of the inductive types in the block. ---PAGE_BREAK---
Lemma 4.11. Let $\mathcal{D} \equiv \mathbf{Ind}n{\Delta_I := \Delta_C}$ be a block of inductive types with $[\Gamma \vdash \mathcal{D}]\gamma$ defined and let $Q{d_1}, \dots, Q{d_l}$ and $f_{c_1}, \dots, f_{c_{l'}}$ be such that
and
Also, assume that for the term $t$ we have $[\Gamma \vdash t]_\gamma \in [(\Gamma \vdash D.d \vec{u} \vec{v}]_\gamma$, where $\vec{u}$ correspond to parameters. Then,
and
Proof. We show by transfinite induction up to the closing ordinal of $\Phi_{\Gamma,D}^\gamma$ that for any $\alpha$ and for any $\langle\langle k; \vec{a}, \vec{m} \rangle; \vec{t} \rangle \in {\langle\langle k; \vec{a}, \vec{m} \rangle; \vec{t} \rangle | \langle i; \vec{a}, \vec{t}; \langle k; \vec{m} \rangle \rangle \in O_{\Phi_{\Gamma,D}^\gamma}^\alpha}$ (note that by Lemma 4.6 $\vec{t}$ is uniquely determined by $k$, $\vec{a}$ and $\vec{m}$) there is a unique $b \in [[\Gamma \vdash \overrightarrow{\text{App}}(Q_{d_i}, \vec{a}, \vec{t}, \langle k; \vec{m} \rangle)]\gamma$ such that $\langle\langle c; \vec{a}, \vec{m} \rangle; b \rangle \in O{\Phi_{\Gamma,ELB}^\gamma}^\alpha$ for
For the base case, $\alpha = 0$ this holds trivially. For the other cases, it suffices to notice that all the argument elements taken for the (mutually) recursive arguments of constructors, i.e., corresponding to $U_{J_{k,j}}$ for rec($V_{J_{k,j}}$) are uniquely determined from the arguments of the constructor ($\vec{b}$ in the interpretation of recursors above) as is so restricted by the antecedents of each rule.
Notice that the argument above also shows that $\Phi_{\Gamma,ELB}^{\gamma}$ and $\Phi_{\Gamma,D}^{\gamma}$ have the same closing ordinal. This concludes the proof. $\square$
4.3 Proof of Soundness
We show that the model that we have constructed throughout this section is sound. That is, we show that for any typing context $\Gamma$, term $t$ and type $A$ such that $\Gamma \vdash t: A$ we have that for any environment $\gamma \in [\Gamma]$, $[\Gamma \vdash t]_\gamma \downarrow$, $[\Gamma \vdash A]_\gamma \downarrow$ and that $[\Gamma \vdash t]_\gamma \in [\Gamma \vdash A]_\gamma$. We use this result to prove consistency of pCuIC.
Lemma 4.12. Let $\Gamma$ be a typing context, $\gamma$ be an environment, and $t$ be a term such that $[\Gamma \vdash t]_\gamma \downarrow$. Then $FV(t) \subseteq \text{dom}(\Gamma)$.
Proof. We prove that if there is a variable $x \in FV(t)$ such that $x \notin \text{dom}(\Gamma)$ then $\neg [\Gamma \vdash t]_\gamma$. This follows easily by induction on $t$. $\square$
Lemma 4.13 (Weakening). Let $\Gamma$ be a typing context, $\gamma$ be an environment, $t$ and $A$ be terms such that $[\Gamma, \Gamma']\downarrow$, $\gamma \in [\Gamma]$, $\gamma, \gamma' \in [\Gamma, \Gamma']$ and $[\Gamma, \Gamma' \vdash t]_{\gamma, \gamma'}\downarrow$. Furthermore, let $\Xi$ be a typing context and $\delta$ be an environment such that $(\text{dom}(\Gamma) \cup \text{dom}(\Gamma')) \cap \text{dom}(\Xi) = \emptyset$, and we have that variables in $\text{dom}(\Xi)$ do not appear in $\Gamma'$ freely. Furthermore, let us assume that $[\Gamma, \Xi, \Gamma']\downarrow$ and $\gamma, \delta, \gamma' \in [\Gamma, \Xi, \Gamma']$. Then
---PAGE_BREAK---
- $[[\Xi, \Xi', \Gamma' \vdash t]]{\gamma, \delta, \gamma'} = [[\Gamma, \Xi, \Gamma' \vdash t]]{\gamma, \gamma'}$
Proof. We prove the result above by induction on t. Most cases follow easily by induction hypotheses. Here, for demonstration purposes we show the case for variables and (dependent) function types.
• $t = x$: In this case, both Case 1 and Case 2 above follow by definition of the model.
• $t = \Pi x : A.B$: We know by induction hypothesis that
Also by induction hypotheses we have that for all $a \in [\Gamma, \Xi, \Gamma' \vdash A]_{\gamma, \delta, \gamma'}$,
Given the above induction hypotheses, both Case 1 and Case 2 above follow by the definition of the model. Note that by Lemma 4.12, we know that variables in $\text{dom}(\Xi)$ do not appear freely in $A$. This is why induction hypothesis applies to $B$ above. $\square$
Lemma 4.14 (Substitutivity). Let $\Gamma$ be a typing context, $\gamma$ be an environment, $u$ and $A$ be terms such that $[\Gamma]\downarrow$, $\gamma \in [\Gamma]$ and $[\Gamma \vdash u]_{\gamma}\downarrow$. Then
If $[[\Gamma, x : A, \Xi]]{\downarrow}$ and $\gamma$, $[[\Gamma \vdash u]]{\gamma}$, $\delta \in [[\Gamma, x : A, \Xi]]$ then $\gamma$, $\delta \in [[\Gamma, \Xi [u/x]]$
If $[[\Gamma, x : A, \Xi]]{\downarrow}$ and $\gamma$, $[[\Gamma \vdash u]]{\gamma}$, $\delta \in [[\Gamma, x : A, \Xi]]$ and $[[\Gamma, x : A, \Xi \vdash t]]{\gamma, [[\Gamma \vdash u]]{\gamma}, \delta} \downarrow$ then
(a) $[\Gamma, \Xi [u/x] \vdash t [u/x]]{\gamma, \delta}$ (b) $[\Gamma, \Xi [u/x] \vdash t [u/x]]{\gamma, \delta} =$
$[\Gamma, x : A, \Xi \vdash t]{\gamma, [\Gamma \vdash u]{\gamma}, \delta} = [\Gamma, x := u : A, \Xi \vdash t]{\gamma, [\Gamma \vdash u]{\gamma}, \delta}$
Proof. We prove this lemma by well-founded induction on $\sigma(\Xi, t) = size(\Xi) + size(t) - 1/2$. In the following we reason as though we are conducting induction on the structure of terms and contexts. Note that this is allowed because our measure $\sigma(\Xi, t)$ does decrease for the induction hypotheses pertaining to structural induction. This is in particular crucial in some sub-cases of the case where $\Xi = \Xi$, $y : B$. There, we are performing induction on $t$ which enlarges the context $\Xi$ (similar to case of (dependent) functions in Lemma 4.13).
• Case $\Xi = :$: then Case 1 holds trivially. Case 2, follows by induction on $t$. The only non-trivial case (not immediately following from the induction hypothesis) is the case where $t$ is a variable. In this case, both 2a and 2b follow by definition of the model.
• Case $\Xi = \Xi'$, $y : B$ and correspondingly, $\delta = \delta'$, $a$:
Follows by definition of the model and the induction hypothesis corresponding to Case 2b: $$ [[\Gamma, \Xi'[u/x] \vdash B[u/x]]]{\gamma,\delta'} = [[\Gamma, x : A, \Xi' \vdash B]]{\gamma,[\Gamma\vdash u]_{\gamma,\delta'}} $$
We proceed by induction on $t$. The only non-trivial case is when $t$ is a variable, $t=z$. Notice, when $z \neq x$ then both 2a and 2b hold trivially by definition of the model. Otherwise, we have to show that $[[\Gamma, \Xi'[u/x], y : B[u/x] \vdash u]]{\gamma,\delta,a} \downarrow$ and $[[\Gamma, \Xi[u/x], y : B[u/x] \vdash u]]{\gamma,\delta,a} = [[\Gamma, x : A, \Xi, y : B[u/x] \vdash x]]{\gamma,[\Gamma\vdash u]{\gamma},\delta,a} =$ $[[\Gamma, x := u : A, \Xi, y : B[u/x] \vdash x]]{\gamma,[\Gamma\vdash u]{\gamma},\delta,a}$. These follow by Lemma 4.13 above and our assumption that $[[\Gamma \vdash u]]_{\gamma} \downarrow$. ---PAGE_BREAK---
- Case $\Xi = \Xi'$, $\mathbf{Ind}n{\Delta_I := \Delta_C}$: We prove this case by induction on $t$. The only non-trivial case here is the case where $t = \mathbf{Ind}n{\Delta_I := \Delta_C} \cdot z$. Notice that the interpretation of $[\Gamma, \Xi'[u/x], y : B[u/x] \vdash t]{\gamma, \delta, a}$ is defined based on the interpretation of terms of the form $[\Gamma, \Xi'[u/x] \vdash m]{\gamma, \delta}$ where $m$ appears in $\Delta_I$ or $\Delta_C$ to which the induction hypothesis (that of induction on $\Xi$) applies. $\square$
Theorem 4.15 (Soundness of the model). The model defined in this section is sound for our typing system. That is, the following statements hold:
If $\mathcal{W}\mathcal{F}(\Gamma)$ then $[\Gamma]\downarrow$
If $\Gamma \vdash t : A$ then $[\Gamma]\downarrow$ and for any $\gamma \in [\Gamma]$ we have $[\Gamma \vdash t]{\gamma\downarrow}, [\Gamma \vdash A]{\gamma\downarrow}$ and $[\Gamma \vdash t]{\gamma} \in [\Gamma \vdash A]{\gamma}$
If $\Gamma \vdash t \simeq t' : A$ then $[\Gamma \vdash t]{\gamma\downarrow}, [\Gamma \vdash t']{\gamma\downarrow}, [\Gamma \vdash A]{\gamma\downarrow}$ and $[\Gamma \vdash t]{\gamma} = [\Gamma \vdash t']{\gamma} \in [\Gamma \vdash A]{\gamma}$
If $\Gamma \vdash A \sqsubseteq B$ then $[\Gamma \vdash A]{\gamma\downarrow}, [\Gamma \vdash B]{\gamma\downarrow}$ and $[\Gamma \vdash A]{\gamma} \subseteq [\Gamma \vdash B]{\gamma}$
Proof. Note that judgements of the form $\mathcal{W}\mathcal{F}(\Gamma)$, $\Gamma \vdash t : A$, $\Gamma \vdash t \simeq t' : A$ and $\Gamma \vdash A \sqsubseteq B$ are defined mutually. We prove the theorem by mutual induction on the derivation of these judgements.
Case WF-CTX-EMPTY: trivial by definition.
Case WF-CTX-HYP: trivial by definition and induction hypothesis.
Case WF-CTX-DEF: trivial by definition and induction hypothesis.
Case PROP: trivial by definition.
Case HIERARCHY: trivial by definition.
Case VAR: trivial by definition and induction hypotheses.
Case LET: by definition, induction hypothesis and Lemma 4.14.
Case LET-EQ: by definition, induction hypotheses and Lemma 4.14.
Case PROD: by induction hypotheses we know that $[\Gamma \vdash A]_\gamma \in [\Gamma \vdash s_1]\gamma$ and that $[\Gamma, x : A \vdash B]{\gamma,a} \in [\Gamma \vdash s_2]_\gamma$ for any $a \in [\Gamma \vdash A]_\gamma$. We also know $\mathcal{R}_s(s_1, s_2, s_3)$. We have to show that
Since $\mathcal{R}_s(s_1, s_2, s_3)$ holds, we have that either $s_2 = s_3 = \text{Prop}$ or $s_1 = \text{Type}_i$, $s_2 = \text{Type}j$ and $s_3 = \text{Type}{\max{i,j}}$ or $s_1 = \text{Prop}$, $s_2 = \text{Type}_i$ and $s_3 = \text{Type}_j$ hold. In the first case, The membership relation above, (1), follows from Case 1 of Lemma 3.8. In the other two cases, note that $[\Gamma \vdash s_3]_\gamma$ is a von Neumann universe and is hence closed under (dependent) function space and also (by axiom schema of replacement) under taking trace-encoding of elements of any set.
Case PROD-EQ: by definition and induction hypotheses.
Case LAM: by definition and induction hypotheses.
Case LAM-EQ: by definition and induction hypotheses. ---PAGE_BREAK---
• Case APP: by induction hypotheses we know that $[[\Gamma \vdash N]]{\gamma} \in [[\Gamma \vdash A]]{\gamma}$ and $[[\Gamma \vdash M]]{\gamma} \in [[\Gamma \vdash \Pi x : A. B]]{\gamma}$. From the latter we know that $[[\Gamma \vdash M]]{\gamma} = \text{Lam}(f)$ for some $f$ with domain $\text{dom}(f) = [[\Gamma \vdash A]]{\gamma}$ such that $f(a) = [[\Gamma, x : A \vdash B]]_{\gamma,a}$. Therefore,
where the last equality is by Lemma 4.14.
• Case APP-EQ: by a reasoning similar to that of Case APP above.
• Case IND-WF: by definition, induction hypotheses and Lemma 4.8.
• Case IND-TYPE: by induction hypotheses we know that $[[\Gamma]]{\downarrow}$ which by definition means that for any environment $\gamma \in [[\Gamma]]$ and any inductive block $\mathcal{D} \in \Gamma$ we have (using the weakening lemma above) $[[\Gamma \vdash \mathcal{D}]]{\downarrow}$. By Lemma 4.8 the desired result follows.
• Case IND-CONSTR: by induction hypotheses we know that $[[\Gamma]]{\downarrow}$ which by definition means that for any environment $\gamma \in [[\Gamma]]$ and any inductive block $\mathcal{D} \in \Gamma$ we have (using the weakening lemma above) $[[\Gamma \vdash \mathcal{D}]]{\downarrow}$. The desired result follows by the definition of $[[\Gamma \vdash \mathcal{D}.c]]{\gamma}$, Lemma 4.14 and the fact that $[[\Gamma \vdash \mathcal{D}]]{\downarrow}$ is the fixpoint of the rule-set used to construct it.
• Case IND-ELIM: by Lemma 4.11 and induction hypotheses.
• Case IND-ELIM-EQ: similarly to Case IND-ELIM.
• Case EQ-REF: trivial by definition and induction hypothesis.
• Case EQ-SYM: trivial by definition and induction hypothesis.
• Case EQ-TRANS: trivial by definition and induction hypothesis.
• Case BETA: by induction hypotheses that
On the other hand, we have that
and therefore
Also, by Lemma 4.14 we get that
and that
---PAGE_BREAK---
We finish the proof by:
• Case ETA: We need to show that
We know by induction hypothesis that [[Γ ⊢ t]]γ↓ and that [[Γ ⊢ t]]γ ∈ [[Γ ⊢ Πx : A.B]]γ and consequently we know that there is a set theoretic function f:
such that $[[\Gamma \vdash t]]_{\gamma} = \text{Lam}(f)$. This implies that,
• Case DELTA: by Lemma 4.14 and induction hypotheses.
Case ZETA: trivial by definition and induction hypothesis.
Case IOTA: by definition of the interpretation of recursors and induction hypothesis. Notice that by construction of the interpretation of eliminators in Definition 4.10 the interpretation of elimination of $c_i$ $\vec{a}$ is basically, the result of applying $f_{c_i}\vec{b}$ where $\vec{a}$ is a subsequence of $\vec{b}$. The only difference between $\vec{b}$ and $\vec{a}$ is that in $\vec{b}$ after each value that corresponds to a (mutually) recursive argument of the constructor $c_i$ we have a value that corresponds to the interpretation of elimination of that (mutually) recursive argument. For those terms, $\mu_D^{\vec{a};\vec{f}}$ applies the elimination using the eliminator, Elim, while the rule in rule set corresponding $c_i$ $\vec{a}$ ensures in its antecedents that all elements are eliminated correctly according to the interpretation of the eliminator (the fixpoint taken in Definition 4.10). Notice that if the constructor is of an inductive sub-type, then, by construction of interpretation of constructors the interpretation of the two constructors applied to those terms are equal.
Case PROP-IN-TYPE: trivial by definition.
Case CUM-TYPE: trivial by definition. ---PAGE_BREAK---
Case CUM-TRANS: trivial by definition and induction hypothesis.
Case CUM-WEAKEN: trivial by definition, induction hypothesis and Lemma 4.13.
Case CUM-PROD: trivial by definition and induction hypothesis.
Case CUM-EQ-L: trivial by definition and induction hypothesis.
Case CUM-EQ-R: trivial by definition and induction hypothesis.
Case CUM: trivial by definition and induction hypothesis.
Case CUM-EQ: trivial by definition and induction hypothesis.
Case EQ-CUM: trivial by definition and induction hypothesis.
Case C-IND: easy by definition, induction hypothesis and Lemma 4.9.
Case IND-EQ: by definition, induction hypotheses and Lemma 4.9.
Case CONSTR-EQ-L: by definition, induction hypothesis.
Case CONSTR-EQ-R: by definition, induction hypothesis. □
Corollary 4.16 (Consistency of pCUC). Let s be a sort, then, there does not exist any term t such that $· \vdash t : \Pi x : s. x$.
Proof. If there where such a term t by Theorem 4.15 we should have [[· ⊢ t]]nil ∈ [[· ⊢ Πx : sx]]nil.
However, [[· ⊢ Πx : s.x]]nil = ∅. □
Strong normalization We believe that our extension to pCIC maintains strong normalization and that the model constructed by Barras [2012] for pCIC could be easily extended to support our added rules.
4.4 The model and axioms of type theory
Although our system does not explicitly feature any of the axioms mentioned below, they are consistent with the model that we have constructed.
Our model is a proof-irrelevant model. That is, all provable propositions (terms of type Prop) are interpreted identically. Therefore, it satisfies the axiom of proof irrelevance and also the axiom of propositional extensionality (that any two logically equivalent propositions are equal). This model also satisfies definitional/judgemental proof irrelevance for proposition. This is similar to how Agda treats irrelevant arguments Abel [2011].
We do not support inductive types in the sort Prop in our system. However, if the Paulin-style equality is encoded using inductive types in higher sorts, then the interpretation of these types would simply be collections of reflexivity proofs. Hence, our model supports the axiom UIP (unicity of identity proofs) and consequently all other logically equivalent axioms, e.g., axiom K Streicher [1993].
This model, being a set theoretic model, also supports the axiom of functional extensionality as set theoretic functions are extensional. This is indeed why our model supports $\eta$-equivalence.
All these axioms are also supported by the model constructed by Lee and Werner [2011]. ---PAGE_BREAK---
Acknowledgements This work was partially supported by the CoqHoTT ERC Grant 637339 and partially by the Flemish Research Fund grants G.0058.13 (until June 2017) and G.0962.17N (since July 2017).
References
A. Abel. Irrelevance in Type Theory with a Heterogeneous Equality Judgement, pages 57-71. Springer Berlin Heidelberg, Berlin, Heidelberg, 2011. ISBN 978-3-642-19805-2. doi: 10.1007/978-3-642-19805-2_5. URL https://doi.org/10.1007/978-3-642-19805-2_5.
P. Aczel. An introduction to inductive definitions. Studies in Logic and the Foundations of Mathematics, 90:739–782, 1977. ISSN 0049-237X. doi: http://dx.doi.org/10.1016/S0049-237X(08)71120-0. URL http://www.sciencedirect.com/science/article/pii/S0049237X08711200. HANDBOOK OF MATHEMATICAL LOGIC.
P. Aczel. On relating type theories and set theories. In T. Altenkirch, B. Reus, and W. Naraschewski, editors, Types for Proofs and Programs: International Workshop, TYPES' 98 Kloster Irsee, Germany, March 27–31, 1998 Selected Papers, pages 1–18, Berlin, Heidelberg, 1999. Springer Berlin Heidelberg. doi: 10.1007/3-540-48167-2_1. URL https://doi.org/10.1007/3-540-48167-2_1.
B. Barras. Semantical investigation in intuitionistic set theory and type theoreis with inductive families, 2012. Habilitation thesis, University Paris Diderot – Paris 7.
F. R. Drake. Set theory : an introduction to large cardinals. Studies in logic and the foundations of mathematics 76. North-Holland, Amsterdam, 1974. ISBN 0720422795.
P. Dybjer. Inductive Sets and Families in Martin-Löf's Type Theory and Their Set-Theoretic Semantics, pages 280–306. Cambridge University Press, Cambridge, 1991.
M. Gitik. All uncountable cardinals can be singular. Israel Journal of Mathematics, 35(1):61–88, Sep 1980. ISSN 1565-8511. doi: 10.1007/BF02760939. URL https://doi.org/10.1007/BF02760939.
G. Lee and B. Werner. Proof-irrelevant model of CC with predicative induction and judgmental equality. Logical Methods in Computer Science, 7(4), 2011. doi: 10.2168/LMCS-7(4:5)2011. URL http://dx.doi.org/10.2168/LMCS-7(4:5)2011.
A. Miquel and B. Werner. The Not So Simple Proof-Irrelevant Model of CC, pages 240–258. Springer Berlin Heidelberg, Berlin, Heidelberg, 2003. ISBN 978-3-540-39185-2. doi: 10.1007/3-540-39185-1_14. URL https://doi.org/10.1007/3-540-39185-1_14.
T. Streicher. Investigations into intensional type theory, 1993. Habilitiation thesis, Ludwig Maximilian Universität.
The Coq Development Team. The coq proof assistant, version 8.7+beta2., Oct. 2017. URL https://doi.org/10.5281/zenodo.1003421.
A. Timany and B. Jacobs. First steps towards cumulative inductive types in CIC. In Theoretical Aspects of Computing - ICTAC 2015, Proceedings, pages 608–617, Cali, Colombia, 2015. Springer. doi: 10.1007/978-3-319-25150-9_36. URL http://dx.doi.org/10.1007/978-3-319-25150-9_36.
RR n° 9105 ---PAGE_BREAK---
B. Werner. Sets in types, types in sets. In M. Abadi and T. Ito, editors, Theoretical Aspects of Computer Software: Third International Symposium, TACS'97 Sendai, Japan, September 23-26, 1997 Proceedings, pages 530-546, Berlin, Heidelberg, 1997. Springer Berlin Heidelberg. ISBN 978-3-540-69530-1. doi: 10.1007/BFb0014566. URL https://doi.org/10.1007/BFb0014566. ---PAGE_BREAK---
in informatics mathematics
RESEARCH CENTRE
PARIS
2 rue Simone Iff - CS 42112 75589 Paris Cedex 12
Publisher Inria Domaine de Voluceau - Rocquencourt BP 105 - 78153 Le Chesnay Cedex inria.fr
ISSN 0249-6399