REDUCTION FREE NORMALIZATION FOR A PROOF-IRRELEVANT TYPE OF PROPOSITIONS

. We show normalization for a type theory with a hierarchy of universes and a proof irrelevant type of propositions, close to the type system used in the proof assistant Lean. The proof uses the technique of Artin glueing between the term model and a suitable preseaf model. This can also be seen as a proof relevant version of Tait’s computability argument.


Introduction
We show normalization and decidability of conversion for dependent type theory with a cumulative sequence of universes U 0 , U 1 . . . with η-conversion and where the type U 0 is an impredicative universe of proof-irrelevant propositions. One interest of such a system is that it is very close to the type system used by the proof assistant Lean [Car19].
Such a system with a hierarchy of universes, with the lowest level impredicative, was introduced in [Coq86]. It was conjectured there that this system is stronger than Zermelo set theory (without even introducing primitive data types). This conjecture was solved by A. Miquel in [Miq04], by encoding a non well-founded version of set theory where a set is interpreted as a pointed graph up to bissimulation. The notion of proof-irrelevant propositions goes back to de Bruijn [dB95].
Our proof is a direct adaptation of the normalization argument presented in [Coq19]. We recall three features of this approach (1) we never need to consider a reduction relation, (2) we only define a reducibility predicate, and this reducibility predicate is proof-relevant 1 , (3) the reducibility predicate is not defined by an inductive-recursive relation.
This approach has been much refined in [Ste22,Gra22]. One goal of this note is to illustrate further the flexibility of this "reduction free" approach, by combining it with an idea already used in [ACP09] for dealing with proof irrelevance. To each type A in a context Γ, we associate a set of syntactical expressions Term(Γ, A) and a set Elem(Γ, A) of expressions modulo conversion. We have a quotient map Term(Γ, A) → Elem(Γ, A) and the main result (Theorem 4.1) is to show that this map has a section.
The metatheory used in the present note is the impredicative intuitionistic set theory IZFu ω , introduced by P. Aczel [Acz98]. (Essentially the same argument works in a predicative version CZFu ω for a predicative universe of proof-irrelevant propositions.) As in the previous work [Coq19], the approach is algebraic. We first define a general operation which associates to any model M another normalization model M * with a projection map M * → M . We apply then this general construction to the initial model to deduce various syntactical properties, such as normalization, decidability of conversion and type-checking.
1. What is a model of type theory 1.1. Definition. We present a formal system, which at the same time can be thought of describing the syntax of basic dependent type theory, with explicit substitutions and a name-free (de Bruijn index) presentation, and defining what is a model of type theory.
A model of type theory consists of one set Con of contexts. If Γ and ∆ are in Con they determine a set ∆ → Γ of substitutions. If Γ is in Con, it determines a set Type(Γ) of types in the context Γ. Finally, if Γ is in Con and A is in Type(Γ) then this determines a set Elem(Γ, A) of elements of type A in the context Γ.
This describes the sort of type theory. We describe now the operations and the equations they have to satisfy. For any context Γ we have an identity substitution id : Γ → Γ. We also have a composition operator σδ : Θ → Γ if δ : Θ → ∆ and σ : ∆ → Γ. The equations are We have a terminal context 1 and for, any context Γ, a map () : Γ → 1. Furthermore, σ = () if σ : Γ → 1.
The extension operation can then be defined as (σ, u) = [u]σ + . Thus instead of the extension operation, we could have chosen the operations [u] and σ + as primitive, like in [Ehr88]. Our argument is independent of this choice of primitive operations.
Finally we assume U 0 to be impredicative and types in U 0 to be proof-irrelevant. Impredicativity means that Π A B is in Type 0 (Γ) if B is in Type 0 (Γ.A) where A can be any type, and proof-irrelevance means that a 0 = a 1 : Elem(Γ, A) whenever A is in Type 0 (Γ) and a 0 and a 1 are in Elem(Γ, A).
We think of types in Type 0 (Γ) as proof-irrelevant propositions.
Note that, in an arbitrary model we may have some equality of the form 2 Π A B = U 0 and the operations, like product operations, don't need to be injective.

P. Aczel in [Acz98] provides a model in in a impredicative intuitionistic set theory IZFu ω , with intuitionistic versions of Grothendieck universes
A context is interpreted as a set in V ω , and Type(Γ) is interpreted by Γ → V ω . The lowest universe U 0 is interpreted by the set of truth values V 0 : the set of subsets of 1 = {0}. In order to interpret the fact that U 0 is closed by arbitrary products, P. Aczel introduces a non-standard encoding of dependent products, see [Acz98], which we use in building our normalization model (see Appendix). This encoding of dependent products M. Hofmann [Hof97] shows how to refine a presheaf model over an arbitrary small category to a model of type theory. It models universes, and if we use Aczel's encoding of dependent products, we also get a model where the lowest universe U 0 is interpreted by the presheaf of sieves. Using Aczel's non-standard encoding [Acz98] of dependent products mentioned above, we see that U 0 is closed by dependent products of families valued in U 0 . We write U 0 , U 1 , . . . for the universes corresponding to V 0 , V 1 , . . .
We will work in the last section with the initial or term model M 0 (see Appendix). This is the model where elements are syntactical expressions modulo equations/conversion rules. One important result which follows from the "normalization model" we present in the next section, is that equality is decidable for the initial model, and that constructors are injective; this means in particular that we cannot have an equality of the form U 0 = Π A B and that This injectivity property may not hold in general for an arbitrary model; for instance in the set model, we have ∅ A = ∅ for any non empty set A.

Normalization Model
We present a variation of the model used in [Coq19]. As in [Coq19], we work in a suitable presheaf topos, but with a slight variation for the choice of the base category. We start from an arbitrary model M .
2.1. Category of telescopes. As in [Coq19], we define first the collection of telescopes X, Y, Z, . . . . These are finite list and so on. Any telescope X has an interpretation ⟨X⟩ which is a context of the model M , We write () the empty telescope. If X is a telescope and A in Type⟨X⟩, we may write X.A for X, A.
We can now define the base category of the presheaf model. A map α : Y → S X is a syntactical object defined inductively. We have () : Y → S () and if we have already define α : Y → S X then we can either add a type to Y getting αp : Y, B → S X, or we can add a type to X, getting α + : Y, A⟨α⟩ → S X, A. We define at the same time ⟨()⟩ by the clauses: can be seen as a proof relevant witness that Y extends X (which was the relation used in [CG90]). It is direct to define a syntactical identity map id S : X → S X by induction on X so that ⟨id S ⟩ = id and to define a composition operation. We get in this way a category C of telescopes 3 .
We can also define a syntactic projection map p S : X.A → X such that ⟨p S ⟩ = p by induction on X. This category of syntactic extensions will be the base category C for the presheaf toposĈ in which we define the normalization model 4 .
2.2. Syntactic expressions. We introduce, for A in Type⟨X⟩, the set Term(X, A). This is a set of syntactical expressions. Contrary to the set Elem(⟨X⟩, A), these expressions are not quotiented up to conversion. Also the syntactical expressions don't use explicit substitutions and can be thought of as annotated λ-expressions.
The syntactical expressions are described by the following grammar K, L, k :: where v n are de Bruijn index. This forms a set with a decidable equality. We define then inductively for A in Type⟨X⟩ a subset Term(X, A) of this set of syntactical expressions. Each such set Term(X, A) is then also a set with a decidable equality. If k is in Term(X, A) we define by induction on k an element ⟨k⟩ in Elem(⟨X⟩, A). This can be thought of as the interpretation of the syntactical expression k. We can also see the map as a quotient map.
We have U n in Term(X, U l ) if n < l and ⟨U n ⟩ = U n .
We have v 0 in Term(X.A, Ap) and v n+1 in Term(X.A, Bp) if v n is in Term(X, B). We let ⟨v n ⟩ to be qp n and ⟨U l ⟩ = U l .
If K is in Term(X, U n ) and L in Term(X.⟨K⟩, U n ) then Π K L is in Term(X, U n ) and ⟨Π K L⟩ = Π ⟨K⟩ ⟨L⟩. If furthermore k ′ is in Term(X, ⟨Π K L⟩) and k in Term(X, ⟨K⟩) then app K L k ′ k is in Term(X, ⟨L⟩[⟨k⟩]) and then ⟨app K L k ′ k⟩ = ⟨k ′ ⟩ ⟨k⟩.
If K is in Term(X, U n ) and L in Term(X.⟨K⟩, U n ) and t is in Term(X.⟨K⟩, ⟨L⟩) then λ K L t is in Term(X, ⟨Π K L⟩) and ⟨λ K L t⟩ = λ ⟨t⟩.
If K is in Term(X, U l ) and l ≤ n then K is in Term(X, U n ).
One key addition to this notion of syntactical expressions, introduced in order to deal with proof-irrelevant propositions, is the special constant 0. We have 0 in Term(X, A) whenever A is in Type 0 (⟨X⟩) and Elem(⟨X⟩, A) is inhabited.
Since Elem(⟨X⟩, A) is a subsingleton we can define ⟨0⟩ to be any element u of Elem(⟨X⟩, A). Like in [Coq19], we need to define two subsets of Term(X, A), the subsets Norm(X, A) of normal terms and Neut(X, A) of neutral terms. These are defined inductively by the following clauses.
We have v 0 in Neut(X.A, Ap) and v n+1 in Neut(X.A, Bp) if v n is in Neut(X, B).
We have app K L k t in Neut(X, ⟨L⟩[⟨t⟩]) if K in Norm(X, U n ) and L in Norm(X.⟨K⟩, U n ) and k in Neut(X, ⟨Π K L⟩) and t in Norm(X, ⟨K⟩).
We have λ K L t in Norm(X, ⟨Π K L⟩[⟨t⟩]) if K in Norm(X, U n ) and L in Norm(X.⟨K⟩, U n ) and k in Neut(X, ⟨Π K L⟩) and t in Norm(X, ⟨K⟩).
We have Π K L in Norm(X, U n ) if K in Norm(X, U n ) and L in Norm(X.⟨K⟩, U n ).
We have K in Norm(X, U n ) if K is in Neut(X, U l ) and l ≤ n.
We have U l in Norm(X, U n ) if l < n.
We have 0 in Norm(X, K) if K is in Neut(X, U 0 ) and Elem(⟨X⟩, ⟨K⟩) is inhabited We have k in Norm(X, K) if K is in Neut(X, U n ) with n > 0 and k is in Neut(X, K).
As in [Hof97,Coq19], we freely use the notations of type theory for operations in the presheaf toposĈ. In this presheaf models we have a cumulative sequence of universe U n , for n = 0, 1, . . . , ω. Furthermore, as noticed above, U 0 inherits from V 0 the fact that it is closed by arbitrary products.
In this model, we have a family of types Type n (in the universe U 1 ) with families of types Elem(T ) and Term(T ) for T : Type n . We have two subtypes Norm(T ) and Neut(T ) of Term(T ). We also have an interpretation function Term(T ) → Elem(T ). Because of our choice of morphisms for the category of telescopes, each Term(T ) has (internally) a decidable equality. To each context Γ in M , we associate a presheaf |Γ| ofĈ by taking |Γ|(X) to be the set ⟨X⟩ → Γ, with restriction maps ρ → ρα = ρ⟨α⟩ for α : Y → S X.
Each This defines a pseudomorphism between the model M and the modelĈ. Given B in Type n (Γ.A), let us write C = Π A B in Type n (Γ). If ρ : |Γ| and w in Elem(|C|ρ) and u in Elem(|A|ρ) we can define w u in Elem(|B|(mk ρ u)), which is levelwise the application.
Proof. We prove the first point, the arguments for the two other points being similar. We have to define Π S K G in Term(X, U n ) such that ⟨Π S K G⟩ = Cρ. Here ρ is in ⟨X⟩ → Γ and K is in Norm(X, U n ) and such that ⟨K⟩ = Aρ. Furthermore, G is an operation such that Gα k is an element of Term(Y, U n ) satisfying ⟨Gα k⟩ = B(ρα, ⟨k⟩) for α : Y → X and k in Term(Y, Aρα) and satisfying (Gα k)α 1 = G(αα 1 ) (kα 1 ), for α 1 : Z → S Y .

Normalization model
3.1. Internal definitions. The first definitions are purely internal to the modelĈ.
For T in Type n , we define Type ′ n (T ) to be the set of 4-tuples (T ′ , K, q T , r T ) where 5 (1) T ′ is in Elem(T ) → U n , (2) K is in Norm(U n )|T , (3) q T , a "quote" function, is in Π u:Elem(T ) T ′ u → Norm(T )|u, (4) r T , a "reflect" function, is in Π k:Neut(T ) T ′ ⟨k⟩.
We define q Un A (A ′ , K, q A , r A ) = K.
For n > 0 and K in Neut(U n ) we define r Un K to be (K ′ , K, q K , r K ) where K ′ u is Norm(K)|u and q K u u ′ = u ′ and r K k = k.
For n = 0, and K in Neut(U n ), we define r Un K to be (K ′ , K, q K , r K ) where K ′ u is {0} and 6 q K u u ′ = 0 and r K k = 0.
3.2. The glued model for normalization. We can now define the normalization model M * , where a context is a pair Γ, Γ ′ where Γ is a context of M and Γ ′ is a dependent family over |Γ| in the modelĈ.
We define () ′ to be the constant family of constant presheaf {0}.
The set Type * n (Γ, Γ ′ ) is defined to be the set of pairs A, A where A is in Type M n (Γ) and A is a global element of An element of this type A, A is a pair a, a where a is in Elem M (Γ, A) and a is a global element of Π ρ:|Γ| Π ρ ′ :Γ ′ (ρ) Aρρ ′ .1(|a|ρ) We define U n = U n , Type ′ n , q Un , r Un and U * n is the pair U n , U n .
As in [Coq19], we define a new operation Π * (A, A) (B, B) = C, C where C = Π A B. We write (T ′ , K, q T , r T ) = Aρρ ′ in Type ′ n (|A|ρ) and for each u in Elem(|A|ρ) and u ′ in T ′ (u) we write in Type ′ n (|B|(mk ρ u)). We then define Cρρ ′ in Type ′ n (|C|ρ) to be the tuple where G is the function G k = F 0 ⟨k⟩(r T k) and g the function g k = q F ⟨k⟩(r T k)(w ⟨k⟩) (w ′ ⟨k⟩(r T k)).
We can check using Lemma 2.1 that R ′ , L, q R , r R is an element of Type ′ n (|C|ρ). We get in this way a new model M * with a projection map M * → M . For each context Γ of M 0 , we can hence compute, using this section, Γ ′ which is internally a dependent family over |Γ|. Externally, this is given by a family of sets Γ ′ (∆, ρ) for ρ : ∆ → Γ with restriction maps ρ ′ → ρ ′ α for α : ∆ 1 → S ∆.
For Γ = () we take 7 id ′ Γ = 0. If we have defined id ′ Γ in Γ ′ (Γ, id) and A is in Type(Γ), let ∆ = Γ.A. We have p : ∆ → Γ and p S : If furthermore a is in Elem(Γ, A) we define reify(a) in Norm(Γ, A) to be q A id id ′ a (a id id ′ ). We have ⟨reify(a)⟩ = a in Elem(Γ, A).
By mutual induction, we can show the following.
Lemma 4.6. If t is in Norm(Γ, A) then t = reify(⟨t⟩) and if k is in Neut(Γ, A) then r A id id ′ k = ⟨k⟩ id id ′ .
Corollary 4.8. The section map reify : Elem(Γ, A) → Term(Γ, A) is natural in Γ w.r.t. the morphisms in the telescope category C.
This implies that, in the presheaf modelĈ the interpretation map Term(T ) → Elem(T ) for T in Type has a section Elem(T ) → Term(T ). Furthermore, Norm(T ), which has internally a decidable equality, is isomorphic to Elem(T ).

Conclusion
This note can be seen as a weak "positive" complement of the "negative" result in [AC20], in the sense, that, in the absence of the problematic cast function analysed in [AC20], we do have normalization and decidability of conversion.
Our argument extends to the addition of dependent sum types with surjective pairing, or inductive types. In general, inductive types have to be declared in some universe U n with n > 0.
Note that it is possible to define the absurd proposition ⊥ in U 0 as Π X:U 0 X and to add the large elimination rule ⊥→ A for any type A while preserving decidability of equality.
A natural question is what happens if we consider a proof relevant impredicative type of propositions. In a companion paper, we show that the present technique extends also to this case.