Metamath Proof Explorer


Theorem cntrcmnd

Description: The center of a monoid is a commutative submonoid. (Contributed by Thierry Arnoux, 21-Aug-2023)

Ref Expression
Hypothesis cntrcmnd.z ⊢ Z = M ↾ 𝑠 Cntr ⁡ M
Assertion cntrcmnd ⊢ M ∈ Mnd → Z ∈ CMnd

Proof

Step Hyp Ref Expression
1 cntrcmnd.z ⊢ Z = M ↾ 𝑠 Cntr ⁡ M
2 eqid ⊢ Base M = Base M
3 2 cntrss ⊢ Cntr ⁡ M ⊆ Base M
4 1 2 ressbas2 ⊢ Cntr ⁡ M ⊆ Base M → Cntr ⁡ M = Base Z
5 3 4 mp1i ⊢ M ∈ Mnd → Cntr ⁡ M = Base Z
6 fvex ⊢ Cntr ⁡ M ∈ V
7 eqid ⊢ + M = + M
8 1 7 ressplusg ⊢ Cntr ⁡ M ∈ V → + M = + Z
9 6 8 mp1i ⊢ M ∈ Mnd → + M = + Z
10 eqid ⊢ Cntz ⁡ M = Cntz ⁡ M
11 2 10 cntrval ⊢ Cntz ⁡ M ⁡ Base M = Cntr ⁡ M
12 ssid ⊢ Base M ⊆ Base M
13 2 10 cntzsubm ⊢ M ∈ Mnd ∧ Base M ⊆ Base M → Cntz ⁡ M ⁡ Base M ∈ SubMnd ⁡ M
14 12 13 mpan2 ⊢ M ∈ Mnd → Cntz ⁡ M ⁡ Base M ∈ SubMnd ⁡ M
15 11 14 eqeltrrid ⊢ M ∈ Mnd → Cntr ⁡ M ∈ SubMnd ⁡ M
16 1 submmnd ⊢ Cntr ⁡ M ∈ SubMnd ⁡ M → Z ∈ Mnd
17 15 16 syl ⊢ M ∈ Mnd → Z ∈ Mnd
18 simp2 ⊢ M ∈ Mnd ∧ x ∈ Cntr ⁡ M ∧ y ∈ Cntr ⁡ M → x ∈ Cntr ⁡ M
19 simp3 ⊢ M ∈ Mnd ∧ x ∈ Cntr ⁡ M ∧ y ∈ Cntr ⁡ M → y ∈ Cntr ⁡ M
20 3 19 sselid ⊢ M ∈ Mnd ∧ x ∈ Cntr ⁡ M ∧ y ∈ Cntr ⁡ M → y ∈ Base M
21 eqid ⊢ Cntr ⁡ M = Cntr ⁡ M
22 2 7 21 cntri ⊢ x ∈ Cntr ⁡ M ∧ y ∈ Base M → x + M y = y + M x
23 18 20 22 syl2anc ⊢ M ∈ Mnd ∧ x ∈ Cntr ⁡ M ∧ y ∈ Cntr ⁡ M → x + M y = y + M x
24 5 9 17 23 iscmnd ⊢ M ∈ Mnd → Z ∈ CMnd