Skip to content

Commit 6924ba8

Browse files
committed
chore: Fix name of Nat.card_mono (#8340)
This was accidentally put in the `PartENat` namespace in #8202. Also add `Set.Infinite.card_eq_zero` and fix capitalisation errors.
1 parent 6eb9f7b commit 6924ba8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Mathlib/SetTheory/Cardinal/Finite.lean

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ lemma card_eq_zero_of_isEmpty [IsEmpty α] : Nat.card α = 0 := by simp [Nat.car
4646
@[simp] lemma card_eq_zero_of_infinite [Infinite α] : Nat.card α = 0 := mk_toNat_of_infinite
4747
#align nat.card_eq_zero_of_infinite Nat.card_eq_zero_of_infinite
4848

49+
lemma _root_.Set.Infinite.card_eq_zero {s : Set α} (hs : s.Infinite) : Nat.card s = 0 :=
50+
@card_eq_zero_of_infinite _ hs.to_subtype
51+
4952
lemma card_eq_zero : Nat.card α = 0 ↔ IsEmpty α ∨ Infinite α := by
5053
simp [Nat.card, mk_eq_zero_iff, aleph0_le_mk_iff]
5154

@@ -81,6 +84,9 @@ theorem card_eq_of_equiv_fin {α : Type*} {n : ℕ} (f : α ≃ Fin n) : Nat.car
8184
simpa only [card_eq_fintype_card, Fintype.card_fin] using card_congr f
8285
#align nat.card_eq_of_equiv_fin Nat.card_eq_of_equiv_fin
8386

87+
lemma card_mono {s t : Set α} (ht : t.Finite) (h : s ⊆ t) : Nat.card s ≤ Nat.card t :=
88+
toNat_le_of_le_of_lt_aleph0 ht.lt_aleph0 <| mk_le_mk_of_subset h
89+
8490
/-- If the cardinality is positive, that means it is a finite type, so there is
8591
an equivalence between `α` and `Fin (Nat.card α)`. See also `Finite.equivFin`. -/
8692
def equivFinOfCardPos {α : Type*} (h : Nat.card α ≠ 0) : α ≃ Fin (Nat.card α) := by
@@ -180,17 +186,11 @@ theorem card_congr {α : Type*} {β : Type*} (f : α ≃ β) : PartENat.card α
180186
Cardinal.toPartENat_congr f
181187
#align part_enat.card_congr PartENat.card_congr
182188

183-
theorem card_uLift (α : Type*) : card (ULift α) = card α :=
184-
card_congr Equiv.ulift
185-
#align part_enat.card_ulift PartENat.card_uLift
186-
187-
@[simp]
188-
theorem card_pLift (α : Type*) : card (PLift α) = card α :=
189-
card_congr Equiv.plift
190-
#align part_enat.card_plift PartENat.card_pLift
189+
@[simp] lemma card_ulift (α : Type*) : card (ULift α) = card α := card_congr Equiv.ulift
190+
#align part_enat.card_ulift PartENat.card_ulift
191191

192-
lemma card_mono {s t : Set α} (ht : t.Finite) (h : s ⊆ t) : Nat.card s ≤ Nat.card t :=
193-
toNat_le_of_le_of_lt_aleph0 ht.lt_aleph0 <| mk_le_mk_of_subset h
192+
@[simp] lemma card_plift (α : Type*) : card (PLift α) = card α := card_congr Equiv.plift
193+
#align part_enat.card_plift PartENat.card_plift
194194

195195
theorem card_image_of_injOn {α : Type u} {β : Type v} {f : α → β} {s : Set α} (h : Set.InjOn f s) :
196196
card (f '' s) = card s :=

0 commit comments

Comments
 (0)