40
THE GENERALISED TYPE-THEORETIC INTERPRETATION OF CONSTRUCTIVE SET THEORY NICOLA GAMBINO AND PETER ACZEL Abstract. We present a generalisation of the type-theoretic interpre- tation of constructive set theory into Martin-L¨ of type theory. The original interpretation treated logic in Martin-L¨ of type theory via the propositions-as-types interpretation. The generalisation involves replac- ing Martin-L¨ of type theory with a new type theory in which logic is treated as primitive. The primitive treatment of logic in type theories allows us to study reinterpretations of logic, such as the double-negation translation. Introduction The type-theoretic interpretation of Constructive Zermelo-Frankel set the- ory, or CZF for short, provides an explicit link between constructive set the- ory and Martin-L¨ of type theory [1, 2, 3]. This interpretation is a useful tool in the proof-theoretical investigations of constructive formal systems [17] and allows us to relate the set-theoretic and type-theoretic approaches to the development of constructive mathematics [5, 28, 32]. A crucial component of the original type-theoretic interpretation of CZF is the propositions-as-types interpretation of logic. Under this interpretation, arbitrary formulas of CZF are interpreted as types, and restricted formulas as small types. By a small type we mean here a type represented by an element of the type universe that is part of the type theory in which CZF is interpreted. The propositions-as-types representation of logic is used in proving the validity of three schemes of CZF, namely Restricted Separation, Strong Collection, and Subset Collection. Validity of Restricted Separation follows from the representation of restricted propositions as small types, while the validity of both Strong Collection and Subset Collection follow from the type-theoretic axiom of choice, that holds in the propositions-as- types interpretation of logic [28]. Another ingredient of the original type- theoretic interpretation is the definition of a type V, called the type of iterative sets, that is used to interpret the universe of sets of CZF. In this way, it is possible to obtain a valid interpretation of CZF in the Martin-L¨ of type theory ML 1 + W, which has rules for the usual forms of type, for a Date : October 12th, 2005. 2000 Mathematics Subject Classification. 03F25 (Relative consistency and interpreta- tions), 03F50 (Metamathematics of constructive systems). Key words and phrases. Constructive Set Theory, Dependent Type Theory. 1

THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETICINTERPRETATION OF CONSTRUCTIVE SET THEORY

NICOLA GAMBINO AND PETER ACZEL

Abstract. We present a generalisation of the type-theoretic interpre-tation of constructive set theory into Martin-Lof type theory. Theoriginal interpretation treated logic in Martin-Lof type theory via thepropositions-as-types interpretation. The generalisation involves replac-ing Martin-Lof type theory with a new type theory in which logic istreated as primitive. The primitive treatment of logic in type theoriesallows us to study reinterpretations of logic, such as the double-negationtranslation.

Introduction

The type-theoretic interpretation of Constructive Zermelo-Frankel set the-ory, or CZF for short, provides an explicit link between constructive set the-ory and Martin-Lof type theory [1, 2, 3]. This interpretation is a useful toolin the proof-theoretical investigations of constructive formal systems [17]and allows us to relate the set-theoretic and type-theoretic approaches tothe development of constructive mathematics [5, 28, 32].

A crucial component of the original type-theoretic interpretation of CZF isthe propositions-as-types interpretation of logic. Under this interpretation,arbitrary formulas of CZF are interpreted as types, and restricted formulasas small types. By a small type we mean here a type represented by anelement of the type universe that is part of the type theory in which CZFis interpreted. The propositions-as-types representation of logic is used inproving the validity of three schemes of CZF, namely Restricted Separation,Strong Collection, and Subset Collection. Validity of Restricted Separationfollows from the representation of restricted propositions as small types,while the validity of both Strong Collection and Subset Collection followfrom the type-theoretic axiom of choice, that holds in the propositions-as-types interpretation of logic [28]. Another ingredient of the original type-theoretic interpretation is the definition of a type V, called the type ofiterative sets, that is used to interpret the universe of sets of CZF. In thisway, it is possible to obtain a valid interpretation of CZF in the Martin-Loftype theory ML1 + W, which has rules for the usual forms of type, for a

Date: October 12th, 2005.2000 Mathematics Subject Classification. 03F25 (Relative consistency and interpreta-

tions), 03F50 (Metamathematics of constructive systems).Key words and phrases. Constructive Set Theory, Dependent Type Theory.

1

Page 2: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

2 GAMBINO AND ACZEL

type universe reflecting these forms of type, and for W-types (see Section 1for details).

Our first aim here is to present a new type-theoretic interpretation of CZF.The novelty lies in replacing the pure type theory like ML1 + W with a suit-able logic-enriched type theory. By a logic-enriched intuitionistic type theorywe mean an intuitionistic type theory like ML1 + W that is extended withjudgement forms that allow us to express, relative to a context of variabledeclarations, the notion of proposition and assertions that one propositionfollows from others. Logic-enriched type theories have a straighforward in-terpretation in their pure counterparts that is obtained by following thepropositions-as-types idea. When formulating logic-enriched type theoriesthat extend pure type theories with rules for a type universe, like ML1 + W,it is natural to have rules for a proposition universe to match the typeuniverse. Elements of the proposition universe should be thought of as rep-resentatives for propositions whose quantifiers range over small types.

The new interpretation generalises the original type-theoretic interpreta-tion in that logic is treated as primitive and not via the propositions-as-typesinterpretation. In particular, we will introduce a logic-enriched type theory,called ML(COLL), that has two collection rules, corresponding to the collec-tion axiom schemes of CZF. Within the type theory ML(COLL) we define atype V, called the type of iterative small classes, that can be used to interpretthe universe of sets of CZF. The particular definition of V allows us to provethe validity of Restricted Separation without assuming the propositions-as-types interpretation of logic, and the collection rules of ML(COLL) allowus to prove the validity of Strong Collection and Subset Collection. We willtherefore obtain a type-theoretic interpretation of CZF that does not relyon the propositions-as-types treatment of logic and in particular avoids anyuse of the type-theoretic axiom of choice.

A fundamental reason for the interest in the generalised interpretationis that it allows us to provide an analysis of the original interpretation.This is obtained by considering a logic-enriched type theory ML(AC + PU)with special rules expressing the axiom of choice and a correspondencebetween the proposition and type universes. These rules are valid underthe proposition-as-types interpretation, so that ML(AC + PU) can be in-tepreted in the pure type theory ML1 + W. Furthermore, the collectionrules of ML(COLL) follow from the special rules of ML(AC + PU), andtherefore it is possible to view the generalised interpretation of CZF as tak-ing place in ML(AC + PU). We then prove that the original interpretation ofCZF in ML1 + W can be seen as the result of composing the generalised in-terpretation of CZF in ML(AC + PU) followed by the propositions-as-typesinterpretation of ML(AC + PU) into ML1 + W.

Another goal of this paper is to describe how logic-enriched type theo-ries with collection rules, like ML(COLL), have a key advantage over logic-enriched type theories with the axiom of choice, like ML(AC + PU). Theadvantage is that the former can accomodate reinterpretations of their logic,

Page 3: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 3

while the latter cannot. We focus our attention on reinterpretations of logicas determined by a map j that satisfies a type-theoretic version of the prop-erties of a Lawvere-Tierney local operator in an elementary topos [21] or of anucleus on a frame [19]. We will call such a j a local operator, and the rein-terpretation of logic determined by it will be called the j-interpretation. Atypical example of such an operator is provided by double-negation. In ourdevelopment, we consider initially a subsystem ML(COLL−) of ML(COLL),and ML(COLL) at a later stage. There are two main reasons for doing so.A first reason is that the Strong Collection rule is sufficient to prove thebasic properties of j-interpretations. A second reason is that the StrongCollection rule is preserved by the j-interpretation determined by any lo-cal operator j, while the Subset Collection rule is not. In order to obtainthe derivability of the j-interpretation of the Subset Collection rule, we willintroduce a natural further assumption. These results allow us to definea type-theoretic version of the double-negation translation, which in turnleads to a proof-theoretic application.

The generalised type-theoretic interpretation is related to the study ofcategorical models for constructive set theories [7, 29, 30, 13]. Indeed, oneof our initial motivations was to study whether it was possible to obtaina type-theoretic version of the results in [30] concerning the interpretationof CZF in categories whose internal logic does not satisfy the axiom ofchoice. An essential difference, however, between the development presentedhere and the results in the existing literature on categorical models is thatthe interaction between propositions and types is more restricted in logic-enriched type theories than in categories when logic is treated assumingthe proposition-as-subobjects approach to propositions. In particular, logic-enriched type theories do not generally have rules that allow us to formtypes by separation, something that is instead a direct consequence of theproposition-as-subobjects representation of logic in categories [29, 30]. Thecategory-theoretic counterpart to the logic-enrichment of a pure dependenttype theory is roughly a first-order fibration over a category that is alreadythe base category of a fibration representing the dependent type theory. See,for example, [18, Chapter 11] or [22, 23].

Extensions of pure type theories that allow the formation of types byseparation have already been studied. One approach is via minimal typetheories [24, 39]. Minimal type theories may be understood as extensionsof logic-enriched type theories with extra rules asserting that each propo-sition represents a type, that is to be thought of as the types of proofs ofthe proposition. Using these rules and the standard rules for Σ-types ofthe underlying pure type theory, the formation of types by separation canbe easily obtained. Another approach is offered by the pure type theorieswith bracket types [6]. These are obtained by extending pure type theorieswith rules for a new form of type, called bracket type, that allows the repre-sentation of propositions as types with at most one element. This approachprovides essentially a type-theoretic version of the proposition-as-subobjects

Page 4: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

4 GAMBINO AND ACZEL

idea. In the development of the generalised type-theoretic interpretation wepreferred however to work within logic-enriched type theories, and avoid theassumption of extra rules allowing formation of types by separation. In thisrespect, the generalised type-theoretic interpretation presented here is moregeneral than the existing categorical models for CZF.

The results presented here are part of a wider research programme, orig-inally sketched in [4]. The present paper contributes to that programme intwo respects: first, by giving precise proofs of the results announced in [4]regarding the generalised type-theoretic interpretation of CZF and the rein-terpretations of logic, and secondly by presenting new results concerningthe analysis of the original type-theoretic interpretation via the generalisedone. We regard these new results as fundamental, since they show thatthe generalised intepretation allows us to gain further insight into the orig-inal intepretation. Section 6 contains an informal discussion of the overallresearch effort.

For the convenience of the reader, we present here a concise review of theaxiom system of CZF. For a discussion of the development of constructivemathematics in constructive set theories, see [5]. For proof-theoretical in-vestigations on constructive set theories we invite the reader to refer alsoto [10, 14, 20, 34, 35, 33, 36]. The axioms of CZF are presented below inan extension of the language of first-order logic with primitive restrictedquantifiers (∀x ∈ α) and (∃x ∈ α). The membership relation can then bedefined by letting

α ∈ β =def (∃x ∈ β)(x = α)A formula is said to be restricted if all the quantifiers in it are restricted.We use letters u, v, z, x, y, w, . . . for variables of the language, and greekletters α, β, γ, . . . to denote sets. Other greek letters are used to denoteformulas. For formulas φ and ψ, we write φ ⊃ ψ for their implication anddefine φ ≡ ψ =def (φ ⊃ ψ) ∧ (ψ ⊃ φ).

The axiom system of CZF includes both logical and set-theoretic axiomsand schemes. We will refer to axioms and schemes collectively as axiomschemes. The logical axioms schemes include the standard ones for intu-itionistic logic with equality and the following axiom schemes for restrictedquantifiers:

(∀x ∈ α)φ ≡ (∀x)(x ∈ α ⊃ φ) , (∃x ∈ α)φ ≡ (∃x)(x ∈ α ∧ φ)

The set-theoretic axiom schemes of CZF can be conceptually divided intothree groups: structural, basic set existence, and collection. The structuralaxiom schemes of CZF are Extensionality (1) and Set Induction (2).

(∀x)(x ∈ α ≡ x ∈ β) ⊃ (α = β) (1)

(∀x)((∀y ∈ x)φ[y/x] ⊃ φ

)⊃ (∀x)φ (2)

The Extensionality axiom asserts that if two sets have the same elements,then they are equal. The Set Induction scheme is the intuitionistic counter-part of the classical Foundation axiom, and it is formulated as a scheme in

Page 5: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 5

which φ is an arbitrary formula. The first basic set existence axioms of CZFare Pairing (3), Union (4), and Infinity (5).

(∃u)(∀x)(x ∈ u ≡ (x = α ∨ x = β)) (3)

(∃u)(∀x)(x ∈ u ≡ (∃y ∈ α)(x ∈ y)) (4)

(∃u)((∃x)(x ∈ u) ∧ (∀x ∈ u)(∃y ∈ u)(x ∈ y)) (5)

They are formulated as in classical set theory. A further basic set existencescheme of CZF is Restricted Separation. It is the scheme in (6), where θ isa restricted formula in which the variable u does not appear free.

(∃u)(∀x)(x ∈ u ≡ x ∈ α ∧ θ) (6)

The Restricted Separation scheme is a weakening of the classical schemeof Full Separation, obtained by limiting the kind of formulas allowed inthe scheme. To formulate the two collection schemes of CZF we use theabbreviation

(∀∃ x∈αy∈β )φ =def (∀x ∈ α)(∃y ∈ β)φ ∧ (∀y ∈ β)(∃x ∈ α)φ

where φ is an arbitrary formula. Note that in the formula

(∀∃ x∈αy∈β )φ

free occurrences of x and y in φ get bound by the operator (∀∃ x∈αy∈β ) . The

Strong Collection (7) and Subset Collection (8) schemes are given below.

(∀x ∈ α)(∃y)φ ⊃ (∃u)(∀∃ x∈αy∈u )φ (7)

(∃v)(∀z)[(∀x ∈ α)(∃y ∈ β)φ ⊃ (∃u ∈ v)(∀∃ x∈αy∈u )φ] (8)

Note that in the Subset Collection scheme (8) the formula φ may have freeoccurrences of z which get bound by the universal quantifier (∀z). TheStrong Collection scheme is a mild strengthening of the Collection scheme,needed in order to derive the Replacement scheme in a set theory withoutthe Full Separation scheme [10]. The Subset Collection scheme is instead aweakening of the Power Set axiom and a strengthening of Myhill’s Exponen-tiation axiom, which asserts that the class of functions between two sets isagain a set [31]. In [20] it is shown that, in the presence of axioms (1) – (7),the Subset Collection scheme is independent of the Exponentiation axiom.

Outline of the paper. A review of Martin-Lof pure type theories is presentedin Section 1, which also serves to fix the notation used in the reminder of thepaper, while the list of rules for the type theories used here is contained inAppendix A. Logic-enriched type theories are introduced in Section 2, wherewe also describe their propositions-as-types interpretation. In Section 3 wedefine the generalised type-theoretic interpretation of CZF. The relationshipbetween the original and the generalised type-theoretic interpretations isthen described in Section 4. Section 5 discusses the reinterpretations oflogic. The paper ends in Section 6 with conclusions and a perspective offuture work.

Page 6: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

6 GAMBINO AND ACZEL

1. Pure type theories

Standard pure type theories. A standard pure type theory has judge-ments of form (Γ) B, where Γ is a context consisting of a list of declarationsx1 : A1, . . . , xn : An of distinct variables x1, . . . , xn, and B has one of thefollowing forms.

A : type A = A′ : type a : A a = a′ : A (9)

For the context Γ to be well-formed it is required that the judgements

( )A1 : type (x1 : A1)A2 : type . . . (x1 : A1, . . . , xn−1 : An−1)An : type

are derivable. The well-formedness of the forms of judgement in (9) has otherpresuppositions: in a well-formed context Γ, the judgement A = A′ : typepresupposes that A : type and A′ : type, the judgement a : A presup-poses that A : type, and the judgement a = a′ : A presupposes that a : Aand a′ : A. In the rest of the paper we prefer to leave out the empty contextwhenever possible, so that ( ) A : type will be written simply as A : type.

Any standard type theory will have certain general rules for deriving well-formed judgements, each instance of a rule having the form

J1 · · · Jk

J

where J1, . . . , Jk, J are all judgements. In stating a rule of a standard typetheory it is convenient to suppress mention of a context that is common toboth the premisses and the conclusion of the rule. For example we write thereflexivity rule for type equality as just

A : type

A = A : typebut when we apply this rule we are allowed to infer (Γ) A = A : typefrom (Γ) A : type for any well-formed context Γ.

Martin-Lof type theory. We use ML to stand for a variant of Martin-Lof’s standard type theory without universes or W-types [28, 32]. We preferto avoid having any identity types. Also, rather than have finite types Nk

for all k = 0, 1, . . . we will just have them for k = 0, 1, 2 and use the notationO,1,2 for them. We do not assume binary sums as primitive but definethem. To do so, we allow dependent types to be defined by cases on 2 asfollows: under the assumption that A1 : type and A2 : type we allow theformation of R2(c, A1, A2) : type whenever c : 2. Furthermore there arerules stating that the judgements

R2(12, A1, A2) = A1 : type R2(22, A1, A2) = A2 : type

are derivable. Here 12 : 2 and 22 : 2 are the canonical elements of the type 2.This form of type allows us to define binary sums. For types A1 and A2 wedefine

A1 +A2 =def (Σz : 2)R2(z,A1, A2)

Page 7: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 7

Binary product and function types are defined as usual

A1 ×A2 =def (Σ : A1)A2 A1 → A2 =def (Π : A1)A2

Here and in the following the symbol indicates an anonymous bound vari-able. To fix notation let us also recall that there are derivable rules express-ing the first and second projection of an element of a Σ-type, as follows

c : (Σx : A)B

c.1 : A

c : (Σx : A)B

c.2 : B[c.1/x](10)

In summary, the primitive forms of type of ML are

O , 1 , 2 , R2(e,A1, A2) , (Σx : A)B , (Πx : A)B

Table 1 presents the raw syntax for the expressions of ML that we aregoing to use throughout the paper. For the convenience of the readers, thecomplete set of rules of ML is recalled in Appendix A.

Form of type Canonical expression Eliminating expressionO r0(e)1 01 r1(e, c)2 12, 22 r2(e, c1, c2)N 0, succ(e) rN(e, c, (x, y)d)

(Σx : A)B pair(a, b) split(e, (x, y)c)(Πx : A)B (λx : A)b app(f, a)

Table 1. Types and expressions of the ML type theory.

Wellfounded trees. Types of wellfounded trees, or W-types for short, playa crucial role in the intrerpretation of constructive set theories in dependenttype theories. Let us then briefly review the rules concerning this formof type. The formation rule and introduction rules for W-types are thefollowing

A : type (x : A) B : type

(Wx : A)B : type

a : A t : B[a/x] → (Wx : A)B

sup(a, t) : (Wx : A)BA canonical element sup(a, t) of W =def (Wx : A)B should be thought of asthe tree with a root labelled by sup(a, t). The branches departing from theroot are indexed by elements of B[a/x] with nodes labelled by the elementsapp(t, b) for b : B[a/x].

In the formulation of the elimination and computation rules, we suppressmention of the judgement (z : W ) C : type that is part of the premisses.Let (Γ) =def (x : A , u : B → W , v : (Πy : B)C[app(u, y)/z]) so that wecan write the elimination rule as

e : W (Γ) c : C[sup(x, u)/z]

rW(e, (x, u, v)c) : C[e/z]

Page 8: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

8 GAMBINO AND ACZEL

and the computation rule as

a : A t : B[a/x] →W (Γ) c : C[sup(x, u)/z]

rec(sup(a, t)) = c[a, t, (λy : B[a/x])rec(app(t, y))/x, u, v] : C[sup(a, t)/z]

where rec(e) =def rW(e, (x, u, v)c), for e : W .

Type universes. We will consider type theories that include rules for atype universe U of small types, or rather of representatives for small types.We adopt a slight variant of the so-called Tarski-style formulation of typeuniverses, that we now present. The type universe has formation rule

U : type

For each a : U, we write T(a) : type for the small type represented by a.Therefore, the elimination rule for the type universe is stated as

a : U

T(a) : type

The introduction and computation rules for the type universe express that Ureflects all the forms of type of ML. For example, to express that U reflectsthe type O we have the introduction rule

O : U

which has an associated computation rule asserting

T(O) = O : type

To reflect Σ-types, there is the introduction rule

a : U (x : T(a)) b : U

(Σx : a)b : Uand its associated computation rule

T((Σx : a)b) = (Σx : T(a)) T(b) : type

The complete set of rules for the type universe is given in Appendix A.Note that the symbol Σ appears both in the judgement (Σx : a)b : U andin the judgement (Σx : T(a)) T(b) : type. Similar notation is used to reflectthe type formation rules of ML in the type universe. Since the forms ofjudgement in which the same symbol appears are different, there is no reasonfor confusion.

We write MLW and ML1 for the type theories that are obtained from MLby adding rules for W-types and rules for a type universe, respectively. Thetype theory MLW1 is like ML1 except that the rules for the W-types areadded and the type universe U also reflects W-types. A particularly impor-tant role will be played in the following by the natural subtheory ML1 + Wof MLW1, which has W-types but they are not reflected in U. Many proof-theoretical results concerning these pure type theories are presented in [17].

Page 9: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 9

2. Logic-enriched type theories

Adding Predicate Logic. Given a standard pure type theory we mayconsider extending it with two additional forms of judgement (Γ) B, whereΓ should be a well-formed context as before, and B has one of the forms

φ : prop φ1, . . . , φm ⇒ φ

These judgements express, relative to the context (Γ), that φ is a propositionand that φ follows from φ1, . . . , φm, respectively. In the context Γ, the well-formedness of the judgement φ1, . . . , φm ⇒ φ presupposes that φi : prop(for i = 1, . . . ,m) and φ : prop. Using these new judgement forms it isstraightforward to add the standard formation and inference rules for theintuitionistic logical constants, i.e. the canonical true and false propositions>,⊥, the binary connectives ∧,∨,⊃ and the quantifiers (∀x : A), (∃x : A)for each type A. For example, the rules for the existential quantifier are asfollows.

A : type (x : A) φ : prop

(∃x : A) φ : prop

(x : A) φ : prop a : A φ[a/x]

(∃x : A)φ

(∃x : A)φ ψ : prop (x : A) φ⇒ ψ

ψ

The negation ¬φ of a proposition φ is defined by letting ¬φ =def φ ⊃ ⊥,and logical equivalence is expressed with the proposition

φ ≡ ψ =def (φ ⊃ ψ) ∧ (ψ ⊃ φ) (11)

where φ and ψ are propositions. As always, in the statement of formationrules we suppress a context that is common to the premisses and conclusion.In the inference rules we will also suppress a list of assumptions appearingon the left hand side of ⇒ in the logical premisses and conclusion of eachinference rule. Moreover we will write (Γ) φ rather than (Γ) ⇒ φ and just φrather than the judgement ⇒ φ.

Induction Rules. It is possible to extend a standard logic-enriched typetheory with additional non-logical rules to express properties of the variousforms of type. For example, it is natural to add a rule for mathematicalinduction to the rules concerning the type of natural numbers and thereare similar rules for the other inductive forms of type. For each inductivetype C of MLW, we have an induction rule of the form

(z : C) φ : prop e : C INDC

φ[e/z]where the correspondence between the form of C and the premisses INDC isdescribed in Table 2. Note that Π-types are absent from this correspondence,since they are not an inductive form of type.

Page 10: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

10 GAMBINO AND ACZEL

C INDC

O

1 φ[01/z]2 φ[12/z] , φ[22/z]N φ[0/z] , (x : N) φ[x/z] ⇒ φ[succ(x)/z]

(Σx : A)B (x : A, y : B) φ[pair(x, y)/z](Wx : A)B (x : A, u : B → C) (∀y : B)φ[app(u, y)/z] ⇒ φ[sup(x, u)/z]

Table 2. Inductive types and premisses of their induction rules.

The proposition universe. When adding logic to a standard pure typetheory T that includes ML1 it is natural to also add a proposition universe Pto match the type universe U. The formation rule for this type is

P : type

The rules for P express that elements of this type are to be thought of asrepresentatives for propositions whose quantifiers range over small types.Indeed, the elimination rule

p : P

τ(p) : propexpresses that each object p : P represents a proposition. To express thatthe false proposition has a representative in P we have the introduction rule

⊥ : PFor the type P it seems convenient to avoid the use of an equality form ofjudgement for propositions in order to express that P reflects logic. Insteadwe use logical equivalence as defined in (11). For example, the rule relativeto the false proposition is

τ(⊥) ≡ ⊥Similarly, existential quantification over small types is reflected in P withthe introduction rule

a : U (x : T(a)) p : P

(∃x : a)p : Pand the rule

τ((∃x : a)p) ≡ (∃x : T(a))τ(p)The set of rules for the proposition universe P is presented in Appendix A.

Some logic-enriched type theories. Given a pure type theory T, wewrite T + IL for the logic-enriched type theory that is obtained from Tby adding rules for predicate logic. We then write T + IL + IND for thelogic-enriched type theory that has induction rules for each of the formsof inductive type of T. When the pure type theory T includes ML1 then

Page 11: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 11

we write T + IL1 for the enrichment of T with intuitionistic predicate logicand also the rules for P, and T + IL1 + IND for its extension with inductionrules.

In the following we will be interested in an extension of the logic-enrichedtype theory ML1 + W + IL1 + IND, whose primitive forms of type are thefollowing.

O, 1, 2, N, R2(A1, A2, e), (Σx : A)B, (Πx : A)B (Wx : A)B , U, T(e) , PThere are predicate logic rules, induction rules for O, 1, 2, N, (Σx : A)Band (Wx : A)B, and rules for the type P. We will work informally in thelogic-enriched type theory ML1 + W + IL1 + IND in Section 3.

Propositions-as-types. The logic-enriched type theory ML + IL has astraightforward interpretation into the pure type theory ML that is ob-tained by following the propositions-as-types idea. Each induction rule canalso be justified under the propositions-as-types interpretation of logic byusing the elimination rule of the inductive type to which the induction ruleis associated. Furthermore, the derivability of the type-theoretic axiom ofchoice [28] implies that the rule

A : type (x : A) B : type (x : A, y : B) φ : prop

(∀x : A)(∃y : B)φ ⊃(∃u : (Πx : A)B

)(∀x : A)φ[app(u, x)/y]

(AC)

has a valid propositions-as-types interpretation in the pure type theory ML.Hence, the propositions-as-types interpretation reduces the logic-enrichedtype theory ML + IL + IND + AC to the pure type theory ML. An analo-gous result holds when we add rules for W-types on both sides.

The propositions-as-types idea extends to logic-enriched type theorieswith a proposition universe. The extension is obtained by interpretingthe proposition universe P as the type universe U, and representatives forsmall propositions as representatives for small types, again following thepropositions-as-types idea. The logic-enriched type theory ML1 + IL1 hasthen an interpretation into the pure type theory ML1. Since the rules forthe proposition universe P are completely analogous to the rules for the typeuniverse U it is possible to see that also the proposition

(∀p : P)(∃u : U)(τ(p) ≡ (∃ : T(u))>

)(PU)

is interpreted as an inhabited type by this extension of the propositions-as-types interpretation. As a consequence of these facts, the logic-enrichedtype theory ML(AC + PU) =def ML1 + W + IL1 + IND + AC + PU admitsan interpretation into the pure type theory ML1 + W. In Section 3 we willintroduce collection principles and show that the rules (AC) and (PU) allowus to derive them. The following lemma will be helpful to do so.

Lemma 2.1. Assuming (AC) and (PU) there exists t : P → U such that,for p : P, the judgement τ(p) ≡ (∃ : T(app(t, p))> is derivable.

Proof. To prove the claim, it is suffient to apply (AC) to (PU). �

Page 12: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

12 GAMBINO AND ACZEL

3. The generalised type-theoretic interpretation

Some notions of collection. Given a type A what is a collection of objectsof type A? We may consider three approaches to this question: logical,combinatorial, and hybrid. The logical approach is to take a collection tobe a class on A, i.e. a propositional function (x : A) φ : prop. The objectsof such a collection are the a : A such that φ[a/x] holds. By contrast thecombinatorial approach is to take a collection to be a family (x : I) b : Aindexed by a type I. This time the objects are the b[i/x] : A for i : I.Finally, the hybrid approach takes a collection to consist of a pair given bya family (x : I) b : A and a class (x : I) φ : prop on the index type I. Theobjects of such a collection are the b[i/x] : A for those i : I such that φ[i/x]holds.

A problem with each of these notions of collection is that we cannotgenerally expect there to be a type of all collections of objects of type Afor all types A. What we can expect is to be able to form types of smallcollections using the type and proposition universes. For example, the typeof small collections for the logical approach is given by

Cla(A) =def A→ PWe get the following types of small collections for the combinatorial andhybrid notions of small collection of objects of type A. We shall refer tothese types as the types of small families and of small subclasses of A,respectively:

Fam(A) =def (Σx : U)(T(x) → A) (12)Sub(A) =def (Σx : U)

((T(x) → P)× (T(x) → A)

)(13)

The properties of these types play an essential role in the developmentof the original and generalised type-theoretic interpretations of CZF, and itis therefore convenient to introduce some notation to manipulate efficientlytheir elements. We do so by exploiting the notation for projections of ele-ments of Σ-types as given in (10). Given α : Fam(A) define

el(α) =def α.1 : UWe will write el(α) : type to denote also the small type T(el(α)), associatedwith el(α) : U, since the judgement makes clear whether we are consideringa small type or the element in the type universe that represents it. We dealanalogously with the elements in type and proposition universes that wedefine below. For x : el(α), let

val(α, x) =def app(α.2, x) : A

Using the definitions introduced above, we can form propositions by quan-tifying over a small family, i.e. if (x : A) φ : prop and α : Fam(A) we candefine the propositions (∀x ∈ α)φ and (∃x ∈ α)φ as follows.

(∀x ∈ α) φ =def (∀x : el(α)) φ[val(α, x)/x] : prop(∃x ∈ α) φ =def (∃x : el(α)) φ[val(α, x)/x] : prop (14)

Page 13: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 13

In a similar way, it is possible to form elements of the proposition universeby quantifying over a small family. For (x : A) p : P we define

(∀x ∈ α) p =def (∀x : el(α)) p[val(α, x)/x] : P(∃x ∈ α) p =def (∃x : el(α)) p[val(α, x)/x] : P (15)

The notation introduced in (14) and (15) does not lead to confusion, sincethe rules for the proposition universe P imply that the judgements

(∀x ∈ α) τ(p) ≡ τ((∀x ∈ α)p

)(∃x ∈ α) τ(p) ≡ τ

((∃x ∈ α)p

) (16)

are derivable. We now develop an analogous system of abbreviations for thetype of small subclasses of a type, as defined in (13). For α : Sub(A) wedefine

el(α) =def α.1 : UFor x : el(α) we define

dom(α, x) =def app(α.2.1, x) : Pval(α, x) =def app(α.2.2, x) : A

For (x : A) φ : prop we define

(∀x ∈ α) φ =def (∀x : el(α)) (dom(α, x) ⊃ φ[val(α, x)/x]) : prop(∃x ∈ α) φ =def (∃x : el(α)) (dom(α, x) ∧ φ[val(α, x)/x]) : prop (17)

Finally, for (x : A) p : P we define

(∀x ∈ α) p =def (∀x : el(α)) (dom(α, x) ⊃ p[val(α, x)/x]) : P(∃x ∈ α) p =def (∃x : el(α)) (dom(α, x) ∧ p[val(α, x)/x]) : P (18)

Judgements analogous to those in (16) are easily derivable, so that the def-initions in (17) and (18) are compatible.

Separation in type theory. The set theory CZF, like the systems ofclassical axiomatic set theory, allows the formation of sets of sets of setsof . . . but does not allow non-well-founded sets. So to interpret the universeof sets of CZF as a type in type theory we need a type of iterative setsobtained by inductively iterating some notion of ‘set of’. When we use thecombinatorial approach to interpret the notion of ‘set of’ there is a problemwith the justification of the Restricted Separation scheme of CZF if we wishto avoid the propositions-as-types representation of logic. The problem canbe explained as follows. In CZF, for a set α and a restricted formula θ,Restricted Separation, as stated in (6), asserts that there is a set γ suchthat (∀x)

(x ∈ γ ≡ (x ∈ α ∧ θ)

). It is then straightforward to see that for a

formula φ the following sentences are provable in CZF.

(∀x ∈ γ) φ ≡ (∀x ∈ α) (θ ⊃ φ)(∃x ∈ γ) φ ≡ (∃x ∈ α) (θ ∧ φ) (19)

An analogous fact holds in the logic-enriched type theory ML(AC + PU).Given α : Fam(A) and (x : A) p : P, let θ =def τ(p) for x : el(α).

Page 14: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

14 GAMBINO AND ACZEL

We can then define γ : Fam(A) such that for (x : A) φ : prop the fol-lowing judgements, corresponding to the sentences in (19), are derivable inML(AC + PU)

(∀x ∈ γ) φ ≡ (∀x ∈ α) (θ ⊃ φ)(∃x ∈ γ) φ ≡ (∃x ∈ α) (θ ∧ φ)

The reason is that in ML(AC + PU) it is possible to prove the existence ofa function t : P → U as in Lemma 2.1, and so to define γ : Fam(A) suchthat

el(γ) = (Σx : el(α)) app(t, p[val(α, x)/x]) : U (20)and

val(γ, z) = val(α, z.1) : A (21)for z : el(γ). But without the assumption of (AC) and (PU), the proof ofLemma 2.1 cannot be carried out. To overcome this difficulty we adopt thehybrid notion of small collection instead of the combinatorial one. Note thatthe purely logical notion of small collection cannot be used to get any kindof iterative notion of set essentially because Cla(A) is not positive in A. Soit seems that the use of the hybrid notion is the natural way to incorporatethe necessary logical ingredient in the notion of small collection. We aretherefore led to study the properties of small subclasses of a type.

Small subclasses. To define explicitly small subclasses of a type A it willbe convenient to adopt the following convention. For derivable judgementsof the form a : U, (x : T(a)) p : P, and (x : T(a)) t : A, we will define anelement of Sub(A) by saying that it is the small subclass γ such that

el(γ) = T(a) : type (22)

and that, for x : T(a), the judgements

dom(γ, x) ≡ τ(p)val(γ, x) = t : A (23)

are derivable. Note that if γ = δ : Sub(A), where

δ =def pair(a,pair((λx : T(a))p, (λx : T(a))t)) : Sub(A)

then the judgements in (22) and (23) can actually be derived. We beginour discussion of set-theoretic constructs with the empty set. Recalling thatT(O) = O : type, we define

∅A : Sub(A)to be the small subclass γ of A such that el(γ) = O : type and, for x : O,the judgements dom(γ, x) ≡ ⊥ and val(γ, x) = r0(x) : A are derivable.

Lemma 3.1. There exists γ : Sub(A) such that the judgements

(∀x ∈ γ) φ ≡ >(∃x ∈ γ) φ ≡ ⊥

are derivable.

Page 15: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 15

Proof. Let γ = ∅A : Sub(A). The required conclusion follows directly by thedefinition of quantification over small subclasses in (17). �

To introduce the pairing operation, let us recall that T(2) = 2 : type.For a1, a2 : A we can then define

{a1, a2} : Sub(A)

as the small subclass γ of A such that el(γ) = 2 : type and, for x : 2, thejudgements dom(γ, x) ≡ > and val(γ, x) = r2(x, a1, a2) : A are derivable.The properties of this operation are stated in the next lemma.

Lemma 3.2. Let a1, a2 : A. There exists γ : Sub(A) such that

(∀x ∈ γ) φ ≡ φ[a1/x] ∧ φ[a2/x](∃x ∈ γ) φ ≡ φ[a1/x] ∨ φ[a2/x]

are derivable.

Proof. Let γ = {a1, a2} : Sub(A). Unfolding the definition of quantificationover γ, we derive the following judgement.

(∀x ∈ γ) φ ≡ (∀x : 2) φ[r2(a1, a2, x)/x]

Now, note that the following holds.

(∀x : 2) φ[r2(a1, a2, x)/x] ≡ φ[a1/x] ∧ φ[a2/x]

The left-to-right implication is obtained with the ∀-elimination, and theright-to-left implication follows by the 2-induction rule. We have thereforeobtained that (∀x ∈ γ) φ is equivalent to φ[a1/x] ∧ φ[a2/x] as required. Wecan derive the equivalence between (∃x ∈ γ) φ and φ[a1/x] ∨ φ[a2/x] withan analogous reasoning: first unfold the definitions of restricted quantifiers,then use the 2-induction rule and the ∨-elimination rule. �

As a special case of the pairing operation defined above, we obtain thedefinition of singletons. For a : A, we define

{a} =def {a, a} : Sub(A)

Lemma 3.3. Let a : A. There exists γ : Sub(A) such that the judgements

(∀x ∈ γ) φ ≡ φ[a/x](∃x ∈ γ) φ ≡ φ[a/x]

are derivable.

Proof. Let γ =def {a} : Sub(A). The proofs of the claims follow directlyfrom Lemma 3.2. �

Let Sub2(A) =def Sub(Sub(A)). For α : Sub2(A) we define⋃α : Sub(A)

Page 16: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

16 GAMBINO AND ACZEL

as the small subclass γ of A such that el(γ) = (Σy : el(α)) el(val(α, y)) and,for z : el(γ), the judgements

dom(γ, z) ≡ dom(α, z.1) ∧ dom(val(α, z.1), z.2)

val(γ, z) = val(val(α, z.1), z.2) : A

are derivable. The next lemma shows that this operation has the propertiesof the set-theoretic union.

Lemma 3.4. Let α : Sub2(A). There exists γ : Sub(A) such that thejudgements

(∀x ∈ γ) φ ≡ (∀y ∈ α)(∀x ∈ y) φ(∃x ∈ γ) φ ≡ (∃y ∈ α)(∃x ∈ y) φ

are derivable.

Proof. Let γ =⋃α : Sub(A). By the computation rules for Σ-types we

obtain that for y : el(α) and x : el(val(α, y))

val(γ,pair(x, y)) = val(val(a, y), x) : A

holds. We want to show that (∀x ∈ γ)φ is equivalent to (∀y ∈ α)(∀x ∈ y)φ.It is convenient to consider ψ =def (∀z : el(γ)) dom(γ, z) ⊃ φ[val(γ, z)/x].Let θ =def dom(α, y) : prop, η =def dom(val(α, y), x) : prop, for y : el(α)and x : el(val(α, y)), and consider

ξ =def (∀y : el(α))(∀x : el(val(α, y))) (θ ∧ η ⊃ φ[val(γ,pair(x, y))/x]) .

We claim that (∀x ∈ α)φ ≡ ψ ≡ ξ ≡ (∀y ∈ a)(∀x ∈ y)φ holds, which wouldgive us the desired result. The first equivalence follows by simply unfoldingthe definitions, ψ implies ξ by the ∀-elimination rule and ξ implies ψ by theΣ-induction rule, and the third equivalence is a consequence of predicatelogic rules. The proof of the claim involving the existential quantifier followsthe same pattern of reasoning. �

To define a separation operation we exploit essentially that we are assum-ing the hybrid approach to the problem of representing the notion of a smallcollection of elements of a type. Let α : Sub(A) and (x : A) p : P. We define

{x ∈ α | p } : Sub(A)

as the small subclass γ of A such that el(γ) = el(α) : type and, for x : el(α),the judgements dom(γ, x) ≡ dom(α, x) ∧ τ(p) and val(γ, x) = val(α, x) : Aare derivable.

Lemma 3.5. Let α : Sub(A) and (x : A) p : P. There exists γ : Sub(A)such that the judgements

(∀x ∈ γ)φ ≡ (∀x ∈ α)(τ(p) ⊃ φ)(∃x ∈ γ)φ ≡ (∃x ∈ α)(τ(p) ∧ φ)

are derivable.

Page 17: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 17

Proof. If γ = {x ∈ α | p} : Sub(A) then it holds that

(∀x ∈ γ)φ ≡ (∀x : el(α))((

dom(α, x) ∧ τ p[val(α, x)/x])⊃ φ[val(α, x)/x]

)The rules of predicate logic imply that the right-hand side in the aboveequivalence is in turn equivalent to (∀x ∈ α)(τ(p) ⊃ φ) as required. Theproof of the statement involving existential quantification is analogous. �

The next definition introduces a type-theoretic analog of the construc-tions allowed by the Replacement axiom of set theory [5]. For A,B : type,α : Sub(A) and (x : A) b : B, define

{b | x ∈ α} : Sub(B)

as the small subclass β of B such that el(β) = el(α) : type and, for x : el(α),the judgements dom(β, x) ≡ dom(α, x) and val(β, x) = b[val(α, x)/x] : Bare derivable.

Lemma 3.6. Let α : Sub(A), (x : A) b : B and (y : B) ψ : prop. Thereexists β : Sub(B) such that the judgements

(∀y ∈ β)ψ ≡ (∀x ∈ α)ψ[b/y](∃y ∈ β)ψ ≡ (∃x ∈ α)ψ[b/y]

are derivable.

Proof. First of all, observe that we can assume that x is not a free variablein ψ. Let β =def {b | x ∈ α} : Sub(B), By unfolding definitions andperforming the appropriate substitutions we can derive that (∀y ∈ β)ψ islogically equivalent to

(∀y : el(α))(dom(α, y) ⊃ ψ[b[val(α, y)/x]/y])

and this is in turn equivalent to (∀x ∈ α)ψ[b/y], since we assumed that x isnot a free variable in ψ. The statement involving existential quantificationcan be proved in a similar way. �

We conclude this series of lemmas by transferring to logic-enriched typetheories a familiar fact of constructive set theories: the correspondence be-tween the class of subsets of a singleton set and restricted sentences, asdiscussed in [5] and [12, Section 2.3]. In logic-enriched type theories the roleof the class of all subsets of a singleton set is played by the type of smallsubclasses of the type 1 and the role of restricted sentences is played byelements of P. Define

ext(p) : Sub(1)as the small subclass γ of 1 such that el(γ) = 1 : type and, for x : 1, thejudgements dom(γ, x) ≡ τ(p) and val(γ, x) = x : 1 are derivable.

Lemma 3.7. Let p : P and ψ : prop. There is γ : Sub(1) such that thejudgements

(∀ ∈ γ) ψ ≡ τ(p) ⊃ ψ

(∃ ∈ γ) ψ ≡ τ(p) ∧ ψ

Page 18: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

18 GAMBINO AND ACZEL

are derivable.

Proof. Let γ = ext(p) : Sub(1). The conclusion then follows by unfoldingthe definitions. �

We now formulate the collection rules for small subclasses. GivenA : type,B : type, and (x : A, y : B)φ : prop, for α : Sub(A) and β : Sub(B) we define

(∀∃ x∈αy∈β )φ =def (∀x ∈ α) (∃y ∈ β)φ ∧ (∀y ∈ β) (∃x ∈ α)φ : prop

The Strong Collection rule isA,B : type α : Sub(A) (x : A, y : B) φ : prop

(∀x ∈ α)(∃y : B)φ ⇒ (∃v : Sub(B))(∀∃ x∈αy∈v )φ

and the Subset Collection rule isA,B,C : type α : Sub(A) β : Sub(B) (x : A, y : B, z : C) φ : prop

(∃u : Sub2(B))(∀z : C)((∀x ∈ α)(∃y ∈ β)φ ⊃ (∃v ∈ u)(∀∃ x∈α

y∈v ) φ)

We will show in Section 4 that these rules are derivable under the proposi-tions-as-types interpretation of logic. We write ML(COLL) for the extensionof the logic-enriched type theory ML1 + W + IL1 + IND obtained by addingthe Strong Collection and the Subset Collection rules. Recalling that CZF−

is the subsystem of CZF obtained from CZF by leaving out the SubsetCollection axiom scheme, and that in CZF− it is not possible to derive theExponentiation axiom, asserting that the class of functions from a set to aset is again a set [20], it is natural to define ML(COLL−) as the type theoryobtained from ML(COLL) by omitting the Subset Collection rule and therules reflecting Π-types in the type universe.

Iterative small classes. Let us begin by defining the type

V =def

(Wz : (Σx : U)(T(x) → P)

)T(z.1)

A canonical element of V has form sup(pair(a, p), f) : V where a : U, p :T(a) → P and f : T(a) → V. Such an object can be thought of as the ‘setof’ app(f, x) : V for x : T(a) such that τ(app(p, x)) holds. We will refer tothe elements of this type as iterative small classes. As usual, it is convenientto introduce some explicitly defined expressions. We define, for α : Sub(V)

set(α) =def sup(pair(α.1, α.2.1), α.2.2) : Vand, for α : V

sub(α) =def rW(α, (u, v) pair(u.1,pair(u.2, v)) : Sub(V)

Observe that there is a correspondence between elements of V and elementsof Sub(V). The next lemma shows a first property of this correspondence.

Lemma 3.8. For a : U, p : T(a) → P, and f : T(a) → V the judgements

set(pair(a,pair(p, f))) = sup(pair(a, p), f) : Vsub(sup(pair(a, p), f) = pair(a,pair(p, f)) : Sub(V)

Page 19: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 19

are derivable.

Proof. The judgements follow from the computation rules for W-types andΣ-types. �

Lemma 3.9. For (x : V) φ : prop and (y : Sub V) ψ : prop the judgements

(∀x : V)φ ≡ (∀y : Sub(V))φ[set(y)/x](∃x : V)φ ≡ (∃y : Sub(V))φ[set(y)/x]

are derivable.

Proof. To prove the judgement

(∀x : V)φ ≡ (∀y : Sub(V))φ[set(y)/x]

we consider

ψ =def (∀x : U)(∀y : T(x) → P)(∀z : T(x) → V)φ[sup(pair(x, y), z)/x]

We show that

(∀x : V)φ ≡ ψ ≡ (∀y : Sub(V))φ[set(y)/x] (24)

The first equivalence in (24) can be proved as follows: the left-to-right impli-cation is proved with the ∀-elimination rule, while the right-to-left is provedby W-induction. The second equivalence in (24) can instead be obtained aswe describe now. The left-to-right implication is a consequence of the Σ-induction rule, while the right-to-left implication follows by the ∀-eliminationrule and Lemma 3.8. �

We introduce versions of quantification over iterative small classes usingLemma 3.8 and the definitions expressing quantification over a small subclassof a type in (17) and (18). For α : V, and (x : V)φ : prop we define

(∀x ∈ α)φ =def (∀x ∈ sub(α))φ : prop(∃x ∈ α)φ =def (∃x ∈ sub(α))φ : prop

and, for (x : V) p : P, we let

(∀x ∈ α)p =def (∀x ∈ sub(α))p : P(∃x ∈ α)p =def (∃x ∈ sub(α))p : P

Again, these definitions can easily be shown to be compatible.We now want to apply a special instance of the elimination rule for the

W-type V of iterative small classes and define a type-theoretic counterpartto the set-theoretic extensional equality relation. To do so, let us introducesome auxiliary definitions. Define A =def (Σx : U)(T(x) → P) and, for u : A,let

B =def T(u.1) → PC =def T(u.1) → (V → P)

and finally D =def V → P. For u : A, z : B, and w : C we can then define

g =def (λv : V)(g1 ∧ g2) : D

Page 20: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

20 GAMBINO AND ACZEL

where, for v : V we let

g1 =def (∀x : u.1) app(u.2, x) ⊃ (∃y ∈ v) app(app(w, x), y) : Pg2 =def (∀y ∈ v)(∃x : u.1) app(u.2, x) ∧ app(app(w, x), y) : P

We can then apply the following instance of the elimination rule for VD : type (u : A, z : B,w : C) g : D α : V

rW(α, (u, z, w)d) : Dand define

α≈β =def app(rW(α, (u, z, w)g), β) : P (25)for α, β : V.

Lemma 3.10. For α, β : V the judgement

α≈β ≡ (∀∃ x∈αy∈β ) x≈y

is derivable.

Proof. The proof involves unfolding the appropriate definitions and applyingthe computation rule for the W-type V of iterative small classes. �

Sets-as-trees. We now define the generalized type-theoretic interpretationof CZF. Recall from the introduction that we are assuming that CZF isformulated in a language L with equality and primitive restricted quantifiers,in which the membership relation is defined. Let us also assume that thesymbols for variables for sets of CZF coincide with the symbols for variablesof type V. We define two interpretations. The first is indicated with J·K andapplies to arbitrary formulas. The second is indicated with L·M and appliesonly to restricted formulas. Both interpretations are defined in Table 3,where ? is ∧, ∨ or ⊃, and ∇ is ∀ or ∃.

Jx = yK =def x≈y Lx = yM =def x≈yJφ1 ? φ2K =def Jφ1K ? Jφ2K Lθ1 ? θ2M =def Lθ1M ? Lθ2M

J(∇x ∈ α)φK =def (∇x ∈ α)JφK L(∇x ∈ α)θM =def (∇x ∈ α)LθMJ(∇x)φK =def (∇x : V)JφK

Table 3. Interpretation of the language of CZF.

Lemma 3.11. Let θ, φ be formulas of L with free variables x1, . . . , xn, andassume that θ is restricted. Then the judgements

(x1 : V, . . . , xn : V) JφK : prop(x1 : V, . . . , xn : V) LθM : P(x1 : V, . . . , xn : V) τLθM ≡ JθK

are derivable.

Proof. Reasoning by structural induction suffices to prove the claim. �

Page 21: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 21

Definition 3.12. A formula φ of L with free variables x1, . . . , xn will besaid to be valid if the judgement

(x1 : V, . . . , xn : V) JφK

is derivable. We say that the generalized type-theoretic interpretation of CZFis valid if each axiom scheme is valid.

We begin by establishing that the logical axioms of CZF are valid.

Lemma 3.13. Let (x : V) φ : prop and α, β : V. Then the judgement

Jφ[α/x]K ∧ Jα = βK ⊃ Jφ[β/x]K

is derivable.

Proof. The claim follows by structural induction on φ. �

Given Lemma 3.13, the predicate logic rules imply that all the logicalaxioms for CZF, and in particular the ones regarding restricted quantifiers,are valid. The next lemma takes care of the structural axioms of CZF.

Lemma 3.14. Extensionality and Set Induction are valid.

Proof. Validity of Extensionality follows from Lemma 3.10. Validity of SetInduction is a consequence of the induction rule for the W-type V of iterativesmall classes. �

Lemma 3.15. Pairing, Union, Infinity and Restricted Separation are valid.

Proof. Lemma 3.2 helps us to prove validity of Pairing. Let α, β : V anddefine γ =def set({α, β}) : V. By Lemma 3.2 we have

(∀x ∈ γ)(x≈α ∨ x≈β) ≡ (∀x ∈ {α, β})(x≈α ∨ x≈β)≡ (α≈α ∨ α≈β) ∧ (β≈α ∨ β≈β)

Similarly we get

α ∈ γ ∧ β ∈ γ ≡ (∃x ∈ {α, β})(x≈α) ∧ (∃x ∈ {α, β})(x≈β)≡ (α≈α ∨ α≈β) ∧ (β≈α ∨ β≈β)

as required. Soundness of Union follows in a similar way from Lemma 3.4.For Infinity we exploit Lemma 3.1 and Corollary 3.3. We let ω : Sub(V)be the small subclass of V such that el(ω) = N : type, and for n : N, thejudgements dom(ω, n) ≡ > and

val(ω, n) = rN(n, set(∅V), (x, y) set({y})) : Vare derivable, where we used the elimination rule for the type N given inAppendix A. It is immediate to see that set(ω) : V can be used to showthe soundness of Infinity. Validity of Restricted Separation follows fromLemma 3.5. �

The collection rules for small subclasses that are part of ML(COLL) allowus to prove the validity of all the instances of the collection axiom schemesof CZF.

Page 22: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

22 GAMBINO AND ACZEL

Lemma 3.16. Strong Collection and Subset Collection are valid.

Proof. The interpretation of each instance of these axiom schemes can beproved from a suitable instance of the corresponding type-theoretic ruleusing the correspondence between V and Sub(V). �

These results provide a proof of our first main result.

Theorem 3.17. The logic-enriched type theory ML(COLL) proves that thegeneralised type-theoretic interpretation of CZF in (V,≈) is valid.

4. An analysis of the original type-theoretic interpretation

The original interpretation of CZF in the type theory ML1 + W can beviewed as taking place in two steps: an interpretation of CZF in the logic-enriched type theory ML(AC + PU) followed by the propositions-as-typesinterpretation of ML(AC + PU) in ML1 + W. The generalised interpreta-tion of CZF presented in Section 3 is concerned with a strengthening of theinterpretation of CZF into ML(AC + PU) so as to interpret CZF in the logic-enriched type theory ML(COLL) obtained from ML1 + W + IL1 + IND byadding two type-theoretic collection principles corresponding to the two col-lection principles of CZF. In this section we describe how the interpretationsof CZF in ML(COLL) and in ML(AC + PU) are related. In particular, wewill prove that the two type-theoretic collection principles can be derived inML(AC + PU) so that the new interpretation is indeed a refinement of theold one.

The interpretation of CZF in the logic-enriched type theory ML(AC + PU)assumes the combinatorial notion of small collection, as discussed in Sec-tion 3, to interpret the notion of ‘set of’. We will therefore refer to thisinterpretation as the combinatorial interpretation of CZF. The combinato-rial approach leads naturally to the use of the type V =def (Wx : U) T(x)to interpret the universe of sets of CZF. Indeed, for each small collectionpair(a, f) : Fam(V), there is sup(a, f) : V. Each formula φ of CZF with freevariables x1, . . . , xn is then interpreted as JφK such that the judgement

(x1 : V, . . . , xn : V) JφK : prop

can be derived, and each restricted formula θ with free variables x1, . . . , xn

is interpreted as LθM such that the judgements

(x1 : V, . . . , xn : V) LθM : P

and(x1 : V, . . . , xn : V) τLθM ≡ JθK

can be derived. The validity of the axioms of CZF under the original type-theoretic interpretation relies on the properties of the types of small familiesof objects. We isolate the relevant properties below, but we prefer to avoidgiving detailed proofs, since we have presented detailed proofs of the corre-sponding statements for small subclasses in Section 3.

Page 23: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 23

Small families. The next lemma states that small families support thedefinition of some basic set-theoretical constructs: the empty set, pairing,and union.

Lemma 4.1. Let A : type and (x : A) φ : prop.

(i) There exists γ : Fam(A) such that the judgements

(∀x ∈ γ) φ ≡ >(∃x ∈ γ) φ ≡ ⊥

are derivable.(ii) Let a1, a2 : A. There exists γ : Fam(A) such that the judgements

(∀x ∈ γ) φ ≡ φ[a1/x] ∧ φ[a2/x](∃x ∈ γ) φ ≡ φ[a1/x] ∨ φ[a2/x]

are derivable.(iii) Let α : Fam2(A), where Fam2(A) = Fam(Fam(A)). There exists γ :

Fam(A) such that the judgements

(∀x ∈ γ) φ ≡ (∀y ∈ α)(∀x ∈ y) φ(∃x ∈ γ) φ ≡ (∃y ∈ α)(∃x ∈ y) φ

are derivable.

Proof. The proofs of the three parts of the Lemma are analogous to the onesof Lemma 3.1, Lemma 3.2, and Lemma 3.4 respectively. �

The previous lemma states the key facts needed to obtain the validityof Pairing and Union in the original type-theoretic interpretation. As wediscussed in Section 3 it is necessary to assume the rule (PU) in order toobtain a version of Restricted Separation when the combinatorial notion ofsmall collection is assumed.

Lemma 4.2. Let A : type, α : Fam(A) and (x : A) p : P. Assuming (PU)there exists γ : Fam(A) such that, for (x : A) φ : prop, the judgements

(∀x ∈ γ) φ ≡ (∀x ∈ α)(τ(p) ⊃ φ)(∃x ∈ γ) φ ≡ (∃x ∈ α)(τ(p) ∧ φ)

can be derived.

Proof. The definition of the appropriate γ : Sub(A) is given in (20) and (21).The required judgements follow by unfolding the relevant definitions. �

The type-theoretic axiom of choice is crucial to prove the validity of thetwo collection schemes of CZF in the original type-theoretic interpretation.Indeed, the rule (AC) allows us to prove the next lemma, from which thetwo collection rules concerning small families follow easily.

Page 24: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

24 GAMBINO AND ACZEL

Lemma 4.3. Assuming (AC), the rulesα : Fam(A) B : type (x : A, y : B) φ : prop

(∀x ∈ α)(∃y : B) ⇒ (∃f : el(α) → B)(∀x ∈ α)φ[app(f, x)/y]and

α : Fam(A) β : Fam(B) (x : A, y : B) φ : prop

(∀x ∈ α)(∃y ∈ β)φ⇒ (∃f : el(α) → el(β))(∀x ∈ α)φ[val(β, app(f, x))/y]are derivable.

For types A and B, α : Fam(A) and β : Fam(B) and (x : A, y : B) φ : propwe define

(∀∃ x∈αy∈β ) φ =def (∀x ∈ α)(∃y ∈ β)φ ∧ (∀y ∈ β)(∃x ∈ α)φ : prop

We can now obtain the collection rules for small families. These rules areformulated just like those rules for small collections presented in Section 3.

Proposition 4.4. Assuming (AC), the rulesA,B : type α : Fam(A) (x : A, y : B) φ : prop

(∀x ∈ α)(∃y : B)φ⇒ (∃v : Fam(B))(∀∃ x∈ay∈v )φ

andA,B,C : type α : Fam(A) β : Fam(B) (x : A, y : B, z : C) ψ : prop

(∃u : Fam2(B))(∀z : C)((∀x ∈ α)(∃y ∈ β)ψ ⊃ (∃v ∈ u)(∀∃ x∈α

y∈v ) ψ)

are derivable.

Proof. To derive the Strong Collection rule for small families, let us assumethat (∀x ∈ α) (∃y : B)φ holds. By Lemma 4.3 there is f : el(α) → B suchthat (∀x ∈ α) φ[app(f, x)/y] holds. Once we define

β =def pair(el(α), f) : Fam(B)

it is straightforward to show that (∀∃ x∈αy∈β ) φ holds, as required.

We now derive the Subset Collection rule for small families. Let z : Cand assume (∀x ∈ α)(∃y ∈ β)φ. An application of Lemma 4.3 shows thatthere is f : el(α) → el(β) such that

(∀x ∈ el(α))φ[val(β, app(f, x))/y]

holds. Define

β′ =def pair(el(α), (λx : el(α)) val(β, app(f, x))) : Fam(B)

We define an element δ : Fam2(B), independent of φ and z : C, such thatel(δ) = el(α) → el(β) : U and, for k : el(α) → el(β)

val(δ, k) = pair(el(α), (λx : el(α)) val(β, app(k, x)))) : Fam(B)

Observe that f : el(α) → el(β) and val(δ, f) = β′ : Fam(B). We havetherefore obtained δ : Fam2(B) such that

(∃v ∈ δ)(∀∃ x∈αy∈v )φ

Page 25: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 25

holds, as required. �

The interpretation of CZF in ML(AC + PU) can now be developed anal-ogously to the generalised type-theoretic interpretation of Section 3, exceptthat we use the type V =def (Wx : U) T(x) instead of the type V to inter-pret the universe of sets of CZF. Let us sketch the general outline of thisinterpretation. First, it is necessary to develop the appropriate notation toexpress quantification over an element of V. This involves proving counter-parts of Lemma 3.8 and Lemma 3.9. Secondly, one defines an analog for thetype V of the extensional equality that we defined for the type V in (25).For α1, α2 : V we write α1≈α2 : prop to denote it. Finally, one gives aninterpretation of the language of CZF in ML(AC + PU) as in Table 3 ex-cept that the type V is used instead of the type V to interpret unrestrictedquantifiers. The following result can then be proved.

Theorem 4.5. The logic-enriched type theory ML(AC + PU) proves thatthe combinatorial interpretation of CZF in (V,≈) is valid.

Proof. Validity of Extensionality and Set Induction follows from the defini-tion of the extensional equality on V and from the induction rule of the W-type V, respectively. Lemma 4.1 implies the validity of Pairing and Union,and Lemma 4.2 the validity of Restricted Separation. The proof of validityof Infinity is essentially as in the generalised type-theoretic interpretation.Finally, the validity of the Strong Collection and Subset Collection schemesfollows from Proposition 4.4. �

Propositions-as-types interpretation of collection rules for smallsubclasses. We now want to relate the interpretations of CZF in ML(COLL)and in ML(AC + PU). To do so, we show that the Strong Collection andSubset Collection rules for small subclasses are justified under the proposi-tions-as-types interpretation of logic. Let us use the function t : P → U ofLemma 2.1 to define, for α : Sub(A)

comp(α) =def (Σx : el(α)) app(t,dom(α, x)) : U

For α : Sub(A) and σ : Fam(A) we can then let

i(α) =def pair(comp(α), (λz : comp(α)) val(α, z.1)) : Fam(A)j(σ) =def pair(el(σ),pair((λ : el(σ))>, (λx : el(σ)) val(σ, x))) : Sub(A)

The next lemma relates the definitions in (14) and (15) with the ones in (17)and (18).

Lemma 4.6. Let (x : A) φ : prop. Assuming (AC) and (PU), for α : Sub(A)and σ : Fam(A) the judgements

(∇x ∈ α)φ ≡ (∇x ∈ i(α))φ(∇x ∈ σ)φ ≡ (∇x ∈ j(σ))φ

where ∇ is either ∀ or ∃, are derivable.

Page 26: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

26 GAMBINO AND ACZEL

Proof. Let us prove the judgements involving universal quantification. Forthe first part, observe that the rule (PU) implies

(∀x : el(α)) dom(α, x) ⊃ φ[val(α, x)/x] ≡ (∀z : comp(α))φ[val(α, z.1)/x]

By unfolding the definitions it follows that (∀x ∈ α)φ ≡ (∀x ∈ i(α))φ holds.For the second part, observe that

(∀x ∈ el(σ))φ[val(σ, x)/x] ≡ (∀x ∈ j(σ))φ

holds, and this proves the desired claim. �

Theorem 4.7. Assuming (AC) and (PU), the Strong Collection and SubsetCollection rules are derivable.

Proof. The claim follows from Proposition 4.4 and Lemma 4.6. �

We now have two interpretations of CZF in ML(AC + PU), one using Vand the other using V. But in fact these are essentially the same. This isbecause in ML(AC + PU) one can prove that there are inverse isomorphismsbetween the structure on V with extensional equality and extensional mem-bership and the same structure on V. The key advantage of ML(COLL)over ML(AC + PU) is the fact that the former allows for reinterpretationsof the logic which are not available for the latter, as we discuss in Section 5.

5. Reinterpreting logic

Local operators in logic-enriched type theories. In this section weintroduce the notion of a local operator on the proposition universe, anddiscuss the reinterpreation of logic determined by it. Before introducinglocal operators, however, it is convenient to fix some notation and establisha simple fact that will be useful in the development of reinterpretations oflogic. For p, q : P we define p ≤ q =def τ(p) ⊃ τ(q) : prop. It is alsoconvenient to define, for p : P and φ : prop

p ≤ φ =def τ(p) ⊃ φ .

We then have the following result.

Lemma 5.1. Let B : type, p : P and (y : B) ψ : prop such that

p ≤ (∃y : B)ψ .

Then there is β : Sub(B) such that p ≤ (∃y ∈ β)ψ and (∀y ∈ β)(τ(p) ∧ ψ).

Proof. Let α =def ext(p) : Sub(1). Use Lemma 3.7 and then apply theStrong Collection Rule to (∀ ∈ α)(∃y : B)ψ. �

Definition 5.2. We say that j : P → P is a local operator if the followingjudgements

(i) p ≤ jp(ii) p ≤ q ⇒ jp ≤ jq(iii) jp ∧ jq ≤ j(p ∧ q)(iv) j(jp) ≤ jp

Page 27: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 27

are derivable, where jp =def app(j, p), for p : P.

From now on we assume given an arbitrary local operator j. For φ : propwe define

Jφ =def (∃y : P)[τ(jy) ∧ (τ(y) ⊃ φ)]

First of all, we note that J and j are extensionally equal on elements of theproposition universe. The following result can be obtained by expanding therelevant definitions.

Lemma 5.3. For p : P, the judgement J(τ(p)) ≡ τ(jp) is derivable.

We now show that the operator J inherits all the properties of the localoperator j.

Lemma 5.4. Let φ : prop and p : P such that p ≤ Jφ.Then there is q ∈ Psuch that q ≤ φ and p ≤ jq.

Proof. As p ≤ Jφ, we have that p ≤ (∃y : P)ψ, where ψ =def (τ(jy)∧y ≤ φ).Then, by Lemma 5.1, there is β : Sub(P) such that

p ≤ (∃y ∈ β)ψ (26)

and(∀y ∈ β)(τ(p) ∧ ψ). (27)

Let q =def (∃y ∈ β)y : P. Then q ≤ φ, as (∀y ∈ β)(y ≤ φ), by (27). Also,by (26), p ≤ (∃y ∈ β)τ(jy). As (∀y ∈ β)(y ≤ q) and j is monotone we getthat (∀y ∈ β)(jy ≤ jq) and hence p ≤ jq. �

The next proposition shows that the properties of j can be lifted to J .In its proof we will apply Lemma 5.4, and thus make use of the StrongCollection rule.

Proposition 5.5. For φ, ψ : prop, the judgements

(i) φ ⊃ Jφ(ii) φ ⊃ ψ ⇒ Jφ ⊃ Jψ

(iii) Jφ ∧ Jψ ⊃ J(φ ∧ ψ)(iv) J(Jφ) ⊃ Jφ

are derivable.

Proof. Direct derivations suffice to prove the first three claims. The proofof the last one uses Lemma 5.4 and the fact that j is monotone. �

We define the j-interpretation of ML(COLL−) into itself determined bythe local operator j. This interpretation acts solely on the logic, leavingtypes unchanged. We define the j-interpretation by structural induction onthe raw syntax of the type theory. The interpretation on formulae is definedin Table 4, where ? is either ∧,∨ or ⊃ and ∇ is either ∀ or ∃.

Page 28: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

28 GAMBINO AND ACZEL

〈>〉j =def >〈⊥〉j =def ⊥

〈φ ? ψ〉j =def J〈φ〉j ? J〈ψ〉j〈(∇x : A)φ〉j =def (∇x : A) J〈φ〉j

〈τ(a)〉j =def τ(a)

Table 4. Definition of the j-interpretation of formulas.

〈A : type〉j =def A : type〈A = A′ : type〉j =def A = A′ : type

〈a : A〉j =def a : A〈a = a′ : A〉j =def a = a′ : A〈φ : prop〉j =def 〈φ〉j : prop

〈(φ1, · · · , φn ⇒ φ

)〉j =def J〈φ1〉j , · · · , J〈φn〉j ⇒ J〈φ〉j

Table 5. Definition of the j-interpretation of judgment bodies

The definition of the j-interpretation of judgement bodies follows in Ta-ble 5. Given these definitions, we let the j-interpretation of judgements tobe defined as follows:

〈 (Γ) B 〉j =def ( Γ ) 〈B〉j

Definition 5.6. The j-interpretation of a rule(Γ1) B1 · · · (Γn) Bn

(Γ) Bis said to be sound if the judgement 〈(Γ) B〉j is derivable from the judgements〈(Γ1) B1〉j , . . . , 〈(Γn) Bn〉j .

Proposition 5.7. The j-interpretation of the predicate logic and inductionrules of ML(COLL)is sound.

Proof. The result follows by a series of routine calculations. �

We now prove three lemmas that will lead us to a proof of the result thatthe j-interpretation of the Strong Collection rule is sound. For z ∈ Sub(1),let

σ(z) =def J(∃ ∈ z)> : prop.

Lemma 5.8. For φ : prop, the judgement

Jφ ≡ (∃z : Sub(1))(σ(z) ∧ (∀ ∈ z)φ

)is derivable.

Page 29: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 29

Proof. This is a consequence of the definition of J and of Lemma 3.7. �

Lemma 5.9. For A,B : type, (x : A, y : B) φ : prop, α : Sub(A) andγ : Sub2(B), the judgement

(1) =⇒ (2)

can be derived, where

(1) =def (∀∃ x∈αw∈γ ) (∃z : Sub(1))[σ(z) ∧ (∀∃ ∈z

y∈w )φ]and

(2) =def (∀x ∈ α)J(∃y ∈⋃γ)φ ∧ (∀y ∈

⋃γ)(∃x ∈ α)φ.

Proof. Assume (1). Then

(∀x ∈ α)(∃w ∈ γ)(∃z : Sub(1)[σ(z) ∧ (∀ ∈ z)(∃y ∈ w)φ]

so that

(∀x ∈ α)(∃z : Sub(1))[σ(z) ∧ (∀ ∈ z)(∃w ∈ γ)(∃y ∈ w)φ]

and hence, by Lemma 5.8,

(∀x ∈ α)J(∃y ∈⋃γ)φ.

Also,

(∀w ∈ γ)(∃x ∈ α)(∃z : Sub(1))[σ(z) ∧ (∀y ∈ w)(∃ ∈ z)φ]

so that (∀w ∈ γ)(∀y ∈ w)(∃x ∈ α)φ and hence

(∀y ∈⋃γ)(∃x ∈ α)φ.

Thus we have proved (2). �

Lemma 5.10. For A,B : type, (x : A, y : B) φ : prop, α : Sub(A), thejudgement

(∀x ∈ α) J(∃y : B) φ⇒(∃v : Sub(B))

((∀x ∈ α) J(∃y ∈ v) φ ∧ (∀y ∈ v)(∃x ∈ α) φ

)is derivable.

Proof. Assume (∀x ∈ α) J(∃y : B) φ. By Lemma 5.9 it suffices to show thatthere is γ : Sub2(B) such that (1) of that lemma holds. By Lemma 5.8

(∀x ∈ α)(∃z : Sub(1)) [σ(z) ∧ (∀ ∈ z)(∃y : B) φ].

By Strong Collection

(∀x ∈ α)(∃z : Sub(1)) [σ(z) ∧ (∃w : Sub(B))(∀∃ ∈zy∈w ) φ]

so that

(∀x ∈ α)(∃w : Sub(B))(∃z : Sub(1)) [σ(z) ∧ (∀∃ ∈zy∈w ) φ].

By Strong Collection again there is γ : Sub2(B) such that (1) of Lemma 5.9holds. �

Page 30: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

30 GAMBINO AND ACZEL

Proposition 5.11. The j-interpretation of the Strong Collection rule issound.

Proof. The claim is a direct consequence of Lemma 5.10. �

As we will see, it is not possible to prove that the j-interpretation ofthe Subset Collection rule is sound for an arbitrary local operator j. Wetherefore introduce the notion of a set-presented local operator and showthat if j is set-presented then the j-interpretation of the Subset Collectionrule is sound. The notion of set-presented local operator is closely relatedto the notion of set-presented closure operator or nucleus [5, 12, 16] andinductively generated formal topology [8, 37, 38].

Definition 5.12. A local operator j on P is said to be set-presentable ifthere exists ρ : Sub(P) such that the judgement

(∀p : P) τ(jp) ≡ (∃q ∈ ρ)(q ≤ p)

is derivable.

From now on we work assuming the Subset Collection rule.

Proposition 5.13. Let A,B,C : type and (x : A, y : B, z : C) ψ : prop.If α : Sub2(A) and β : Sub(B) then there is γ : Sub2(B) such that thejudgement

(∀w ∈ α)(∀z : C)((∀x ∈ w)(∃y ∈ β) ψ ⊃ (∃v ∈ γ)(∀∃ x∈w

y∈v ) ψ)

is derivable.

Proof. For w : Sub(A), u : Sub2(B), z : C let

θ(w, u, z) =def [(∀x ∈ w)(∃y ∈ β) ψ ⊃ (∃v ∈ u)(∀∃ x∈wy∈v ) ψ].

By Subset Collection

(∀w ∈ α)(∃u : Sub2(B))(∀z : C) θ(w, u, z).

By Strong Collection there is δ : Sub(Sub2(B)) such that

(∀w ∈ α)(∃u ∈ δ)(∀z : C) θ(w, u, z).

Let γ =def⋃δ : Sub2(B). Then

(∀w ∈ α)(∀z : C)θ(w, γ, z)

as desired. �

The next lemma is a consequence of Lemma 3.6 and Lemma 3.7.

Lemma 5.14. If j is a set-presentable local operator, then there exists κ :Sub2(1) such that, for φ : prop the judgements

Jφ ≡ (∃u ∈ κ)(∀ ∈ u) φand

(∀u ∈ κ) σ(u)are derivable.

Page 31: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 31

Let us now assume that the local operator j is set-presentable and thatκ : Sub2(1) satisfies the properties of Lemma 5.14.

Lemma 5.15. Let A,B,C : type and (x : A, y : B, z : C) φ : prop. Ifα : Sub(A) and β : Sub(B) then there is γ : Sub2(B) such that the judgement

(∀z : C){(∀x ∈ α)J(∃y ∈ β) φ ⊃

(∃v ∈ γ)[(∀x ∈ α)J(∃y ∈ v) φ ∧ (∀y ∈ v)(∃x ∈ α) φ]}

is derivable.

Proof. Let κ : Sub2(1) satisfy the properties of Lemma 5.14. For y : B, z′ :A× C let

φ′ =def φ[z′.1, z′.2/x, z].

By Proposition 5.13 there is γ0 : Sub2(B) such that

(∀u ∈ κ)(∀z′ : A× C) [(∀ ∈ u)(∃y ∈ β) φ′ ⊃ (∃v ∈ γ0)(∀∃ ∈uy∈v ) φ′]

It follows that

(∀u ∈ κ)(∀x : A)(∀z : C) [(∀ ∈ u)(∃y ∈ β) φ ⊃ (∃v ∈ γ0)(∀∃ ∈uy∈v ) φ].

For x : A, z : C, v : Sub(B) let

ψ =def (∃u : Sub(1)) [σ(u) ∧ (∀∃ ∈uy∈v ) φ.]

By Subset Collection there is δ : Sub(Sub2(B)) such that

(∀z : C) [(∀x ∈ α)(∃v ∈ γ0) ψ ⊃ (∃w ∈ δ)(∀∃ x∈αv∈w ) ψ].

Let γ =def {⋃w | w ∈ δ} : Sub2(B). To complete the proof of the lemma

let z : C such that (∀x ∈ α)J(∃y ∈ β) φ. By Lemma 5.14

(∀x ∈ α)(∃u ∈ κ)(∀ ∈ u)(∃y ∈ β) φ.

so that(∀x ∈ α)(∃u ∈ κ)(∃v ∈ γ0)(∀∃ ∈u

y∈v ) φ.

As (∀u ∈ κ) σ(u)(∀x ∈ α)(∃v ∈ γ0) ψ

so that(∃w ∈ δ)(∀∃ x∈α

v∈w ) ψ

and hence, by Lemma 5.9,

(∃w ∈ δ)[(∀x ∈ α)J(∃y ∈⋃w) φ ∧ (∀y ∈

⋃w)(∃x ∈ α) φ].

It follows that

(∃v ∈ γ)[(∀x ∈ α)J(∃y ∈ v) φ ∧ (∀y ∈ v)(∃x ∈ α) φ].

Page 32: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

32 GAMBINO AND ACZEL

Observe that the soundness of the j-interpretation of the Subset Collec-tion rule follows directly from the previous lemma. We can then summarisethe results obtained in this section in the next theorem, that is our secondmain result.

Theorem 5.16. Let j be a local operator.

(i) The j-interpretation of each rule of ML(COLL−) is sound.(ii) Assuming the Subset Collection rule of ML(COLL), if j is set-presentable,

then the j-interpretation of the Subset Collection rule is sound.

Double-negation interpretation. As an application of the results justobtained we present a type-theoretic version of the double-negation inter-pretation. We define the double-negation local operator as follows:

(x : P) jx =def ¬¬x : P

where

¬x =def x ⊃ ⊥ : P

for x : P. It is easy to prove that j is a local operator.Let us point out that the operator J determined by the double negation

local operator need not to be logically equivalent to double negation. Infact, for φ : prop it holds

Jφ ≡ (∃p : P)(¬¬ τ(p) ∧ τ(p) ⊃ φ

)where ¬φ =def φ ⊃ ⊥, for φ : prop. In general it will hold only that Jφimplies ¬¬φ but not viceversa. This observation seems to isolate the mainreason for which it is possible to prove the soundness of the j-interpretationof the Strong Collection rule. Since [9] it is well-known that there is astandard double-negation translation of classical Zermelo-Frankel set the-ory, ZF, into its intuitionistic counterpart, IZF. A close inspection of theproofs reveals however that the derivation of the standard double-negationinterpretation of Collection makes use not only of the Collection axiom butalso of the Full Separation axiom scheme of IZF, that is not available in gen-eralised predicative systems like CZF or ML(COLL). This use of Full Sep-aration seems essential if one is working with the standard double-negationtranslation [11]. Our definition of a variant of the double-negation transla-tion overcomes this problem. These observations arose first in connectionwith the development of Heyting-valued interpretations for CZF [14]. Thedouble-negation nucleus on the Heyting algebra of truth values correspondsindeed to a double-negation interpretation [9, 15].

Since the j-interpretation of a proposition is logically equivalent to itsdouble-negation only for small propositions, it is natural to consider thefollowing Restricted Excluded Middle principle (REM),

(x : P) τ(x) ∨ ¬ τ(x) (REM)

Page 33: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 33

and we can also consider a type-theoretic principle asserting that the double-negation local operator is set-presentable

(∃r : Sub(P))(∀p : P) ¬¬ τ(p) ≡ (∃q ∈ r) q ⊃ τ(p) . (DNSP)

Theorem 5.17.(i) The double-negation interpretation of ML(COLL−) + REM is sound.(ii) Assuming (DNSP), the double-negation interpretation of ML(COLL)+

REM is sound.

Proof. The claims are direct consequences of Theorem 5.16. �

We conclude the paper with a lower bound for the proof-theoretic strengthof the logic-enriched type theory ML(COLL) + DNSP.

Corollary 5.18. Second-order arithmetic is proof-theoretically reducible tothe logic-enriched type theory ML(COLL) + DNSP.

Proof. Consider the set theory CZF + REM that is obtained from CZF byadding a scheme asserting the law of exclued middle for restricted formu-las. Using the generalised type-theoretic interpretation, this semi-classicalset theory is interpretable in the logic-enriched type theory ML(COLL) +REM, which can in turn be interpreted in ML(COLL) + DNSP via thedouble-negation translation. The set theory CZF+REM has proof-theoreticstrength at least above that of Bounded Zermelo set theory, which is ob-tained from Zermelo set theory by replacing the Full Separation axiomscheme with its restricted counterpart. This is because the Power Set ax-iom is derivable in CZF + REM, and Bounded Zermelo set theory has adouble-negation interpretation into its intuitionistic counterpart, which is asubsystem of CZF + REM. �

6. Conclusions and Future work

This paper is the first in a series of papers developing a research effortintended to contribute to establishing the exact relationship between differ-ent settings for constructive mathematics. These different settings are thetype-theoretical, set-theoretical, and categorical. Our effort is concernedwith getting a precise result relating CZF and a suitably formulated typetheory. A sketch of the ideas involved in getting this result was presentedwithout proofs in [4]. In the present paper we have focussed on two of thecrucial ingredients in our effort, namely the introduction of logic-enrichedtype theories and the generalised type-theoretic interpretation.

In a sequel to this paper, we will treat the other two main ideas involvedin proving the precise result relating CZF and a logic-enriched type the-ory. The first idea is to weaken the type-theoretic rules concerning Π-typesand W-types so as to allow the development of a types-as-classes interpre-tation of the resulting logic-enriched type theory into CZF. The secondidea is the development of the generalised type-theoretic interpretation with

Page 34: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

34 GAMBINO AND ACZEL

these weaker rules, so as to bring CZF in exact correspondence with a logic-enriched type theory. The planned sequel to the present paper will alsocontain detailed results characterising the propositions-as-types translationof a logic-enriched type theory into its pure part.

A related topic is the development a general theory of dependently-sortedlogic, which could be applied to logic-enriched type theories as a special case.The study of such a theory, only hinted at in [4], was originally explored bythe second author in an unpublished note, and developed further by his PhDstudent Joao Belo. This dependently-sorted logic can be compared with thethe formulation of First-Order Logic with Dependent Sorts (FOLDS) [25,26, 27]. The motivation for FOLDS is quite different to ours, and leadsto a different technical focus. In particular, the development of FOLDSdoes not involve languages that have function symbols. This simplifies theformulation of the syntax. From the point of view of logic-enriched typetheories functions symbols are essential and cannot be avoided, thus leadingto a more complex theory, which will be the subject of a further paper.

Acknowledgements. The first author wishes to thank the Department ofComputer Science, University of Manchester, where part of the researchdescribed here was carried out.

Appendix A. Type-theoretic rules

The pure type theory ML. We present the rules of the pure type theoryML, discussed in Section 1. Informal explanations for the rules of this typetheory can be found in [28].

Assumption rule. The following rule applies under the side-condition thatx /∈ FV(Γ) ∪ FV(∆).

(Γ,∆) B A : type

(Γ, x : A,∆) B

Equality rules. From now on we suppress mention of a context that is com-mon to both the premisses and the conclusion of a rule.

A : type

A = A : type

A1 = A2 : type

A2 = A1 : type

A1 = A2 : type A2 = A3 : type

A1 = A3 : type

a : A

a = a : A

a1 = a2 : A

a2 = a1 : A

a1 = a2 : A a2 = a3 : A

a1 = a3 : Aa : A1 A1 = A2

a : A2

a1 = a2 : A1 A1 = A2

a1 = a2 : A2

Substitution rule.(x : A,∆) B a : A

(∆[a/x]) B[a/x]

Page 35: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 35

Congruence rules.

(x : A,∆) C : type a1 = a2 : A

(∆[a1/x]) C[a1/x] = C[a2/x] : type

(x : A,∆) c : C a1 = a2 : A

(∆[a1/x]) c[a1/x] = c[a2/x] : C[a1/x]

For ∇ that is either Π, Σ or W:

(x : A) B1 = B2 : type

(∇x : A)B1 = (∇x : A)B2 : type

(x : A) b1 = b2 : B

(λx : A)b1 = (λx : A)b2 : (Πx : A)B

Analogous rules should also be formulated for other symbols, but we omitfor brevity.

Basic types. We write O, 1, and 2 for the types with zero, one, and twocanonical elements, respectively. We thus have the following formation andintroduction rules.

O : type 1 : type 2 : type

The type with no canonical elements does not have an introduction rule.We thus have only the following introduction rules.

01 : 1 12 : 2 22 : 2

The elimination rules follow the usual pattern.

(z : O) C : type e : O

r0(e) : C[e/z]

(z : 1) C : type e : 1 c : C[01/z]

r1(e, c) : C[e/z]

(z : 2) C : type e : 2 c1 : C[12/z] c2 : C[22/z]

r2(e, c1, c2) : C[e/z]

Finally, we give the computation rules for these types.

(z : 1) C : type c : C[01/z]

r1(0, c) = c : C[01/z]

(z : 2) C : type c1 : C[12/z] c2 : C[22/z]

r2(12, c1, c2) = c1 : C[12/z]

(z : 2) C : type c1 : C[12/z] c2 : C[22/z]

r2(22, c1, c2) = c2 : C[22/z]

Page 36: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

36 GAMBINO AND ACZEL

Natural numbers type.

N : type

The introduction rules for this type are standard.

0N : Nn : N

succ(n) : N

In the elination and computation rules below the premisses should includethe judgement (z : N) C : type that we omit for brevity.

n : N c : C[0/z] (x : N, y : C[x/z]) d : C[succ(x)/z]

rN(n, c, (x, y)d) : C[n/z]

0 : N c : C[0/z] (x : N, y : C[x/z]) d : C[succ(x)/z]

rN(0, c, (x, y)d) = c : C[0/z]

n : N c : C[0/z] (x : N, y : C[x/z]) d : C[succ(x)/z]

rN(succ(n), c, (x, y)d) = d[n, rN(n, c, (x, y)d)/x, y] : C[succ(n)/z]

R2-rules.

e : 2 A1 : type A2 : type

R2(e,A1, A2) : type

R2(12, A1, A2) = A1 R2(22, A1, A2) = A2

Σ-rules.A : type (x : A) B : type

(Σx : A)B : type

a : A b : B[a/x]

pair(a, b) : (Σx : A)B

Similarly to what we did for the natural numbers type, we suppress thepremiss (z : (Σx : A)) C : type in the elimination and computation rules.

e : (Σx : A)B (x : A, y : B) c : C[pair(x, y)/z]

split(e, (x, y)c) : C[e/z]

a : A b : B[a/x] (x : A, y : B) c : C[pair(x, y)/z]

split((pair(a, b), (x, y)c) = c[a, b/x, y] : C[pair(a, b)/z]

Page 37: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 37

Π-rules.A : type (x : A) B : type

(Πx : A)B : type

(x : A) b : B

(λx : A)b : (Πx : A)B

f : (Πx : A)B a : A

app(f, a) : B[a/x]

(x : A) b : B a : A

app((λx : A)b, a) = b[a/x] : B[a/x]

Rules for the type universe.

Formation rule.

U : type

Introduction rules.

O : U 1 : U 2 : U N : U

e : 2 a1 : U a2 : U

R2(e, a1, a2) : U

a : U (x : T(a)) b : U

(Σx : a)b : U

a : U (x : T(a)) b : U

(Πx : a)b : U

Elimination rule.a : U

T(a) : type

Computation rules.

T(O) = O : type T(1) = 1 : type T(2) = 2 : type T(N) = N : type

e : 2 a1 : U a2 : U

T(R2(e, a1, a2)) = R2(e,T(a1),T(a2)) : type

a : U (x : T(a)) b : U

T((Σx : a)b) = (Σx : T(a)) T b : type

a : U (x : T(a)) b : U

T((Πx : a)b) = (Πx : T(a)) T(b) : type

Page 38: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

38 GAMBINO AND ACZEL

Rules for the proposition universe.

Formation rule.P : type

Introduction rules.> : P ⊥ : P

p1 : P p2 : P

p1 ∧ p2 : P

p1 : P p2 : P

p1 ∨ p2 : P

p1 : P p2 : P

p1 ⊃ p2 : P

a : U (x : T(a)) p : P

(∀x : a)p : P

a : U (x : T(a)) p : P

(∃x : a)p : P

Elimination rule.p : P

τ(p) : prop

Computation rules.τ(>) ≡ > τ(⊥) ≡ ⊥

p1 : P p2 : P

τ(p1 ∧ p2) ≡ τ(p1) ∧ τ(p2)

p1 : P p2 : P

τ(p1 ∨ p2) ≡ τ(p1) ∨ τ(p2)

p1 : P p2 : P

τ(p1 ⊃ p2) ≡ τ(p1) ⊃ τ(p2)

a : U (x : T(a)) p : P

τ((∀x : a)p) ≡ (∀x : T(a)) τ(p)

a : U (x : T(a)) p : P

τ((∃x : a)p) ≡ (∃x : T(a)) τ(p)

References

[1] P. Aczel. The type theoretic interpretation of constructive set theory. In A. MacIntyre,L. Pacholski, and J. Paris, editors, Logic Colloquium ’77, pages 55 – 66. North-Holland, 1978.

[2] P. Aczel. The type theoretic interpretation of constructive set theory: choice princi-ples. In A. S. Troelstra and D. van Dalen, editors, The L. E. J. Brouwer CentenarySymposium, pages 1 – 40. North-Holland, 1982.

[3] P. Aczel. The type theoretic interpretation of constructive set theory: inductive def-initions. In R. Barcan Marcus, G.J.W. Dorn, and P. Weinegartner, editors, Logic,Methodology and Philosophy of Science VII, pages 17 – 49. North-Holland, 1986.

[4] P. Aczel and N. Gambino. Collection principles in Dependent Type Theory. InP. Callaghan, Z. Luo, J. McKinna, and R. Pollack, editors, Types for Proofs andPrograms, volume 2277 of Lecture Notes in Computer Science, pages 1 – 23. Springer,2002.

[5] P. Aczel and M. Rathjen. Notes on Constructive Set Theory. Technical Report 40,Mittag-Leffler Institute, The Swedish Royal Academy of Sciences, 2001. Availablefrom the first author’s web page at http://www.cs.man.ac.uk/~petera/papers.

html.

Page 39: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

THE GENERALISED TYPE-THEORETIC INTERPRETATION 39

[6] S. Awodey and A. Bauer. Propositions as [types]. Journal of Logic and Computation,14(4):447 – 471, 2004.

[7] S. Awodey and M. Warren. Predicative algebraic set theory. Theory and applicationsof categories, 15(1):1 – 39, 2005.

[8] T. Coquand, G. Sambin, J. M. Smith, and S. Valentini. Inductively generated formaltopologies. Annals of Pure and Applied Logic, 124(1-3):71–106, 2003.

[9] H. M. Friedman. The consistency of classical set theory relative to a set theory withintuitionistic logic. Journal of Symbolic Logic, 38:315–319, 1973.

[10] H. M. Friedman. Set theoretic foundations of constructive analysis. Annals of Math-ematics, 105:1–28, 1977.

[11] N. Gambino. Types and sets: a study on the jump to full impredicativity, 1999.Laurea dissertation, Dipartimento di Matematica Pura e Applicata, Universita degliStudi di Padova.

[12] N. Gambino. Sheaf interpretations for generalised predicative intuitionistic systems.PhD thesis, University of Manchester, 2002. Available from the author’s web page.

[13] N. Gambino. Presheaf models for constructive set theory. In L. Crosilla and P. Schus-ter, editors, From Sets and Types to Topology and Analysis. Oxford University Press,2005.

[14] N. Gambino. Heyting-valued interpretations for Constructive Set Theory. Annals ofPure and Applied Logic, To appear.

[15] R. J. Grayson. Heyting-valued models for Intuitionistic Set Theory. In M. P. Fourman,C. J. Mulvey, and D. S. Scott, editors, Applications of Sheaves, volume 753 of LectureNotes in Mathematics, pages 402 – 414. Springer, 1979.

[16] R. J. Grayson. Forcing in intuitionistic systems without power-set. Journal of Sym-bolic Logic, 48(3):670–682, 1983.

[17] E. R. Griffor and M. Rathjen. The strength of some Martin-Lof type theories. Archivefor Mathematical Logic, 33:347 – 385, 1994.

[18] B. Jacobs. Categorical Logic and Type Theory. North-Holland, 1999.[19] P. T. Johnstone. Stone Spaces. Cambridge University Press, 1982.[20] R. S. Lubarsky. Independence results around constructive ZF. Annals of Pure and

Applied Logic, 132(2-3):209 – 225, 2005.[21] S. MacLane and I. Moerdijk. Sheaves in Geometry and Logic. Springer, 1992.[22] M. E. Maietti. The type theory of categorical universes. PhD thesis, Dipartimento di

Matematica Pura e Applicata, Universita degli Studi di Padova, 1998. Available fromthe author’s web page.

[23] M. E. Maietti. Modular correspondence between dependent type theories and cate-gories including pretopoi and topoi. Mathematical Structures in Computer Science,To appear.

[24] M. E. Maietti and G. Sambin. Towards a minimalistic foundation for constructivemathematics. In L. Crosilla and P. Schuster, editors, From Sets and Types to Topologyand Analysis. Oxford University Press, 2005.

[25] M. Makkai. First-order logic with dependent sorts, with applications to categorytheory. Available from the author’s web page, 1995.

[26] M. Makkai. Towards a categorical foundation of mathematics. In J. A. Makowskyand E. V. Ravve, editors, Logic Colloquium ’95, volume 11 of Lecture Notes in Logic,pages 153 – 190. Association for Symbolic Logic, 1998.

[27] M. Makkai. On comparing definitions of weak n-category. Available from the author’sweb page, 2001.

[28] P. Martin-Lof. Intuitionistic Type Theory — Notes by G. Sambin of a series of lecturesgiven in Padua, June 1980. Bibliopolis, 1984.

[29] I. Moerdijk and E. Palmgren. Wellfounded trees in categories. Journal of Pure andApplied Logic, 104:189 – 218, 2000.

Page 40: THE GENERALISED TYPE-THEORETIC INTERPRETATION OF

40 GAMBINO AND ACZEL

[30] I. Moerdijk and E. Palmgren. Type theories, toposes and Constructive Set Theory:predicative aspects of AST. Annals of Pure and Applied Logic, 114(1-3):155–201,2002.

[31] J.R. Myhill. Constructive Set Theory. Journal of Symbolic Logic, 40(3):347–382, 1975.[32] B. Nordstrom, K. Petersson, and J. M. Smith. Martin-Lof Type Theory. In S. Abram-

ski, D. M. Gabbay, and T. S. E. Maibaum, editors, Handbook of Logic in ComputerScience, volume 5. Oxford University Press, 2000.

[33] M. Rathjen. Replacement versus Collection in Constructive Zermelo-Fraenkel SetTheory. Annals of Pure and Applied Logic, 136(1–2):156–174, 2005.

[34] M. Rathjen. The disjunction and other properties for Constructive Zermelo-FrankelSet Theory. Journal of Symbolic Logic, To appear.

[35] M. Rathjen. Realizability for Constructive Zermelo-Fraenkel Set Theory. InJ. Vaananen and V. Stoltenberg-Hansen, editors, Proceedings of the Logic Colloquium2003. Association for Symbolic Logic, To appear.

[36] M. Rathjen and R. S. Lubarsky. On the regular extension axiom and its variants.Mathematical Logic Quarterly, 49(5):511–518, 2003.

[37] G. Sambin. Intuitionistic formal spaces – A first communication. In D. Skordev, edi-tor, Mathematical Logic and its Applications, pages 87 – 204. Plenum, 1987.

[38] G. Sambin. Some points in formal topology. Theoretical Computer Science, 305(1–3):347–408, 2003.

[39] G. Sambin and S. Valentini. Building up a toolbox for Martin-Lof’s type theory: sub-set theory. In G. Sambin and J. M. Smith, editors, Twenty-five Years of ConstructiveType Theory, pages 221–244. Oxford University Press, 1998.

Laboratoire de Combinatoire et Informatique Mathematique, Universite duQuebec a Montreal, Case Postale 8888, Succursale Centre-Ville, Montreal(Quebec) H3C 3P8, Canada

E-mail address: [email protected]

Schools of Mathematics and Computer Science, University of Manchester,Manchester M13 9PL, England

E-mail address: [email protected]