Metamath Proof Explorer


Theorem toycom

Description: Show the commutative law for an operation O on a toy structure class C of commuatitive operations on CC . This illustrates how a structure class can be partially specialized. In practice, we would ordinarily define a new constant such as "CAbel" in place of C . (Contributed by NM, 17-Mar-2013) (Proof modification is discouraged.)

Ref Expression
Hypotheses toycom.1 C = g Abel | Base g =
toycom.2 + ˙ = + K
Assertion toycom K C A B A + ˙ B = B + ˙ A

Proof

Step Hyp Ref Expression
1 toycom.1 C = g Abel | Base g =
2 toycom.2 + ˙ = + K
3 ssrab2 g Abel | Base g = Abel
4 1 3 eqsstri C Abel
5 4 sseli K C K Abel
6 5 3ad2ant1 K C A B K Abel
7 simp2 K C A B A
8 fveq2 g = K Base g = Base K
9 8 eqeq1d g = K Base g = Base K =
10 9 1 elrab2 K C K Abel Base K =
11 10 simprbi K C Base K =
12 11 3ad2ant1 K C A B Base K =
13 7 12 eleqtrrd K C A B A Base K
14 simp3 K C A B B
15 14 12 eleqtrrd K C A B B Base K
16 eqid Base K = Base K
17 eqid + K = + K
18 16 17 ablcom K Abel A Base K B Base K A + K B = B + K A
19 6 13 15 18 syl3anc K C A B A + K B = B + K A
20 2 oveqi A + ˙ B = A + K B
21 2 oveqi B + ˙ A = B + K A
22 19 20 21 3eqtr4g K C A B A + ˙ B = B + ˙ A