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.
This function sends finite cardinals to the corresponding natural, and infinite cardinals to 0.
Instances For
@[simp]
theorem
Cardinal.toNat_toENat
(a : Cardinal.{u_1})
:
ENat.toNat (Cardinal.toENat a) = Cardinal.toNat a
@[simp]
@[simp]
theorem
Cardinal.cast_toNat_of_lt_aleph0
{c : Cardinal.{u_1}}
(h : c < Cardinal.aleph0)
:
↑(Cardinal.toNat c) = c
theorem
Cardinal.toNat_apply_of_lt_aleph0
{c : Cardinal.{u_1}}
(h : c < Cardinal.aleph0)
:
Cardinal.toNat c = Classical.choose ⋯
theorem
Cardinal.toNat_apply_of_aleph0_le
{c : Cardinal.{u_1}}
(h : Cardinal.aleph0 ≤ c)
:
Cardinal.toNat c = 0
theorem
Cardinal.cast_toNat_of_aleph0_le
{c : Cardinal.{u_1}}
(h : Cardinal.aleph0 ≤ c)
:
↑(Cardinal.toNat c) = 0
theorem
Cardinal.toNat_eq_iff_eq_of_lt_aleph0
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hc : c < Cardinal.aleph0)
(hd : d < Cardinal.aleph0)
:
Two finite cardinals are equal
iff they are equal their Cardinal.toNat
projections are equal.
theorem
Cardinal.toNat_le_iff_le_of_lt_aleph0
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hc : c < Cardinal.aleph0)
(hd : d < Cardinal.aleph0)
:
theorem
Cardinal.toNat_lt_iff_lt_of_lt_aleph0
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hc : c < Cardinal.aleph0)
(hd : d < Cardinal.aleph0)
:
theorem
Cardinal.toNat_le_toNat
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hcd : c ≤ d)
(hd : d < Cardinal.aleph0)
:
Cardinal.toNat c ≤ Cardinal.toNat d
@[deprecated Cardinal.toNat_le_toNat]
theorem
Cardinal.toNat_le_of_le_of_lt_aleph0
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hd : d < Cardinal.aleph0)
(hcd : c ≤ d)
:
Cardinal.toNat c ≤ Cardinal.toNat d
theorem
Cardinal.toNat_lt_toNat
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hcd : c < d)
(hd : d < Cardinal.aleph0)
:
Cardinal.toNat c < Cardinal.toNat d
@[deprecated Cardinal.toNat_lt_toNat]
theorem
Cardinal.toNat_lt_of_lt_of_lt_aleph0
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hd : d < Cardinal.aleph0)
(hcd : c < d)
:
Cardinal.toNat c < Cardinal.toNat d
@[deprecated Cardinal.toNat_natCast]
Alias of Cardinal.toNat_natCast
.
@[simp]
theorem
Cardinal.toNat_ofNat
(n : ℕ)
[Nat.AtLeastTwo n]
:
Cardinal.toNat (OfNat.ofNat n) = OfNat.ofNat n
toNat
has a right-inverse: coercion.
@[simp]
theorem
Cardinal.mk_toNat_of_infinite
{α : Type u}
[h : Infinite α]
:
Cardinal.toNat (Cardinal.mk α) = 0
theorem
Cardinal.mk_toNat_eq_card
{α : Type u}
[Fintype α]
:
Cardinal.toNat (Cardinal.mk α) = Fintype.card α
theorem
Cardinal.toNat_eq_ofNat
{c : Cardinal.{u}}
{n : ℕ}
[Nat.AtLeastTwo n]
:
Cardinal.toNat c = OfNat.ofNat n ↔ c = OfNat.ofNat n
A version of toNat_eq_iff
for literals
theorem
Cardinal.toNat_eq_one_iff_unique
{α : Type u}
:
Cardinal.toNat (Cardinal.mk α) = 1 ↔ Subsingleton α ∧ Nonempty α
@[simp]
theorem
Cardinal.toNat_lift
(c : Cardinal.{v})
:
Cardinal.toNat (Cardinal.lift.{u, v} c) = Cardinal.toNat c
theorem
Cardinal.toNat_congr
{α : Type u}
{β : Type v}
(e : α ≃ β)
:
Cardinal.toNat (Cardinal.mk α) = Cardinal.toNat (Cardinal.mk β)
@[deprecated map_prod]
theorem
Cardinal.toNat_finset_prod
{α : Type u}
(s : Finset α)
(f : α → Cardinal.{u_1})
:
Cardinal.toNat (Finset.prod s fun (i : α) => f i) = Finset.prod s fun (i : α) => Cardinal.toNat (f i)
@[simp]
theorem
Cardinal.toNat_add
{c : Cardinal.{u}}
{d : Cardinal.{u}}
(hc : c < Cardinal.aleph0)
(hd : d < Cardinal.aleph0)
:
@[simp]
theorem
Cardinal.toNat_lift_add_lift
{a : Cardinal.{u}}
{b : Cardinal.{v}}
(ha : a < Cardinal.aleph0)
(hb : b < Cardinal.aleph0)
:
Cardinal.toNat (Cardinal.lift.{v, u} a + Cardinal.lift.{u, v} b) = Cardinal.toNat a + Cardinal.toNat b
@[deprecated Cardinal.toNat_lift_add_lift]
theorem
Cardinal.toNat_add_of_lt_aleph0
{a : Cardinal.{u}}
{b : Cardinal.{v}}
(ha : a < Cardinal.aleph0)
(hb : b < Cardinal.aleph0)
:
Cardinal.toNat (Cardinal.lift.{v, u} a + Cardinal.lift.{u, v} b) = Cardinal.toNat a + Cardinal.toNat b
Alias of Cardinal.toNat_lift_add_lift
.