aarjaneiro/planetmath huggingface dataset:
A.2.4 Dependent function types (Π-types)

A.2.4 Dependent function types (

Π

-types)

In §1.2 (

http://planetmath.org/12functiontypes

), we introduced non-dependent

functions

A

→

B

in
order to define a family of types as a function

λ

(

x

:

A

)

.

B

:

A

→

𝒰

i

, which
then gives rise to a type of dependent functions

∏

(

x

:

A

)

B

. But with explicit

contexts

we may replace

λ

(

x

:

A

)

.

B

:

A

→

𝒰

i

with the judgment

x

⁢

:

⁢

A

⊢

B

:

𝒰

i

.

Consequently, we may define dependent functions directly, without reference to non-dependent ones. This way we follow the general principle that each type former, with its

constants

and rules, should be introduced independently of all other type formers.
In fact, henceforth each type former is introduced systematically by:

•

a

formation rule

, stating when the type former can be applied;

•

some

introduction

rules

, stating how to inhabit the type;

•

elimination rules

, or an

induction

principle, stating how to use an
element of the type;

•

computation

rules

, which are judgmental equalities explaining what happens when elimination rules are applied to results of introduction rules;

•

optional

uniqueness principles

, which are judgmental equalities explaining how every element of the type is uniquely determined by the results of elimination rules applied to it.

(See also

\autoref

rmk:introducing-new-concepts.)

For the dependent function type these rules are:

{mathparpagebreakable}

\inferrule

*[right=

Π

-

form

]
Γ ⊢A :

𝒰

_i Γ,x : A ⊢B :

𝒰

_iΓ ⊢∏_(x:A)B :

𝒰

_i

\inferrule

*[right=

Π

-

intro

]
Γ,x : A ⊢b : B
Γ ⊢λ(x : A). b : ∏_(x:A)B

\inferrule

*[right=

Π

-

elim

]
Γ ⊢f : ∏_(x:A)B

Γ ⊢a : A
Γ ⊢f(a) : B[a/x]

\inferrule

*[right=

Π

-

comp

]
Γ,x : A ⊢b : B

Γ ⊢a : A
Γ ⊢(λ(x : A). b)(a) ≡b[a/x] : B[a/x]

\inferrule

*[right=

Π

-

uniq

]
Γ ⊢f : ∏_(x:A)B
Γ ⊢f ≡(λx. f(x)) : ∏_(x:A)B

The

expression

λ

(

x

:

A

)

.

b

binds

free occurrences

of

x

in

b

, as does

∏

(

x

:

A

)

B

for

B

.

When

x

does not occur freely in

B

so that

B

does not depend on

A

, we obtain as a
special case the ordinary function type

A

→

B

:

≡

∏

(

x

:

A

)

B

. We take this as the

definition

of

→

.

We may abbreviate an expression

λ

(

x

:

A

)

.

b

as

λ

⁢

x

.

b

, with the understanding
that the omitted type

A

should be filled in appropriately before type-checking.

Title

A.2.4 Dependent function types (

Π

-types)

\metatable

Generated on Thu Feb 8 19:44:00 2018 by

LaTeXML
A.2.5 Dependent pair types (S⁢i⁢g⁢m⁢a-types)

A.2.5 Dependent pair types (

S

⁢

i

⁢

g

⁢

m

⁢

a

-types)

In §1.6 (

http://planetmath.org/16dependentpairtypes

), we needed

→

and

∏

types in order to
define the

introduction

and elimination rules for

∑

; as with

∏

,

contexts

allow us to state the rules for

∑

independently:

{mathparpagebreakable}

\inferrule

*[right=

Σ

-

form

]
Γ ⊢A :

𝒰

_i Γ,x : A ⊢B :

𝒰

_iΓ ⊢∑_(x:A)B :

𝒰

_i

\inferrule

*[right=

Σ

-

intro

]
Γ, x : A ⊢B :

𝒰

_i

Γ ⊢a : A

Γ ⊢b : B[a/x]
Γ ⊢(a,b) : ∑_(x:A)B

\inferrule

*[right=

Σ

-

elim

]
Γ, z : ∑_(x:A)B ⊢C :

𝒰

_i

Γ,x : A,y : B ⊢g : C[(x,y)/z]

Γ ⊢p : ∑_(x:A)B
Γ ⊢

ind

_∑_(x:A)B(z.C,x.y.g,p) : C[p/z]

\inferrule

*[right=

Σ

-

comp

]
Γ, z : ∑_(x:A)B ⊢C :

𝒰

_i

Γ, x : A, y : B ⊢g : C[(x,y)/z]

Γ ⊢a’ : A

Γ ⊢b’ : B[a’/x]
Γ ⊢

ind

_∑_(x:A)B(z.C,x.y.g,(a’,b’)) ≡g[a’,b’/x,y] : C[(a’,b’)/z]

The expression

∑

(

x

:

A

)

B

binds

free occurrences

of

x

in

B

. Furthermore, because

𝗂𝗇𝖽

∑

(

x

:

A

)

B

has some

arguments

with

free variables

beyond those in

Γ

,
we bind (following the variable names above)

z

in

C

, and

x

and

y

in

g

.
These bindings are written as

z

.

C

and

x

.

y

.

g

, to indicate the names of the

bound
variables

.
In particular, we treat

𝗂𝗇𝖽

∑

(

x

:

A

)

B

as a primitive,
two of whose arguments contain binders; this is superficially

similar

to, but
different from,

𝗂𝗇𝖽

∑

(

x

:

A

)

B

being a

function

that takes functions as
arguments.

When

B

does not contain free occurrences of

x

, we obtain as a special case
the

cartesian product

A

×

B

:

≡

∑

(

x

:

A

)

B

. We take this
as the

definition

of the cartesian product.

Notice that we don’t

postulate

a judgmental uniqueness principle for

Σ

-types, even
though we could have; see PMlinknameCorollary 127sigmatypes#Thmcor1 for a proof of the corresponding
propositional uniqueness principle.

Title

A.2.5 Dependent pair types (

S

⁢

i

⁢

g

⁢

m

⁢

a

-types)

\metatable

Generated on Thu Feb 8 19:44:03 2018 by

LaTeXML
A.2.6 Coproduct types

A.2.6 Coproduct types

{mathparpagebreakable}

\inferrule

*[right=

+

-

form

]
Γ ⊢A :

𝒰

_i

Γ ⊢B :

𝒰

_i
Γ ⊢A+B :

𝒰

_i

\inferrule

*[right=

+

-

intro

1

]
Γ ⊢A :

𝒰

_i

Γ ⊢B :

𝒰

_i

Γ ⊢a : A
Γ ⊢

𝗂𝗇𝗅

(a) : A+B

\inferrule

*[right=

+

-

intro

2

]
Γ ⊢A :

𝒰

_i

Γ ⊢B :

𝒰

_i

Γ ⊢b : B
Γ ⊢

𝗂𝗇𝗋

(b) : A+B

\inferrule

*[right=

+

-

elim

]
Γ,z : (A+B) ⊢C :

𝒰

_i

Γ,x : A ⊢c : C[

𝗂𝗇𝗅

(x)/z]

Γ,y : B ⊢d : C[

𝗂𝗇𝗋

(y)/z]

Γ ⊢e : A+B
Γ ⊢

ind

_A+B(z.C,x.c,y.d,e) : C[e/z]

\inferrule

*[right=

+

-

comp

1

]
Γ,z : (A+B) ⊢C :

𝒰

_i

Γ,x : A ⊢c : C[

𝗂𝗇𝗅

(x)/z]

Γ,y : B ⊢d : C[

𝗂𝗇𝗋

(y)/z]

Γ ⊢a : A
Γ ⊢

ind

_A+B(z.C,x.c,y.d,

𝗂𝗇𝗅

(a)) ≡c[a/x] : C[

𝗂𝗇𝗅

(a)/z]

\inferrule

*[right=

+

-

comp

2

]
Γ,z : (A+B) ⊢C :

𝒰

_i

Γ,x : A ⊢c : C[

𝗂𝗇𝗅

(x)/z]

Γ,y : B ⊢d : C[

𝗂𝗇𝗋

(y)/z]

Γ ⊢b : B
Γ ⊢

ind

_A+B(z.C,x.c,y.d,

𝗂𝗇𝗋

(b)) ≡d[b/y] : C[

𝗂𝗇𝗋

(b)/z]

In

𝗂𝗇𝖽

A

+

B

,

z

is bound in

C

,

x

is bound in

c

, and

y

is bound in

d

.

Title

A.2.6

Coproduct

types

\metatable

Generated on Thu Feb 8 19:44:06 2018 by

LaTeXML
A.2.7 The empty type 0

A.2.7 The empty type 0

{mathparpagebreakable}

\inferrule

*[right=

𝟎

-

form

]
Γ

𝖼𝗍𝗑

Γ ⊢

𝟎

:

𝒰

_i

\inferrule

*[right=

𝟎

-

elim

]
Γ,x :

𝟎

⊢C :

𝒰

_i

Γ ⊢a :

𝟎

Γ ⊢

ind

_

𝟎

(x.C,a) : C[a/x]

In

𝗂𝗇𝖽

𝟎

,

x

is bound in

C

. The empty type has no

introduction

rule and no

computation

rule.

Title

A.2.7 The empty type 0

\metatable

Generated on Thu Feb 8 19:44:08 2018 by

LaTeXML
A.2.8 The unit type 1

A.2.8 The unit type 1

{mathparpagebreakable}

\inferrule

*[right=

𝟏

-

form

]
Γ

𝖼𝗍𝗑

Γ ⊢

𝟏

:

𝒰

_i

\inferrule

*[right=

𝟏

-

intro

]
Γ

𝖼𝗍𝗑

Γ ⊢

⋆

:

𝟏

\inferrule

*[right=

𝟏

-

elim

]
Γ,x :

𝟏

⊢C :

𝒰

_i

Γ,y :

𝟏

⊢c : C[y/x]

Γ ⊢a :

𝟏

Γ ⊢

ind

_

𝟏

(x.C,y.c,a) : C[a/x]

\inferrule

*[right=

𝟏

-

comp

]
Γ,x :

𝟏

⊢C :

𝒰

_i

Γ,y :

𝟏

⊢c : C[y/x]
Γ ⊢

ind

_

𝟏

(x.C,y.c,

⋆

) ≡c[

⋆

/y] : C[

⋆

/x]

In

𝗂𝗇𝖽

𝟏

,

x

is bound in

C

, and

y

is bound in

c

.

Notice that we don’t

postulate

a judgmental uniqueness principle for the unit
type; see §1.5 (

http://planetmath.org/15producttypes

) for a proof of the corresponding
propositional uniqueness statement.

Title

A.2.8 The unit type 1

\metatable

Generated on Thu Feb 8 19:44:10 2018 by

LaTeXML
A.2.9 The natural number type

A.2.9 The natural number type

We give the rules for

natural numbers

, following §1.9 (

http://planetmath.org/19thenaturalnumbers

).

{mathparpagebreakable}

\inferrule

*[right=

ℕ

-

form

]
Γ

𝖼𝗍𝗑

Γ ⊢

ℕ

:

𝒰

_i

\inferrule

*[right=

ℕ

-

intro

1

]
Γ

𝖼𝗍𝗑

Γ ⊢0 :

ℕ

\inferrule

*[right=

ℕ

-

intro

2

]
Γ ⊢n :

ℕ

Γ ⊢

succ

(n) :

ℕ

\inferrule

*[right=

ℕ

-

elim

]

Γ,x :

ℕ

⊢C :

𝒰

_i

Γ ⊢c_0 : C[0/x]

Γ,x :

ℕ

,y : C ⊢c_s : C[

succ

(x)/x]

Γ ⊢n :

ℕ

Γ ⊢

ind

_

ℕ

(x.C,c_0,x.y.c_s,n) : C[n/x]

\inferrule

*[right=

ℕ

-

comp

1

]

Γ,x :

ℕ

⊢C :

𝒰

_i

Γ ⊢c_0 : C[0/x]

Γ,x :

ℕ

,y : C ⊢c_s : C[

succ

(x)/x]
Γ ⊢

ind

_

ℕ

(x.C,c_0,x.y.c_s,0) ≡c_0 : C[0/x]

\inferrule

*[right=

ℕ

-

comp

2

]

Γ,x :

ℕ

⊢C :

𝒰

_i

Γ ⊢c_0 : C[0/x]

Γ,x :

ℕ

,y : C ⊢c_s : C[

succ

(x)/x]

Γ ⊢n :

ℕ

Γ⊢

ind

ℕ

(x.C,c

0

,x.y.c

s

,

succ

(n))

≡c

s

[n,

ind

ℕ

(x.C,c

0

,x.y.c

s

,n)/x,y] : C[

succ

(n)/x]

In

𝗂𝗇𝖽

ℕ

,

x

is bound in

C

, and

x

and

y

are bound in

c

s

.

Other inductively defined types follow the same general scheme.

Title

A.2.9 The natural number type

\metatable

Generated on Thu Feb 8 19:44:13 2018 by

LaTeXML
A.2 The second presentation

A.2 The second presentation

In this

section

, there are three kinds of judgments

{mathpar}

Γ

𝖼𝗍𝗑

Γ ⊢a : A
Γ ⊢a ≡a’ : A

which we specify by providing

inference rules

for deriving them. A typical

inference rule

has the form

\inferrule

*

[

r

i

g

h

t

=

Name

]

𝒥

1

⋯

𝒥

k

𝒥

It says that we may derive the

conclusion

𝒥

, provided that we have
already derived the

hypotheses

𝒥

1

,

…

,

𝒥

k

.
(Note that, being judgments rather than types, these are not hypotheses

internal

to the

type theory

in the sense of §1.1 (

http://planetmath.org/11typetheoryversussettheory

); they are instead hypotheses in the

deductive system

, i.e. the

metatheory

.)
On the
right we write the

Name

of the rule, and there may be extra side conditions that
need to be checked before the rule is applicable.

A

derivation

of a judgment is a tree constructed from such inference
rules, with the judgment at the root of the tree. For example, with the rules given below, the following is a derivation of

⋅

⊢

λ

x

.

x

:

𝟏

→

𝟏

.

{mathpar}

\inferrule

*[right=

Π

-

intro

]

\inferrule

*[right=

𝖵𝖻𝗅𝖾

]

\inferrule

*[right=

𝖼𝗍𝗑

-

ext

]

\inferrule

*[right=

𝟏

-

form

]

\inferrule

*[right=

𝖼𝗍𝗑

-

emp

]

⋅

𝖼𝗍𝗑

⊢

𝟏

:

𝒰

_0
x :

𝟏

𝖼𝗍𝗑

x :

𝟏

⊢x :

𝟏

⋅

⊢λx. x :

𝟏

→

𝟏

Title

A.2 The second

presentation

\metatable

Generated on Thu Feb 8 19:44:16 2018 by

LaTeXML
A.3.1 Function extensionality and univalence

A.3.1 Function extensionality and univalence

There are two basic ways of introducing axioms which do not introduce new syntax or judgmental equalities (function extensionality and univalence are of this form):
either add a primitive

constant

to inhabit the axiom, or prove all

theorems

which depend on the axiom by hypothesizing a variable that inhabits the axiom, cf. §1.1 (

http://planetmath.org/11typetheoryversussettheory

).
While these are essentially

equivalent

, we opt for the former approach because we feel that the axioms of

homotopy type theory

are an essential part of the core theory.

\autoref

axiom:funext is formalized by

introduction

of a constant

𝖿𝗎𝗇𝖾𝗑𝗍

which
asserts that

𝗁𝖺𝗉𝗉𝗅𝗒

is an equivalence:

{mathparpagebreakable}

\inferrule

*[right=

Π

-

ext

]
Γ ⊢f : ∏_(x:A)B

Γ ⊢g : ∏_(x:A)B
Γ ⊢

funext

(f,g) :

𝗂𝗌𝖾𝗊𝗎𝗂𝗏

(

happly

_f,g)

The definitions of

𝗁𝖺𝗉𝗉𝗅𝗒

and

𝗂𝗌𝖾𝗊𝗎𝗂𝗏

can be found in (

LABEL:eq:happly

) and
§4.5 (

http://planetmath.org/45onthedefinitionofequivalences

), respectively.

\autoref

axiom:univalence is formalized in a similar fashion, too:

{mathparpagebreakable}

\inferrule

*[right=

𝒰

i

-

univ

]
Γ ⊢A :

𝒰

_i

Γ ⊢B :

𝒰

_i
Γ ⊢

𝗎𝗇𝗂𝗏𝖺𝗅𝖾𝗇𝖼𝖾

(A,B) :

𝗂𝗌𝖾𝗊𝗎𝗂𝗏

(

𝗂𝖽𝗍𝗈𝖾𝗊𝗏

_A,B)

The definition of

𝗂𝖽𝗍𝗈𝖾𝗊𝗏

can be found in (

LABEL:eq:uidtoeqv

).

Title

A.3.1 Function extensionality and univalence

\metatable

Generated on Thu Feb 8 19:44:18 2018 by

LaTeXML
A.3.2 The circle

A.3.2 The circle

Here we give an example of a basic

higher inductive type

; others follow the same
general scheme, albeit with elaborations.

Note that the rules below do not precisely follow the pattern of the ordinary
inductive types in

\autoref

sec:syntax-more-formally: the rules refer to the
notions of transport and functoriality of maps (§2.2 (

http://planetmath.org/22functionsarefunctors

)), and the
second

computation

rule is a propositional, not judgmental, equality. These

differences

are discussed in §6.2 (

http://planetmath.org/62inductionprinciplesanddependentpaths

).

{mathparpagebreakable}

\inferrule

*[right=

𝕊

1

-

form

]
Γ

𝖼𝗍𝗑

Γ ⊢

S

^1 :

𝒰

_i

\inferrule

*[right=

𝕊

1

-

intro

1

]
Γ

𝖼𝗍𝗑

Γ ⊢

𝖻𝖺𝗌𝖾

:

S

^1

\inferrule

*[right=

𝕊

1

-

intro

2

]
Γ

𝖼𝗍𝗑

Γ ⊢

𝗅𝗈𝗈𝗉

:

𝖻𝖺𝗌𝖾

=

𝕊

1

𝖻𝖺𝗌𝖾

\inferrule

*[right=

𝕊

1

-

elim

]
Γ,x :

S

^1 ⊢C :

𝒰

_i

Γ ⊢b : C[

𝖻𝖺𝗌𝖾

/x]

Γ ⊢ℓ : b =^C_

𝗅𝗈𝗈𝗉

b

Γ ⊢p :

S

^1
Γ ⊢

ind

_

S

^1(x.C,b,ℓ,p) : C[p/x]

\inferrule

*[right=

𝕊

1

-

comp

1

]
Γ,x :

S

^1 ⊢C :

𝒰

_i

Γ ⊢b : C[

𝖻𝖺𝗌𝖾

/x]

Γ ⊢ℓ : b =^C_

𝗅𝗈𝗈𝗉

b
Γ ⊢

ind

_

S

^1(x.C,b,ℓ,

𝖻𝖺𝗌𝖾

) ≡b : C[

𝖻𝖺𝗌𝖾

/x]

\inferrule

*[right=

𝕊

1

-

comp

2

]
Γ,x :

S

^1 ⊢C :

𝒰

_i

Γ ⊢b : C[

𝖻𝖺𝗌𝖾

/x]

Γ ⊢ℓ : b =^C_

𝗅𝗈𝗈𝗉

b
Γ ⊢

S

^1-

loopcomp

:

𝖺𝗉𝖽

(

λ

y

.

𝗂𝗇𝖽

𝕊

1

(

x

.

C

,

b

,

ℓ

,

y

)

)

(

𝗅𝗈𝗈𝗉

)

=

ℓ

In

𝗂𝗇𝖽

𝕊

1

,

x

is bound in

C

. The notation

b

=

𝗅𝗈𝗈𝗉

C

b

for dependent paths was introduced in §6.2 (

http://planetmath.org/62inductionprinciplesanddependentpaths

).

Title

A.3.2 The circle

\metatable

Generated on Thu Feb 8 19:44:21 2018 by

LaTeXML
A.3 Homotopy type theory

A.3 Homotopy type theory

In this

section

we state the additional axioms of

homotopy type theory

which distinguish it from standard Martin-Löf

type theory

: function extensionality, the
univalence axiom, and

higher inductive types

. We state them in the style
of the second

presentation

\autoref

sec:syntax-more-formally, although the first presentation

\autoref

sec:syntax-informally could be used just as well.

Title

A.3 Homotopy type theory

\metatable

Generated on Thu Feb 8 19:44:23 2018 by

LaTeXML
A. Formal type theory

A. Formal type theory

Just as one can develop mathematics in

set theory

without explicitly using the axioms of Zermelo–Fraenkel set theory,
in this book we have developed mathematics in

univalent foundations

without explicitly referring to a

formal
system

of

homotopy type theory

. Nevertheless, it is important to

have

a
precise description of homotopy type theory as a formal system in order to, for example,

•

state and prove its metatheoretic properties, including logical

consistency

,

•

construct

models, e.g. in

simplicial sets

, model categories, higher toposes,
etc., and

•

implement it in proof assistants like

Coq

or

Agda

.

Even the logical consistency of homotopy type theory, namely that in the empty

context

there is no term

a

:

𝟎

, is not obvious: if we had erroneously
chosen a definition of equivalence for which

𝟎

≃

𝟏

, then
univalence would imply that

𝟎

has an

element

, since

𝟏

does.
Nor is it obvious that, for example, our definition of

𝕊

1

as a

higher
inductive type

yields a type which behaves like the ordinary circle.

There are two aspects of

type theory

which we must pin down before addressing
such questions. Recall from the

Introduction

that type theory
comprises a set of rules specifying when the judgments

a

:

A

and

a

≡

a

′

:

A

hold—for example,

products

are characterized by the rule that whenever

a

:

A

and

b

:

B

,

(

a

,

b

)

:

A

×

B

. To make this precise, we must first define
precisely the syntax of terms—the objects

a

,

a

′

,

A

,

…

which these judgments
relate; then, we must define precisely the judgments and their

rules of
inference

—the manner in which judgments can be derived from other judgments.

In this appendix, we present two formulations of Martin-Löf type
theory, and of the

extensions

that constitute homotopy type theory.
The first

presentation

(

\autoref

sec:syntax-informally) describes the syntax of
terms and the forms of judgments as an extension of the untyped

λ

-calculus, while leaving the rules of inference informal.
The second (

\autoref

sec:syntax-more-formally) defines the terms, judgments,
and rules of inference inductively in the style of

natural deduction

, as
is customary in much type-theoretic literature.

Title

A. Formal type theory

\metatable

Generated on Thu Feb 8 19:44:29 2018 by

LaTeXML
analytic hierarchy

analytic hierarchy

The

analytic hierarchy

is a hierarchy of either (depending on

context

)

formulas

or

relations

similar

to the

arithmetical hierarchy

. It is essentially the

second order

equivalent

. Like the arithmetical hierarchy, the relations in each level are exactly the relations defined by the formulas of that level.

The first level can be called

Δ

0

1

,

Δ

1

1

,

Σ

0

1

, or

Π

0

1

, and consists of the arithmetical formulas or relations.

A formula

ϕ

is

Σ

n

1

if there is some arithmetical formula

ψ

such that:

ϕ

⁢

(

k

→

)

=

∃

X

1

⁢

∀

X

2

⁢

⋯

⁢

Q

⁢

X

n

⁢

ψ

⁢

(

k

→

,

X

→

n

)

where

⁢

Q

⁢

is either

⁢

∀

or

⁢

∃

, whichever maintains the pattern of alternating quantifiers, and each

⁢

X

i

⁢

is a set variable (that is, second order)

Similarly, a formula

ϕ

is

Π

n

1

if there is some arithmetical formula

ψ

such that:

ϕ

⁢

(

k

→

)

=

∀

X

1

⁢

∃

X

2

⁢

⋯

⁢

Q

⁢

X

n

⁢

ψ

⁢

(

k

→

,

X

→

n

)

where

⁢

Q

⁢

is either

⁢

∀

or

⁢

∃

, whichever maintains the pattern of alternating quantifiers, and each

⁢

X

i

⁢

is a set variable (that is, second order)

Title

analytic hierarchy

Canonical name

AnalyticHierarchy

Date of creation

2013-03-22 12:56:48

Last modified on

2013-03-22 12:56:48

Owner

Henry (455)

Last modified by

Henry (455)

Numerical id

4

Author

Henry (455)

Entry type

Definition

Classification

msc 03B15

Synonym

analytical hierarchy

Related topic

ArithmeticalHierarchy

Generated on Thu Feb 8 19:44:33 2018 by

LaTeXML
Appendix A Notes

Appendix A Notes

The system of rules with

introduction

(

primitive

constants

) and elimination
and computation rules (defined constant) is inspired by Gentzen

natural
deduction

. The possibility of strengthening the elimination rule for
existential quantification was indicated in

[

howard:pat

]

. The
strengthening of the axioms for

disjunction

appears in

[

Martin-Lof-1972

]

,
and for absurdity elimination and identity type in

[

Martin-Lof-1973

]

. The

W

-types were introduced in

[

Martin-Lof-1979

]

. They generalize a notion
of trees introduced by

[

Tait-1968

]

.

The generalized form of

primitive recursion

for

natural numbers

and

ordinals

appear in

[

Hilbert-1925

]

. This motivated Gödel’s system

T

,

[

Goedel-T-1958

]

, which was analyzed by

[

Tait-1966

]

, who used,
following

[

Goedel-T-1958

]

, the terminology “definitional equality” for
conversion: two terms are

judgmentally equal

if they reduce to a
common term by means of a

sequence

of applications of the

reduction

rules. This terminology was also used by de Bruijn

[

deBruijn-1973

]

in his

presentation

of

AUTOMATH

.

Streicher

[

Streicher-1991

,

Theorem

4.13]

, explains how to give the

semantics

in a contextual

category

of terms in normal form using a simple syntax

similar

to the one we have presented.

Our second presentation comprises fairly standard presentation of
intensional Martin-Löf

type theory

, with some additional features needed in

homotopy type theory

. Compared to a reference presentation of

[

hofmann:syntax-and-semantics

]

, the type theory of this book has a few
non-critical

differences

:

•

universes

à la Russell, in the sense of

[

martin-lof:bibliopolis

]

; and

•

judgmental

η

and function extensionality for

Π

types;

and a few features essential for homotopy type theory:

•

the univalence axiom; and

•

higher inductive types

.

As a matter of convenience, the book primarily defines

functions

by

induction

using

definition

by

pattern matching

.
It is possible to formalize the
notion of pattern matching, as done in

\autoref

sec:syntax-informally. However, the
standard type-theoretic presentation, adopted in

\autoref

sec:syntax-more-formally, is to introduce a single

dependent
eliminator

for each type former, from which functions out of that type must be
defined. This approach is easier to formalize both syntactically and
semantically, as it amounts to the

universal property

of the type former.
The two approaches are

equivalent

; see §1.10 (

http://planetmath.org/110patternmatchingandrecursion

) for a
longer discussion.

Title

Appendix A Notes

\metatable

Generated on Thu Feb 8 19:44:35 2018 by

LaTeXML
Chapter 10 Notes

Chapter 10 Notes

The basic properties one expects of the

category of sets

date back to the early days of

elementary topos

theory.
The

Elementary theory of the category of sets

referred to in

\autoref

subsec:emacinsets was introduced by Lawvere in

[

lawvere:etcs-long

]

, as a category-theoretic axiomatization of

set theory

.
The notion of

Π

⁢

W

-pretopos, regarded as a predicative version of an elementary topos, was introduced in

[

MoerdijkPalmgren2002

]

; see also

[

palmgren:cetcs

]

.

The treatment of the category of sets in

\autoref

sec:piw-pretopos roughly follows that in

[

RijkeSpitters

]

.
The fact that

epimorphisms

are

surjective

(

\autoref

epis-surj) is well known in classical mathematics, but is not as

trivial

as it may seem to prove

predicatively

.
The proof in

[

Mines/R/R:1988

]

uses the

power set

operation

(which is

impredicative

), although it can also be seen as a predicative proof of the weaker statement that a map in a

universe

𝒰

i

is surjective if it is an epimorphism in the next universe

𝒰

i

+

1

.
A predicative proof for setoids was given by Wilander

[

Wilander2010

]

.
Our proof is

similar

to Wilander’s, but avoids setoids by using

pushouts

and univalence.

The

implication

in

\autoref

thm:1surj_to_surj_to_pem from

𝖠𝖢

to

𝖫𝖤𝖬

is an adaptation to

homotopy type
theory

of a

theorem

from topos theory due to Diaconescu

[

Diaconescu

]

; it was posed as a problem already by Bishop

[

Bishop1967

, Problem 2]

.

For the intuitionistic theory of

ordinal numbers

, see

[

taylor:

ordinals

]

and also

[

JoyalMoerdijk1995

]

.
Definitions of well-foundedness in

type theory

by an

induction

principle, including the inductive

predicate

of accessibility, were studied in

[

Huet80

,

Paulson86

,

Nordstrom88

]

, although the idea dates back to Getzen’s proof of the

consistency

of

arithmetic

[

Gentzen36

]

.

The idea of algebraic set theory, which informs our development in

\autoref

sec:cumulative-hierarchy of the

cumulative hierarchy

, is due to

[

JoyalMoerdijk1995

]

, but it derives from earlier work by

[

AczelCZF

]

.

Title

Chapter 10 Notes

\metatable

Generated on Thu Feb 8 19:44:38 2018 by

LaTeXML