Cardinal Numbers
We define cardinal numbers as a quotient of types under the equivalence relation of equinumerity. We define the order on cardinal numbers, define omega, and do basic cardinal arithmetic: addition, multiplication, power, cardinal successor, minimum, supremum, infinitary sums and products
The fact that the cardinality of α × α
coincides with that of α
when α
is infinite is not
proved in this file, as it relies on facts on well-orders. Instead, it is in
cardinal_ordinal.lean
(together with many other facts on cardinals, for instance the
cardinality of list α
).
Implementation notes
- There is a type of cardinal numbers in every universe level:
cardinal.{u} : Type (u + 1)
is the quotient of types inType u
. There is a lift operation lifting cardinal numbers to a higher level. - Cardinal arithmetic specifically for infinite cardinals (like
κ * κ = κ
) is in the fileset_theory/ordinal.lean
, because concepts from that file are used in the proof.
References
Tags
cardinal number, cardinal arithmetic, cardinal exponentiation, omega
The equivalence relation on types given by equivalence (bijective correspondence) of types. Quotienting by this equivalence relation gives the cardinal numbers.
The cardinal number of a type
Equations
We define the order on cardinal numbers by mk α ≤ mk β
if and only if
there exists an embedding (injective function) from α to β.
Equations
- cardinal.has_le = {le := λ (q₁ q₂ : cardinal), quotient.lift_on₂ q₁ q₂ (λ (α β : Type u), nonempty (α ↪ β)) cardinal.has_le._proof_1}
Equations
- cardinal.linear_order = {le := has_le.le cardinal.has_le, lt := partial_order.lt._default has_le.le, le_refl := cardinal.linear_order._proof_1, le_trans := cardinal.linear_order._proof_2, lt_iff_le_not_le := cardinal.linear_order._proof_3, le_antisymm := cardinal.linear_order._proof_4, le_total := cardinal.linear_order._proof_5}
Equations
- cardinal.inhabited = {default := 0}
Equations
- cardinal.has_add = {add := λ (q₁ q₂ : cardinal), quotient.lift_on₂ q₁ q₂ (λ (α β : Type u), cardinal.mk (α ⊕ β)) cardinal.has_add._proof_1}
Equations
- cardinal.has_mul = {mul := λ (q₁ q₂ : cardinal), quotient.lift_on₂ q₁ q₂ (λ (α β : Type u), cardinal.mk (α × β)) cardinal.has_mul._proof_1}
Equations
- cardinal.comm_semiring = {add := has_add.add cardinal.has_add, add_assoc := cardinal.comm_semiring._proof_1, zero := 0, zero_add := zero_add, add_zero := cardinal.comm_semiring._proof_2, add_comm := add_comm, mul := has_mul.mul cardinal.has_mul, mul_assoc := cardinal.comm_semiring._proof_3, one := 1, one_mul := one_mul, mul_one := cardinal.comm_semiring._proof_4, zero_mul := zero_mul, mul_zero := cardinal.comm_semiring._proof_5, left_distrib := left_distrib, right_distrib := cardinal.comm_semiring._proof_6, mul_comm := mul_comm}
The cardinal exponential. mk α ^ mk β
is the cardinal of β → α
.
Equations
- a.power b = quotient.lift_on₂ a b (λ (α β : Type u), cardinal.mk (β → α)) cardinal.power._proof_1
Equations
Equations
- cardinal.order_bot = {bot := 0, le := linear_order.le cardinal.linear_order, lt := linear_order.lt cardinal.linear_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, bot_le := cardinal.zero_le}
Equations
- cardinal.canonically_ordered_add_monoid = {add := comm_semiring.add cardinal.comm_semiring, add_assoc := _, zero := comm_semiring.zero cardinal.comm_semiring, zero_add := _, add_zero := _, add_comm := _, le := order_bot.le cardinal.order_bot, lt := order_bot.lt cardinal.order_bot, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := cardinal.canonically_ordered_add_monoid._proof_1, lt_of_add_lt_add_left := cardinal.canonically_ordered_add_monoid._proof_2, bot := order_bot.bot cardinal.order_bot, bot_le := _, le_iff_exists_add := cardinal.le_iff_exists_add}
Equations
The minimum cardinal in a family of cardinals (the existence
of which is provided by injective_min
).
Equations
- cardinal.min I f = f (classical.some _)
Equations
- cardinal.has_wf = {r := has_lt.lt (preorder.to_has_lt cardinal), wf := cardinal.wf}
The successor cardinal - the smallest cardinal greater than
c
. This is not the same as c + 1
except in the case of finite c
.
Equations
- c.succ = cardinal.min _ subtype.val
The indexed sum of cardinals is the cardinality of the indexed disjoint union, i.e. sigma type.
Equations
- cardinal.sum f = cardinal.mk (Σ (i : ι), quotient.out (f i))
The indexed supremum of cardinals is the smallest cardinal above everything in the family.
Equations
- cardinal.sup f = cardinal.min _ (λ (a : {c // ∀ (i : ι), f i ≤ c}), a.val)
The indexed product of cardinals is the cardinality of the Pi type (dependent product).
Equations
- cardinal.prod f = cardinal.mk (Π (i : ι), quotient.out (f i))
ω
is the smallest infinite cardinal, also known as ℵ₀.
Equations
Equations
- cardinal.can_lift_cardinal_nat = {coe := coe coe_to_lift, cond := λ (x : cardinal), x < cardinal.omega, prf := cardinal.can_lift_cardinal_nat._proof_1}
König's theorem
The cardinality of a union is at most the sum of the cardinalities of the two sets.
The function α^{<β}, defined to be sup_{γ < β} α^γ. We index over {s : set β.out // mk s < β } instead of {γ // γ < β}, because the latter lives in a higher universe
Equations
- α ^< β = cardinal.sup (λ (s : {s // cardinal.mk ↥s < β}), α ^ cardinal.mk ↥s)