Skip to content

Commit 9d56841

Browse files
committed
feat(Data/Set/Card): ncard/encard is strictly monotonic on finite sets (#34689)
1 parent 69decbd commit 9d56841

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

Mathlib/Data/Set/Card.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ theorem Finite.encard_lt_encard (hs : s.Finite) (h : s ⊂ t) : s.encard < t.enc
260260
theorem encard_strictMono [Finite α] : StrictMono (encard : Set α → ℕ∞) :=
261261
fun _ _ h ↦ (toFinite _).encard_lt_encard h
262262

263+
theorem Finite.encard_strictMonoOn : StrictMonoOn (α := Set α) encard (setOf Set.Finite) :=
264+
fun _ hs _ _ hlt ↦ hs.encard_lt_encard hlt.ssubset
265+
263266
theorem encard_diff_add_encard (s t : Set α) : (s \ t).encard + t.encard = (s ∪ t).encard := by
264267
rw [← encard_union_eq disjoint_sdiff_left, diff_union_self]
265268

@@ -814,6 +817,9 @@ theorem ncard_lt_card [Finite α] (h : s ≠ univ) : s.ncard < Nat.card α :=
814817
theorem ncard_strictMono [Finite α] : @StrictMono (Set α) _ _ _ ncard :=
815818
fun _ _ h ↦ ncard_lt_ncard h
816819

820+
theorem Finite.ncard_strictMonoOn : StrictMonoOn (α := Set α) ncard (setOf Set.Finite) :=
821+
fun _ _ _ ht hlt ↦ ncard_lt_ncard hlt.ssubset ht
822+
817823
theorem ncard_eq_of_bijective {n : ℕ} (f : ∀ i, i < n → α)
818824
(hf : ∀ a ∈ s, ∃ i, ∃ h : i < n, f i h = a) (hf' : ∀ (i) (h : i < n), f i h ∈ s)
819825
(f_inj : ∀ (i j) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j) : s.ncard = n := by

Mathlib/GroupTheory/GroupAction/Jordan.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ theorem MulAction.IsPreprimitive.is_two_motive_of_is_motive
158158
exact ⟨ha, hga⟩
159159
have hmn : t.ncard - 1 < n := by
160160
rw [Nat.lt_iff_add_one_le, ← htm, Nat.le_iff_lt_add_one, ← hsn]
161-
apply Set.ncard_lt_ncard _ s.toFinite
161+
apply Set.ncard_lt_ncard _
162162
exact ⟨Set.inter_subset_left, fun h ↦ hgb (Set.inter_subset_right (h hb))⟩
163163
have htm' : t.ncard - 1 + 2 < Nat.card α := lt_trans (Nat.add_lt_add_right hmn 2) hsn'
164164
suffices IsPretransitive ↥(fixingSubgroup G s) ↥(ofFixingSubgroup G s) →
@@ -200,7 +200,7 @@ theorem MulAction.IsPreprimitive.is_two_motive_of_is_motive
200200
· exact fun h ↦ ha (by rw [h]; trivial)
201201
have hmn : t.ncard - 1 < n := by
202202
rw [Nat.lt_iff_add_one_le, ← htm, Nat.le_iff_lt_add_one, ← hsn]
203-
apply Set.ncard_lt_ncard _ (Set.toFinite s)
203+
apply Set.ncard_lt_ncard _
204204
refine ⟨Set.inter_subset_left, fun h ↦ hb ?_⟩
205205
suffices s = g • s by
206206
rw [this]

0 commit comments

Comments
 (0)