Documentation

Mathlib.SetTheory.Cardinal.ToNat

Projection from cardinal numbers to natural numbers #

In this file we define Cardinal.toNat to be the natural projection Cardinal → ℕ, sending all infinite cardinals to zero. We also prove basic lemmas about this definition.

noncomputable def Cardinal.toNat :

This function sends finite cardinals to the corresponding natural, and infinite cardinals to 0.

Instances For
    @[simp]
    theorem Cardinal.toNat_natCast (n : ) :
    toNat n = n
    @[simp]
    theorem Cardinal.toNat_eq_zero {c : Cardinal.{u}} :
    toNat c = 0 c = 0 aleph0 c
    theorem Cardinal.toNat_ne_zero {c : Cardinal.{u}} :
    toNat c 0 c 0 c < aleph0
    @[simp]
    theorem Cardinal.toNat_pos {c : Cardinal.{u}} :
    0 < toNat c c 0 c < aleph0
    theorem Cardinal.toNat_apply_of_lt_aleph0 {c : Cardinal.{u}} (h : c < aleph0) :
    toNat c = Classical.choose
    theorem Cardinal.toNat_inj_of_lt_aleph0 {c d : Cardinal.{u}} (hc : c < aleph0) (hd : d < aleph0) :
    toNat c = toNat d c = d

    Two finite cardinals are equal iff they are equal their Cardinal.toNat projections are equal.

    theorem Cardinal.toNat_lt_toNat {c d : Cardinal.{u}} (hcd : c < d) (hd : d < aleph0) :
    @[simp]
    theorem Cardinal.toNat_ofNat (n : ) [n.AtLeastTwo] :
    toNat (OfNat.ofNat n) = OfNat.ofNat n
    theorem Cardinal.toNat_rightInverse :
    Function.RightInverse Nat.cast toNat

    toNat has a right-inverse: coercion.

    theorem Cardinal.toNat_surjective :
    Function.Surjective toNat
    @[simp]
    theorem Cardinal.mk_toNat_of_infinite {α : Type u} [h : Infinite α] :
    toNat (mk α) = 0
    theorem Cardinal.toNat_eq_iff {c : Cardinal.{u}} {n : } (hn : n 0) :
    toNat c = n c = n
    theorem Cardinal.toNat_eq_ofNat {c : Cardinal.{u}} {n : } [n.AtLeastTwo] :
    toNat c = OfNat.ofNat n c = OfNat.ofNat n

    A version of toNat_eq_iff for literals

    @[simp]
    theorem Cardinal.toNat_eq_one {c : Cardinal.{u}} :
    toNat c = 1 c = 1
    theorem Cardinal.toNat_eq_one_iff_unique {α : Type u} :
    toNat (mk α) = 1 Subsingleton α Nonempty α
    theorem Cardinal.toNat_congr {α : Type u} {β : Type v} (e : α β) :
    toNat (mk α) = toNat (mk β)
    @[simp]
    theorem Cardinal.toNat_add {c d : Cardinal.{u}} (hc : c < aleph0) (hd : d < aleph0) :
    toNat (c + d) = toNat c + toNat d
    theorem Cardinal.toNat_le_iff_of_lt_aleph0 {a : Cardinal.{u}} (n : ) (lt : a < aleph0) :
    toNat a n a n
    theorem Cardinal.toNat_eq_iff_of_lt_aleph0 {a : Cardinal.{u}} (n : ) (lt : a < aleph0) :
    toNat a = n a = n