aarjaneiro/planetmath huggingface dataset:
8.7 The van Kampen theorem

8.7 The van Kampen theorem

The

van Kampen theorem

calculates the

fundamental group

π

1

of a (

homotopy

)

pushout

of spaces.
It is traditionally stated for a

topological space

X

which is the union of two open subspaces

U

and

V

, but in homotopy-theoretic terms this is just a convenient way of ensuring that

X

is the pushout of

U

and

V

over their

intersection

.
Thus, we will prove a version of the van Kampen theorem for arbitrary pushouts.

In this

section

we will describe a proof of the van Kampen theorem which uses the same encode-decode method that we used for

π

1

⁢

(

𝕊

1

)

in

\autoref

sec:pi1-s1-intro.
There is also a more homotopy-theoretic approach; see

\autoref

ex:rezk-vankampen.

We need a more refined version of the encode-decode method.
In

\autoref

sec:pi1-s1-intro (as well as in

\autoref

sec:compute-coprod,

\autoref

sec:compute-nat) we used it to characterize the

path space

of a (higher) inductive type

W

— deriving as a

consequence

a

characterization

of the

loop space

Ω

⁢

(

W

)

, and thereby also of its 0-truncation

π

1

⁢

(

W

)

.
In the van Kampen theorem, our goal is only to characterize the fundamental group

π

1

⁢

(

W

)

, and we do not have any explicit description of the loop spaces or the path spaces to use.

It turns out that we can use the same technique directly for a truncated version of the path

fibration

, thereby characterizing not only the fundamental

group

π

1

⁢

(

W

)

, but also the whole fundamental

groupoid

.
Specifically, for a type

X

, write

Π

1

⁢

X

:

X

→

X

→

𝒰

for the

0

-truncation of its identity type, i.e.

Π

1

X

(

x

,

y

)

:

≡

∥

x

=

y

∥

0

.
Note that we have induced groupoid

operations

(

–

⁢

\centerdot

⁢

–

)

:

Π

1

⁢

X

⁢

(

x

,

y

)

→

Π

1

⁢

X

⁢

(

y

,

z

)

→

Π

1

⁢

X

⁢

(

x

,

z

)

(

–

)

-

1

:

Π

1

⁢

X

⁢

(

x

,

y

)

→

Π

1

⁢

X

⁢

(

y

,

x

)

𝗋𝖾𝖿𝗅

x

:

Π

1

⁢

X

⁢

(

x

,

x

)

𝖺𝗉

f

:

Π

1

⁢

X

⁢

(

x

,

y

)

→

Π

1

⁢

Y

⁢

(

f

⁢

x

,

f

⁢

y

)

for which we use the same notation as the corresponding operations on paths.

Title

8.7 The van Kampen theorem

\metatable

Generated on Thu Feb 8 19:41:55 2018 by

LaTeXML
9.3 Adjunctions

9.3 Adjunctions

The definition of

adjoint functors

is straightforward; the main interesting aspect arises from proof-relevance.

Definition 9.3.1

.

A

functor

F

:

A

→

B

is a

left adjoint

if there exists

•

A functor

G

:

B

→

A

.

•

A

natural transformation

η

:

1

A

→

G

⁢

F

(the

unit

).

•

A natural transformation

ϵ

:

F

⁢

G

→

1

B

(the

counit

).

•

(

ϵ

⁢

F

)

⁢

(

F

⁢

η

)

=

1

F

.

•

(

G

⁢

ϵ

)

⁢

(

η

⁢

G

)

=

1

G

.

The last two equations are called the

triangle identities

or

zigzag

identities

.

We leave it to the reader to define right adjoints analogously.

Lemma 9.3.2

.

If

A

is a

category

(but

B

may be only a

precategory

), then the type “

F

is a left adjoint” is a mere proposition.

Proof.

Suppose we are given

(

G

,

η

,

ϵ

)

with the triangle identities and also

(

G

′

,

η

′

,

ϵ

′

)

.
Define

γ

:

G

→

G

′

to be

(

G

′

⁢

ϵ

)

⁢

(

η

′

⁢

G

)

, and

δ

:

G

′

→

G

to be

(

G

⁢

ϵ

′

)

⁢

(

η

⁢

G

′

)

.
Then

δ

⁢

γ

=

(

G

⁢

ϵ

′

)

⁢

(

η

⁢

G

′

)

⁢

(

G

′

⁢

ϵ

)

⁢

(

η

′

⁢

G

)

=

(

G

⁢

ϵ

′

)

⁢

(

G

⁢

F

⁢

G

′

⁢

ϵ

)

⁢

(

η

⁢

G

′

⁢

F

⁢

G

)

⁢

(

η

′

⁢

G

)

=

(

G

⁢

ϵ

)

⁢

(

G

⁢

ϵ

′

⁢

F

⁢

G

)

⁢

(

G

⁢

F

⁢

η

′

⁢

G

)

⁢

(

η

⁢

G

)

=

(

G

⁢

ϵ

)

⁢

(

η

⁢

G

)

=

1

G

using

\autoref

ct:interchange and the triangle identities.
Similarly, we show

γ

⁢

δ

=

1

G

′

, so

γ

is a

natural isomorphism

G

≅

G

′

.
By

\autoref

ct:functor-cat, we have an identity

G

=

G

′

.

Now we need to know that when

η

and

ϵ

are transported along this identity, they become equal to

η

′

and

ϵ

′

.
By

\autoref

ct:idtoiso-trans, this transport is given by composing with

γ

or

δ

as appropriate.
For

η

, this yields

(

G

′

⁢

ϵ

⁢

F

)

⁢

(

η

′

⁢

G

⁢

F

)

⁢

η

=

(

G

′

⁢

ϵ

⁢

F

)

⁢

(

G

′

⁢

F

⁢

η

)

⁢

η

′

=

η

′

using

\autoref

ct:interchange and the triangle identity.
The case of

ϵ

is

similar

.
Finally, the triangle identities transport correctly automatically, since hom-sets are sets.
∎

In

\autoref

sec:yoneda we will give another proof of

\autoref

ct:adjprop.

Title

9.3 Adjunctions

\metatable

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

LaTeXML
9.6 Strict categories

9.6 Strict categories

Definition 9.6.1

.

A

strict category

is a

precategory

whose type of objects is a set.

In accordance with the mathematical red herring principle, a strict category is not necessarily a

category

.
In fact, a category is a strict category precisely when it is gaunt (

\autoref

ct:gaunt).
Most of the time,

category theory

is about categories, not strict ones, but sometimes one wants to consider strict categories.
The main advantage of this is that strict categories have a stricter notion of “sameness” than

equivalence

, namely

isomorphism

(or equivalently, by

\autoref

ct:cat-eq-iso, equality).

Here is one origin of strict categories.

Example 9.6.2

.

Let

A

be a precategory and

x

:

A

an object.
Then there is a precategory

mono

⁢

(

A

,

x

)

as follows:

•

Its objects consist of an object

y

:

A

and a

monomorphism

m

:

hom

A

⁡

(

y

,

x

)

.
(As usual,

m

:

hom

A

⁡

(

y

,

x

)

is a

monomorphism

(or is

monic

) if

(

m

∘

f

=

m

∘

g

)

⇒

(

f

=

g

)

.)

•

Its

morphisms

from

(

y

,

m

)

to

(

z

,

n

)

are arbitrary morphisms from

y

to

z

in

A

(not necessarily respecting

m

and

n

).

An equality

(

y

,

m

)

=

(

z

,

n

)

of objects in

mono

⁢

(

A

,

x

)

consists of an equality

p

:

y

=

z

and an equality

p

*

(

m

)

=

n

, which by

\autoref

ct:idtoiso-trans is equivalently an equality

m

=

n

∘

idtoiso

⁢

(

p

)

.
Since hom-sets are sets, the type of such equalities is a mere proposition.
But since

m

and

n

are monomorphisms, the

type of morphisms

f

such that

m

=

n

∘

f

is also a mere proposition.
Thus, if

A

is a category, then

(

y

,

m

)

=

(

z

,

n

)

is a mere proposition, and hence

mono

⁢

(

A

,

x

)

is a strict category.

This example can be dualized, and generalized in various ways.
Here is an interesting application of strict categories.

Example 9.6.3

.

Let

E

/

F

be a finite

Galois extension

of fields, and

G

its

Galois group

.
Then there is a strict category whose objects are intermediate fields

F

⊆

K

⊆

E

, and whose morphisms are

field homomorphisms

which fix

F

pointwise

(but need not commute with the

inclusions

into

E

).
There is another strict category whose objects are subgroups

H

⊆

G

, and whose morphisms are morphisms of

G

-sets

G

/

H

→

G

/

K

.
The

fundamental theorem of Galois theory

says that these two precategories are isomorphic (not merely

equivalent

).

Title

9.6 Strict categories

\metatable

Generated on Thu Feb 8 19:42:50 2018 by

LaTeXML
9.7 †-categories

9.7

†

-categories

It is also worth mentioning a useful kind of precategory whose type of objects is not a set, but which is not a category either.

Definition 9.7.1

.

A

†

-precategory

is a precategory

A

together with the following.

1.

For each

x

,

y

:

A

, a

function

(

-

)

†

:

hom

A

⁡

(

x

,

y

)

→

hom

A

⁡

(

y

,

x

)

.

2.

For all

x

:

A

, we have

(

1

x

)

†

=

1

x

.

3.

For all

f

,

g

we have

(

g

∘

f

)

†

=

f

†

∘

g

†

.

4.

For all

f

we have

(

f

†

)

†

=

f

.

Definition 9.7.2

.

A

morphism

f

:

hom

A

⁡

(

x

,

y

)

in a

†

-precategory is

unitary

if

f

†

∘

f

=

1

x

and

f

∘

f

†

=

1

y

.

Of course, every unitary morphism is an

isomorphism

, and being unitary is a mere proposition.
Thus for each

x

,

y

:

A

we have a set of unitary isomorphisms from

x

to

y

, which we denote

(

x

≅

†

y

)

.

Lemma 9.7.3

.

If

p

:

(

x

=

y

)

, then

idtoiso

⁢

(

p

)

is unitary.

Proof.

By

induction

, we may assume

p

is

𝗋𝖾𝖿𝗅

x

.
But then

(

1

x

)

†

∘

1

x

=

1

x

∘

1

x

=

1

x

and similarly.
∎

Definition 9.7.4

.

A

†

-category

is a

†

-precategory such that for all

x

,

y

:

A

, the function

(

x

=

y

)

→

(

x

≅

†

y

)

from

\autoref

ct:idtounitary is an equivalence.

Example 9.7.5

.

The category

R

⁢

e

⁢

l

from

\autoref

ct:rel becomes a

†

-precategory if we define

(

R

†

)

(

y

,

x

)

:

≡

R

(

x

,

y

)

.
The proof that

R

⁢

e

⁢

l

is a category actually shows that every isomorphism is unitary; hence

R

⁢

e

⁢

l

is also a

†

-category.

Example 9.7.6

.

Any groupoid becomes a

†

-category if we define

f

†

:

≡

f

-

1

.

Example 9.7.7

.

Let

H

⁢

i

⁢

l

⁢

b

be the following precategory.

•

Its objects are

finite-dimensional

vector spaces

equipped with an

inner product

⟨

–

,

–

⟩

.

•

Its morphisms are arbitrary

linear maps

.

By standard

linear algebra

, any linear map

f

:

V

→

W

between finite
dimensional

inner product spaces

has a uniquely defined

adjoint

f

†

:

W

→

V

, characterized by

⟨

f

⁢

v

,

w

⟩

=

⟨

v

,

f

†

⁢

w

⟩

.
In this way,

H

⁢

i

⁢

l

⁢

b

becomes a

†

-precategory.
Moreover, a

linear isomorphism

is unitary precisely when it is an

isometry

,
i.e.

⟨

f

⁢

v

,

f

⁢

w

⟩

=

⟨

v

,

w

⟩

.
It follows from this that

H

⁢

i

⁢

l

⁢

b

is a

†

-category, though it is not a category (not every linear isomorphism is unitary).

There has been a good deal of general theory developed for

†

-categories under classical

foundations

.
It was observed early on that the unitary isomorphisms, not arbitrary isomorphisms, are the correct notion of “sameness” for objects of a

†

-category, which has caused some consternation among category theorists.

Homotopy type theory

resolves this issue by identifying

†

-categories, like strict categories, as simply a different kind of precategory.

Title

9.7

†

-categories

\metatable

Generated on Thu Feb 8 19:42:53 2018 by

LaTeXML
A.1.1 Type universes

A.1.1 Type universes

We

postulate

a hierarchy of

universes

denoted by primitive

constants

𝒰

0

,

𝒰

1

,

𝒰

2

,

…

The first two rules for universes say that they form a

cumulative hierarchy

of types:

•

𝒰

m

:

𝒰

n

for

m

<

n

,

•

if

A

:

𝒰

m

and

m

≤

n

, then

A

:

𝒰

n

,

and the third expresses the idea that an object of a universe can serve as a type and stand to the
right of a colon in judgments:

•

if

Γ

⊢

A

:

𝒰

n

, and

x

is a new variable,

1

1

By “new” we mean that it does not appear in

Γ

or

A

.

then

⊢

(

Γ

,

x

:

A

)

𝖼𝗍𝗑

.

In the body of the book, an equality judgment

A

≡

B

:

𝒰

n

between types

A

and

B

is usually abbreviated to

A

≡

B

. This is an

instance

of

typical ambiguity

, as we can always switch to a larger universe, which however does not affect the

validity

of the judgment.

The following conversion rule allows us to replace a type by one equal to it in a typing judgment:

•

if

a

:

A

and

A

≡

B

then

a

:

B

.

Title

A.1.1 Type universes

\metatable

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

LaTeXML
A.1.2 Dependent function types (Π-types)

A.1.2 Dependent function types (

Π

-types)

We introduce a primitive constant

c

Π

, but write

c

Π

(

A

,

λ

x

.

B

)

as

∏

(

x

:

A

)

B

. Judgments concerning
such

expressions

and expressions of the form

λ

⁢

x

.

b

are introduced by the following rules:

•

if

Γ

⊢

A

:

𝒰

n

and

Γ

,

x

:

A

⊢

B

:

𝒰

n

, then

Γ

⊢

∏

(

x

:

A

)

B

:

𝒰

n

•

if

Γ

,

x

:

A

⊢

b

:

B

then

Γ

⊢

(

λ

x

.

b

)

:

(

∏

(

x

:

A

)

B

)

•

if

Γ

⊢

g

:

∏

(

x

:

A

)

B

and

Γ

⊢

t

:

A

then

Γ

⊢

g

⁢

(

t

)

:

B

⁢

[

t

/

x

]

If

x

does not occur freely in

B

, we abbreviate

∏

(

x

:

A

)

B

as the non-dependent function type

A

→

B

and derive the following rule:

•

if

Γ

⊢

g

:

A

→

B

and

Γ

⊢

t

:

A

then

Γ

⊢

g

⁢

(

t

)

:

B

Using non-dependent function types and leaving implicit the context

Γ

, the rules above can be written in the following alternative style that we use in the rest of this section of the appendix.

•

if

A

:

𝒰

n

and

B

:

A

→

𝒰

n

, then

∏

(

x

:

A

)

B

⁢

(

x

)

:

𝒰

n

•

if

x

:

A

⊢

b

:

B

then

λ

x

.

b

:

∏

(

x

:

A

)

B

(

x

)

•

if

g

:

∏

(

x

:

A

)

B

⁢

(

x

)

and

t

:

A

then

g

⁢

(

t

)

:

B

⁢

(

t

)

Title

A.1.2 Dependent function types (

Π

-types)

\metatable

Generated on Thu Feb 8 19:43:24 2018 by

LaTeXML
A.1.3 Dependent pair types (Σ-types)

A.1.3 Dependent pair types (

Σ

-types)

We introduce primitive

constants

c

Σ

and

c

𝗉𝖺𝗂𝗋

. An

expression

of the form

c

Σ

(

A

,

λ

a

.

B

)

is written as

∑

(

a

:

A

)

B

,
and an expression of the form

c

𝗉𝖺𝗂𝗋

⁢

(

a

,

b

)

is written as

(

a

,

b

)

. We write

A

×

B

instead of

∑

(

x

:

A

)

B

if

x

is not free in

B

.

Judgments concerning such expressions are introduced by the following
rules:

•

if

A

:

𝒰

n

and

B

:

A

→

𝒰

n

, then

∑

(

x

:

A

)

B

⁢

(

x

)

:

𝒰

n

•

if, in

addition

,

a

:

A

and

b

:

B

⁢

(

a

)

, then

(

a

,

b

)

:

∑

(

x

:

A

)

B

⁢

(

x

)

If we have

A

and

B

as above,

C

:

∑

(

x

:

A

)

B

⁢

(

x

)

→

𝒰

m

, and

d

:

∏

(

x

:

A

)

∏

(

y

:

B

(

x

)

)

C

⁢

(

(

x

,

y

)

)

we can introduce a defined constant

f

:

∏

(

p

:

∑

(

x

:

A

)

B

(

x

)

)

C

⁢

(

p

)

with the defining equation

f

(

(

x

,

y

)

)

:

≡

d

(

x

,

y

)

.

Note that

C

,

d

,

x

, and

y

may contain extra implicit

parameters

x

1

,

…

,

x

n

if they were obtained in some non-empty

context

; therefore, the fully explicit

recursion

schema is

f

(

x

1

,

…

,

x

n

,

(

x

(

x

1

,

…

,

x

n

)

,

y

(

x

1

,

…

,

x

n

)

)

)

:

≡

d

(

x

1

,

…

,

x

n

,

(

x

(

x

1

,

…

,

x

n

)

,

y

(

x

1

,

…

,

x

n

)

)

)

.

Title

A.1.3 Dependent pair types (

Σ

-types)

\metatable

Generated on Thu Feb 8 19:43:27 2018 by

LaTeXML
A.1.4 Coproduct types

A.1.4 Coproduct types

We introduce primitive constants

c

+

,

c

𝗂𝗇𝗅

, and

c

𝗂𝗇𝗋

.
We write

A

+

B

instead of

c

+

⁢

(

A

,

B

)

,

𝗂𝗇𝗅

⁢

(

a

)

instead of

c

𝗂𝗇𝗅

⁢

(

a

)

, and

𝗂𝗇𝗋

⁢

(

a

)

instead of

c

𝗂𝗇𝗋

⁢

(

a

)

:

•

if

A

,

B

:

𝒰

n

then

A

+

B

:

𝒰

n

•

moreover,

𝗂𝗇𝗅

:

A

→

A

+

B

and

𝗂𝗇𝗋

:

B

→

A

+

B

If we have

A

and

B

as above,

C

:

A

+

B

→

𝒰

m

,

d

:

∏

(

x

:

A

)

C

⁢

(

𝗂𝗇𝗅

⁢

(

x

)

)

, and

e

:

∏

(

y

:

B

)

C

⁢

(

𝗂𝗇𝗋

⁢

(

y

)

)

,
then we can introduce a defined constant

f

:

∏

(

z

:

A

+

B

)

C

⁢

(

z

)

with the defining equations

f

(

𝗂𝗇𝗅

(

x

)

)

:

≡

d

(

x

)

and

f

(

𝗂𝗇𝗋

(

y

)

)

:

≡

e

(

y

)

.

Title

A.1.4

Coproduct

types

\metatable

Generated on Thu Feb 8 19:43:30 2018 by

LaTeXML
A.1.5 The finite types

A.1.5 The finite types

We introduce primitive constants

⋆

,

𝟎

,

𝟏

, satisfying the following rules:

•

𝟎

:

𝒰

0

,

𝟏

:

𝒰

0

•

⋆

:

𝟏

Given

C

:

𝟎

→

𝒰

n

we can introduce a defined constant

f

:

∏

(

x

:

𝟎

)

C

⁢

(

x

)

, with no defining equations.

Given

C

:

𝟏

→

𝒰

n

and

d

:

C

⁢

(

⋆

)

we can introduce a defined constant

f

:

∏

(

x

:

𝟏

)

C

⁢

(

x

)

, with defining equation

f

(

⋆

)

:

≡

d

.

Title

A.1.5 The

finite types

\metatable

Generated on Thu Feb 8 19:43:32 2018 by

LaTeXML
A.1.6 Natural numbers

A.1.6 Natural numbers

The type of

natural numbers

is obtained by introducing primitive

constants

ℕ

,

0

, and

𝗌𝗎𝖼𝖼

with the following rules:

•

ℕ

:

𝒰

0

,

•

0

:

ℕ

,

•

𝗌𝗎𝖼𝖼

:

ℕ

→

ℕ

.

Furthermore, we can define

functions

by

primitive recursion

. If we have

C

:

ℕ

→

𝒰

k

we can introduce a defined constant

f

:

∏

(

x

:

ℕ

)

C

⁢

(

x

)

whenever we have

d

:

C

⁢

(

0

)

e

:

∏

(

x

:

ℕ

)

(

C

(

x

)

→

C

(

𝗌𝗎𝖼𝖼

(

x

)

)

)

with the defining equations

f

(

0

)

:

≡

d

and

f

(

𝗌𝗎𝖼𝖼

(

x

)

)

:

≡

e

(

x

,

f

(

x

)

)

.

Title

A.1.6 Natural numbers

\metatable

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

LaTeXML
A.1.7 W-types

A.1.7

W

-types

For

W

-types we introduce primitive

constants

c

𝖶

and

c

𝗌𝗎𝗉

.
An

expression

of the form

c

𝖶

(

A

,

λ

x

.

B

)

is written as

𝖶

(

x

:

A

)

⁢

B

, and an expression of the form

c

𝗌𝗎𝗉

⁢

(

x

,

u

)

is written
as

𝗌𝗎𝗉

⁢

(

x

,

u

)

:

•

if

A

:

𝒰

n

and

B

:

A

→

𝒰

n

, then

𝖶

(

x

:

A

)

⁢

B

⁢

(

x

)

:

𝒰

n

•

if moreover,

a

:

A

and

g

:

B

⁢

(

a

)

→

𝖶

(

x

:

A

)

⁢

B

⁢

(

x

)

then

𝗌𝗎𝗉

⁢

(

a

,

g

)

:

𝖶

(

x

:

A

)

⁢

B

⁢

(

x

)

.

Here also we can define

functions

by total

recursion

. If we have

A

and

B

as above and

C

:

𝖶

(

x

:

A

)

⁢

B

⁢

(

x

)

→

𝒰

m

, then we can introduce a defined constant

f

:

∏

(

z

:

𝖶

(

x

:

A

)

B

(

x

)

)

C

⁢

(

z

)

whenever we have

d

:

∏

(

x

:

A

)

∏

(

u

:

B

(

x

)

→

𝖶

(

x

:

A

)

B

(

x

)

)

(

(

∏

(

y

:

B

(

x

)

)

C

(

u

(

y

)

)

)

→

C

(

𝗌𝗎𝗉

(

x

,

u

)

)

)

with the defining equation

f

(

𝗌𝗎𝗉

(

x

,

u

)

)

:

≡

d

(

x

,

u

,

f

∘

u

)

.

Title

A.1.7

W

-types

\metatable

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

LaTeXML
A.1.8 Identity types

A.1.8 Identity types

We introduce

primitive

constants

c

=

and

c

𝗋𝖾𝖿𝗅

. We write

a

=

A

b

for

c

=

⁢

(

A

,

a

,

b

)

and

𝗋𝖾𝖿𝗅

a

for

c

𝗋𝖾𝖿𝗅

⁢

(

A

,

a

)

, when

a

:

A

is understood:

•

If

A

:

𝒰

n

,

a

:

A

, and

b

:

A

then

a

=

A

b

:

𝒰

n

.

•

If

a

:

A

then

𝗋𝖾𝖿𝗅

a

:

a

=

A

a

.

Given

a

:

A

, if

y

:

A

,

z

:

a

=

A

y

⊢

C

:

𝒰

m

and

⊢

d

:

C

[

a

,

𝗋𝖾𝖿𝗅

a

/

y

,

z

]

then we can introduce a defined constant

f

:

∏

(

y

:

A

)

∏

(

z

:

a

=

A

y

)

C

with defining equation

f

(

a

,

𝗋𝖾𝖿𝗅

a

)

:

≡

d

.

Title

A.1.8 Identity types

\metatable

Generated on Thu Feb 8 19:43:41 2018 by

LaTeXML
A.2.10 Identity types

A.2.10 Identity types

The

presentation

here corresponds to the (unbased) path

induction

principle for identity types in
§1.12 (

http://planetmath.org/112identitytypes

).

{mathparpagebreakable}

\inferrule

*[right=

=

-

form

]
Γ ⊢A :

𝒰

_i

Γ ⊢a : A

Γ ⊢b : A
Γ ⊢

a

=

A

b

:

𝒰

_i

\inferrule

*[right=

=

-

intro

]
Γ ⊢A :

𝒰

_i

Γ ⊢a : A
Γ ⊢

𝗋𝖾𝖿𝗅

a

:

a

=

A

a

\inferrule

*[right=

=

-

elim

]
Γ,x : A,y : A,p :

x

=

A

y

⊢C :

𝒰

_i

Γ,z : A ⊢c : C[z,z,

𝗋𝖾𝖿𝗅

z

/x,y,p]

Γ ⊢a : A

Γ ⊢b : A

Γ ⊢p’ :

a

=

A

b

Γ ⊢

ind

_=_A’(x.y.p.C,z.c,a,b,p’) : C[a,b,p’/x,y,p]

\inferrule

*[right=

=

-

comp

]
Γ,x : A,y : A,p :

x

=

A

y

⊢C :

𝒰

_i

Γ,z : A ⊢c : C[z,z,

𝗋𝖾𝖿𝗅

z

/x,y,p]

Γ ⊢a : A
Γ ⊢

ind

_=_A’(x.y.p.C,z.c,a,a,

𝗋𝖾𝖿𝗅

a

) ≡c[a/z] : C[a,a,

𝗋𝖾𝖿𝗅

a

/x,y,p]

In

𝗂𝗇𝖽

=

A

′

,

x

,

y

, and

p

are bound in

C

, and

z

is bound in

c

.

Title

A.2.10 Identity types

\metatable

Generated on Thu Feb 8 19:43:47 2018 by

LaTeXML
A.2.11 Definitions

A.2.11 Definitions

Although the rules we listed so far allows us to construct everything we need directly, we
would still like to be able to use named

constants

, such as

𝗂𝗌𝖾𝗊𝗎𝗂𝗏

, as a matter of
convenience. Informally, we can think of these constants simply as
abbreviations, but the situation is a bit subtler in the formalization.

For example, consider function composition, which takes

f

:

A

→

B

and

g

:

B

→

C

to

g

∘

f

:

A

→

C

. Somewhat unexpectedly, to make this work formally,

∘

must take as

arguments

not only

f

and

g

, but also their types

A

,

B

,

C

:

∘

:

≡

λ

(

A

:

𝒰

i

)

.

λ

(

B

:

𝒰

i

)

.

λ

(

C

:

𝒰

i

)

.

λ

(

g

:

B

→

C

)

.

λ

(

f

:

A

→

B

)

.

λ

(

x

:

A

)

.

g

(

f

(

x

)

)

.

From a practical perspective, we do not want to annotate each application of

∘

with

A

,

B

and

C

, as the are usually quite easily guessed from surrounding information. We would like to simply write

g

∘

f

.
Then,

strictly

speaking,

g

∘

f

is not an abbreviation for

λ

(

x

:

A

)

.

g

(

f

(

x

)

)

,
because it involves additional

implicit arguments

which we want to suppress.

Inference of implicit arguments,

typical ambiguity

(§1.3 (

http://planetmath.org/13universesandfamilies

)),
ensuring that symbols are only defined once, etc., are collectively called

elaboration

.
Elaboration must take place prior to checking a

derivation

, and is
thus not usually presented as part of the core

type theory

. However, it is
essentially impossible to use any implementation of type theory which does not
perform elaboration; see

[

Coq

,

norell2007towards

]

for further discussion.

Title

A.2.11

Definitions

\metatable

Generated on Thu Feb 8 19:43:49 2018 by

LaTeXML
A.2.1 Contexts

A.2.1 Contexts

A

context

is a list

x

1

⁢

:

⁢

A

1

,

x

2

⁢

:

⁢

A

2

,

…

,

x

n

⁢

:

⁢

A

n

which indicates that the distinct

variables

x

1

,

…

,

x

n

are assumed to have types

A

1

,

…

,

A

n

, respectively. The list may be empty. We abbreviate contexts with the letters

Γ

and

Δ

, and we may juxtapose them to form larger contexts.

The judgment

Γ

⁢

𝖼𝗍𝗑

formally expresses the fact that

Γ

is a well-formed context, and is governed by the

rules of inference

{mathpar}

\inferrule

*[right=

𝖼𝗍𝗑

-

emp

]

⋅

𝖼𝗍𝗑

\inferrule

*[right=

𝖼𝗍𝗑

-

ext

]
x_1 : A_1, …, x_n-1 : A_n-1 ⊢A_n :

𝒰

_i
(x_1 : A_1, …, x_n : A_n)

𝖼𝗍𝗑

with a side condition for the second rule: the variable

x

n

must be distinct from the variables

x

1

,

…

,

x

n

-

1

.
Note that the

hypothesis

and

conclusion

of

𝖼𝗍𝗑

-

ext

are judgments of different forms: the hypothesis says that in the context of variables

x

1

,

…

,

x

n

-

1

, the

expression

A

n

has type

𝒰

i

; while the conclusion says that the extended context

(

x

1

⁢

:

⁢

A

1

,

…

,

x

n

⁢

:

⁢

A

n

)

is well-formed.
(It is a meta-theoretic

property

of the system that if

x

1

⁢

:

⁢

A

1

,

…

,

x

n

⁢

:

⁢

A

n

⊢

b

:

B

is

derivable

, then the context

(

x

1

⁢

:

⁢

A

1

,

…

,

x

n

⁢

:

⁢

A

n

)

must be well-formed; thus

𝖼𝗍𝗑

-

ext

does not need to hypothesize well-formedness of the context to the left of

x

n

.)

Title

A.2.1 Contexts

\metatable

Generated on Thu Feb 8 19:43:52 2018 by

LaTeXML
A.2.3 Type universes

A.2.3 Type universes

We

postulate

an

infinite

hierarchy of type

universes

𝒰

0

,

𝒰

1

,

𝒰

2

,

…

Each universe is

contained

in the next, and any type in

𝒰

i

is also in

𝒰

i

+

1

:

{mathpar}

\inferrule

*[right=

𝒰

-

intro

]
Γ

𝖼𝗍𝗑

Γ ⊢

𝒰

_i :

𝒰

_i+1

\inferrule

*[right=

𝒰

-

cumul

]
Γ ⊢A :

𝒰

_i
Γ ⊢A :

𝒰

_i+1

We shall set up the rules of

type theory

in such a way that

Γ

⊢

a

:

A

implies

Γ

⊢

A

:

𝒰

i

for some

i

. In other words, if

A

plays the role of a type then it is in some universe. Another property of our type system is that

Γ

⊢

a

≡

b

:

A

implies

Γ

⊢

a

:

A

and

Γ

⊢

b

:

A

.

Title

A.2.3 Type universes

\metatable

Generated on Thu Feb 8 19:43:57 2018 by

LaTeXML