File: Mathlib/SetTheory/Cardinal/ToNat.lean

full_name: Cardinal.toNat
code: /-- This function sends finite cardinals to the corresponding natural, and infinite cardinals
  to 0. -/
noncomputable def toNat : Cardinal →*₀ ℕ 
goal: Cardinal.{u_1} →*₀ ℕ

full_name: Cardinal.toNat_toENat
code: @[simp] lemma toNat_toENat (a : Cardinal) : ENat.toNat (toENat a) = toNat a 
goal: (Cardinal.toENat a).toNat = Cardinal.toNat a

full_name: Cardinal.toNat_ofENat
code: @[simp]
theorem toNat_ofENat (n : ℕ∞) : toNat n = ENat.toNat n 
goal: Cardinal.toNat ↑n = n.toNat

full_name: Cardinal.toNat_natCast
code: @[simp, norm_cast] theorem toNat_natCast (n : ℕ) : toNat n = n 
goal: Cardinal.toNat ↑n = n

full_name: Cardinal.toNat_eq_zero
code: @[simp]
lemma toNat_eq_zero : toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c 
goal: Cardinal.toNat c = 0 ↔ c = 0 ∨ Cardinal.aleph0 ≤ c

full_name: Cardinal.toNat_ne_zero
code: lemma toNat_ne_zero : toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀ 
goal: Cardinal.toNat c ≠ 0 ↔ c ≠ 0 ∧ c < Cardinal.aleph0

full_name: Cardinal.toNat_pos
code: @[simp] lemma toNat_pos : 0 < toNat c ↔ c ≠ 0 ∧ c < ℵ₀ 
goal: 0 < Cardinal.toNat c ↔ c ≠ 0 ∧ c < Cardinal.aleph0

full_name: Cardinal.cast_toNat_of_lt_aleph0
code: theorem cast_toNat_of_lt_aleph0 {c : Cardinal} (h : c < ℵ₀) : ↑(toNat c) = c 
goal: ↑(Cardinal.toNat c) = c

full_name: Cardinal.toNat_apply_of_lt_aleph0
code: theorem toNat_apply_of_lt_aleph0 {c : Cardinal.{u}} (h : c < ℵ₀) :
    toNat c = Classical.choose (lt_aleph0.1 h) 
goal: Cardinal.toNat c = Classical.choose ⋯

full_name: Cardinal.toNat_apply_of_aleph0_le
code: theorem toNat_apply_of_aleph0_le {c : Cardinal} (h : ℵ₀ ≤ c) : toNat c = 0 
goal: Cardinal.toNat c = 0

full_name: Cardinal.cast_toNat_of_aleph0_le
code: theorem cast_toNat_of_aleph0_le {c : Cardinal} (h : ℵ₀ ≤ c) : ↑(toNat c) = (0 : Cardinal) 
goal: ↑(Cardinal.toNat c) = 0

full_name: Cardinal.toNat_strictMonoOn
code: theorem toNat_strictMonoOn : StrictMonoOn toNat (Iio ℵ₀) 
goal: StrictMonoOn (⇑Cardinal.toNat) (Set.Iio Cardinal.aleph0)

full_name: Cardinal.toNat_monotoneOn
code: theorem toNat_monotoneOn : MonotoneOn toNat (Iio ℵ₀) 
goal: MonotoneOn (⇑Cardinal.toNat) (Set.Iio Cardinal.aleph0)

full_name: Cardinal.toNat_injOn
code: theorem toNat_injOn : InjOn toNat (Iio ℵ₀) 
goal: Set.InjOn (⇑Cardinal.toNat) (Set.Iio Cardinal.aleph0)

full_name: Cardinal.toNat_eq_iff_eq_of_lt_aleph0
code: /-- Two finite cardinals are equal
iff they are equal their `Cardinal.toNat` projections are equal. -/
theorem toNat_eq_iff_eq_of_lt_aleph0 (hc : c < ℵ₀) (hd : d < ℵ₀) :
    toNat c = toNat d ↔ c = d 
goal: Cardinal.toNat c = Cardinal.toNat d ↔ c = d

full_name: Cardinal.toNat_le_iff_le_of_lt_aleph0
code: theorem toNat_le_iff_le_of_lt_aleph0 (hc : c < ℵ₀) (hd : d < ℵ₀) :
    toNat c ≤ toNat d ↔ c ≤ d 
goal: Cardinal.toNat c ≤ Cardinal.toNat d ↔ c ≤ d

full_name: Cardinal.toNat_lt_iff_lt_of_lt_aleph0
code: theorem toNat_lt_iff_lt_of_lt_aleph0 (hc : c < ℵ₀) (hd : d < ℵ₀) :
    toNat c < toNat d ↔ c < d 
goal: Cardinal.toNat c < Cardinal.toNat d ↔ c < d

full_name: Cardinal.toNat_le_toNat
code: @[gcongr]
theorem toNat_le_toNat (hcd : c ≤ d) (hd : d < ℵ₀) : toNat c ≤ toNat d 
goal: Cardinal.toNat c ≤ Cardinal.toNat d

full_name: Cardinal.toNat_le_of_le_of_lt_aleph0
code: @[deprecated toNat_le_toNat (since := "2024-02-15")]
theorem toNat_le_of_le_of_lt_aleph0 (hd : d < ℵ₀) (hcd : c ≤ d) :
    toNat c ≤ toNat d 
goal: Cardinal.toNat c ≤ Cardinal.toNat d

full_name: Cardinal.toNat_lt_toNat
code: theorem toNat_lt_toNat (hcd : c < d) (hd : d < ℵ₀) : toNat c < toNat d 
goal: Cardinal.toNat c < Cardinal.toNat d

full_name: Cardinal.toNat_lt_of_lt_of_lt_aleph0
code: @[deprecated toNat_lt_toNat (since := "2024-02-15")]
theorem toNat_lt_of_lt_of_lt_aleph0 (hd : d < ℵ₀) (hcd : c < d) : toNat c < toNat d 
goal: Cardinal.toNat c < Cardinal.toNat d

full_name: Cardinal.toNat_ofNat
code: @[simp]
theorem toNat_ofNat (n : ℕ) [n.AtLeastTwo] :
    Cardinal.toNat (no_index (OfNat.ofNat n)) = OfNat.ofNat n 
goal: Cardinal.toNat (OfNat.ofNat n) = OfNat.ofNat n

full_name: Cardinal.toNat_rightInverse
code: /-- `toNat` has a right-inverse: coercion. -/
theorem toNat_rightInverse : Function.RightInverse ((↑) : ℕ → Cardinal) toNat 
goal: Function.RightInverse Nat.cast ⇑Cardinal.toNat

full_name: Cardinal.toNat_surjective
code: theorem toNat_surjective : Surjective toNat 
goal: Function.Surjective ⇑Cardinal.toNat

full_name: Cardinal.mk_toNat_of_infinite
code: @[simp]
theorem mk_toNat_of_infinite [h : Infinite α] : toNat #α = 0 
goal: Cardinal.toNat (Cardinal.mk α) = 0

full_name: Cardinal.aleph0_toNat
code: @[simp]
theorem aleph0_toNat : toNat ℵ₀ = 0 
goal: Cardinal.toNat Cardinal.aleph0 = 0

full_name: Cardinal.mk_toNat_eq_card
code: theorem mk_toNat_eq_card [Fintype α] : toNat #α = Fintype.card α 
goal: Cardinal.toNat (Cardinal.mk α) = Fintype.card α

full_name: Cardinal.zero_toNat
code: theorem zero_toNat : toNat 0 = 0 
goal: Cardinal.toNat 0 = 0

full_name: Cardinal.one_toNat
code: theorem one_toNat : toNat 1 = 1 
goal: Cardinal.toNat 1 = 1

full_name: Cardinal.toNat_eq_iff
code: theorem toNat_eq_iff {n : ℕ} (hn : n ≠ 0) : toNat c = n ↔ c = n 
goal: Cardinal.toNat c = n ↔ c = ↑n

full_name: Cardinal.toNat_eq_ofNat
code: /-- A version of `toNat_eq_iff` for literals -/
theorem toNat_eq_ofNat {n : ℕ} [Nat.AtLeastTwo n] :
    toNat c = OfNat.ofNat n ↔ c = OfNat.ofNat n 
goal: Cardinal.toNat c = OfNat.ofNat n ↔ c = OfNat.ofNat n

full_name: Cardinal.toNat_eq_one
code: @[simp]
theorem toNat_eq_one : toNat c = 1 ↔ c = 1 
goal: Cardinal.toNat c = 1 ↔ c = 1

full_name: Cardinal.toNat_eq_one_iff_unique
code: theorem toNat_eq_one_iff_unique : toNat #α = 1 ↔ Subsingleton α ∧ Nonempty α 
goal: Cardinal.toNat (Cardinal.mk α) = 1 ↔ Subsingleton α ∧ Nonempty α

full_name: Cardinal.toNat_lift
code: @[simp]
theorem toNat_lift (c : Cardinal.{v}) : toNat (lift.{u, v} c) = toNat c 
goal: Cardinal.toNat (Cardinal.lift.{u, v} c) = Cardinal.toNat c

full_name: Cardinal.toNat_congr
code: theorem toNat_congr {β : Type v} (e : α ≃ β) : toNat #α = toNat #β 
goal: Cardinal.toNat (Cardinal.mk α) = Cardinal.toNat (Cardinal.mk β)

full_name: Cardinal.toNat_mul
code: theorem toNat_mul (x y : Cardinal) : toNat (x * y) = toNat x * toNat y 
goal: Cardinal.toNat (x * y) = Cardinal.toNat x * Cardinal.toNat y

full_name: Cardinal.toNat_finset_prod
code: @[deprecated map_prod (since := "2024-02-15")]
theorem toNat_finset_prod (s : Finset α) (f : α → Cardinal) :
    toNat (∏ i ∈ s, f i) = ∏ i ∈ s, toNat (f i) 
goal: Cardinal.toNat (∏ i ∈ s, f i) = ∏ i ∈ s, Cardinal.toNat (f i)

full_name: Cardinal.toNat_add
code: @[simp]
theorem toNat_add (hc : c < ℵ₀) (hd : d < ℵ₀) : toNat (c + d) = toNat c + toNat d 
goal: Cardinal.toNat (c + d) = Cardinal.toNat c + Cardinal.toNat d

full_name: Cardinal.toNat_lift_add_lift
code: @[simp]
theorem toNat_lift_add_lift {a : Cardinal.{u}} {b : Cardinal.{v}} (ha : a < ℵ₀) (hb : b < ℵ₀) :
    toNat (lift.{v} a + lift.{u} b) = toNat a + toNat b 
goal: Cardinal.toNat (Cardinal.lift.{v, u} a + Cardinal.lift.{u, v} b) = Cardinal.toNat a + Cardinal.toNat b