Metamath Proof Explorer


Theorem dmatcrng

Description: The subring of diagonal matrices (over a commutative ring) is a commutative ring . (Contributed by AV, 20-Aug-2019) (Revised by AV, 18-Dec-2019)

Ref Expression
Hypotheses dmatid.a A=NMatR
dmatid.b B=BaseA
dmatid.0 0˙=0R
dmatid.d D=NDMatR
dmatcrng.c C=A𝑠D
Assertion dmatcrng RCRingNFinCCRing

Proof

Step Hyp Ref Expression
1 dmatid.a A=NMatR
2 dmatid.b B=BaseA
3 dmatid.0 0˙=0R
4 dmatid.d D=NDMatR
5 dmatcrng.c C=A𝑠D
6 crngring RCRingRRing
7 1 2 3 4 dmatsrng RRingNFinDSubRingA
8 6 7 sylan RCRingNFinDSubRingA
9 5 subrgring DSubRingACRing
10 8 9 syl RCRingNFinCRing
11 simp1lr NFinRCRingxDyDaNbNRCRing
12 eqid BaseR=BaseR
13 eqid BaseA=BaseA
14 simp2 NFinRCRingxDyDaNbNaN
15 simp3 NFinRCRingxDyDaNbNbN
16 1 13 3 4 dmatmat NFinRCRingxDxBaseA
17 16 imp NFinRCRingxDxBaseA
18 17 adantrr NFinRCRingxDyDxBaseA
19 18 3ad2ant1 NFinRCRingxDyDaNbNxBaseA
20 1 12 13 14 15 19 matecld NFinRCRingxDyDaNbNaxbBaseR
21 1 13 3 4 dmatmat NFinRCRingyDyBaseA
22 21 imp NFinRCRingyDyBaseA
23 22 adantrl NFinRCRingxDyDyBaseA
24 23 3ad2ant1 NFinRCRingxDyDaNbNyBaseA
25 1 12 13 14 15 24 matecld NFinRCRingxDyDaNbNaybBaseR
26 eqid R=R
27 12 26 crngcom RCRingaxbBaseRaybBaseRaxbRayb=aybRaxb
28 11 20 25 27 syl3anc NFinRCRingxDyDaNbNaxbRayb=aybRaxb
29 28 ifeq1d NFinRCRingxDyDaNbNifa=baxbRayb0˙=ifa=baybRaxb0˙
30 29 mpoeq3dva NFinRCRingxDyDaN,bNifa=baxbRayb0˙=aN,bNifa=baybRaxb0˙
31 6 anim2i NFinRCRingNFinRRing
32 1 2 3 4 dmatmul NFinRRingxDyDxAy=aN,bNifa=baxbRayb0˙
33 31 32 sylan NFinRCRingxDyDxAy=aN,bNifa=baxbRayb0˙
34 pm3.22 xDyDyDxD
35 1 2 3 4 dmatmul NFinRRingyDxDyAx=aN,bNifa=baybRaxb0˙
36 31 34 35 syl2an NFinRCRingxDyDyAx=aN,bNifa=baybRaxb0˙
37 30 33 36 3eqtr4d NFinRCRingxDyDxAy=yAx
38 37 ralrimivva NFinRCRingxDyDxAy=yAx
39 38 ancoms RCRingNFinxDyDxAy=yAx
40 5 subrgbas DSubRingAD=BaseC
41 40 eqcomd DSubRingABaseC=D
42 eqid A=A
43 5 42 ressmulr DSubRingAA=C
44 43 eqcomd DSubRingAC=A
45 44 oveqd DSubRingAxCy=xAy
46 44 oveqd DSubRingAyCx=yAx
47 45 46 eqeq12d DSubRingAxCy=yCxxAy=yAx
48 41 47 raleqbidv DSubRingAyBaseCxCy=yCxyDxAy=yAx
49 41 48 raleqbidv DSubRingAxBaseCyBaseCxCy=yCxxDyDxAy=yAx
50 8 49 syl RCRingNFinxBaseCyBaseCxCy=yCxxDyDxAy=yAx
51 39 50 mpbird RCRingNFinxBaseCyBaseCxCy=yCx
52 eqid BaseC=BaseC
53 eqid C=C
54 52 53 iscrng2 CCRingCRingxBaseCyBaseCxCy=yCx
55 10 51 54 sylanbrc RCRingNFinCCRing