Finite Cardinality Functions #
Main Definitions #
Nat.card α
is the cardinality ofα
as a natural number. Ifα
is infinite,Nat.card α = 0
.ENat.card α
is the cardinality ofα
as an extended natural number. Ifα
is infinite,ENat.card α = ⊤
.PartENat.card α
is the cardinality ofα
as an extended natural number (using the legacy definitionPartENat := Part ℕ
). Ifα
is infinite,PartENat.card α = ⊤
.
@[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_injective_and_card
{α : Type u_1}
{β : Type u_2}
[Finite β]
(f : α → β)
:
Function.Bijective f ↔ Function.Injective f ∧ Nat.card α = Nat.card β
theorem
Nat.bijective_iff_surjective_and_card
{α : Type u_1}
{β : Type u_2}
[Finite α]
(f : α → β)
:
Function.Bijective f ↔ Function.Surjective f ∧ Nat.card α = Nat.card β
theorem
Function.Injective.bijective_of_nat_card_le
{α : Type u_1}
{β : Type u_2}
[Finite β]
{f : α → β}
(inj : Function.Injective f)
(hc : Nat.card β ≤ Nat.card α)
:
theorem
Function.Surjective.bijective_of_nat_card_le
{α : Type u_1}
{β : Type u_2}
[Finite α]
{f : α → β}
(surj : Function.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)
:
Alias of the reverse direction of Set.natCard_pos
.
@[simp]
theorem
Set.natCard_graphOn
{α : Type u_1}
{β : Type u_2}
(s : Set α)
(f : α → β)
:
Nat.card ↑(Set.graphOn f s) = Nat.card ↑s
@[simp]
theorem
ENat.card_image_of_injective
{α : Type u_3}
{β : Type u_4}
(f : α → β)
(s : Set α)
(h : Function.Injective f)
:
@[simp]
@[simp]
@[simp]
@[simp]
@[deprecated ENat.card]
PartENat.card α
is the cardinality of α
as an extended natural number.
If α
is infinite, PartENat.card α = ⊤
.
Equations
- PartENat.card α = Cardinal.toPartENat (Cardinal.mk α)
Instances For
@[simp, deprecated ENat.card_eq_coe_fintype_card]
theorem
PartENat.card_eq_coe_fintype_card
{α : Type u_1}
[Fintype α]
:
PartENat.card α = ↑(Fintype.card α)
@[simp, deprecated ENat.card_eq_top_of_infinite]
@[simp, deprecated ENat.card_sum]
theorem
PartENat.card_sum
(α : Type u_3)
(β : Type u_4)
:
PartENat.card (α ⊕ β) = PartENat.card α + PartENat.card β
@[deprecated ENat.card_congr]
@[simp, deprecated ENat.card_ulift]
@[simp, deprecated ENat.card_plift]
@[deprecated ENat.card_image_of_injOn]
theorem
PartENat.card_image_of_injOn
{α : Type u}
{β : Type v}
{f : α → β}
{s : Set α}
(h : Set.InjOn f s)
:
PartENat.card ↑(f '' s) = PartENat.card ↑s
@[deprecated ENat.card_image_of_injective]
theorem
PartENat.card_image_of_injective
{α : Type u}
{β : Type v}
(f : α → β)
(s : Set α)
(h : Function.Injective f)
:
PartENat.card ↑(f '' s) = PartENat.card ↑s
@[simp, deprecated Cardinal.natCast_le_toENat_iff]
@[simp, deprecated Cardinal.toENat_le_natCast_iff]
@[simp, deprecated Cardinal.natCast_eq_toENat_iff]
@[simp, deprecated Cardinal.toENat_eq_natCast_iff]
@[simp, deprecated Cardinal.natCast_lt_toENat_iff]
@[simp, deprecated Cardinal.toENat_lt_natCast_iff]
@[deprecated ENat.card_eq_zero_iff_empty]
@[deprecated ENat.card_le_one_iff_subsingleton]
@[deprecated ENat.one_lt_card_iff_nontrivial]