aarjaneiro/planetmath huggingface dataset:
well-founded induction

well-founded induction

Definition

.

Let

S

be a non-empty set, and

R

be a

binary relation

on

S

. Then

R

is said to be a

well-founded

relation

if and only if every nonempty subset

X

⊆

S

has an

R

-

minimal element

(

http://planetmath.org/RMinimalElement

). When

R

is well-founded, we also call the underlying set

S

well-founded.

Note that

R

is by no means required to be a

total order

, or even a

partial order

. When

R

is a partial order, then

R

-minimality is the same as minimality (of the partial order). A classical example of a well-founded set that is not

totally ordered

is the set

ℕ

of

natural numbers

ordered by

division

, i.e.

a

⁢

R

⁢

b

if and only if

a

divides

b

, and

a

≠

1

. The

R

-minimal elements of

ℕ

are the

prime numbers

.

Let

Φ

be a

property

defined on a well-founded set

S

. The principle of

well-founded induction

states that if the following is true :

1.

Φ

is true for all the

R

-minimal elements of

S

2.

for every

a

, if for every

x

such that

x

⁢

R

⁢

a

, we have

Φ

⁢

(

x

)

, then we have

Φ

⁢

(

a

)

then

Φ

is true for every

a

∈

S

.

As an example of application of this principle, we mention the proof of the

fundamental theorem of arithmetic

: every natural number has a unique factorization into prime numbers. The proof goes by well-founded induction in the set

ℕ

ordered by division.

Title

well-founded induction

Canonical

name

WellfoundedInduction

Date of creation

2013-03-22 12:42:17

Last modified on

2013-03-22 12:42:17

Owner

ratboy (4018)

Last modified by

ratboy (4018)

Numerical id

22

Author

ratboy (4018)

Entry type

Theorem

Classification

msc 03B10

Related topic

PrincipleOfFiniteInduction

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

LaTeXML
well-founded induction on formulas

well-founded induction on formulas

Let

L

be a

first-order language

. The

formulas

of

L

are built by a finite application of the rules of construction. This says that the

relation

≤

defined on formulas by

φ

≤

ψ

if and only if

φ

is a

subformula

of

ψ

is a

well-founded relation

. Therefore, we can formulate a principle of

induction

for formulas as follows : suppose

P

is a

property

defined on formulas, then

P

is true for every formula of

L

if and only if

1.

P

is true for the

atomic formulas

;

2.

for every formula

φ

, if

P

is true for every subformula of

φ

, then

P

is true for

φ

.

Title

well-founded induction on formulas

Canonical

name

WellfoundedInductionOnFormulas

Date of creation

2013-03-22 12:42:49

Last modified on

2013-03-22 12:42:49

Owner

jihemme (316)

Last modified by

jihemme (316)

Numerical id

6

Author

jihemme (316)

Entry type

Definition

Classification

msc 03B10

Classification

msc 03C99

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

LaTeXML
10.1.1 Limits and colimits

10.1.1 Limits and colimits

Since sets are

closed under

products

, the

universal property

of products in

\autoref

thm:prod-ump shows immediately that

𝒮

⁢

e

⁢

t

has finite products.
In fact, infinite products follow just as easily from the equivalence

(

X

→

∏

a

:

A

B

(

a

)

)

≃

(

∏

a

:

A

(

X

→

B

(

a

)

)

)

.

And we saw in

\autoref

ex:

pullback

that the pullback of

f

:

A

→

C

and

g

:

B

→

C

can be defined as

∑

(

a

:

A

)

∑

(

b

:

B

)

f

⁢

(

a

)

=

g

⁢

(

b

)

; this is a set if

A

,

B

,

C

are and inherits the correct universal property.
Thus,

𝒮

⁢

e

⁢

t

is a

complete

category

in the obvious sense.

Since sets are closed under

+

and contain

𝟎

,

𝒮

⁢

e

⁢

t

has finite

coproducts

.
Similarly, since

∑

(

a

:

A

)

B

⁢

(

a

)

is a set whenever

A

and each

B

⁢

(

a

)

are, it yields a coproduct of the family

B

in

𝒮

⁢

e

⁢

t

.
Finally, we showed in

\autoref

sec:pushouts that pushouts exist in

n

-types, which includes

𝒮

⁢

e

⁢

t

in particular.
Thus,

𝒮

⁢

e

⁢

t

is also

cocomplete

.

Title

10.1.1 Limits and

colimits

\metatable

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

LaTeXML
10.1 The category of sets

10.1 The category of sets

Recall that in

\autoref

cha:category-theory we defined the

category

𝒮

⁢

e

⁢

t

to consist of all

0

-types (in some

universe

𝒰

) and maps between them, and observed that it is a category (not just a

precategory

).
We consider successively the levels of

structure

which

𝒮

⁢

e

⁢

t

possesses.

Title

10.1 The

category of sets

\metatable

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

LaTeXML
10. Set theory

10. Set theory

Our conception of sets as types with particularly simple homotopical

character

, cf.

\autoref

sec:basics-sets, is quite different from the sets of Zermelo–Fraenkel

set theory

, which form a

cumulative hierarchy

with an intricate nested membership

structure

.
For many mathematical purposes, the homotopy-theoretic sets are just as good as
the Zermelo–Fraenkel ones, but there are important

differences

.

We begin this chapter in

\autoref

sec:piw-pretopos by showing that the

category

𝒮

⁢

e

⁢

t

has (most of) the usual

properties

of the

category of sets

.
In constructive, predicative,

univalent foundations

, it is a “

Π

⁢

𝖶

-pretopos”; whereas if we assume propositional resizing
(

\autoref

subsec:prop-subsets) it is an

elementary topos

, and if we assume

𝖫𝖤𝖬

and

𝖠𝖢

then it is a model of Lawvere’s

Elementary Theory of the Category of Sets

.
This is

sufficient

to ensure that the sets in

homotopy type theory

behave like sets as used by most mathematicians outside of set theory.

In the rest of the chapter, we investigate some subjects that traditionally belong to “set theory”.
In

\autoref

sec:

cardinals

,sec:

ordinals

,sec:wellorderings we study cardinal and

ordinal numbers

.
These are traditionally defined in set theory using the global membership

relation

, but we will see that the univalence axiom enables an equally convenient, more “structural” approach.

Finally, in

\autoref

sec:cumulative-hierarchy we consider the possibility of constructing

inside

of homotopy type theory a cumulative hierarchy of sets, equipped with a binary membership relation akin to that of Zermelo–Fraenkel set theory.
This combines

higher inductive types

with ideas from the field of algebraic set theory.

In this chapter we will often use the traditional logical notation described in

\autoref

subsec:prop-trunc.
In

addition

to the basic theory of

\autoref

cha:basics,

\autoref

cha:logic, we use higher inductive types for

colimits

and

quotients

as in

\autoref

sec:colimits,

\autoref

sec:set-quotients, as well as some of the theory of

truncation

from

\autoref

cha:hlevels, particularly the

factorization system

of

\autoref

sec:image-factorization in the case

n

=

-

1

.
In

\autoref

sec:ordinals we use an inductive family (

\autoref

sec:

generalizations

) to describe well-foundedness, and in

\autoref

sec:cumulative-hierarchy we use a more complicated higher inductive type to present the cumulative hierarchy.

Title

10. Set theory

\metatable

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

LaTeXML
11.1 The field of rational numbers

11.1 The field of rational numbers

We first construct the

rational numbers

ℚ

, as the reals can then be seen as a

completion

of

ℚ

. An expert will point out that

ℚ

could be replaced by any approximate field,
i.e., a subring of

ℚ

in which arbitrarily precise approximate

inverses

exist. An example is the
ring of dyadic rationals,
which are those of the form

n

/

2

k

.
If we were implementing constructive mathematics on a computer,
an approximate field would be more suitable, but we leave such finesse for those
who care about the digits of

π

.

We constructed the

integers

ℤ

in

\autoref

sec:set-quotients as a

quotient

of

ℕ

×

ℕ

, and observed that this quotient is

generated by

an idempotent. In

\autoref

sec:free-algebras we saw that

ℤ

is the free group on

𝟏

; we could similarly
show that it is the free commutative ring on

𝟎

. The

field of rationals

ℚ

is
constructed along the same lines as well, namely as the quotient

ℚ

:

≡

(

ℤ

×

ℕ

)

/

≈

where

(

u

,

a

)

≈

(

v

,

b

)

:

≡

(

u

(

b

+

1

)

=

v

(

a

+

1

)

)

.

In other words, a pair

(

u

,

a

)

represents the rational number

u

/

(

1

+

a

)

. There can be
no

division by zero

because we cunningly added one to the

denominator

a

. Here too we
have a canonical choice of representatives, namely fractions in lowest terms. Thus we may
apply

\autoref

lem:quotient-when-canonical-representatives to obtain a set

ℚ

, which
again has a decidable equality.

We do not bother to write down the

arithmetical

operations

on

ℚ

as we trust our readers
know how to compute with fractions even in the case when one is added to the denominator.
Let us just record the

conclusion

that there is an entirely unproblematic construction of
the

ordered field

of rational numbers

ℚ

, with a decidable equality and

decidable

order.
It can also be characterized as the initial ordered field.

Let

ℚ

+

=

\setof

⁢

q

:

ℚ

⁢

|

q

>

⁢

0

be the type of positive rational numbers.

Title

11.1 The field of rational numbers

\metatable

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

LaTeXML
1.12.3 Disequality

1.12.3 Disequality

Finally, let us also say something about

disequality

,
which is

negation

of equality:

1

1

We use “

inequality

”
to refer to

<

and

≤

. Also, note that this is negation of the

propositional

identity type.
Of course, it makes no sense to negate judgmental equality

≡

, because judgments are not subject to logical

operations

.

(

x

≠

A

y

)

:

≡

¬

(

x

=

A

y

)

.

If

x

≠

y

, we say that

x

and

y

are

unequal

or

not equal

.
Just like negation, disequality plays a less important role here than it does in classical
mathematics. For example, we cannot prove that two things are equal by proving that they
are not unequal: that would be an application of the classical

law of double negation

, see §3.4 (

http://planetmath.org/34classicalvsintuitionisticlogic

).

Sometimes it is useful to phrase disequality in a positive way. For example,
in

Theorem

11.2.4 (

http://planetmath.org/1122dedekindrealsarecauchycomplete#Thmprethm1

) we shall prove that a

real number

x

has an

inverse

if,
and only if, its

distance

from

0

is positive, which is a

stronger

requirement than

x

≠

0

.

Title

1.12.3 Disequality

\metatable

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

LaTeXML
11.3.4 Cauchy reals are Cauchy complete

11.3.4 Cauchy reals are Cauchy complete

We constructed

ℝ

𝖼

by closing

ℚ

under limits of Cauchy approximations, so it better
be the case that

ℝ

𝖼

is Cauchy

complete

. Thanks to

\autoref

RC-sim-eqv-le there is no

difference

between a Cauchy approximation

x

:

ℚ

+

→

ℝ

𝖼

as defined in the construction
of

ℝ

𝖼

, and a Cauchy approximation in the sense of

\autoref

defn:cauchy-approximation
(adapted to

ℝ

𝖼

).

Thus, given a Cauchy approximation

x

:

ℚ

+

→

ℝ

𝖼

it is quite natural to expect that

𝗅𝗂𝗆

⁢

(

x

)

is its limit, where the notion of limit is defined as in

\autoref

defn:cauchy-approximation. But this is so by

\autoref

RC-sim-eqv-le and

\autoref

thm:RC-sim-lim-term. We have proved:

Theorem 11.3.1

.

Every Cauchy approximation in

R

c

has a limit.

An

archimedean

ordered field

in which every Cauchy approximation has a limit is called

Cauchy complete

.
The Cauchy reals are the least such field.

Theorem 11.3.2

.

The Cauchy reals embed into every Cauchy complete archimedean ordered field.

Proof.

Suppose

F

is a Cauchy complete archimedean ordered field. Because limits are unique,
there is an

operator

lim

which takes Cauchy approximations in

F

to their limits. We
define the

embedding

e

:

ℝ

𝖼

→

F

by

(

ℝ

𝖼

,

∼

)

-

recursion

as

e

(

𝗋𝖺𝗍

(

q

)

)

:

≡

q

and

e

(

𝗅𝗂𝗆

(

x

)

)

:

≡

lim

(

e

∘

x

)

.

A suitable

⌢

on

F

is

(

a

⌢

ϵ

b

)

:

≡

|

a

-

b

|

<

ϵ

.

This is a

separated

relation

because

F

is archimedean. The rest of the clauses for

(

ℝ

𝖼

,

∼

)

-recursion are easily checked. One would also have to check that

e

is
an embedding of ordered fields which fixes the

rationals

.
∎

Title

11.3.4 Cauchy reals are Cauchy complete

\metatable

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

LaTeXML
1.7 Coproduct types

1.7 Coproduct types

Given

A

,

B

:

𝒰

, we introduce their

coproduct

type

A

+

B

:

𝒰

.
This corresponds to the

disjoint union

in

set theory

, and we may also use that name for it.
In

type theory

, as was the case with

functions

and

products

, the coproduct must be a fundamental construction, since there is no previously given notion of “union of types”.
We also introduce a
nullary version: the

empty type

𝟎

:

U

.

There are two ways to

construct

elements of

A

+

B

, either as

𝗂𝗇𝗅

⁢

(

a

)

:

A

+

B

for

a

:

A

, or as

𝗂𝗇𝗋

⁢

(

b

)

:

A

+

B

for

b

:

B

. There are no ways to construct elements of the empty type.

To construct a non-dependent function

f

:

A

+

B

→

C

, we need
functions

g

0

:

A

→

C

and

g

1

:

B

→

C

. Then

f

is defined
via the defining equations

f

⁢

(

𝗂𝗇𝗅

⁢

(

a

)

)

:

≡

g

0

(

a

)

,

f

⁢

(

𝗂𝗇𝗋

⁢

(

b

)

)

:

≡

g

1

(

b

)

.

That is, the function

f

is defined by

case

analysis

.
As before, we can derive the recursor:

𝗋𝖾𝖼

A

+

B

:

∏

(

C

:

𝒰

)

(

A

→

C

)

→

(

B

→

C

)

→

A

+

B

→

C

with the defining equations

𝗋𝖾𝖼

A

+

B

⁢

(

C

,

g

0

,

g

1

,

𝗂𝗇𝗅

⁢

(

a

)

)

:

≡

g

0

(

a

)

,

𝗋𝖾𝖼

A

+

B

⁢

(

C

,

g

0

,

g

1

,

𝗂𝗇𝗋

⁢

(

b

)

)

:

≡

g

1

(

b

)

.

We can always construct a function

f

:

𝟎

→

C

without
having to give any defining equations, because there are no elements of

𝟎

on which to define

f

.
Thus, the recursor for

𝟎

is

𝗋𝖾𝖼

𝟎

:

∏

(

C

:

𝒰

)

𝟎

→

C

,

which constructs the canonical function from the empty type to any other type.
Logically, it corresponds to the principle

ex falso quodlibet

.

To construct a dependent function

f

:

∏

(

x

:

A

+

B

)

C

⁢

(

x

)

out of a coproduct, we assume as given the family

C

:

(

A

+

B

)

→

𝒰

, and
require

g

0

:

∏

a

:

A

C

⁢

(

𝗂𝗇𝗅

⁢

(

a

)

)

,

g

1

:

∏

b

:

B

C

⁢

(

𝗂𝗇𝗋

⁢

(

b

)

)

.

This yields

f

with the defining equations:

f

⁢

(

𝗂𝗇𝗅

⁢

(

a

)

)

:

≡

g

0

(

a

)

,

f

⁢

(

𝗂𝗇𝗋

⁢

(

b

)

)

:

≡

g

1

(

b

)

.

We package this scheme into the

induction

principle for coproducts:

𝗂𝗇𝖽

A

+

B

:

∏

(

C

:

(

A

+

B

)

→

𝒰

)

(

∏

(

a

:

A

)

C

⁢

(

𝗂𝗇𝗅

⁢

(

a

)

)

)

→

(

∏

(

b

:

B

)

C

⁢

(

𝗂𝗇𝗋

⁢

(

b

)

)

)

→

∏

(

x

:

A

+

B

)

C

⁢

(

x

)

.

As before, the recursor arises in the case that the family

C

is

constant

.

The induction principle for the empty type

𝗂𝗇𝖽

𝟎

:

∏

(

C

:

𝟎

→

𝒰

)

∏

(

z

:

𝟎

)

C

⁢

(

z

)

gives us a way to define a

trivial

dependent function out of the
empty type.

Title

1.7 Coproduct types

\metatable

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

LaTeXML
2.14 Example: equality of structures

2.14 Example: equality of structures

We now consider one example to illustrate the interaction between the

groupoid

structure

on a type and the type
formers. In the

introduction

we remarked that one of the
advantages of univalence is that two

isomorphic

things are interchangeable,
in the sense that every

property

or construction involving one also
applies to the other. Common “abuses of notation” become formally
true. Univalence itself says that

equivalent

types are equal, and
therefore interchangeable, which includes e.g. the common practice of identifying isomorphic sets. Moreover, when we define other
mathematical objects as sets, or even general types, equipped with structure or properties, we
can derive the correct notion of equality for them from univalence. We will illustrate this
point with a significant example in

http://planetmath.org/node/87583

Chapter 9, where we
define the basic notions of

category theory

in such a way that equality
of

categories

is

equivalence

, equality of

functors

is

natural
isomorphism

, etc. See in particular §9.8 (

http://planetmath.org/98thestructureidentityprinciple

).
In this

section

, we describe a very simple example, coming from

algebra

.

For simplicity, we use

semigroups

as our example, where a
semigroup is a type equipped with an associative “

multiplication

”

operation

. The same ideas apply to other

algebraic structures

, such as
monoids, groups, and rings.
Recall from §1.6 (

http://planetmath.org/16dependentpairtypes

),§1.11 (

http://planetmath.org/111propositionsastypes

) that the

definition

of a kind of mathematical structure should be interpreted as defining the type of such structures as a certain iterated

Σ

-type.
In the case of semigroups this yields the following.

Definition 2.14.1

.

Given a type

A

, the type

SemigroupStr

(A) of

semigroup structures

with

carrier

A

is defined by

𝖲𝖾𝗆𝗂𝗀𝗋𝗈𝗎𝗉𝖲𝗍𝗋

(

A

)

:

≡

∑

(

m

:

A

→

A

→

A

)

∏

(

x

,

y

,

z

:

A

)

m

(

x

,

m

(

y

,

z

)

)

=

m

(

m

(

x

,

y

)

,

z

)

.

A

semigroup

is a type together with such a structure:

𝖲𝖾𝗆𝗂𝗀𝗋𝗈𝗎𝗉

:

≡

∑

A

:

𝒰

𝖲𝖾𝗆𝗂𝗀𝗋𝗈𝗎𝗉𝖲𝗍𝗋

(

A

)

In the next two sections, we describe two ways in which univalence makes
it easier to work with such semigroups.

Title

2.14 Example: equality of structures

\metatable

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

LaTeXML
2.8 The unit type

2.8 The unit type

Trivial

cases are sometimes important, so we mention briefly the case of the unit type

𝟏

.

Theorem 2.8.1

.

For any

x

,

y

:

1

, we have

(

x

=

y

)

≃

1

.

Proof.

A

function

(

x

=

y

)

→

𝟏

is easy to define by sending everything to

⋆

.

Conversely

, for any

x

,

y

:

𝟏

we may assume by

induction

that

x

≡

⋆

≡

y

.
In this case we have

𝗋𝖾𝖿𝗅

⋆

:

x

=

y

, yielding a

constant function

𝟏

→

(

x

=

y

)

.

To show that these are

inverses

, consider first an

element

u

:

𝟏

.
We may assume that

u

≡

⋆

, but this is also the result of the composite

𝟏

→

(

x

=

y

)

→

𝟏

.

On the other hand, suppose given

p

:

x

=

y

.
By path induction, we may assume

x

≡

y

and

p

is

𝗋𝖾𝖿𝗅

x

.
We may then assume that

x

is

⋆

, in which case the composite

(

x

=

y

)

→

𝟏

→

(

x

=

y

)

takes

p

to

𝗋𝖾𝖿𝗅

x

, i.e. to

p

.
∎

In particular, any two

elements of

𝟏

are equal.
We leave it to the reader to formulate this equivalence in terms of

introduction

, elimination, computation, and uniqueness rules.
The transport lemma for

𝟏

is simply the transport lemma for

constant

type families (Lemma 2.3.5 (

http://planetmath.org/23typefamiliesarefibrations#Thmlem4

)).

Title

2.8 The unit type

\metatable

Generated on Thu Feb 8 19:34:22 2018 by

LaTeXML
3.6 The logic of mere propositions

3.6 The logic of mere propositions

We mentioned in §1.1 (

http://planetmath.org/11typetheoryversussettheory

) that in contrast to

type theory

, which has only one basic notion (types), set-theoretic

foundations

have two basic notions: sets and

propositions

.
Thus, a classical mathematician is accustomed to manipulating these two kinds of objects separately.

It is possible to recover a

similar

dichotomy in type theory, with the role of the set-theoretic propositions being played by the types (and type families) that are

mere

propositions.
In many cases, the

logical connectives

and

quantifiers

can be represented in this logic by simply restricting the corresponding type-former to the mere propositions.
Of course, this requires knowing that the type-former in question

preserves

mere propositions.

Example 3.6.1

.

If

A

and

B

are mere propositions, so is

A

×

B

.
This is easy to show using the

characterization

of paths in

products

, just like Example 3.1.5 (

http://planetmath.org/31setsandntypes#Thmpreeg4

) but simpler.
Thus, the

connective

“and” preserves mere propositions.

Example 3.6.2

.

If

A

is any type and

B

:

A

→

U

is such that for all

x

:

A

, the type

B

⁢

(

x

)

is a mere proposition, then

∏

(

x

:

A

)

B

⁢

(

x

)

is a mere proposition.
The proof is just like Example 3.1.6 (

http://planetmath.org/31setsandntypes#Thmpreeg5

) but simpler: given

f

,

g

:

∏

(

x

:

A

)

B

⁢

(

x

)

, for any

x

:

A

we have

f

⁢

(

x

)

=

g

⁢

(

x

)

since

B

⁢

(

x

)

is a mere proposition.
But then by function extensionality, we have

f

=

g

.

In particular, if

B

is a mere proposition, then so is

A

→

B

regardless of what

A

is.
In even more particular, since

0

is a mere proposition, so is

¬

A

≡

(

A

→

0

)

.
Thus, the connectives “implies” and “not” preserve mere propositions, as does the quantifier “for all”.

On the other hand, some type formers do not preserve mere propositions.
Even if

A

and

B

are mere propositions,

A

+

B

will not in general be.
For

instance

,

𝟏

is a mere proposition, but

𝟐

=

𝟏

+

𝟏

is not.
Logically speaking,

A

+

B

is a “purely constructive” sort of “or”: a witness of it contains the additional information of

which

disjunct is true.
Sometimes this is very useful, but if we want a more classical sort of “or” that preserves mere propositions, we need a way to “truncate” this type into a mere proposition by forgetting this additional information.

The same issue arises with the

Σ

-type

∑

(

x

:

A

)

P

⁢

(

x

)

.
This is a purely constructive

interpretation

of “there exists an

x

:

A

such that

P

⁢

(

x

)

” which remembers the witness

x

, and hence is not generally a mere proposition even if each type

P

⁢

(

x

)

is.
(Recall that we observed in §3.5 (

http://planetmath.org/35subsetsandpropositionalresizing

) that

∑

(

x

:

A

)

P

⁢

(

x

)

can also be regarded as “the subset of those

x

:

A

such that

P

⁢

(

x

)

”.)

Title

3.6 The logic of mere propositions

\metatable

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

LaTeXML