Metamath Proof Explorer


Theorem mgmlrid

Description: The identity element of a magma, if it exists, is a left and right identity. (Contributed by Mario Carneiro, 27-Dec-2014)

Ref Expression
Hypotheses ismgmid.b B=BaseG
ismgmid.o 0˙=0G
ismgmid.p +˙=+G
mgmidcl.e φeBxBe+˙x=xx+˙e=x
Assertion mgmlrid φXB0˙+˙X=XX+˙0˙=X

Proof

Step Hyp Ref Expression
1 ismgmid.b B=BaseG
2 ismgmid.o 0˙=0G
3 ismgmid.p +˙=+G
4 mgmidcl.e φeBxBe+˙x=xx+˙e=x
5 eqid 0˙=0˙
6 1 2 3 4 ismgmid φ0˙BxB0˙+˙x=xx+˙0˙=x0˙=0˙
7 5 6 mpbiri φ0˙BxB0˙+˙x=xx+˙0˙=x
8 7 simprd φxB0˙+˙x=xx+˙0˙=x
9 oveq2 x=X0˙+˙x=0˙+˙X
10 id x=Xx=X
11 9 10 eqeq12d x=X0˙+˙x=x0˙+˙X=X
12 oveq1 x=Xx+˙0˙=X+˙0˙
13 12 10 eqeq12d x=Xx+˙0˙=xX+˙0˙=X
14 11 13 anbi12d x=X0˙+˙x=xx+˙0˙=x0˙+˙X=XX+˙0˙=X
15 14 rspccva xB0˙+˙x=xx+˙0˙=xXB0˙+˙X=XX+˙0˙=X
16 8 15 sylan φXB0˙+˙X=XX+˙0˙=X