Nat.card α is the cardinality of α as a natural number.
If α is infinite, Nat.card α = 0.
Equations
- Nat.card α = Cardinal.toNat (Cardinal.mk α)
Instances For
@[simp]
Because this theorem takes Fintype α as a non-instance argument, it can be used in particular
when Fintype.card ends up with different instance than the one found by inference
theorem Nat.card_le_card_of_injective {α : Type u} {β : Type v} [Finite β] (f : α → β) (hf : Function.Injective f) :
theorem Nat.card_le_card_of_surjective {α : Type u} {β : Type v} [Finite α] (f : α → β) (hf : Function.Surjective f) :
theorem Nat.card_eq_of_bijective {α : Type u_1} {β : Type u_2} (f : α → β) (hf : Function.Bijective f) :
theorem Nat.bijective_iff_surjective_and_card {α : Type u_1} {β : Type u_2} [Finite α] (f : α → β) :
theorem Function.Surjective.bijective_of_nat_card_le {α : Type u_1} {β : Type u_2} [Finite α] {f : α → β} (surj : Surjective f) (hc : Nat.card α ≤ Nat.card β) :
theorem Nat.card_image_of_injective {α : Type u_1} {β : Type u_2} {f : α → β} (hf : Function.Injective f) (s : Set α) :
theorem Nat.card_range_of_injective {α : Type u_1} {β : Type u_2} {f : α → β} (hf : Function.Injective f) :
If the cardinality is positive, that means it is a finite type, so there is
an equivalence between α and Fin (Nat.card α). See also Finite.equivFin.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alias of the reverse direction of Set.natCard_pos.
ENat.card α is the cardinality of α as an extended natural number.
If α is infinite, ENat.card α = ⊤.
Equations
- ENat.card α = Cardinal.toENat (Cardinal.mk α)
Instances For
@[simp]
theorem ENat.card_image_of_injective {α : Type u_3} {β : Type u_4} (f : α → β) (s : Set α) (h : Function.Injective f) :
theorem ENat.card_le_card_of_injective {α : Type u_3} {β : Type u_4} {f : α → β} (hf : Function.Injective f) :