Skip to content

Commit 32240b2

Browse files
j-loreauxADedecker
andcommitted
feat: the bicentralizer of a commutative set is commutative (#18700)
This shows that the bicentralizer (a.k.a. bicommutant) of a commutative set is commutative. Moreover, since `s ⊆ s.centralizer.centralizer`, if `s` is a commutative set, then `closure s ≤ centralizer (centralizer s)` for various subobject closures. Consequently, we obtain simplified proofs that if `s` is commutative, then so is `closure s`. Co-authored-by: ADedecker <anatolededecker@gmail.com>
1 parent c0c8f97 commit 32240b2

File tree

12 files changed

+143
-105
lines changed

12 files changed

+143
-105
lines changed

Mathlib/Algebra/Group/Center.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ theorem mul_mem_center {z₁ z₂ : M} (hz₁ : z₁ ∈ Set.center M) (hz₂ :
138138
lemma center_subset_centralizer (S : Set M) : Set.center M ⊆ S.centralizer :=
139139
fun _ hx m _ ↦ (hx.comm m).symm
140140

141+
@[to_additive addCentralizer_union]
142+
lemma centralizer_union : centralizer (S ∪ T) = centralizer S ∩ centralizer T := by
143+
simp [centralizer, or_imp, forall_and, setOf_and]
144+
141145
@[to_additive (attr := gcongr) addCentralizer_subset]
142146
lemma centralizer_subset (h : S ⊆ T) : centralizer T ⊆ centralizer S := fun _ ht s hs ↦ ht s (h hs)
143147

@@ -161,6 +165,11 @@ lemma centralizer_centralizer_centralizer (S : Set M) :
161165
instance decidableMemCentralizer [∀ a : M, Decidable <| ∀ b ∈ S, b * a = a * b] :
162166
DecidablePred (· ∈ centralizer S) := fun _ ↦ decidable_of_iff' _ mem_centralizer_iff
163167

168+
@[to_additive addCentralizer_addCentralizer_comm_of_comm]
169+
lemma centralizer_centralizer_comm_of_comm (h_comm : ∀ x ∈ S, ∀ y ∈ S, x * y = y * x) :
170+
∀ x ∈ S.centralizer.centralizer, ∀ y ∈ S.centralizer.centralizer, x * y = y * x :=
171+
fun _ h₁ _ h₂ ↦ h₂ _ fun _ h₃ ↦ h₁ _ fun _ h₄ ↦ h_comm _ h₄ _ h₃
172+
164173
end Mul
165174

166175
section Semigroup

Mathlib/Algebra/Group/Subgroup/Basic.lean

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -436,27 +436,6 @@ theorem closure_closure_coe_preimage {k : Set G} : closure (((↑) : closure k
436436
closure_induction (fun _ h ↦ subset_closure h) (one_mem _) (fun _ _ _ _ ↦ mul_mem)
437437
(fun _ _ ↦ inv_mem) hx'
438438

439-
/-- If all the elements of a set `s` commute, then `closure s` is a commutative group. -/
440-
@[to_additive
441-
"If all the elements of a set `s` commute, then `closure s` is an additive
442-
commutative group."]
443-
def closureCommGroupOfComm {k : Set G} (hcomm : ∀ x ∈ k, ∀ y ∈ k, x * y = y * x) :
444-
CommGroup (closure k) :=
445-
{ (closure k).toGroup with
446-
mul_comm := fun ⟨x, hx⟩ ⟨y, hy⟩ => by
447-
ext
448-
simp only [Subgroup.coe_mul]
449-
induction hx, hy using closure_induction₂ with
450-
| mem x y hx hy => exact hcomm x hx y hy
451-
| one_left x _ => exact Commute.one_left x
452-
| one_right x _ => exact Commute.one_right x
453-
| mul_left _ _ _ _ _ _ h₁ h₂ => exact Commute.mul_left h₁ h₂
454-
| mul_right _ _ _ _ _ _ h₁ h₂ => exact Commute.mul_right h₁ h₂
455-
| inv_left _ _ _ _ h => -- `Commute.inv_left` is not imported
456-
rw [inv_mul_eq_iff_eq_mul, ← mul_assoc, h, mul_assoc, mul_inv_cancel, mul_one]
457-
| inv_right _ _ _ _ h =>
458-
rw [mul_inv_eq_iff_eq_mul, mul_assoc, h, ← mul_assoc, inv_mul_cancel, one_mul] }
459-
460439
variable (G)
461440

462441
/-- `closure` forms a Galois insertion with the coercion to set. -/

Mathlib/Algebra/Group/Submonoid/Membership.lean

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -494,20 +494,6 @@ theorem map_powers {N : Type*} {F : Type*} [Monoid N] [FunLike F M N] [MonoidHom
494494
(powers m).map f = powers (f m) := by
495495
simp only [powers_eq_closure, map_mclosure f, Set.image_singleton]
496496

497-
/-- If all the elements of a set `s` commute, then `closure s` is a commutative monoid. -/
498-
@[to_additive
499-
"If all the elements of a set `s` commute, then `closure s` forms an additive
500-
commutative monoid."]
501-
def closureCommMonoidOfComm {s : Set M} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
502-
CommMonoid (closure s) :=
503-
{ (closure s).toMonoid with
504-
mul_comm := fun x y => by
505-
ext
506-
simp only [Submonoid.coe_mul]
507-
exact closure_induction₂ (fun _ _ h₁ h₂ ↦ hcomm _ h₁ _ h₂) (fun _ _ ↦ Commute.one_left _)
508-
(fun _ _ ↦ Commute.one_right _) (fun _ _ _ _ _ _ ↦ Commute.mul_left)
509-
(fun _ _ _ _ _ _ ↦ Commute.mul_right) x.prop y.prop }
510-
511497
end Submonoid
512498

513499
@[to_additive]

Mathlib/Algebra/Ring/Subring/Basic.lean

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -548,25 +548,17 @@ theorem mem_closure_iff {s : Set R} {x} :
548548
| mul _ _ _ _ h₁ h₂ => exact add_mem h₁ h₂
549549
| inv _ _ h => exact neg_mem h⟩
550550

551+
lemma closure_le_centralizer_centralizer (s : Set R) :
552+
closure s ≤ centralizer (centralizer s) :=
553+
closure_le.mpr Set.subset_centralizer_centralizer
554+
551555
/-- If all elements of `s : Set A` commute pairwise, then `closure s` is a commutative ring. -/
552-
def closureCommRingOfComm {s : Set R} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
556+
abbrev closureCommRingOfComm {s : Set R} (hcomm : ∀ x ∈ s, ∀ y ∈ s, x * y = y * x) :
553557
CommRing (closure s) :=
554558
{ (closure s).toRing with
555-
mul_comm := fun ⟨x, hx⟩ ⟨y, hy⟩ => by
556-
ext
557-
simp only [MulMemClass.mk_mul_mk]
558-
induction hx, hy using closure_induction₂ with
559-
| mem_mem x y hx hy => exact hcomm x hx y hy
560-
| zero_left x _ => exact Commute.zero_left x
561-
| zero_right x _ => exact Commute.zero_right x
562-
| one_left x _ => exact Commute.one_left x
563-
| one_right x _ => exact Commute.one_right x
564-
| mul_left _ _ _ _ _ _ h₁ h₂ => exact Commute.mul_left h₁ h₂
565-
| mul_right _ _ _ _ _ _ h₁ h₂ => exact Commute.mul_right h₁ h₂
566-
| add_left _ _ _ _ _ _ h₁ h₂ => exact Commute.add_left h₁ h₂
567-
| add_right _ _ _ _ _ _ h₁ h₂ => exact Commute.add_right h₁ h₂
568-
| neg_left _ _ _ _ h => exact Commute.neg_left h
569-
| neg_right _ _ _ _ h => exact Commute.neg_right h }
559+
mul_comm := fun ⟨_, h₁⟩ ⟨_, h₂⟩ ↦
560+
have := closure_le_centralizer_centralizer s
561+
Subtype.ext <| Set.centralizer_centralizer_comm_of_comm hcomm _ (this h₁) _ (this h₂) }
570562

571563
theorem exists_list_of_mem_closure {s : Set R} {x : R} (hx : x ∈ closure s) :
572564
∃ L : List (List R), (∀ t ∈ L, ∀ y ∈ t, y ∈ s ∨ y = (-1 : R)) ∧ (L.map List.prod).sum = x := by

Mathlib/Algebra/Ring/Subsemiring/Basic.lean

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -886,23 +886,17 @@ instance center.smulCommClass_left : SMulCommClass (center R') R' R' :=
886886
instance center.smulCommClass_right : SMulCommClass R' (center R') R' :=
887887
Submonoid.center.smulCommClass_right
888888

889-
/-- If all the elements of a set `s` commute, then `closure s` is a commutative monoid. -/
890-
def closureCommSemiringOfComm {s : Set R'} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
889+
lemma closure_le_centralizer_centralizer (s : Set R') :
890+
closure s ≤ centralizer (centralizer s) :=
891+
closure_le.mpr Set.subset_centralizer_centralizer
892+
893+
/-- If all the elements of a set `s` commute, then `closure s` is a commutative semiring. -/
894+
abbrev closureCommSemiringOfComm {s : Set R'} (hcomm : ∀ x ∈ s, ∀ y ∈ s, x * y = y * x) :
891895
CommSemiring (closure s) :=
892896
{ (closure s).toSemiring with
893-
mul_comm := fun ⟨x, hx⟩ ⟨y, hy⟩ => by
894-
ext
895-
simp only [MulMemClass.mk_mul_mk]
896-
induction hx, hy using closure_induction₂ with
897-
| mem_mem x y hx hy => exact hcomm x hx y hy
898-
| zero_left x _ => exact Commute.zero_left x
899-
| zero_right x _ => exact Commute.zero_right x
900-
| one_left x _ => exact Commute.one_left x
901-
| one_right x _ => exact Commute.one_right x
902-
| mul_left _ _ _ _ _ _ h₁ h₂ => exact Commute.mul_left h₁ h₂
903-
| mul_right _ _ _ _ _ _ h₁ h₂ => exact Commute.mul_right h₁ h₂
904-
| add_left _ _ _ _ _ _ h₁ h₂ => exact Commute.add_left h₁ h₂
905-
| add_right _ _ _ _ _ _ h₁ h₂ => exact Commute.add_right h₁ h₂ }
897+
mul_comm := fun ⟨_, h₁⟩ ⟨_, h₂⟩ ↦
898+
have := closure_le_centralizer_centralizer s
899+
Subtype.ext <| Set.centralizer_centralizer_comm_of_comm hcomm _ (this h₁) _ (this h₂) }
906900

907901
end Subsemiring
908902

Mathlib/Algebra/Star/Center.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R
3333
_ = b * star (a * star c) := by rw [star_mul, star_star]
3434
_ = b * (c * star a) := by rw [star_mul, star_star]
3535

36+
theorem Set.star_centralizer : star s.centralizer = (star s).centralizer := by
37+
simp_rw [centralizer, ← commute_iff_eq]
38+
conv_lhs => simp only [← star_preimage, preimage_setOf_eq, ← commute_star_comm]
39+
conv_rhs => simp only [← image_star, forall_mem_image]
40+
41+
theorem Set.union_star_self_comm (hcomm : ∀ x ∈ s, ∀ y ∈ s, y * x = x * y)
42+
(hcomm_star : ∀ x ∈ s, ∀ y ∈ s, y * star x = star x * y) :
43+
∀ x ∈ s ∪ star s, ∀ y ∈ s ∪ star s, y * x = x * y := by
44+
change s ∪ star s ⊆ (s ∪ star s).centralizer
45+
simp_rw [centralizer_union, ← star_centralizer, union_subset_iff, subset_inter_iff,
46+
star_subset_star, star_subset]
47+
exact ⟨⟨hcomm, hcomm_star⟩, ⟨hcomm_star, hcomm⟩⟩
48+
3649
theorem Set.star_mem_centralizer' (h : ∀ a : R, a ∈ s → star a ∈ s) (ha : a ∈ Set.centralizer s) :
3750
star a ∈ Set.centralizer s := fun y hy => by simpa using congr_arg star (ha _ (h _ hy)).symm
3851

Mathlib/Algebra/Star/Subalgebra.lean

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,22 @@ def centralizer (s : Set A) : StarSubalgebra R A where
265265
theorem coe_centralizer (s : Set A) : (centralizer R s : Set A) = (s ∪ star s).centralizer :=
266266
rfl
267267

268-
theorem mem_centralizer_iff {s : Set A} {z : A} :
268+
open Set in
269+
nonrec theorem mem_centralizer_iff {s : Set A} {z : A} :
269270
z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g := by
270-
show (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
271-
simp only [Set.mem_union, or_imp, forall_and, and_congr_right_iff]
272-
exact fun _ =>
273-
fun hz a ha => hz _ (Set.star_mem_star.mpr ha), fun hz a ha => star_star a ▸ hz _ ha⟩
271+
simp [← SetLike.mem_coe, centralizer_union, ← image_star, mem_centralizer_iff, forall_and]
274272

275273
theorem centralizer_le (s t : Set A) (h : s ⊆ t) : centralizer R t ≤ centralizer R s :=
276274
Set.centralizer_subset (Set.union_subset_union h <| Set.preimage_mono h)
277275

276+
theorem centralizer_toSubalgebra (s : Set A) :
277+
(centralizer R s).toSubalgebra = Subalgebra.centralizer R (s ∪ star s):=
278+
rfl
279+
280+
theorem coe_centralizer_centralizer (s : Set A) :
281+
(centralizer R (centralizer R s : Set A)) = (s ∪ star s).centralizer.centralizer := by
282+
rw [coe_centralizer, StarMemClass.star_coe_eq, Set.union_self, coe_centralizer]
283+
278284
end Centralizer
279285

280286
end StarSubalgebra
@@ -503,28 +509,29 @@ theorem adjoin_induction_subtype {s : Set A} {p : adjoin R s → Prop} (a : adjo
503509

504510
variable (R)
505511

512+
lemma adjoin_le_centralizer_centralizer (s : Set A) :
513+
adjoin R s ≤ centralizer R (centralizer R s) := by
514+
rw [← toSubalgebra_le_iff, centralizer_toSubalgebra, adjoin_toSubalgebra]
515+
convert Algebra.adjoin_le_centralizer_centralizer R (s ∪ star s)
516+
rw [StarMemClass.star_coe_eq]
517+
simp
518+
506519
/-- If all elements of `s : Set A` commute pairwise and also commute pairwise with elements of
507520
`star s`, then `StarSubalgebra.adjoin R s` is commutative. See note [reducible non-instances]. -/
508521
abbrev adjoinCommSemiringOfComm {s : Set A}
509-
(hcomm : ∀ a : A, a ∈ s∀ b : A, b ∈ s a * b = b * a)
510-
(hcomm_star : ∀ a : A, a ∈ s∀ b : A, b ∈ s a * star b = star b * a) :
522+
(hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a)
523+
(hcomm_star : ∀ a ∈ s, ∀ b ∈ s, a * star b = star b * a) :
511524
CommSemiring (adjoin R s) :=
512-
{ (adjoin R s).toSubalgebra.toSemiring with
513-
mul_comm := by
514-
rintro ⟨x, hx⟩ ⟨y, hy⟩
515-
ext
516-
simp only [MulMemClass.mk_mul_mk]
517-
rw [← mem_toSubalgebra, adjoin_toSubalgebra] at hx hy
518-
letI : CommSemiring (Algebra.adjoin R (s ∪ star s)) :=
519-
Algebra.adjoinCommSemiringOfComm R
520-
(by
521-
intro a ha b hb
522-
cases' ha with ha ha <;> cases' hb with hb hb
523-
· exact hcomm _ ha _ hb
524-
· exact star_star b ▸ hcomm_star _ ha _ hb
525-
· exact star_star a ▸ (hcomm_star _ hb _ ha).symm
526-
· simpa only [star_mul, star_star] using congr_arg star (hcomm _ hb _ ha))
527-
exact congr_arg Subtype.val (mul_comm (⟨x, hx⟩ : Algebra.adjoin R (s ∪ star s)) ⟨y, hy⟩) }
525+
{ (adjoin R s).toSemiring with
526+
mul_comm := fun ⟨_, h₁⟩ ⟨_, h₂⟩ ↦ by
527+
have hcomm : ∀ a ∈ s ∪ star s, ∀ b ∈ s ∪ star s, a * b = b * a := fun a ha b hb ↦
528+
Set.union_star_self_comm (fun _ ha _ hb ↦ hcomm _ hb _ ha)
529+
(fun _ ha _ hb ↦ hcomm_star _ hb _ ha) b hb a ha
530+
have := adjoin_le_centralizer_centralizer R s
531+
apply this at h₁
532+
apply this at h₂
533+
rw [← SetLike.mem_coe, coe_centralizer_centralizer] at h₁ h₂
534+
exact Subtype.ext <| Set.centralizer_centralizer_comm_of_comm hcomm _ h₁ _ h₂ }
528535

529536
/-- If all elements of `s : Set A` commute pairwise and also commute pairwise with elements of
530537
`star s`, then `StarSubalgebra.adjoin R s` is commutative. See note [reducible non-instances]. -/

Mathlib/GroupTheory/Subgroup/Centralizer.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,21 @@ variable (H)
7777
theorem le_centralizer [h : H.IsCommutative] : H ≤ centralizer H :=
7878
le_centralizer_iff_isCommutative.mpr h
7979

80+
variable {H} in
81+
@[to_additive]
82+
lemma closure_le_centralizer_centralizer (s : Set G) :
83+
closure s ≤ centralizer (centralizer s) :=
84+
closure_le _ |>.mpr Set.subset_centralizer_centralizer
85+
86+
/-- If all the elements of a set `s` commute, then `closure s` is a commutative group. -/
87+
@[to_additive
88+
"If all the elements of a set `s` commute, then `closure s` is an additive
89+
commutative group."]
90+
abbrev closureCommGroupOfComm {k : Set G} (hcomm : ∀ x ∈ k, ∀ y ∈ k, x * y = y * x) :
91+
CommGroup (closure k) :=
92+
{ (closure k).toGroup with
93+
mul_comm := fun ⟨_, h₁⟩ ⟨_, h₂⟩ ↦
94+
have := closure_le_centralizer_centralizer k
95+
Subtype.ext <| Set.centralizer_centralizer_comm_of_comm hcomm _ (this h₁) _ (this h₂) }
96+
8097
end Subgroup

Mathlib/GroupTheory/Submonoid/Centralizer.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,23 @@ lemma centralizer_centralizer_centralizer {s : Set M} :
8888
apply SetLike.coe_injective
8989
simp only [coe_centralizer, Set.centralizer_centralizer_centralizer]
9090

91+
variable {M} in
92+
@[to_additive]
93+
lemma closure_le_centralizer_centralizer (s : Set M) :
94+
closure s ≤ centralizer (centralizer s) :=
95+
closure_le.mpr Set.subset_centralizer_centralizer
96+
97+
/-- If all the elements of a set `s` commute, then `closure s` is a commutative monoid. -/
98+
@[to_additive
99+
"If all the elements of a set `s` commute, then `closure s` forms an additive
100+
commutative monoid."]
101+
abbrev closureCommMonoidOfComm {s : Set M} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
102+
CommMonoid (closure s) :=
103+
{ (closure s).toMonoid with
104+
mul_comm := fun ⟨_, h₁⟩ ⟨_, h₂⟩ ↦
105+
have := closure_le_centralizer_centralizer s
106+
Subtype.ext <| Set.centralizer_centralizer_comm_of_comm hcomm _ (this h₁) _ (this h₂) }
107+
91108
end
92109

93110
end Submonoid

Mathlib/GroupTheory/Subsemigroup/Centralizer.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ variable (M)
6767
theorem centralizer_univ : centralizer Set.univ = center M :=
6868
SetLike.ext' (Set.centralizer_univ M)
6969

70+
variable {M} in
71+
@[to_additive]
72+
lemma closure_le_centralizer_centralizer (s : Set M) :
73+
closure s ≤ centralizer (centralizer s) :=
74+
closure_le.mpr Set.subset_centralizer_centralizer
75+
76+
/-- If all the elements of a set `s` commute, then `closure s` is a commutative semigroup. -/
77+
@[to_additive
78+
"If all the elements of a set `s` commute, then `closure s` forms an additive
79+
commutative semigroup."]
80+
abbrev closureCommSemigroupOfComm {s : Set M} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
81+
CommSemigroup (closure s) :=
82+
{ MulMemClass.toSemigroup (closure s) with
83+
mul_comm := fun ⟨_, h₁⟩ ⟨_, h₂⟩ ↦
84+
have := closure_le_centralizer_centralizer s
85+
Subtype.ext <| Set.centralizer_centralizer_comm_of_comm hcomm _ (this h₁) _ (this h₂) }
86+
7087
end
7188

7289
end Subsemigroup

0 commit comments

Comments
 (0)