group_theory.subsemigroup.center
⟷
Mathlib.GroupTheory.Subsemigroup.Center
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
@[to_additive, simp]
to the correct order (#19169)
Whilst making some files, I noticed that there is some lemmas that have the wrong order for to_additive
and simp
.
@@ -151,7 +151,7 @@ end
section
variables (M) [comm_semigroup M]
-@[to_additive, simp] lemma center_eq_top : center M = ⊤ :=
+@[simp, to_additive] lemma center_eq_top : center M = ⊤ :=
set_like.coe_injective (set.center_eq_univ M)
end
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Jireh Loreaux
-/
-import Mathbin.Algebra.Ring.Defs
-import Mathbin.GroupTheory.Subsemigroup.Operations
+import Algebra.Ring.Defs
+import GroupTheory.Subsemigroup.Operations
#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -178,7 +178,7 @@ variable (M) [Semigroup M]
"The center of a semigroup `M` is the set of elements that commute with everything in\n`M`"]
def center : Subsemigroup M where
carrier := Set.center M
- mul_mem' a b := Set.mul_mem_center
+ hMul_mem' a b := Set.mul_mem_center
#align subsemigroup.center Subsemigroup.center
#align add_subsemigroup.center AddSubsemigroup.center
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Jireh Loreaux
-
-! This file was ported from Lean 3 source module group_theory.subsemigroup.center
-! leanprover-community/mathlib commit 1ac8d4304efba9d03fa720d06516fac845aa5353
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Ring.Defs
import Mathbin.GroupTheory.Subsemigroup.Operations
+#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
+
/-!
# Centers of magmas and semigroups
mathlib commit https://github.com/leanprover-community/mathlib/commit/9240e8be927a0955b9a82c6c85ef499ee3a626b8
@@ -96,12 +96,10 @@ theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b
#align set.add_mem_center Set.add_mem_center
-/
-#print Set.neg_mem_center /-
@[simp]
theorem neg_mem_center [Ring M] {a : M} (ha : a ∈ Set.center M) : -a ∈ Set.center M := fun c => by
rw [← neg_mul_comm, ha (-c), neg_mul_comm]
-#align set.neg_mem_center Set.neg_mem_center
--/
+#align set.neg_mem_center Set.neg_mem_centerₓ
#print Set.subset_center_units /-
@[to_additive subset_add_center_add_units]
mathlib commit https://github.com/leanprover-community/mathlib/commit/9f55d0d4363ae59948c33864cbc52e0b12e0e8ce
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Jireh Loreaux
! This file was ported from Lean 3 source module group_theory.subsemigroup.center
-! leanprover-community/mathlib commit c3291da49cfa65f0d43b094750541c0731edc932
+! leanprover-community/mathlib commit 1ac8d4304efba9d03fa720d06516fac845aa5353
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -224,7 +224,7 @@ section
variable (M) [CommSemigroup M]
#print Subsemigroup.center_eq_top /-
-@[to_additive, simp]
+@[simp, to_additive]
theorem center_eq_top : center M = ⊤ :=
SetLike.coe_injective (Set.center_eq_univ M)
#align subsemigroup.center_eq_top Subsemigroup.center_eq_top
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -58,57 +58,76 @@ instance decidableMemCenter [Mul M] [∀ a : M, Decidable <| ∀ b : M, b * a =
#align set.decidable_mem_center Set.decidableMemCenter
-/
+#print Set.one_mem_center /-
@[simp, to_additive zero_mem_add_center]
theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.one_mem_center Set.one_mem_center
#align set.zero_mem_add_center Set.zero_mem_addCenter
+-/
+#print Set.zero_mem_center /-
@[simp]
theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.zero_mem_center Set.zero_mem_center
+-/
variable {M}
+#print Set.mul_mem_center /-
@[simp, to_additive add_mem_add_center]
theorem mul_mem_center [Semigroup M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a * b ∈ Set.center M := fun g => by rw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]
#align set.mul_mem_center Set.mul_mem_center
#align set.add_mem_add_center Set.add_mem_addCenter
+-/
+#print Set.inv_mem_center /-
@[simp, to_additive neg_mem_add_center]
theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := fun g => by
rw [← inv_inj, mul_inv_rev, inv_inv, ← ha, mul_inv_rev, inv_inv]
#align set.inv_mem_center Set.inv_mem_center
#align set.neg_mem_add_center Set.neg_mem_addCenter
+-/
+#print Set.add_mem_center /-
@[simp]
theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a + b ∈ Set.center M := fun c => by rw [add_mul, mul_add, ha c, hb c]
#align set.add_mem_center Set.add_mem_center
+-/
+#print Set.neg_mem_center /-
@[simp]
theorem neg_mem_center [Ring M] {a : M} (ha : a ∈ Set.center M) : -a ∈ Set.center M := fun c => by
rw [← neg_mul_comm, ha (-c), neg_mul_comm]
#align set.neg_mem_center Set.neg_mem_center
+-/
+#print Set.subset_center_units /-
@[to_additive subset_add_center_add_units]
theorem subset_center_units [Monoid M] : (coe : Mˣ → M) ⁻¹' center M ⊆ Set.center Mˣ :=
fun a ha b => Units.ext <| ha _
#align set.subset_center_units Set.subset_center_units
#align set.subset_add_center_add_units Set.subset_addCenter_add_units
+-/
+#print Set.center_units_subset /-
theorem center_units_subset [GroupWithZero M] : Set.center Mˣ ⊆ (coe : Mˣ → M) ⁻¹' center M :=
fun a ha b => by
obtain rfl | hb := eq_or_ne b 0
· rw [MulZeroClass.zero_mul, MulZeroClass.mul_zero]
· exact units.ext_iff.mp (ha (Units.mk0 _ hb))
#align set.center_units_subset Set.center_units_subset
+-/
+#print Set.center_units_eq /-
/-- In a group with zero, the center of the units is the preimage of the center. -/
theorem center_units_eq [GroupWithZero M] : Set.center Mˣ = (coe : Mˣ → M) ⁻¹' center M :=
Subset.antisymm center_units_subset subset_center_units
#align set.center_units_eq Set.center_units_eq
+-/
+#print Set.inv_mem_center₀ /-
@[simp]
theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M :=
by
@@ -118,7 +137,9 @@ theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) :
rw [← Units.val_inv_eq_inv_val]
exact center_units_subset (inv_mem_center (subset_center_units ha))
#align set.inv_mem_center₀ Set.inv_mem_center₀
+-/
+#print Set.div_mem_center /-
@[simp, to_additive sub_mem_add_center]
theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a / b ∈ Set.center M := by
@@ -126,7 +147,9 @@ theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈
exact mul_mem_center ha (inv_mem_center hb)
#align set.div_mem_center Set.div_mem_center
#align set.sub_mem_add_center Set.sub_mem_addCenter
+-/
+#print Set.div_mem_center₀ /-
@[simp]
theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
(hb : b ∈ Set.center M) : a / b ∈ Set.center M :=
@@ -134,14 +157,17 @@ theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
rw [div_eq_mul_inv]
exact mul_mem_center ha (inv_mem_center₀ hb)
#align set.div_mem_center₀ Set.div_mem_center₀
+-/
variable (M)
+#print Set.center_eq_univ /-
@[simp, to_additive add_center_eq_univ]
theorem center_eq_univ [CommSemigroup M] : center M = Set.univ :=
Subset.antisymm (subset_univ _) fun x _ y => mul_comm y x
#align set.center_eq_univ Set.center_eq_univ
#align set.add_center_eq_univ Set.addCenter_eq_univ
+-/
end Set
@@ -151,6 +177,7 @@ section
variable (M) [Semigroup M]
+#print Subsemigroup.center /-
/-- The center of a semigroup `M` is the set of elements that commute with everything in `M` -/
@[to_additive
"The center of a semigroup `M` is the set of elements that commute with everything in\n`M`"]
@@ -159,6 +186,7 @@ def center : Subsemigroup M where
mul_mem' a b := Set.mul_mem_center
#align subsemigroup.center Subsemigroup.center
#align add_subsemigroup.center AddSubsemigroup.center
+-/
@[to_additive]
theorem coe_center : ↑(center M) = Set.center M :=
@@ -168,17 +196,21 @@ theorem coe_center : ↑(center M) = Set.center M :=
variable {M}
+#print Subsemigroup.mem_center_iff /-
@[to_additive]
theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g :=
Iff.rfl
#align subsemigroup.mem_center_iff Subsemigroup.mem_center_iff
#align add_subsemigroup.mem_center_iff AddSubsemigroup.mem_center_iff
+-/
+#print Subsemigroup.decidableMemCenter /-
@[to_additive]
instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] : Decidable (a ∈ center M) :=
decidable_of_iff' _ mem_center_iff
#align subsemigroup.decidable_mem_center Subsemigroup.decidableMemCenter
#align add_subsemigroup.decidable_mem_center AddSubsemigroup.decidableMemCenter
+-/
/-- The center of a semigroup is commutative. -/
@[to_additive "The center of an additive semigroup is commutative."]
@@ -191,11 +223,13 @@ section
variable (M) [CommSemigroup M]
+#print Subsemigroup.center_eq_top /-
@[to_additive, simp]
theorem center_eq_top : center M = ⊤ :=
SetLike.coe_injective (Set.center_eq_univ M)
#align subsemigroup.center_eq_top Subsemigroup.center_eq_top
#align add_subsemigroup.center_eq_top AddSubsemigroup.center_eq_top
+-/
end
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -39,7 +39,7 @@ variable (M)
/-- The center of a magma. -/
@[to_additive add_center " The center of an additive magma. "]
def center [Mul M] : Set M :=
- { z | ∀ m, m * z = z * m }
+ {z | ∀ m, m * z = z * m}
#align set.center Set.center
#align set.add_center Set.addCenter
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -160,12 +160,11 @@ def center : Subsemigroup M where
#align subsemigroup.center Subsemigroup.center
#align add_subsemigroup.center AddSubsemigroup.center
-/- warning: subsemigroup.coe_center clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align subsemigroup.coe_center [anonymous]ₓ'. -/
@[to_additive]
-theorem [anonymous] : ↑(center M) = Set.center M :=
+theorem coe_center : ↑(center M) = Set.center M :=
rfl
-#align subsemigroup.coe_center [anonymous]
+#align subsemigroup.coe_center Subsemigroup.coe_center
+#align add_subsemigroup.coe_center AddSubsemigroup.coe_center
variable {M}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -58,93 +58,45 @@ instance decidableMemCenter [Mul M] [∀ a : M, Decidable <| ∀ b : M, b * a =
#align set.decidable_mem_center Set.decidableMemCenter
-/
-/- warning: set.one_mem_center -> Set.one_mem_center is a dubious translation:
-lean 3 declaration is
- forall (M : Type.{u1}) [_inst_1 : MulOneClass.{u1} M], Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (OfNat.ofNat.{u1} M 1 (OfNat.mk.{u1} M 1 (One.one.{u1} M (MulOneClass.toHasOne.{u1} M _inst_1)))) (Set.center.{u1} M (MulOneClass.toHasMul.{u1} M _inst_1))
-but is expected to have type
- forall (M : Type.{u1}) [_inst_1 : MulOneClass.{u1} M], Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (OfNat.ofNat.{u1} M 1 (One.toOfNat1.{u1} M (MulOneClass.toOne.{u1} M _inst_1))) (Set.center.{u1} M (MulOneClass.toMul.{u1} M _inst_1))
-Case conversion may be inaccurate. Consider using '#align set.one_mem_center Set.one_mem_centerₓ'. -/
@[simp, to_additive zero_mem_add_center]
theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.one_mem_center Set.one_mem_center
#align set.zero_mem_add_center Set.zero_mem_addCenter
-/- warning: set.zero_mem_center -> Set.zero_mem_center is a dubious translation:
-lean 3 declaration is
- forall (M : Type.{u1}) [_inst_1 : MulZeroClass.{u1} M], Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (OfNat.ofNat.{u1} M 0 (OfNat.mk.{u1} M 0 (Zero.zero.{u1} M (MulZeroClass.toHasZero.{u1} M _inst_1)))) (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M _inst_1))
-but is expected to have type
- forall (M : Type.{u1}) [_inst_1 : MulZeroClass.{u1} M], Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (OfNat.ofNat.{u1} M 0 (Zero.toOfNat0.{u1} M (MulZeroClass.toZero.{u1} M _inst_1))) (Set.center.{u1} M (MulZeroClass.toMul.{u1} M _inst_1))
-Case conversion may be inaccurate. Consider using '#align set.zero_mem_center Set.zero_mem_centerₓ'. -/
@[simp]
theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.zero_mem_center Set.zero_mem_center
variable {M}
-/- warning: set.mul_mem_center -> Set.mul_mem_center is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Semigroup.{u1} M] {a : M} {b : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (Semigroup.toHasMul.{u1} M _inst_1))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) b (Set.center.{u1} M (Semigroup.toHasMul.{u1} M _inst_1))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) a b) (Set.center.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Semigroup.{u1} M] {a : M} {b : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (Semigroup.toMul.{u1} M _inst_1))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) b (Set.center.{u1} M (Semigroup.toMul.{u1} M _inst_1))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toMul.{u1} M _inst_1)) a b) (Set.center.{u1} M (Semigroup.toMul.{u1} M _inst_1)))
-Case conversion may be inaccurate. Consider using '#align set.mul_mem_center Set.mul_mem_centerₓ'. -/
@[simp, to_additive add_mem_add_center]
theorem mul_mem_center [Semigroup M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a * b ∈ Set.center M := fun g => by rw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]
#align set.mul_mem_center Set.mul_mem_center
#align set.add_mem_add_center Set.add_mem_addCenter
-/- warning: set.inv_mem_center -> Set.inv_mem_center is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Group.{u1} M] {a : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1)))))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (Inv.inv.{u1} M (DivInvMonoid.toHasInv.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1)) a) (Set.center.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1))))))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Group.{u1} M] {a : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1)))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (Inv.inv.{u1} M (InvOneClass.toInv.{u1} M (DivInvOneMonoid.toInvOneClass.{u1} M (DivisionMonoid.toDivInvOneMonoid.{u1} M (Group.toDivisionMonoid.{u1} M _inst_1)))) a) (Set.center.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align set.inv_mem_center Set.inv_mem_centerₓ'. -/
@[simp, to_additive neg_mem_add_center]
theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := fun g => by
rw [← inv_inj, mul_inv_rev, inv_inv, ← ha, mul_inv_rev, inv_inv]
#align set.inv_mem_center Set.inv_mem_center
#align set.neg_mem_add_center Set.neg_mem_addCenter
-/- warning: set.add_mem_center -> Set.add_mem_center is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Distrib.{u1} M] {a : M} {b : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (Distrib.toHasMul.{u1} M _inst_1))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) b (Set.center.{u1} M (Distrib.toHasMul.{u1} M _inst_1))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (HAdd.hAdd.{u1, u1, u1} M M M (instHAdd.{u1} M (Distrib.toHasAdd.{u1} M _inst_1)) a b) (Set.center.{u1} M (Distrib.toHasMul.{u1} M _inst_1)))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Distrib.{u1} M] {a : M} {b : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (Distrib.toMul.{u1} M _inst_1))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) b (Set.center.{u1} M (Distrib.toMul.{u1} M _inst_1))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (HAdd.hAdd.{u1, u1, u1} M M M (instHAdd.{u1} M (Distrib.toAdd.{u1} M _inst_1)) a b) (Set.center.{u1} M (Distrib.toMul.{u1} M _inst_1)))
-Case conversion may be inaccurate. Consider using '#align set.add_mem_center Set.add_mem_centerₓ'. -/
@[simp]
theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a + b ∈ Set.center M := fun c => by rw [add_mul, mul_add, ha c, hb c]
#align set.add_mem_center Set.add_mem_center
-/- warning: set.neg_mem_center -> Set.neg_mem_center is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Ring.{u1} M] {a : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (Distrib.toHasMul.{u1} M (Ring.toDistrib.{u1} M _inst_1)))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (Neg.neg.{u1} M (SubNegMonoid.toHasNeg.{u1} M (AddGroup.toSubNegMonoid.{u1} M (AddGroupWithOne.toAddGroup.{u1} M (AddCommGroupWithOne.toAddGroupWithOne.{u1} M (Ring.toAddCommGroupWithOne.{u1} M _inst_1))))) a) (Set.center.{u1} M (Distrib.toHasMul.{u1} M (Ring.toDistrib.{u1} M _inst_1))))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Ring.{u1} M] {a : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (NonUnitalNonAssocRing.toMul.{u1} M (NonAssocRing.toNonUnitalNonAssocRing.{u1} M (Ring.toNonAssocRing.{u1} M _inst_1))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (Neg.neg.{u1} M (Ring.toNeg.{u1} M _inst_1) a) (Set.center.{u1} M (NonUnitalNonAssocRing.toMul.{u1} M (NonAssocRing.toNonUnitalNonAssocRing.{u1} M (Ring.toNonAssocRing.{u1} M _inst_1)))))
-Case conversion may be inaccurate. Consider using '#align set.neg_mem_center Set.neg_mem_centerₓ'. -/
@[simp]
theorem neg_mem_center [Ring M] {a : M} (ha : a ∈ Set.center M) : -a ∈ Set.center M := fun c => by
rw [← neg_mul_comm, ha (-c), neg_mul_comm]
#align set.neg_mem_center Set.neg_mem_center
-/- warning: set.subset_center_units -> Set.subset_center_units is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M], HasSubset.Subset.{u1} (Set.{u1} (Units.{u1} M _inst_1)) (Set.hasSubset.{u1} (Units.{u1} M _inst_1)) (Set.preimage.{u1, u1} (Units.{u1} M _inst_1) M ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Units.{u1} M _inst_1) M (HasLiftT.mk.{succ u1, succ u1} (Units.{u1} M _inst_1) M (CoeTCₓ.coe.{succ u1, succ u1} (Units.{u1} M _inst_1) M (coeBase.{succ u1, succ u1} (Units.{u1} M _inst_1) M (Units.hasCoe.{u1} M _inst_1))))) (Set.center.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)))) (Set.center.{u1} (Units.{u1} M _inst_1) (MulOneClass.toHasMul.{u1} (Units.{u1} M _inst_1) (Units.mulOneClass.{u1} M _inst_1)))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M], HasSubset.Subset.{u1} (Set.{u1} (Units.{u1} M _inst_1)) (Set.instHasSubsetSet.{u1} (Units.{u1} M _inst_1)) (Set.preimage.{u1, u1} (Units.{u1} M _inst_1) M (Units.val.{u1} M _inst_1) (Set.center.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)))) (Set.center.{u1} (Units.{u1} M _inst_1) (MulOneClass.toMul.{u1} (Units.{u1} M _inst_1) (Units.instMulOneClassUnits.{u1} M _inst_1)))
-Case conversion may be inaccurate. Consider using '#align set.subset_center_units Set.subset_center_unitsₓ'. -/
@[to_additive subset_add_center_add_units]
theorem subset_center_units [Monoid M] : (coe : Mˣ → M) ⁻¹' center M ⊆ Set.center Mˣ :=
fun a ha b => Units.ext <| ha _
#align set.subset_center_units Set.subset_center_units
#align set.subset_add_center_add_units Set.subset_addCenter_add_units
-/- warning: set.center_units_subset -> Set.center_units_subset is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M], HasSubset.Subset.{u1} (Set.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Set.hasSubset.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Set.center.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (MulOneClass.toHasMul.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (Units.mulOneClass.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))) (Set.preimage.{u1, u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (HasLiftT.mk.{succ u1, succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (CoeTCₓ.coe.{succ u1, succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (coeBase.{succ u1, succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (Units.hasCoe.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))) (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M], HasSubset.Subset.{u1} (Set.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Set.instHasSubsetSet.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Set.center.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (MulOneClass.toMul.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (Units.instMulOneClassUnits.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))) (Set.preimage.{u1, u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (Units.val.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (Set.center.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align set.center_units_subset Set.center_units_subsetₓ'. -/
theorem center_units_subset [GroupWithZero M] : Set.center Mˣ ⊆ (coe : Mˣ → M) ⁻¹' center M :=
fun a ha b => by
obtain rfl | hb := eq_or_ne b 0
@@ -152,23 +104,11 @@ theorem center_units_subset [GroupWithZero M] : Set.center Mˣ ⊆ (coe : Mˣ
· exact units.ext_iff.mp (ha (Units.mk0 _ hb))
#align set.center_units_subset Set.center_units_subset
-/- warning: set.center_units_eq -> Set.center_units_eq is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M], Eq.{succ u1} (Set.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Set.center.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (MulOneClass.toHasMul.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (Units.mulOneClass.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))) (Set.preimage.{u1, u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (HasLiftT.mk.{succ u1, succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (CoeTCₓ.coe.{succ u1, succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (coeBase.{succ u1, succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (Units.hasCoe.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))) (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M], Eq.{succ u1} (Set.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Set.center.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (MulOneClass.toMul.{u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (Units.instMulOneClassUnits.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))) (Set.preimage.{u1, u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) M (Units.val.{u1} M (MonoidWithZero.toMonoid.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))) (Set.center.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align set.center_units_eq Set.center_units_eqₓ'. -/
/-- In a group with zero, the center of the units is the preimage of the center. -/
theorem center_units_eq [GroupWithZero M] : Set.center Mˣ = (coe : Mˣ → M) ⁻¹' center M :=
Subset.antisymm center_units_subset subset_center_units
#align set.center_units_eq Set.center_units_eq
-/- warning: set.inv_mem_center₀ -> Set.inv_mem_center₀ is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M] {a : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (Inv.inv.{u1} M (DivInvMonoid.toHasInv.{u1} M (GroupWithZero.toDivInvMonoid.{u1} M _inst_1)) a) (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M] {a : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (Inv.inv.{u1} M (GroupWithZero.toInv.{u1} M _inst_1) a) (Set.center.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align set.inv_mem_center₀ Set.inv_mem_center₀ₓ'. -/
@[simp]
theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M :=
by
@@ -179,12 +119,6 @@ theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) :
exact center_units_subset (inv_mem_center (subset_center_units ha))
#align set.inv_mem_center₀ Set.inv_mem_center₀
-/- warning: set.div_mem_center -> Set.div_mem_center is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Group.{u1} M] {a : M} {b : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1)))))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) b (Set.center.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1)))))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (HDiv.hDiv.{u1, u1, u1} M M M (instHDiv.{u1} M (DivInvMonoid.toHasDiv.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1))) a b) (Set.center.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1))))))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Group.{u1} M] {a : M} {b : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1)))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) b (Set.center.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1)))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (HDiv.hDiv.{u1, u1, u1} M M M (instHDiv.{u1} M (DivInvMonoid.toDiv.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1))) a b) (Set.center.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (DivInvMonoid.toMonoid.{u1} M (Group.toDivInvMonoid.{u1} M _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align set.div_mem_center Set.div_mem_centerₓ'. -/
@[simp, to_additive sub_mem_add_center]
theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a / b ∈ Set.center M := by
@@ -193,12 +127,6 @@ theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈
#align set.div_mem_center Set.div_mem_center
#align set.sub_mem_add_center Set.sub_mem_addCenter
-/- warning: set.div_mem_center₀ -> Set.div_mem_center₀ is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M] {a : M} {b : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) b (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (HDiv.hDiv.{u1, u1, u1} M M M (instHDiv.{u1} M (DivInvMonoid.toHasDiv.{u1} M (GroupWithZero.toDivInvMonoid.{u1} M _inst_1))) a b) (Set.center.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : GroupWithZero.{u1} M] {a : M} {b : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) b (Set.center.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1)))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (HDiv.hDiv.{u1, u1, u1} M M M (instHDiv.{u1} M (GroupWithZero.toDiv.{u1} M _inst_1)) a b) (Set.center.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (GroupWithZero.toMonoidWithZero.{u1} M _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align set.div_mem_center₀ Set.div_mem_center₀ₓ'. -/
@[simp]
theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
(hb : b ∈ Set.center M) : a / b ∈ Set.center M :=
@@ -209,12 +137,6 @@ theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
variable (M)
-/- warning: set.center_eq_univ -> Set.center_eq_univ is a dubious translation:
-lean 3 declaration is
- forall (M : Type.{u1}) [_inst_1 : CommSemigroup.{u1} M], Eq.{succ u1} (Set.{u1} M) (Set.center.{u1} M (Semigroup.toHasMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))) (Set.univ.{u1} M)
-but is expected to have type
- forall (M : Type.{u1}) [_inst_1 : CommSemigroup.{u1} M], Eq.{succ u1} (Set.{u1} M) (Set.center.{u1} M (Semigroup.toMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))) (Set.univ.{u1} M)
-Case conversion may be inaccurate. Consider using '#align set.center_eq_univ Set.center_eq_univₓ'. -/
@[simp, to_additive add_center_eq_univ]
theorem center_eq_univ [CommSemigroup M] : center M = Set.univ :=
Subset.antisymm (subset_univ _) fun x _ y => mul_comm y x
@@ -229,12 +151,6 @@ section
variable (M) [Semigroup M]
-/- warning: subsemigroup.center -> Subsemigroup.center is a dubious translation:
-lean 3 declaration is
- forall (M : Type.{u1}) [_inst_1 : Semigroup.{u1} M], Subsemigroup.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)
-but is expected to have type
- forall (M : Type.{u1}) [_inst_1 : Semigroup.{u1} M], Subsemigroup.{u1} M (Semigroup.toMul.{u1} M _inst_1)
-Case conversion may be inaccurate. Consider using '#align subsemigroup.center Subsemigroup.centerₓ'. -/
/-- The center of a semigroup `M` is the set of elements that commute with everything in `M` -/
@[to_additive
"The center of a semigroup `M` is the set of elements that commute with everything in\n`M`"]
@@ -245,11 +161,6 @@ def center : Subsemigroup M where
#align add_subsemigroup.center AddSubsemigroup.center
/- warning: subsemigroup.coe_center clashes with [anonymous] -> [anonymous]
-warning: subsemigroup.coe_center -> [anonymous] is a dubious translation:
-lean 3 declaration is
- forall (M : Type.{u_1}) [_inst_1 : Semigroup.{u_1} M], Eq.{max (succ u_1) 1} (Set.{u_1} M) ((fun (a : Type.{u_1}) (b : Sort.{max (succ u_1) 1}) [self : HasLiftT.{succ u_1, max (succ u_1) 1} a b] => self.0) (Subsemigroup.{u_1} M (Semigroup.toHasMul.{u_1} M _inst_1)) (Set.{u_1} M) (HasLiftT.mk.{succ u_1, max (succ u_1) 1} (Subsemigroup.{u_1} M (Semigroup.toHasMul.{u_1} M _inst_1)) (Set.{u_1} M) (CoeTCₓ.coe.{succ u_1, max (succ u_1) 1} (Subsemigroup.{u_1} M (Semigroup.toHasMul.{u_1} M _inst_1)) (Set.{u_1} M) (SetLike.Set.hasCoeT.{u_1, u_1} (Subsemigroup.{u_1} M (Semigroup.toHasMul.{u_1} M _inst_1)) M (Subsemigroup.setLike.{u_1} M (Semigroup.toHasMul.{u_1} M _inst_1))))) (Subsemigroup.center.{u_1} M _inst_1)) (Set.center.{u_1} M (Semigroup.toHasMul.{u_1} M _inst_1))
-but is expected to have type
- forall {M : Type.{u}} {_inst_1 : Type.{v}}, (Nat -> M -> _inst_1) -> Nat -> (List.{u} M) -> (List.{v} _inst_1)
Case conversion may be inaccurate. Consider using '#align subsemigroup.coe_center [anonymous]ₓ'. -/
@[to_additive]
theorem [anonymous] : ↑(center M) = Set.center M :=
@@ -258,24 +169,12 @@ theorem [anonymous] : ↑(center M) = Set.center M :=
variable {M}
-/- warning: subsemigroup.mem_center_iff -> Subsemigroup.mem_center_iff is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Semigroup.{u1} M] {z : M}, Iff (Membership.Mem.{u1, u1} M (Subsemigroup.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) (SetLike.hasMem.{u1, u1} (Subsemigroup.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) M (Subsemigroup.setLike.{u1} M (Semigroup.toHasMul.{u1} M _inst_1))) z (Subsemigroup.center.{u1} M _inst_1)) (forall (g : M), Eq.{succ u1} M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) g z) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) z g))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Semigroup.{u1} M] {z : M}, Iff (Membership.mem.{u1, u1} M (Subsemigroup.{u1} M (Semigroup.toMul.{u1} M _inst_1)) (SetLike.instMembership.{u1, u1} (Subsemigroup.{u1} M (Semigroup.toMul.{u1} M _inst_1)) M (Subsemigroup.instSetLikeSubsemigroup.{u1} M (Semigroup.toMul.{u1} M _inst_1))) z (Subsemigroup.center.{u1} M _inst_1)) (forall (g : M), Eq.{succ u1} M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toMul.{u1} M _inst_1)) g z) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toMul.{u1} M _inst_1)) z g))
-Case conversion may be inaccurate. Consider using '#align subsemigroup.mem_center_iff Subsemigroup.mem_center_iffₓ'. -/
@[to_additive]
theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g :=
Iff.rfl
#align subsemigroup.mem_center_iff Subsemigroup.mem_center_iff
#align add_subsemigroup.mem_center_iff AddSubsemigroup.mem_center_iff
-/- warning: subsemigroup.decidable_mem_center -> Subsemigroup.decidableMemCenter is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Semigroup.{u1} M] (a : M) [_inst_2 : Decidable (forall (b : M), Eq.{succ u1} M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) b a) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) a b))], Decidable (Membership.Mem.{u1, u1} M (Subsemigroup.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) (SetLike.hasMem.{u1, u1} (Subsemigroup.{u1} M (Semigroup.toHasMul.{u1} M _inst_1)) M (Subsemigroup.setLike.{u1} M (Semigroup.toHasMul.{u1} M _inst_1))) a (Subsemigroup.center.{u1} M _inst_1))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : Semigroup.{u1} M] (a : M) [_inst_2 : Decidable (forall (b : M), Eq.{succ u1} M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toMul.{u1} M _inst_1)) b a) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (Semigroup.toMul.{u1} M _inst_1)) a b))], Decidable (Membership.mem.{u1, u1} M (Subsemigroup.{u1} M (Semigroup.toMul.{u1} M _inst_1)) (SetLike.instMembership.{u1, u1} (Subsemigroup.{u1} M (Semigroup.toMul.{u1} M _inst_1)) M (Subsemigroup.instSetLikeSubsemigroup.{u1} M (Semigroup.toMul.{u1} M _inst_1))) a (Subsemigroup.center.{u1} M _inst_1))
-Case conversion may be inaccurate. Consider using '#align subsemigroup.decidable_mem_center Subsemigroup.decidableMemCenterₓ'. -/
@[to_additive]
instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] : Decidable (a ∈ center M) :=
decidable_of_iff' _ mem_center_iff
@@ -293,12 +192,6 @@ section
variable (M) [CommSemigroup M]
-/- warning: subsemigroup.center_eq_top -> Subsemigroup.center_eq_top is a dubious translation:
-lean 3 declaration is
- forall (M : Type.{u1}) [_inst_1 : CommSemigroup.{u1} M], Eq.{succ u1} (Subsemigroup.{u1} M (Semigroup.toHasMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))) (Subsemigroup.center.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1)) (Top.top.{u1} (Subsemigroup.{u1} M (Semigroup.toHasMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))) (Subsemigroup.hasTop.{u1} M (Semigroup.toHasMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))))
-but is expected to have type
- forall (M : Type.{u1}) [_inst_1 : CommSemigroup.{u1} M], Eq.{succ u1} (Subsemigroup.{u1} M (Semigroup.toMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))) (Subsemigroup.center.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1)) (Top.top.{u1} (Subsemigroup.{u1} M (Semigroup.toMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))) (Subsemigroup.instTopSubsemigroup.{u1} M (Semigroup.toMul.{u1} M (CommSemigroup.toSemigroup.{u1} M _inst_1))))
-Case conversion may be inaccurate. Consider using '#align subsemigroup.center_eq_top Subsemigroup.center_eq_topₓ'. -/
@[to_additive, simp]
theorem center_eq_top : center M = ⊤ :=
SetLike.coe_injective (Set.center_eq_univ M)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -173,8 +173,7 @@ Case conversion may be inaccurate. Consider using '#align set.inv_mem_center₀
theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M :=
by
obtain rfl | ha0 := eq_or_ne a 0
- · rw [inv_zero]
- exact zero_mem_center M
+ · rw [inv_zero]; exact zero_mem_center M
rcases IsUnit.mk0 _ ha0 with ⟨a, rfl⟩
rw [← Units.val_inv_eq_inv_val]
exact center_units_subset (inv_mem_center (subset_center_units ha))
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -118,7 +118,7 @@ theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b
/- warning: set.neg_mem_center -> Set.neg_mem_center is a dubious translation:
lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : Ring.{u1} M] {a : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (Distrib.toHasMul.{u1} M (Ring.toDistrib.{u1} M _inst_1)))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (Neg.neg.{u1} M (SubNegMonoid.toHasNeg.{u1} M (AddGroup.toSubNegMonoid.{u1} M (AddGroupWithOne.toAddGroup.{u1} M (NonAssocRing.toAddGroupWithOne.{u1} M (Ring.toNonAssocRing.{u1} M _inst_1))))) a) (Set.center.{u1} M (Distrib.toHasMul.{u1} M (Ring.toDistrib.{u1} M _inst_1))))
+ forall {M : Type.{u1}} [_inst_1 : Ring.{u1} M] {a : M}, (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) a (Set.center.{u1} M (Distrib.toHasMul.{u1} M (Ring.toDistrib.{u1} M _inst_1)))) -> (Membership.Mem.{u1, u1} M (Set.{u1} M) (Set.hasMem.{u1} M) (Neg.neg.{u1} M (SubNegMonoid.toHasNeg.{u1} M (AddGroup.toSubNegMonoid.{u1} M (AddGroupWithOne.toAddGroup.{u1} M (AddCommGroupWithOne.toAddGroupWithOne.{u1} M (Ring.toAddCommGroupWithOne.{u1} M _inst_1))))) a) (Set.center.{u1} M (Distrib.toHasMul.{u1} M (Ring.toDistrib.{u1} M _inst_1))))
but is expected to have type
forall {M : Type.{u1}} [_inst_1 : Ring.{u1} M] {a : M}, (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) a (Set.center.{u1} M (NonUnitalNonAssocRing.toMul.{u1} M (NonAssocRing.toNonUnitalNonAssocRing.{u1} M (Ring.toNonAssocRing.{u1} M _inst_1))))) -> (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) (Neg.neg.{u1} M (Ring.toNeg.{u1} M _inst_1) a) (Set.center.{u1} M (NonUnitalNonAssocRing.toMul.{u1} M (NonAssocRing.toNonUnitalNonAssocRing.{u1} M (Ring.toNonAssocRing.{u1} M _inst_1)))))
Case conversion may be inaccurate. Consider using '#align set.neg_mem_center Set.neg_mem_centerₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -148,7 +148,7 @@ Case conversion may be inaccurate. Consider using '#align set.center_units_subse
theorem center_units_subset [GroupWithZero M] : Set.center Mˣ ⊆ (coe : Mˣ → M) ⁻¹' center M :=
fun a ha b => by
obtain rfl | hb := eq_or_ne b 0
- · rw [zero_mul, mul_zero]
+ · rw [MulZeroClass.zero_mul, MulZeroClass.mul_zero]
· exact units.ext_iff.mp (ha (Units.mk0 _ hb))
#align set.center_units_subset Set.center_units_subset
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
This is a far from a complete success at the PR title, but it makes a fair bit of progress, and then guards this with appropriate assert_not_exists Ring
statements.
It also breaks apart the Mathlib.GroupTheory.Subsemigroup.[Center|Centralizer]
files, to pull the Set.center
and Set.centralizer
declarations into their own files not depending on Subsemigroup
.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@@ -3,23 +3,17 @@ Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Jireh Loreaux
-/
-import Mathlib.Algebra.Ring.Defs
-import Mathlib.Algebra.Group.Commute.Units
-import Mathlib.Algebra.Invertible.Basic
+import Mathlib.Algebra.Group.Center
import Mathlib.GroupTheory.Subsemigroup.Operations
-import Mathlib.Data.Int.Cast.Lemmas
-import Mathlib.Logic.Basic
#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
/-!
-# Centers of magmas and semigroups
+# Centers of semigroups, as subsemigroups.
## Main definitions
-* `Set.center`: the center of a magma
* `Subsemigroup.center`: the center of a semigroup
-* `Set.addCenter`: the center of an additive magma
* `AddSubsemigroup.center`: the center of an additive semigroup
We provide `Submonoid.center`, `AddSubmonoid.center`, `Subgroup.center`, `AddSubgroup.center`,
@@ -32,288 +26,13 @@ We provide `Submonoid.center`, `AddSubmonoid.center`, `Subgroup.center`, `AddSub
-/
-variable {M : Type*}
-
-/-- Conditions for an element to be additively central -/
-structure IsAddCentral [Add M] (z : M) : Prop where
- /-- addition commutes -/
- comm (a : M) : z + a = a + z
- /-- associative property for left addition -/
- left_assoc (b c : M) : z + (b + c) = (z + b) + c
- /-- middle associative addition property -/
- mid_assoc (a c : M) : (a + z) + c = a + (z + c)
- /-- associative property for right addition -/
- right_assoc (a b : M) : (a + b) + z = a + (b + z)
-
-/-- Conditions for an element to be multiplicatively central -/
-@[to_additive]
-structure IsMulCentral [Mul M] (z : M) : Prop where
- /-- multiplication commutes -/
- comm (a : M) : z * a = a * z
- /-- associative property for left multiplication -/
- left_assoc (b c : M) : z * (b * c) = (z * b) * c
- /-- middle associative multiplication property -/
- mid_assoc (a c : M) : (a * z) * c = a * (z * c)
- /-- associative property for right multiplication -/
- right_assoc (a b : M) : (a * b) * z = a * (b * z)
-
-attribute [mk_iff] IsMulCentral IsAddCentral
-attribute [to_additive existing] isMulCentral_iff
-
-namespace IsMulCentral
-
-variable {a b c : M} [Mul M]
-
--- cf. `Commute.left_comm`
-@[to_additive]
-protected theorem left_comm (h : IsMulCentral a) (b c) : a * (b * c) = b * (a * c) := by
- simp only [h.comm, h.right_assoc]
-
--- cf. `Commute.right_comm`
-@[to_additive]
-protected theorem right_comm (h : IsMulCentral c) (a b) : a * b * c = a * c * b := by
- simp only [h.right_assoc, h.mid_assoc, h.comm]
-
-end IsMulCentral
-
-namespace Set
-
-section Mul
-variable (M) [Mul M]
-
-/-- The center of a magma. -/
-@[to_additive addCenter " The center of an additive magma. "]
-def center : Set M :=
- { z | IsMulCentral z }
-#align set.center Set.center
-#align set.add_center Set.addCenter
-
--- Porting note: The `to_additive` version used to be `mem_addCenter` without the iff
-@[to_additive mem_addCenter_iff]
-theorem mem_center_iff {z : M} : z ∈ center M ↔ IsMulCentral z :=
- Iff.rfl
-#align set.mem_center_iff Set.mem_center_iff
-#align set.mem_add_center Set.mem_addCenter_iff
-
-variable {M}
-
-@[to_additive (attr := simp) add_mem_addCenter]
-theorem mul_mem_center [Mul M] {z₁ z₂ : M} (hz₁ : z₁ ∈ Set.center M) (hz₂ : z₂ ∈ Set.center M) :
- z₁ * z₂ ∈ Set.center M where
- comm a := calc
- z₁ * z₂ * a = z₂ * z₁ * a := by rw [hz₁.comm]
- _ = z₂ * (z₁ * a) := by rw [hz₁.mid_assoc z₂]
- _ = (a * z₁) * z₂ := by rw [hz₁.comm, hz₂.comm]
- _ = a * (z₁ * z₂) := by rw [hz₂.right_assoc a z₁]
- left_assoc (b c : M) := calc
- z₁ * z₂ * (b * c) = z₁ * (z₂ * (b * c)) := by rw [hz₂.mid_assoc]
- _ = z₁ * ((z₂ * b) * c) := by rw [hz₂.left_assoc]
- _ = (z₁ * (z₂ * b)) * c := by rw [hz₁.left_assoc]
- _ = z₁ * z₂ * b * c := by rw [hz₂.mid_assoc]
- mid_assoc (a c : M) := calc
- a * (z₁ * z₂) * c = ((a * z₁) * z₂) * c := by rw [hz₁.mid_assoc]
- _ = (a * z₁) * (z₂ * c) := by rw [hz₂.mid_assoc]
- _ = a * (z₁ * (z₂ * c)) := by rw [hz₁.mid_assoc]
- _ = a * (z₁ * z₂ * c) := by rw [hz₂.mid_assoc]
- right_assoc (a b : M) := calc
- a * b * (z₁ * z₂) = ((a * b) * z₁) * z₂ := by rw [hz₂.right_assoc]
- _ = (a * (b * z₁)) * z₂ := by rw [hz₁.right_assoc]
- _ = a * ((b * z₁) * z₂) := by rw [hz₂.right_assoc]
- _ = a * (b * (z₁ * z₂)) := by rw [hz₁.mid_assoc]
-#align set.mul_mem_center Set.mul_mem_center
-#align set.add_mem_add_center Set.add_mem_addCenter
-
-end Mul
-
-section Semigroup
-variable [Semigroup M]
-
-@[to_additive]
-theorem _root_.Semigroup.mem_center_iff {z : M} :
- z ∈ Set.center M ↔ ∀ g, g * z = z * g := ⟨fun a g ↦ by rw [IsMulCentral.comm a g],
- fun h ↦ ⟨fun _ ↦ (Commute.eq (h _)).symm, fun _ _ ↦ (mul_assoc z _ _).symm,
- fun _ _ ↦ mul_assoc _ z _, fun _ _ ↦ mul_assoc _ _ z⟩ ⟩
-
-variable (M)
-
--- TODO Add `instance : Decidable (IsMulCentral a)` for `instance decidableMemCenter [Mul M]`
-instance decidableMemCenter [∀ a : M, Decidable <| ∀ b : M, b * a = a * b] :
- DecidablePred (· ∈ center M) := fun _ => decidable_of_iff' _ (Semigroup.mem_center_iff)
-#align set.decidable_mem_center Set.decidableMemCenter
-
-end Semigroup
-
-section CommSemigroup
-variable (M)
-
-@[to_additive (attr := simp) addCenter_eq_univ]
-theorem center_eq_univ [CommSemigroup M] : center M = univ :=
- (Subset.antisymm (subset_univ _)) fun _ _ => Semigroup.mem_center_iff.mpr (fun _ => mul_comm _ _)
-#align set.center_eq_univ Set.center_eq_univ
-#align set.add_center_eq_univ Set.addCenter_eq_univ
-
-end CommSemigroup
-
-variable (M)
-
-@[to_additive (attr := simp) zero_mem_addCenter]
-theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M where
- comm _ := by rw [one_mul, mul_one]
- left_assoc _ _ := by rw [one_mul, one_mul]
- mid_assoc _ _ := by rw [mul_one, one_mul]
- right_assoc _ _ := by rw [mul_one, mul_one]
-#align set.one_mem_center Set.one_mem_center
-#align set.zero_mem_add_center Set.zero_mem_addCenter
-
-@[simp]
-theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M where
- comm _ := by rw [zero_mul, mul_zero]
- left_assoc _ _ := by rw [zero_mul, zero_mul, zero_mul]
- mid_assoc _ _ := by rw [mul_zero, zero_mul, mul_zero]
- right_assoc _ _ := by rw [mul_zero, mul_zero, mul_zero]
-#align set.zero_mem_center Set.zero_mem_center
-
-@[simp]
-theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) : (n : M) ∈ Set.center M where
- comm _:= by rw [Nat.commute_cast]
- left_assoc _ _ := by
- induction n with
- | zero => rw [Nat.zero_eq, Nat.cast_zero, zero_mul, zero_mul, zero_mul]
- | succ n ihn => rw [Nat.cast_succ, add_mul, one_mul, ihn, add_mul, add_mul, one_mul]
- mid_assoc _ _ := by
- induction n with
- | zero => rw [Nat.zero_eq, Nat.cast_zero, zero_mul, mul_zero, zero_mul]
- | succ n ihn => rw [Nat.cast_succ, add_mul, mul_add, add_mul, ihn, mul_add, one_mul, mul_one]
- right_assoc _ _ := by
- induction n with
- | zero => rw [Nat.zero_eq, Nat.cast_zero, mul_zero, mul_zero, mul_zero]
- | succ n ihn => rw [Nat.cast_succ, mul_add, ihn, mul_add, mul_add, mul_one, mul_one]
-
--- See note [no_index around OfNat.ofNat]
-@[simp]
-theorem ofNat_mem_center [NonAssocSemiring M] (n : ℕ) [n.AtLeastTwo] :
- (no_index (OfNat.ofNat n)) ∈ Set.center M :=
- natCast_mem_center M n
-
-@[simp]
-theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M where
- comm _ := by rw [Int.commute_cast]
- left_assoc _ _ := match n with
- | (n : ℕ) => by rw [Int.cast_natCast, (natCast_mem_center _ n).left_assoc _ _]
- | Int.negSucc n => by
- rw [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev, add_mul, add_mul, add_mul,
- neg_mul, one_mul, neg_mul 1, one_mul, ← neg_mul, add_right_inj, neg_mul,
- (natCast_mem_center _ n).left_assoc _ _, neg_mul, neg_mul]
- mid_assoc _ _ := match n with
- | (n : ℕ) => by rw [Int.cast_natCast, (natCast_mem_center _ n).mid_assoc _ _]
- | Int.negSucc n => by
- simp only [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev]
- rw [add_mul, mul_add, add_mul, mul_add, neg_mul, one_mul]
- rw [neg_mul, mul_neg, mul_one, mul_neg, neg_mul, neg_mul]
- rw [(natCast_mem_center _ n).mid_assoc _ _]
- simp only [mul_neg]
- right_assoc _ _ := match n with
- | (n : ℕ) => by rw [Int.cast_natCast, (natCast_mem_center _ n).right_assoc _ _]
- | Int.negSucc n => by
- simp only [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev]
- rw [mul_add, mul_add, mul_add, mul_neg, mul_one, mul_neg, mul_neg, mul_one, mul_neg,
- add_right_inj, (natCast_mem_center _ n).right_assoc _ _, mul_neg, mul_neg]
-
-variable {M}
-
-@[to_additive (attr := simp) neg_mem_addCenter]
-theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := by
- rw [_root_.Semigroup.mem_center_iff]
- intro _
- rw [← inv_inj, mul_inv_rev, inv_inv, ha.comm, mul_inv_rev, inv_inv]
-#align set.inv_mem_center Set.inv_mem_center
-#align set.neg_mem_add_center Set.neg_mem_addCenter
-
-@[simp]
-theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
- a + b ∈ Set.center M where
- comm _ := by rw [add_mul, mul_add, ha.comm, hb.comm]
- left_assoc _ _ := by rw [add_mul, ha.left_assoc, hb.left_assoc, ← add_mul, ← add_mul]
- mid_assoc _ _ := by rw [mul_add, add_mul, ha.mid_assoc, hb.mid_assoc, ← mul_add, ← add_mul]
- right_assoc _ _ := by rw [mul_add, ha.right_assoc, hb.right_assoc, ← mul_add, ← mul_add]
-#align set.add_mem_center Set.add_mem_center
-
-@[simp]
-theorem neg_mem_center [NonUnitalNonAssocRing M] {a : M} (ha : a ∈ Set.center M) :
- -a ∈ Set.center M where
- comm _ := by rw [← neg_mul_comm, ← ha.comm, neg_mul_comm]
- left_assoc _ _ := by rw [neg_mul, ha.left_assoc, neg_mul, neg_mul]
- mid_assoc _ _ := by rw [← neg_mul_comm, ha.mid_assoc, neg_mul_comm, neg_mul]
- right_assoc _ _ := by rw [mul_neg, ha.right_assoc, mul_neg, mul_neg]
-#align set.neg_mem_center Set.neg_mem_centerₓ
-
-@[to_additive subset_addCenter_add_units]
-theorem subset_center_units [Monoid M] : ((↑) : Mˣ → M) ⁻¹' center M ⊆ Set.center Mˣ :=
- fun _ ha => by
- rw [_root_.Semigroup.mem_center_iff]
- intro _
- rw [← Units.eq_iff, Units.val_mul, Units.val_mul, ha.comm]
-#align set.subset_center_units Set.subset_center_units
-#align set.subset_add_center_add_units Set.subset_addCenter_add_units
-
-theorem center_units_subset [GroupWithZero M] : Set.center Mˣ ⊆ ((↑) : Mˣ → M) ⁻¹' center M :=
- fun _ ha => by
- rw [mem_preimage, _root_.Semigroup.mem_center_iff]
- intro b
- obtain rfl | hb := eq_or_ne b 0
- · rw [zero_mul, mul_zero]
- · exact Units.ext_iff.mp (ha.comm (Units.mk0 b hb)).symm
-#align set.center_units_subset Set.center_units_subset
-
-/-- In a group with zero, the center of the units is the preimage of the center. -/
-theorem center_units_eq [GroupWithZero M] : Set.center Mˣ = ((↑) : Mˣ → M) ⁻¹' center M :=
- Subset.antisymm center_units_subset subset_center_units
-#align set.center_units_eq Set.center_units_eq
-
-@[simp]
-theorem units_inv_mem_center [Monoid M] {a : Mˣ} (ha : ↑a ∈ Set.center M) :
- ↑a⁻¹ ∈ Set.center M := by
- rw [Semigroup.mem_center_iff] at *
- exact (Commute.units_inv_right <| ha ·)
-
-@[simp]
-theorem invOf_mem_center [Monoid M] {a : M} [Invertible a] (ha : a ∈ Set.center M) :
- ⅟a ∈ Set.center M := by
- rw [Semigroup.mem_center_iff] at *
- exact (Commute.invOf_right <| ha ·)
-
-@[simp]
-theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := by
- obtain rfl | ha0 := eq_or_ne a 0
- · rw [inv_zero]
- exact zero_mem_center M
- · lift a to Mˣ using IsUnit.mk0 _ ha0
- simpa only [Units.val_inv_eq_inv_val] using units_inv_mem_center ha
-#align set.inv_mem_center₀ Set.inv_mem_center₀
-
-@[to_additive (attr := simp) sub_mem_addCenter]
-theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
- a / b ∈ Set.center M := by
- rw [div_eq_mul_inv]
- exact mul_mem_center ha (inv_mem_center hb)
-#align set.div_mem_center Set.div_mem_center
-#align set.sub_mem_add_center Set.sub_mem_addCenter
-
-@[simp]
-theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
- (hb : b ∈ Set.center M) : a / b ∈ Set.center M := by
- rw [div_eq_mul_inv]
- exact mul_mem_center ha (inv_mem_center₀ hb)
-#align set.div_mem_center₀ Set.div_mem_center₀
-
-end Set
-
/-! ### `Set.center` as a `Subsemigroup`. -/
+variable (M)
namespace Subsemigroup
section Mul
-variable (M) [Mul M]
+variable [Mul M]
/-- The center of a semigroup `M` is the set of elements that commute with everything in `M` -/
@[to_additive
@@ -341,7 +60,7 @@ instance center.commSemigroup : CommSemigroup (center M) where
end Mul
section Semigroup
-variable [Semigroup M]
+variable {M} [Semigroup M]
@[to_additive]
theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g := by
@@ -360,7 +79,7 @@ instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] :
end Semigroup
section CommSemigroup
-variable (M) [CommSemigroup M]
+variable [CommSemigroup M]
@[to_additive (attr := simp)]
theorem center_eq_top : center M = ⊤ :=
This is a far from a complete success at the PR title, but it makes a fair bit of progress, and then guards this with appropriate assert_not_exists Ring
statements.
It also breaks apart the Mathlib.GroupTheory.Subsemigroup.[Center|Centralizer]
files, to pull the Set.center
and Set.centralizer
declarations into their own files not depending on Subsemigroup
.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
This is a far from a complete success at the PR title, but it makes a fair bit of progress, and then guards this with appropriate assert_not_exists Ring
statements.
It also breaks apart the Mathlib.GroupTheory.Subsemigroup.[Center|Centralizer]
files, to pull the Set.center
and Set.centralizer
declarations into their own files not depending on Subsemigroup
.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
OfNat
and Nat.cast
lemmas (#11861)
This renames
Int.cast_ofNat
to Int.cast_natCast
Int.int_cast_ofNat
to Int.cast_ofNat
I think the history here is that this lemma was previously about Int.ofNat
, before we globally fixed the simp-normal form to be Nat.cast
.
Since the Int.cast_ofNat
name is repurposed, it can't be deprecated. Int.int_cast_ofNat
is such a wonky name that it was probably never used.
@@ -199,13 +199,13 @@ theorem ofNat_mem_center [NonAssocSemiring M] (n : ℕ) [n.AtLeastTwo] :
theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M where
comm _ := by rw [Int.commute_cast]
left_assoc _ _ := match n with
- | (n : ℕ) => by rw [Int.cast_ofNat, (natCast_mem_center _ n).left_assoc _ _]
+ | (n : ℕ) => by rw [Int.cast_natCast, (natCast_mem_center _ n).left_assoc _ _]
| Int.negSucc n => by
rw [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev, add_mul, add_mul, add_mul,
neg_mul, one_mul, neg_mul 1, one_mul, ← neg_mul, add_right_inj, neg_mul,
(natCast_mem_center _ n).left_assoc _ _, neg_mul, neg_mul]
mid_assoc _ _ := match n with
- | (n : ℕ) => by rw [Int.cast_ofNat, (natCast_mem_center _ n).mid_assoc _ _]
+ | (n : ℕ) => by rw [Int.cast_natCast, (natCast_mem_center _ n).mid_assoc _ _]
| Int.negSucc n => by
simp only [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev]
rw [add_mul, mul_add, add_mul, mul_add, neg_mul, one_mul]
@@ -213,7 +213,7 @@ theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M
rw [(natCast_mem_center _ n).mid_assoc _ _]
simp only [mul_neg]
right_assoc _ _ := match n with
- | (n : ℕ) => by rw [Int.cast_ofNat, (natCast_mem_center _ n).right_assoc _ _]
+ | (n : ℕ) => by rw [Int.cast_natCast, (natCast_mem_center _ n).right_assoc _ _]
| Int.negSucc n => by
simp only [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev]
rw [mul_add, mul_add, mul_add, mul_neg, mul_one, mul_neg, mul_neg, mul_one, mul_neg,
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -88,7 +88,7 @@ def center : Set M :=
#align set.center Set.center
#align set.add_center Set.addCenter
--- porting note: The `to_additive` version used to be `mem_addCenter` without the iff
+-- Porting note: The `to_additive` version used to be `mem_addCenter` without the iff
@[to_additive mem_addCenter_iff]
theorem mem_center_iff {z : M} : z ∈ center M ↔ IsMulCentral z :=
Iff.rfl
@@ -324,7 +324,7 @@ def center : Subsemigroup M where
#align subsemigroup.center Subsemigroup.center
#align add_subsemigroup.center AddSubsemigroup.center
--- porting note: `coe_center` is now redundant
+-- Porting note: `coe_center` is now redundant
#noalign subsemigroup.coe_center
#noalign add_subsemigroup.coe_center
@@ -64,12 +64,12 @@ namespace IsMulCentral
variable {a b c : M} [Mul M]
--- c.f. Commute.left_comm
+-- cf. `Commute.left_comm`
@[to_additive]
protected theorem left_comm (h : IsMulCentral a) (b c) : a * (b * c) = b * (a * c) := by
simp only [h.comm, h.right_assoc]
--- c.f. Commute.right_comm
+-- cf. `Commute.right_comm`
@[to_additive]
protected theorem right_comm (h : IsMulCentral c) (a b) : a * b * c = a * c * b := by
simp only [h.right_assoc, h.mid_assoc, h.comm]
@@ -8,6 +8,7 @@ import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Invertible.Basic
import Mathlib.GroupTheory.Subsemigroup.Operations
import Mathlib.Data.Int.Cast.Lemmas
+import Mathlib.Logic.Basic
#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
@@ -56,9 +56,7 @@ structure IsMulCentral [Mul M] (z : M) : Prop where
/-- associative property for right multiplication -/
right_assoc (a b : M) : (a * b) * z = a * (b * z)
--- TODO: these should have explicit arguments (mathlib4#9129)
-attribute [mk_iff isMulCentral_iff] IsMulCentral
-attribute [mk_iff isAddCentral_iff] IsAddCentral
+attribute [mk_iff] IsMulCentral IsAddCentral
attribute [to_additive existing] isMulCentral_iff
namespace IsMulCentral
Also adds isMulCentral_iff
using mk_iff
.
@@ -56,6 +56,11 @@ structure IsMulCentral [Mul M] (z : M) : Prop where
/-- associative property for right multiplication -/
right_assoc (a b : M) : (a * b) * z = a * (b * z)
+-- TODO: these should have explicit arguments (mathlib4#9129)
+attribute [mk_iff isMulCentral_iff] IsMulCentral
+attribute [mk_iff isAddCentral_iff] IsAddCentral
+attribute [to_additive existing] isMulCentral_iff
+
namespace IsMulCentral
variable {a b c : M} [Mul M]
@@ -185,9 +185,10 @@ theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) : (n : M) ∈ Set.cent
| zero => rw [Nat.zero_eq, Nat.cast_zero, mul_zero, mul_zero, mul_zero]
| succ n ihn => rw [Nat.cast_succ, mul_add, ihn, mul_add, mul_add, mul_one, mul_one]
+-- See note [no_index around OfNat.ofNat]
@[simp]
theorem ofNat_mem_center [NonAssocSemiring M] (n : ℕ) [n.AtLeastTwo] :
- OfNat.ofNat n ∈ Set.center M :=
+ (no_index (OfNat.ofNat n)) ∈ Set.center M :=
natCast_mem_center M n
@[simp]
@@ -228,9 +228,9 @@ theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈
theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a + b ∈ Set.center M where
comm _ := by rw [add_mul, mul_add, ha.comm, hb.comm]
- left_assoc _ _ := by rw [add_mul, ha.left_assoc, hb.left_assoc, ←add_mul, ←add_mul]
- mid_assoc _ _ := by rw [mul_add, add_mul, ha.mid_assoc, hb.mid_assoc, ←mul_add, ←add_mul]
- right_assoc _ _ := by rw [mul_add, ha.right_assoc, hb.right_assoc, ←mul_add, ←mul_add]
+ left_assoc _ _ := by rw [add_mul, ha.left_assoc, hb.left_assoc, ← add_mul, ← add_mul]
+ mid_assoc _ _ := by rw [mul_add, add_mul, ha.mid_assoc, hb.mid_assoc, ← mul_add, ← add_mul]
+ right_assoc _ _ := by rw [mul_add, ha.right_assoc, hb.right_assoc, ← mul_add, ← mul_add]
#align set.add_mem_center Set.add_mem_center
@[simp]
@@ -247,7 +247,7 @@ theorem subset_center_units [Monoid M] : ((↑) : Mˣ → M) ⁻¹' center M ⊆
fun _ ha => by
rw [_root_.Semigroup.mem_center_iff]
intro _
- rw [←Units.eq_iff, Units.val_mul, Units.val_mul, ha.comm]
+ rw [← Units.eq_iff, Units.val_mul, Units.val_mul, ha.comm]
#align set.subset_center_units Set.subset_center_units
#align set.subset_add_center_add_units Set.subset_addCenter_add_units
@@ -62,13 +62,13 @@ variable {a b c : M} [Mul M]
-- c.f. Commute.left_comm
@[to_additive]
-protected theorem left_comm (h : IsMulCentral a) (b c) : a * (b * c) = b * (a * c) :=
- by simp only [h.comm, h.right_assoc]
+protected theorem left_comm (h : IsMulCentral a) (b c) : a * (b * c) = b * (a * c) := by
+ simp only [h.comm, h.right_assoc]
-- c.f. Commute.right_comm
@[to_additive]
-protected theorem right_comm (h : IsMulCentral c) (a b) : a * b * c = a * c * b :=
- by simp only [h.right_assoc, h.mid_assoc, h.comm]
+protected theorem right_comm (h : IsMulCentral c) (a b) : a * b * c = a * c * b := by
+ simp only [h.right_assoc, h.mid_assoc, h.comm]
end IsMulCentral
For a sensible theory, we require that the centre of an algebra is closed under multiplication. The definition currently in Mathlib works for associative algebras, but not non-associative algebras. This PR uses the definition from Cabrera García and Rodríguez Palacios, which works for any multiplication (addition) and which coincides with the current definition in the associative case.
I did consider whether the centralizer should also be re-defined in terms of operator commutation, but this still results in a centralizer which is not closed under multiplication in the non-associative case. I have therefore retained the current definition, but changed centralizer_eq_top_iff_subset
and centralizer_univ
to only work in the associative case.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Christopher Hoskin <mans0954@users.noreply.github.com> Co-authored-by: Christopher Hoskin <christopher.hoskin@overleaf.com>
@@ -23,45 +23,167 @@ import Mathlib.Data.Int.Cast.Lemmas
We provide `Submonoid.center`, `AddSubmonoid.center`, `Subgroup.center`, `AddSubgroup.center`,
`Subsemiring.center`, and `Subring.center` in other files.
+
+## References
+
+* [Cabrera García and Rodríguez Palacios, Non-associative normed algebras. Volume 1]
+ [cabreragarciarodriguezpalacios2014]
-/
variable {M : Type*}
+/-- Conditions for an element to be additively central -/
+structure IsAddCentral [Add M] (z : M) : Prop where
+ /-- addition commutes -/
+ comm (a : M) : z + a = a + z
+ /-- associative property for left addition -/
+ left_assoc (b c : M) : z + (b + c) = (z + b) + c
+ /-- middle associative addition property -/
+ mid_assoc (a c : M) : (a + z) + c = a + (z + c)
+ /-- associative property for right addition -/
+ right_assoc (a b : M) : (a + b) + z = a + (b + z)
+
+/-- Conditions for an element to be multiplicatively central -/
+@[to_additive]
+structure IsMulCentral [Mul M] (z : M) : Prop where
+ /-- multiplication commutes -/
+ comm (a : M) : z * a = a * z
+ /-- associative property for left multiplication -/
+ left_assoc (b c : M) : z * (b * c) = (z * b) * c
+ /-- middle associative multiplication property -/
+ mid_assoc (a c : M) : (a * z) * c = a * (z * c)
+ /-- associative property for right multiplication -/
+ right_assoc (a b : M) : (a * b) * z = a * (b * z)
+
+namespace IsMulCentral
+
+variable {a b c : M} [Mul M]
+
+-- c.f. Commute.left_comm
+@[to_additive]
+protected theorem left_comm (h : IsMulCentral a) (b c) : a * (b * c) = b * (a * c) :=
+ by simp only [h.comm, h.right_assoc]
+
+-- c.f. Commute.right_comm
+@[to_additive]
+protected theorem right_comm (h : IsMulCentral c) (a b) : a * b * c = a * c * b :=
+ by simp only [h.right_assoc, h.mid_assoc, h.comm]
+
+end IsMulCentral
+
namespace Set
-variable (M)
+section Mul
+variable (M) [Mul M]
/-- The center of a magma. -/
@[to_additive addCenter " The center of an additive magma. "]
-def center [Mul M] : Set M :=
- { z | ∀ m, m * z = z * m }
+def center : Set M :=
+ { z | IsMulCentral z }
#align set.center Set.center
#align set.add_center Set.addCenter
-- porting note: The `to_additive` version used to be `mem_addCenter` without the iff
@[to_additive mem_addCenter_iff]
-theorem mem_center_iff [Mul M] {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g :=
+theorem mem_center_iff {z : M} : z ∈ center M ↔ IsMulCentral z :=
Iff.rfl
#align set.mem_center_iff Set.mem_center_iff
#align set.mem_add_center Set.mem_addCenter_iff
-instance decidableMemCenter [Mul M] [∀ a : M, Decidable <| ∀ b : M, b * a = a * b] :
- DecidablePred (· ∈ center M) := fun _ => decidable_of_iff' _ (mem_center_iff M)
+variable {M}
+
+@[to_additive (attr := simp) add_mem_addCenter]
+theorem mul_mem_center [Mul M] {z₁ z₂ : M} (hz₁ : z₁ ∈ Set.center M) (hz₂ : z₂ ∈ Set.center M) :
+ z₁ * z₂ ∈ Set.center M where
+ comm a := calc
+ z₁ * z₂ * a = z₂ * z₁ * a := by rw [hz₁.comm]
+ _ = z₂ * (z₁ * a) := by rw [hz₁.mid_assoc z₂]
+ _ = (a * z₁) * z₂ := by rw [hz₁.comm, hz₂.comm]
+ _ = a * (z₁ * z₂) := by rw [hz₂.right_assoc a z₁]
+ left_assoc (b c : M) := calc
+ z₁ * z₂ * (b * c) = z₁ * (z₂ * (b * c)) := by rw [hz₂.mid_assoc]
+ _ = z₁ * ((z₂ * b) * c) := by rw [hz₂.left_assoc]
+ _ = (z₁ * (z₂ * b)) * c := by rw [hz₁.left_assoc]
+ _ = z₁ * z₂ * b * c := by rw [hz₂.mid_assoc]
+ mid_assoc (a c : M) := calc
+ a * (z₁ * z₂) * c = ((a * z₁) * z₂) * c := by rw [hz₁.mid_assoc]
+ _ = (a * z₁) * (z₂ * c) := by rw [hz₂.mid_assoc]
+ _ = a * (z₁ * (z₂ * c)) := by rw [hz₁.mid_assoc]
+ _ = a * (z₁ * z₂ * c) := by rw [hz₂.mid_assoc]
+ right_assoc (a b : M) := calc
+ a * b * (z₁ * z₂) = ((a * b) * z₁) * z₂ := by rw [hz₂.right_assoc]
+ _ = (a * (b * z₁)) * z₂ := by rw [hz₁.right_assoc]
+ _ = a * ((b * z₁) * z₂) := by rw [hz₂.right_assoc]
+ _ = a * (b * (z₁ * z₂)) := by rw [hz₁.mid_assoc]
+#align set.mul_mem_center Set.mul_mem_center
+#align set.add_mem_add_center Set.add_mem_addCenter
+
+end Mul
+
+section Semigroup
+variable [Semigroup M]
+
+@[to_additive]
+theorem _root_.Semigroup.mem_center_iff {z : M} :
+ z ∈ Set.center M ↔ ∀ g, g * z = z * g := ⟨fun a g ↦ by rw [IsMulCentral.comm a g],
+ fun h ↦ ⟨fun _ ↦ (Commute.eq (h _)).symm, fun _ _ ↦ (mul_assoc z _ _).symm,
+ fun _ _ ↦ mul_assoc _ z _, fun _ _ ↦ mul_assoc _ _ z⟩ ⟩
+
+variable (M)
+
+-- TODO Add `instance : Decidable (IsMulCentral a)` for `instance decidableMemCenter [Mul M]`
+instance decidableMemCenter [∀ a : M, Decidable <| ∀ b : M, b * a = a * b] :
+ DecidablePred (· ∈ center M) := fun _ => decidable_of_iff' _ (Semigroup.mem_center_iff)
#align set.decidable_mem_center Set.decidableMemCenter
+end Semigroup
+
+section CommSemigroup
+variable (M)
+
+@[to_additive (attr := simp) addCenter_eq_univ]
+theorem center_eq_univ [CommSemigroup M] : center M = univ :=
+ (Subset.antisymm (subset_univ _)) fun _ _ => Semigroup.mem_center_iff.mpr (fun _ => mul_comm _ _)
+#align set.center_eq_univ Set.center_eq_univ
+#align set.add_center_eq_univ Set.addCenter_eq_univ
+
+end CommSemigroup
+
+variable (M)
+
@[to_additive (attr := simp) zero_mem_addCenter]
-theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M := by simp [mem_center_iff]
+theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M where
+ comm _ := by rw [one_mul, mul_one]
+ left_assoc _ _ := by rw [one_mul, one_mul]
+ mid_assoc _ _ := by rw [mul_one, one_mul]
+ right_assoc _ _ := by rw [mul_one, mul_one]
#align set.one_mem_center Set.one_mem_center
#align set.zero_mem_add_center Set.zero_mem_addCenter
@[simp]
-theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M := by simp [mem_center_iff]
+theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M where
+ comm _ := by rw [zero_mul, mul_zero]
+ left_assoc _ _ := by rw [zero_mul, zero_mul, zero_mul]
+ mid_assoc _ _ := by rw [mul_zero, zero_mul, mul_zero]
+ right_assoc _ _ := by rw [mul_zero, mul_zero, mul_zero]
#align set.zero_mem_center Set.zero_mem_center
@[simp]
-theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) : (n : M) ∈ Set.center M :=
- (Nat.commute_cast · _)
+theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) : (n : M) ∈ Set.center M where
+ comm _:= by rw [Nat.commute_cast]
+ left_assoc _ _ := by
+ induction n with
+ | zero => rw [Nat.zero_eq, Nat.cast_zero, zero_mul, zero_mul, zero_mul]
+ | succ n ihn => rw [Nat.cast_succ, add_mul, one_mul, ihn, add_mul, add_mul, one_mul]
+ mid_assoc _ _ := by
+ induction n with
+ | zero => rw [Nat.zero_eq, Nat.cast_zero, zero_mul, mul_zero, zero_mul]
+ | succ n ihn => rw [Nat.cast_succ, add_mul, mul_add, add_mul, ihn, mul_add, one_mul, mul_one]
+ right_assoc _ _ := by
+ induction n with
+ | zero => rw [Nat.zero_eq, Nat.cast_zero, mul_zero, mul_zero, mul_zero]
+ | succ n ihn => rw [Nat.cast_succ, mul_add, ihn, mul_add, mul_add, mul_one, mul_one]
@[simp]
theorem ofNat_mem_center [NonAssocSemiring M] (n : ℕ) [n.AtLeastTwo] :
@@ -69,46 +191,73 @@ theorem ofNat_mem_center [NonAssocSemiring M] (n : ℕ) [n.AtLeastTwo] :
natCast_mem_center M n
@[simp]
-theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M :=
- (Int.commute_cast · _)
+theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M where
+ comm _ := by rw [Int.commute_cast]
+ left_assoc _ _ := match n with
+ | (n : ℕ) => by rw [Int.cast_ofNat, (natCast_mem_center _ n).left_assoc _ _]
+ | Int.negSucc n => by
+ rw [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev, add_mul, add_mul, add_mul,
+ neg_mul, one_mul, neg_mul 1, one_mul, ← neg_mul, add_right_inj, neg_mul,
+ (natCast_mem_center _ n).left_assoc _ _, neg_mul, neg_mul]
+ mid_assoc _ _ := match n with
+ | (n : ℕ) => by rw [Int.cast_ofNat, (natCast_mem_center _ n).mid_assoc _ _]
+ | Int.negSucc n => by
+ simp only [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev]
+ rw [add_mul, mul_add, add_mul, mul_add, neg_mul, one_mul]
+ rw [neg_mul, mul_neg, mul_one, mul_neg, neg_mul, neg_mul]
+ rw [(natCast_mem_center _ n).mid_assoc _ _]
+ simp only [mul_neg]
+ right_assoc _ _ := match n with
+ | (n : ℕ) => by rw [Int.cast_ofNat, (natCast_mem_center _ n).right_assoc _ _]
+ | Int.negSucc n => by
+ simp only [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev]
+ rw [mul_add, mul_add, mul_add, mul_neg, mul_one, mul_neg, mul_neg, mul_one, mul_neg,
+ add_right_inj, (natCast_mem_center _ n).right_assoc _ _, mul_neg, mul_neg]
variable {M}
-@[to_additive (attr := simp) add_mem_addCenter]
-theorem mul_mem_center [Semigroup M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
- a * b ∈ Set.center M := fun g => by rw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]
-#align set.mul_mem_center Set.mul_mem_center
-#align set.add_mem_add_center Set.add_mem_addCenter
-
@[to_additive (attr := simp) neg_mem_addCenter]
-theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) :
- a⁻¹ ∈ Set.center M := fun g => by
- rw [← inv_inj, mul_inv_rev, inv_inv, ← ha, mul_inv_rev, inv_inv]
+theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := by
+ rw [_root_.Semigroup.mem_center_iff]
+ intro _
+ rw [← inv_inj, mul_inv_rev, inv_inv, ha.comm, mul_inv_rev, inv_inv]
#align set.inv_mem_center Set.inv_mem_center
#align set.neg_mem_add_center Set.neg_mem_addCenter
@[simp]
theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
- a + b ∈ Set.center M := fun c => by rw [add_mul, mul_add, ha c, hb c]
+ a + b ∈ Set.center M where
+ comm _ := by rw [add_mul, mul_add, ha.comm, hb.comm]
+ left_assoc _ _ := by rw [add_mul, ha.left_assoc, hb.left_assoc, ←add_mul, ←add_mul]
+ mid_assoc _ _ := by rw [mul_add, add_mul, ha.mid_assoc, hb.mid_assoc, ←mul_add, ←add_mul]
+ right_assoc _ _ := by rw [mul_add, ha.right_assoc, hb.right_assoc, ←mul_add, ←mul_add]
#align set.add_mem_center Set.add_mem_center
@[simp]
theorem neg_mem_center [NonUnitalNonAssocRing M] {a : M} (ha : a ∈ Set.center M) :
- -a ∈ Set.center M := fun c => by
- rw [← neg_mul_comm, ha (-c), neg_mul_comm]
+ -a ∈ Set.center M where
+ comm _ := by rw [← neg_mul_comm, ← ha.comm, neg_mul_comm]
+ left_assoc _ _ := by rw [neg_mul, ha.left_assoc, neg_mul, neg_mul]
+ mid_assoc _ _ := by rw [← neg_mul_comm, ha.mid_assoc, neg_mul_comm, neg_mul]
+ right_assoc _ _ := by rw [mul_neg, ha.right_assoc, mul_neg, mul_neg]
#align set.neg_mem_center Set.neg_mem_centerₓ
@[to_additive subset_addCenter_add_units]
theorem subset_center_units [Monoid M] : ((↑) : Mˣ → M) ⁻¹' center M ⊆ Set.center Mˣ :=
- fun _ ha _ => Units.ext <| ha _
+ fun _ ha => by
+ rw [_root_.Semigroup.mem_center_iff]
+ intro _
+ rw [←Units.eq_iff, Units.val_mul, Units.val_mul, ha.comm]
#align set.subset_center_units Set.subset_center_units
#align set.subset_add_center_add_units Set.subset_addCenter_add_units
theorem center_units_subset [GroupWithZero M] : Set.center Mˣ ⊆ ((↑) : Mˣ → M) ⁻¹' center M :=
- fun a ha b => by
- obtain rfl | hb := eq_or_ne b 0
- · rw [zero_mul, mul_zero]
- · exact Units.ext_iff.mp (ha (Units.mk0 _ hb))
+ fun _ ha => by
+ rw [mem_preimage, _root_.Semigroup.mem_center_iff]
+ intro b
+ obtain rfl | hb := eq_or_ne b 0
+ · rw [zero_mul, mul_zero]
+ · exact Units.ext_iff.mp (ha.comm (Units.mk0 b hb)).symm
#align set.center_units_subset Set.center_units_subset
/-- In a group with zero, the center of the units is the preimage of the center. -/
@@ -118,13 +267,15 @@ theorem center_units_eq [GroupWithZero M] : Set.center Mˣ = ((↑) : Mˣ → M)
@[simp]
theorem units_inv_mem_center [Monoid M] {a : Mˣ} (ha : ↑a ∈ Set.center M) :
- ↑a⁻¹ ∈ Set.center M :=
- (Commute.units_inv_right <| ha ·)
+ ↑a⁻¹ ∈ Set.center M := by
+ rw [Semigroup.mem_center_iff] at *
+ exact (Commute.units_inv_right <| ha ·)
@[simp]
theorem invOf_mem_center [Monoid M] {a : M} [Invertible a] (ha : a ∈ Set.center M) :
- ⅟a ∈ Set.center M :=
- (Commute.invOf_right <| ha ·)
+ ⅟a ∈ Set.center M := by
+ rw [Semigroup.mem_center_iff] at *
+ exact (Commute.invOf_right <| ha ·)
@[simp]
theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := by
@@ -150,21 +301,14 @@ theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
exact mul_mem_center ha (inv_mem_center₀ hb)
#align set.div_mem_center₀ Set.div_mem_center₀
-variable (M)
-
-@[to_additive (attr := simp) addCenter_eq_univ]
-theorem center_eq_univ [CommSemigroup M] : center M = Set.univ :=
- (Subset.antisymm (subset_univ _)) fun x _ y => mul_comm y x
-#align set.center_eq_univ Set.center_eq_univ
-#align set.add_center_eq_univ Set.addCenter_eq_univ
-
end Set
-namespace Subsemigroup
+/-! ### `Set.center` as a `Subsemigroup`. -/
-section
+namespace Subsemigroup
-variable (M) [Semigroup M]
+section Mul
+variable (M) [Mul M]
/-- The center of a semigroup `M` is the set of elements that commute with everything in `M` -/
@[to_additive
@@ -181,29 +325,36 @@ def center : Subsemigroup M where
variable {M}
+/-- The center of a magma is commutative and associative. -/
+@[to_additive "The center of an additive magma is commutative and associative."]
+instance center.commSemigroup : CommSemigroup (center M) where
+ mul_assoc _ b _ := Subtype.ext <| b.2.mid_assoc _ _
+ mul_comm a _ := Subtype.ext <| a.2.comm _
+#align subsemigroup.center.comm_semigroup Subsemigroup.center.commSemigroup
+#align add_subsemigroup.center.add_comm_semigroup AddSubsemigroup.center.addCommSemigroup
+
+end Mul
+
+section Semigroup
+variable [Semigroup M]
+
@[to_additive]
-theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g :=
- Iff.rfl
+theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g := by
+ rw [← Semigroup.mem_center_iff]
+ exact Iff.rfl
#align subsemigroup.mem_center_iff Subsemigroup.mem_center_iff
#align add_subsemigroup.mem_center_iff AddSubsemigroup.mem_center_iff
@[to_additive]
-instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] : Decidable (a ∈ center M) :=
- decidable_of_iff' _ mem_center_iff
+instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] :
+ Decidable (a ∈ center M) :=
+ decidable_of_iff' _ Semigroup.mem_center_iff
#align subsemigroup.decidable_mem_center Subsemigroup.decidableMemCenter
#align add_subsemigroup.decidable_mem_center AddSubsemigroup.decidableMemCenter
-/-- The center of a semigroup is commutative. -/
-@[to_additive "The center of an additive semigroup is commutative."]
-instance center.commSemigroup : CommSemigroup (center M) :=
- { MulMemClass.toSemigroup (center M) with mul_comm := fun _ b => Subtype.ext <| b.2 _ }
-#align subsemigroup.center.comm_semigroup Subsemigroup.center.commSemigroup
-#align add_subsemigroup.center.add_comm_semigroup AddSubsemigroup.center.addCommSemigroup
-
-end
-
-section
+end Semigroup
+section CommSemigroup
variable (M) [CommSemigroup M]
@[to_additive (attr := simp)]
@@ -212,7 +363,7 @@ theorem center_eq_top : center M = ⊤ :=
#align subsemigroup.center_eq_top Subsemigroup.center_eq_top
#align add_subsemigroup.center_eq_top AddSubsemigroup.center_eq_top
-end
+end CommSemigroup
end Subsemigroup
This also adds a handful of missing lemmas about Set.center
for inverses and numeric literals.
@@ -4,7 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Jireh Loreaux
-/
import Mathlib.Algebra.Ring.Defs
+import Mathlib.Algebra.Group.Commute.Units
+import Mathlib.Algebra.Invertible.Basic
import Mathlib.GroupTheory.Subsemigroup.Operations
+import Mathlib.Data.Int.Cast.Lemmas
#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
@@ -56,6 +59,19 @@ theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M := by simp [me
theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.zero_mem_center Set.zero_mem_center
+@[simp]
+theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) : (n : M) ∈ Set.center M :=
+ (Nat.commute_cast · _)
+
+@[simp]
+theorem ofNat_mem_center [NonAssocSemiring M] (n : ℕ) [n.AtLeastTwo] :
+ OfNat.ofNat n ∈ Set.center M :=
+ natCast_mem_center M n
+
+@[simp]
+theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M :=
+ (Int.commute_cast · _)
+
variable {M}
@[to_additive (attr := simp) add_mem_addCenter]
@@ -100,14 +116,23 @@ theorem center_units_eq [GroupWithZero M] : Set.center Mˣ = ((↑) : Mˣ → M)
Subset.antisymm center_units_subset subset_center_units
#align set.center_units_eq Set.center_units_eq
+@[simp]
+theorem units_inv_mem_center [Monoid M] {a : Mˣ} (ha : ↑a ∈ Set.center M) :
+ ↑a⁻¹ ∈ Set.center M :=
+ (Commute.units_inv_right <| ha ·)
+
+@[simp]
+theorem invOf_mem_center [Monoid M] {a : M} [Invertible a] (ha : a ∈ Set.center M) :
+ ⅟a ∈ Set.center M :=
+ (Commute.invOf_right <| ha ·)
+
@[simp]
theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := by
obtain rfl | ha0 := eq_or_ne a 0
· rw [inv_zero]
exact zero_mem_center M
- rcases IsUnit.mk0 _ ha0 with ⟨a, rfl⟩
- rw [← Units.val_inv_eq_inv_val]
- exact center_units_subset (inv_mem_center (subset_center_units ha))
+ · lift a to Mˣ using IsUnit.mk0 _ ha0
+ simpa only [Units.val_inv_eq_inv_val] using units_inv_mem_center ha
#align set.inv_mem_center₀ Set.inv_mem_center₀
@[to_additive (attr := simp) sub_mem_addCenter]
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -23,7 +23,7 @@ We provide `Submonoid.center`, `AddSubmonoid.center`, `Subgroup.center`, `AddSub
-/
-variable {M : Type _}
+variable {M : Type*}
namespace Set
@@ -2,15 +2,12 @@
Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Jireh Loreaux
-
-! This file was ported from Lean 3 source module group_theory.subsemigroup.center
-! leanprover-community/mathlib commit 1ac8d4304efba9d03fa720d06516fac845aa5353
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Ring.Defs
import Mathlib.GroupTheory.Subsemigroup.Operations
+#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
+
/-!
# Centers of magmas and semigroups
NonUnitalSubring
s (#5151)
This continues the non-unital-ization of mathlib by defining NonUnitalSubring
. We attempt to provide as much feature parity as possible with both NonUnitalSubsemiring
and Subring
.
@@ -80,9 +80,10 @@ theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b
#align set.add_mem_center Set.add_mem_center
@[simp]
-theorem neg_mem_center [Ring M] {a : M} (ha : a ∈ Set.center M) : -a ∈ Set.center M := fun c => by
+theorem neg_mem_center [NonUnitalNonAssocRing M] {a : M} (ha : a ∈ Set.center M) :
+ -a ∈ Set.center M := fun c => by
rw [← neg_mul_comm, ha (-c), neg_mul_comm]
-#align set.neg_mem_center Set.neg_mem_center
+#align set.neg_mem_center Set.neg_mem_centerₓ
@[to_additive subset_addCenter_add_units]
theorem subset_center_units [Monoid M] : ((↑) : Mˣ → M) ⁻¹' center M ⊆ Set.center Mˣ :=
The other files were already fixed in Lean4. I also tried doing a sweep of the rest of the files to make sure there was no more broken ones - it seems ok.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Jireh Loreaux
! This file was ported from Lean 3 source module group_theory.subsemigroup.center
-! leanprover-community/mathlib commit a437a2499163d85d670479f69f625f461cc5fef9
+! leanprover-community/mathlib commit 1ac8d4304efba9d03fa720d06516fac845aa5353
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -148,7 +148,7 @@ variable (M) [Semigroup M]
"The center of a semigroup `M` is the set of elements that commute with everything in `M`"]
def center : Subsemigroup M where
carrier := Set.center M
- mul_mem':= Set.mul_mem_center
+ mul_mem' := Set.mul_mem_center
#align subsemigroup.center Subsemigroup.center
#align add_subsemigroup.center AddSubsemigroup.center
@@ -194,5 +194,4 @@ end
end Subsemigroup
-- Guard against import creep
--- Porting note: Not implemented yet
--- assert_not_exists finset
+assert_not_exists Finset
@@ -172,8 +172,10 @@ instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] : Decida
/-- The center of a semigroup is commutative. -/
@[to_additive "The center of an additive semigroup is commutative."]
-instance : CommSemigroup (center M) :=
+instance center.commSemigroup : CommSemigroup (center M) :=
{ MulMemClass.toSemigroup (center M) with mul_comm := fun _ b => Subtype.ext <| b.2 _ }
+#align subsemigroup.center.comm_semigroup Subsemigroup.center.commSemigroup
+#align add_subsemigroup.center.add_comm_semigroup AddSubsemigroup.center.addCommSemigroup
end
by
line breaks (#1523)
During porting, I usually fix the desired format we seem to want for the line breaks around by
with
awk '{do {{if (match($0, "^ by$") && length(p) < 98) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}' Mathlib/File/Im/Working/On.lean
I noticed there are some more files that slipped through.
This pull request is the result of running this command:
grep -lr "^ by\$" Mathlib | xargs -n 1 awk -i inplace '{do {{if (match($0, "^ by$") && length(p) < 98 && not (match(p, "^[ \t]*--"))) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}'
Co-authored-by: Moritz Firsching <firsching@google.com>
@@ -103,8 +103,7 @@ theorem center_units_eq [GroupWithZero M] : Set.center Mˣ = ((↑) : Mˣ → M)
#align set.center_units_eq Set.center_units_eq
@[simp]
-theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M :=
- by
+theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M := by
obtain rfl | ha0 := eq_or_ne a 0
· rw [inv_zero]
exact zero_mem_center M
@@ -123,8 +122,7 @@ theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈
@[simp]
theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
- (hb : b ∈ Set.center M) : a / b ∈ Set.center M :=
- by
+ (hb : b ∈ Set.center M) : a / b ∈ Set.center M := by
rw [div_eq_mul_inv]
exact mul_mem_center ha (inv_mem_center₀ hb)
#align set.div_mem_center₀ Set.div_mem_center₀
to_additive
is @[to_additive (attrs := simp, ext, simps)]
simp
and simps
attributes to the to_additive
-dictionary.simp
-attributes). In particular it's possible that norm_cast
might generate some auxiliary declarations.to_additive
and simps
from the Simps
file to the toAdditive
file for uniformity.@[reassoc]
Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -50,7 +50,7 @@ instance decidableMemCenter [Mul M] [∀ a : M, Decidable <| ∀ b : M, b * a =
DecidablePred (· ∈ center M) := fun _ => decidable_of_iff' _ (mem_center_iff M)
#align set.decidable_mem_center Set.decidableMemCenter
-@[simp, to_additive zero_mem_addCenter]
+@[to_additive (attr := simp) zero_mem_addCenter]
theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.one_mem_center Set.one_mem_center
#align set.zero_mem_add_center Set.zero_mem_addCenter
@@ -61,13 +61,13 @@ theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M := by simp [
variable {M}
-@[simp, to_additive add_mem_addCenter]
+@[to_additive (attr := simp) add_mem_addCenter]
theorem mul_mem_center [Semigroup M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a * b ∈ Set.center M := fun g => by rw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]
#align set.mul_mem_center Set.mul_mem_center
#align set.add_mem_add_center Set.add_mem_addCenter
-@[simp, to_additive neg_mem_addCenter]
+@[to_additive (attr := simp) neg_mem_addCenter]
theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) :
a⁻¹ ∈ Set.center M := fun g => by
rw [← inv_inj, mul_inv_rev, inv_inv, ← ha, mul_inv_rev, inv_inv]
@@ -113,7 +113,7 @@ theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) :
exact center_units_subset (inv_mem_center (subset_center_units ha))
#align set.inv_mem_center₀ Set.inv_mem_center₀
-@[simp, to_additive sub_mem_addCenter]
+@[to_additive (attr := simp) sub_mem_addCenter]
theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a / b ∈ Set.center M := by
rw [div_eq_mul_inv]
@@ -131,7 +131,7 @@ theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
variable (M)
-@[simp, to_additive addCenter_eq_univ]
+@[to_additive (attr := simp) addCenter_eq_univ]
theorem center_eq_univ [CommSemigroup M] : center M = Set.univ :=
(Subset.antisymm (subset_univ _)) fun x _ y => mul_comm y x
#align set.center_eq_univ Set.center_eq_univ
@@ -183,7 +183,7 @@ section
variable (M) [CommSemigroup M]
-@[to_additive, simp]
+@[to_additive (attr := simp)]
theorem center_eq_top : center M = ⊤ :=
SetLike.coe_injective (Set.center_eq_univ M)
#align subsemigroup.center_eq_top Subsemigroup.center_eq_top
Also includes fixes in other files as well (Set.Center
to Set.center
and a few more like that).
@@ -16,13 +16,13 @@ import Mathlib.GroupTheory.Subsemigroup.Operations
## Main definitions
-* `Set.Center`: the center of a magma
-* `Subsemigroup.Center`: the center of a semigroup
-* `Set.AddCenter`: the center of an additive magma
-* `AddSubsemigroup.Center`: the center of an additive semigroup
+* `Set.center`: the center of a magma
+* `Subsemigroup.center`: the center of a semigroup
+* `Set.addCenter`: the center of an additive magma
+* `AddSubsemigroup.center`: the center of an additive semigroup
-We provide `Submonoid.Center`, `AddSubmonoid.Center`, `Subgroup.Center`, `AddSubgroup.Center`,
-`Subsemiring.Center`, and `Subring.Center` in other files.
+We provide `Submonoid.center`, `AddSubmonoid.center`, `Subgroup.center`, `AddSubgroup.center`,
+`Subsemiring.center`, and `Subring.center` in other files.
-/
@@ -33,64 +33,64 @@ namespace Set
variable (M)
/-- The center of a magma. -/
-@[to_additive AddCenter " The center of an additive magma. "]
-def Center [Mul M] : Set M :=
+@[to_additive addCenter " The center of an additive magma. "]
+def center [Mul M] : Set M :=
{ z | ∀ m, m * z = z * m }
-#align set.center Set.Center
-#align set.add_center Set.AddCenter
+#align set.center Set.center
+#align set.add_center Set.addCenter
--- porting note: The `to_additive` version used to be `mem_add_center` without the iff
+-- porting note: The `to_additive` version used to be `mem_addCenter` without the iff
@[to_additive mem_addCenter_iff]
-theorem mem_center_iff [Mul M] {z : M} : z ∈ Center M ↔ ∀ g, g * z = z * g :=
+theorem mem_center_iff [Mul M] {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g :=
Iff.rfl
#align set.mem_center_iff Set.mem_center_iff
#align set.mem_add_center Set.mem_addCenter_iff
instance decidableMemCenter [Mul M] [∀ a : M, Decidable <| ∀ b : M, b * a = a * b] :
- DecidablePred (· ∈ Center M) := fun _ => decidable_of_iff' _ (mem_center_iff M)
+ DecidablePred (· ∈ center M) := fun _ => decidable_of_iff' _ (mem_center_iff M)
#align set.decidable_mem_center Set.decidableMemCenter
@[simp, to_additive zero_mem_addCenter]
-theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.Center M := by simp [mem_center_iff]
+theorem one_mem_center [MulOneClass M] : (1 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.one_mem_center Set.one_mem_center
#align set.zero_mem_add_center Set.zero_mem_addCenter
@[simp]
-theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.Center M := by simp [mem_center_iff]
+theorem zero_mem_center [MulZeroClass M] : (0 : M) ∈ Set.center M := by simp [mem_center_iff]
#align set.zero_mem_center Set.zero_mem_center
variable {M}
@[simp, to_additive add_mem_addCenter]
-theorem mul_mem_center [Semigroup M] {a b : M} (ha : a ∈ Set.Center M) (hb : b ∈ Set.Center M) :
- a * b ∈ Set.Center M := fun g => by rw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]
+theorem mul_mem_center [Semigroup M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
+ a * b ∈ Set.center M := fun g => by rw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]
#align set.mul_mem_center Set.mul_mem_center
#align set.add_mem_add_center Set.add_mem_addCenter
@[simp, to_additive neg_mem_addCenter]
-theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.Center M) :
- a⁻¹ ∈ Set.Center M := fun g => by
+theorem inv_mem_center [Group M] {a : M} (ha : a ∈ Set.center M) :
+ a⁻¹ ∈ Set.center M := fun g => by
rw [← inv_inj, mul_inv_rev, inv_inv, ← ha, mul_inv_rev, inv_inv]
#align set.inv_mem_center Set.inv_mem_center
#align set.neg_mem_add_center Set.neg_mem_addCenter
@[simp]
-theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.Center M) (hb : b ∈ Set.Center M) :
- a + b ∈ Set.Center M := fun c => by rw [add_mul, mul_add, ha c, hb c]
+theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
+ a + b ∈ Set.center M := fun c => by rw [add_mul, mul_add, ha c, hb c]
#align set.add_mem_center Set.add_mem_center
@[simp]
-theorem neg_mem_center [Ring M] {a : M} (ha : a ∈ Set.Center M) : -a ∈ Set.Center M := fun c => by
+theorem neg_mem_center [Ring M] {a : M} (ha : a ∈ Set.center M) : -a ∈ Set.center M := fun c => by
rw [← neg_mul_comm, ha (-c), neg_mul_comm]
#align set.neg_mem_center Set.neg_mem_center
@[to_additive subset_addCenter_add_units]
-theorem subset_center_units [Monoid M] : ((↑) : Mˣ → M) ⁻¹' Center M ⊆ Set.Center Mˣ :=
+theorem subset_center_units [Monoid M] : ((↑) : Mˣ → M) ⁻¹' center M ⊆ Set.center Mˣ :=
fun _ ha _ => Units.ext <| ha _
#align set.subset_center_units Set.subset_center_units
#align set.subset_add_center_add_units Set.subset_addCenter_add_units
-theorem center_units_subset [GroupWithZero M] : Set.Center Mˣ ⊆ ((↑) : Mˣ → M) ⁻¹' Center M :=
+theorem center_units_subset [GroupWithZero M] : Set.center Mˣ ⊆ ((↑) : Mˣ → M) ⁻¹' center M :=
fun a ha b => by
obtain rfl | hb := eq_or_ne b 0
· rw [zero_mul, mul_zero]
@@ -98,12 +98,12 @@ theorem center_units_subset [GroupWithZero M] : Set.Center Mˣ ⊆ ((↑) : Mˣ
#align set.center_units_subset Set.center_units_subset
/-- In a group with zero, the center of the units is the preimage of the center. -/
-theorem center_units_eq [GroupWithZero M] : Set.Center Mˣ = ((↑) : Mˣ → M) ⁻¹' Center M :=
+theorem center_units_eq [GroupWithZero M] : Set.center Mˣ = ((↑) : Mˣ → M) ⁻¹' center M :=
Subset.antisymm center_units_subset subset_center_units
#align set.center_units_eq Set.center_units_eq
@[simp]
-theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.Center M) : a⁻¹ ∈ Set.Center M :=
+theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M :=
by
obtain rfl | ha0 := eq_or_ne a 0
· rw [inv_zero]
@@ -114,16 +114,16 @@ theorem inv_mem_center₀ [GroupWithZero M] {a : M} (ha : a ∈ Set.Center M) :
#align set.inv_mem_center₀ Set.inv_mem_center₀
@[simp, to_additive sub_mem_addCenter]
-theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.Center M) (hb : b ∈ Set.Center M) :
- a / b ∈ Set.Center M := by
+theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
+ a / b ∈ Set.center M := by
rw [div_eq_mul_inv]
exact mul_mem_center ha (inv_mem_center hb)
#align set.div_mem_center Set.div_mem_center
#align set.sub_mem_add_center Set.sub_mem_addCenter
@[simp]
-theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.Center M)
- (hb : b ∈ Set.Center M) : a / b ∈ Set.Center M :=
+theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.center M)
+ (hb : b ∈ Set.center M) : a / b ∈ Set.center M :=
by
rw [div_eq_mul_inv]
exact mul_mem_center ha (inv_mem_center₀ hb)
@@ -132,7 +132,7 @@ theorem div_mem_center₀ [GroupWithZero M] {a b : M} (ha : a ∈ Set.Center M)
variable (M)
@[simp, to_additive addCenter_eq_univ]
-theorem center_eq_univ [CommSemigroup M] : Center M = Set.univ :=
+theorem center_eq_univ [CommSemigroup M] : center M = Set.univ :=
(Subset.antisymm (subset_univ _)) fun x _ y => mul_comm y x
#align set.center_eq_univ Set.center_eq_univ
#align set.add_center_eq_univ Set.addCenter_eq_univ
@@ -148,11 +148,11 @@ variable (M) [Semigroup M]
/-- The center of a semigroup `M` is the set of elements that commute with everything in `M` -/
@[to_additive
"The center of a semigroup `M` is the set of elements that commute with everything in `M`"]
-def Center : Subsemigroup M where
- carrier := Set.Center M
+def center : Subsemigroup M where
+ carrier := Set.center M
mul_mem':= Set.mul_mem_center
-#align subsemigroup.center Subsemigroup.Center
-#align add_subsemigroup.center AddSubsemigroup.Center
+#align subsemigroup.center Subsemigroup.center
+#align add_subsemigroup.center AddSubsemigroup.center
-- porting note: `coe_center` is now redundant
#noalign subsemigroup.coe_center
@@ -161,21 +161,21 @@ def Center : Subsemigroup M where
variable {M}
@[to_additive]
-theorem mem_center_iff {z : M} : z ∈ Center M ↔ ∀ g, g * z = z * g :=
+theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g :=
Iff.rfl
#align subsemigroup.mem_center_iff Subsemigroup.mem_center_iff
#align add_subsemigroup.mem_center_iff AddSubsemigroup.mem_center_iff
@[to_additive]
-instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] : Decidable (a ∈ Center M) :=
+instance decidableMemCenter (a) [Decidable <| ∀ b : M, b * a = a * b] : Decidable (a ∈ center M) :=
decidable_of_iff' _ mem_center_iff
#align subsemigroup.decidable_mem_center Subsemigroup.decidableMemCenter
#align add_subsemigroup.decidable_mem_center AddSubsemigroup.decidableMemCenter
/-- The center of a semigroup is commutative. -/
@[to_additive "The center of an additive semigroup is commutative."]
-instance : CommSemigroup (Center M) :=
- { MulMemClass.toSemigroup (Center M) with mul_comm := fun _ b => Subtype.ext <| b.2 _ }
+instance : CommSemigroup (center M) :=
+ { MulMemClass.toSemigroup (center M) with mul_comm := fun _ b => Subtype.ext <| b.2 _ }
end
@@ -184,7 +184,7 @@ section
variable (M) [CommSemigroup M]
@[to_additive, simp]
-theorem center_eq_top : Center M = ⊤ :=
+theorem center_eq_top : center M = ⊤ :=
SetLike.coe_injective (Set.center_eq_univ M)
#align subsemigroup.center_eq_top Subsemigroup.center_eq_top
#align add_subsemigroup.center_eq_top AddSubsemigroup.center_eq_top
All dependencies are ported!