Metamath Proof Explorer


Theorem frmdplusg

Description: The monoid operation of a free monoid. (Contributed by Mario Carneiro, 27-Sep-2015) (Revised by Mario Carneiro, 27-Feb-2016) (Proof shortened by AV, 6-Nov-2024)

Ref Expression
Hypotheses frmdbas.m M=freeMndI
frmdbas.b B=BaseM
frmdplusg.p +˙=+M
Assertion frmdplusg +˙=++B×B

Proof

Step Hyp Ref Expression
1 frmdbas.m M=freeMndI
2 frmdbas.b B=BaseM
3 frmdplusg.p +˙=+M
4 1 2 frmdbas IVB=WordI
5 eqid ++B×B=++B×B
6 1 4 5 frmdval IVM=BasendxB+ndx++B×B
7 6 fveq2d IV+M=+BasendxB+ndx++B×B
8 3 7 eqtrid IV+˙=+BasendxB+ndx++B×B
9 wrdexg IVWordIV
10 ccatfn ++FnV×V
11 xpss B×BV×V
12 fnssres ++FnV×VB×BV×V++B×BFnB×B
13 10 11 12 mp2an ++B×BFnB×B
14 ovres xByBx++B×By=x++y
15 1 2 frmdelbas xBxWordI
16 1 2 frmdelbas yByWordI
17 ccatcl xWordIyWordIx++yWordI
18 15 16 17 syl2an xByBx++yWordI
19 14 18 eqeltrd xByBx++B×ByWordI
20 19 rgen2 xByBx++B×ByWordI
21 ffnov ++B×B:B×BWordI++B×BFnB×BxByBx++B×ByWordI
22 13 20 21 mpbir2an ++B×B:B×BWordI
23 2 fvexi BV
24 23 23 xpex B×BV
25 fex2 ++B×B:B×BWordIB×BVWordIV++B×BV
26 22 24 25 mp3an12 WordIV++B×BV
27 eqid BasendxB+ndx++B×B=BasendxB+ndx++B×B
28 27 grpplusg ++B×BV++B×B=+BasendxB+ndx++B×B
29 9 26 28 3syl IV++B×B=+BasendxB+ndx++B×B
30 8 29 eqtr4d IV+˙=++B×B
31 fvprc ¬IVfreeMndI=
32 1 31 eqtrid ¬IVM=
33 32 fveq2d ¬IV+M=+
34 3 33 eqtrid ¬IV+˙=+
35 res0 ++=
36 plusgid +𝑔=Slot+ndx
37 36 str0 =+
38 35 37 eqtr2i +=++
39 34 38 eqtrdi ¬IV+˙=++
40 32 fveq2d ¬IVBaseM=Base
41 base0 =Base
42 40 2 41 3eqtr4g ¬IVB=
43 42 xpeq2d ¬IVB×B=B×
44 xp0 B×=
45 43 44 eqtrdi ¬IVB×B=
46 45 reseq2d ¬IV++B×B=++
47 39 46 eqtr4d ¬IV+˙=++B×B
48 30 47 pm2.61i +˙=++B×B