Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Subgroup/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ theorem toSubmonoid_mono : Monotone (toSubmonoid : Subgroup G → Submonoid G) :
theorem toSubmonoid_le {p q : Subgroup G} : p.toSubmonoid ≤ q.toSubmonoid ↔ p ≤ q :=
Iff.rfl

@[to_additive (attr := simp)]
@[to_additive (attr := deprecated OneMemClass.coe_nonempty (since := "2026-04-20"))]
lemma coe_nonempty (s : Subgroup G) : (s : Set G).Nonempty := ⟨1, one_mem _⟩

end Subgroup
Expand Down
7 changes: 7 additions & 0 deletions Mathlib/Algebra/Group/Submonoid/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ attribute [to_additive] OneMemClass

attribute [simp, aesop safe (rule_sets := [SetLike])] one_mem zero_mem

/-- The underlying set of a term of a `OneMemClass` is nonempty. -/
@[to_additive (attr := simp)
/-- The underlying set of a term of a `ZeroMemClass` is nonempty. -/]
theorem OneMemClass.coe_nonempty {S M : Type*} [One M] [SetLike S M] [OneMemClass S M] (s : S) :
(s : Set M).Nonempty :=
1, one_mem s⟩

section

/-- A submonoid of a monoid `M` is a subset containing 1 and closed under multiplication. -/
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/ZMod/QuotientGroup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ variable {a}
@[to_additive (attr := simp)]
lemma finite_zpowers : (zpowers a : Set α).Finite ↔ IsOfFinOrder a := by
simp only [← orderOf_pos_iff, ← Nat.card_zpowers, Nat.card_pos_iff, ← SetLike.coe_sort_coe,
nonempty_coe_sort, Nat.card_pos_iff, Set.finite_coe_iff, Subgroup.coe_nonempty, true_and]
nonempty_coe_sort, Nat.card_pos_iff, Set.finite_coe_iff, OneMemClass.coe_nonempty, true_and]

@[to_additive (attr := simp)]
lemma infinite_zpowers : (zpowers a : Set α).Infinite ↔ ¬IsOfFinOrder a := finite_zpowers.not
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/GroupTheory/OrderOfElement.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ nonrec lemma Subgroup.orderOf_dvd_natCard {G : Type*} [Group G] (s : Subgroup G)
@[to_additive]
lemma Subgroup.orderOf_le_card {G : Type*} [Group G] (s : Subgroup G) (hs : (s : Set G).Finite)
{x} (hx : x ∈ s) : orderOf x ≤ Nat.card s :=
le_of_dvd (Nat.card_pos_iff.2 <| ⟨s.coe_nonempty.to_subtype, hs.to_subtype⟩) <|
le_of_dvd (Nat.card_pos_iff.2 <| ⟨(OneMemClass.coe_nonempty s).to_subtype, hs.to_subtype⟩) <|
s.orderOf_dvd_natCard hx

@[to_additive]
Expand Down
Loading