Metamath Proof Explorer


Theorem frmdup1

Description: Any assignment of the generators to target elements can be extended (uniquely) to a homomorphism from a free monoid to an arbitrary other monoid. (Contributed by Mario Carneiro, 27-Sep-2015)

Ref Expression
Hypotheses frmdup.m M = freeMnd I
frmdup.b B = Base G
frmdup.e E = x Word I G A x
frmdup.g φ G Mnd
frmdup.i φ I X
frmdup.a φ A : I B
Assertion frmdup1 φ E M MndHom G

Proof

Step Hyp Ref Expression
1 frmdup.m M = freeMnd I
2 frmdup.b B = Base G
3 frmdup.e E = x Word I G A x
4 frmdup.g φ G Mnd
5 frmdup.i φ I X
6 frmdup.a φ A : I B
7 1 frmdmnd I X M Mnd
8 5 7 syl φ M Mnd
9 4 adantr φ x Word I G Mnd
10 simpr φ x Word I x Word I
11 6 adantr φ x Word I A : I B
12 wrdco x Word I A : I B A x Word B
13 10 11 12 syl2anc φ x Word I A x Word B
14 2 gsumwcl G Mnd A x Word B G A x B
15 9 13 14 syl2anc φ x Word I G A x B
16 15 3 fmptd φ E : Word I B
17 eqid Base M = Base M
18 1 17 frmdbas I X Base M = Word I
19 5 18 syl φ Base M = Word I
20 19 feq2d φ E : Base M B E : Word I B
21 16 20 mpbird φ E : Base M B
22 1 17 frmdelbas y Base M y Word I
23 22 ad2antrl φ y Base M z Base M y Word I
24 1 17 frmdelbas z Base M z Word I
25 24 ad2antll φ y Base M z Base M z Word I
26 6 adantr φ y Base M z Base M A : I B
27 ccatco y Word I z Word I A : I B A y ++ z = A y ++ A z
28 23 25 26 27 syl3anc φ y Base M z Base M A y ++ z = A y ++ A z
29 28 oveq2d φ y Base M z Base M G A y ++ z = G A y ++ A z
30 4 adantr φ y Base M z Base M G Mnd
31 wrdco y Word I A : I B A y Word B
32 23 26 31 syl2anc φ y Base M z Base M A y Word B
33 wrdco z Word I A : I B A z Word B
34 25 26 33 syl2anc φ y Base M z Base M A z Word B
35 eqid + G = + G
36 2 35 gsumccat G Mnd A y Word B A z Word B G A y ++ A z = G A y + G G A z
37 30 32 34 36 syl3anc φ y Base M z Base M G A y ++ A z = G A y + G G A z
38 29 37 eqtrd φ y Base M z Base M G A y ++ z = G A y + G G A z
39 eqid + M = + M
40 1 17 39 frmdadd y Base M z Base M y + M z = y ++ z
41 40 adantl φ y Base M z Base M y + M z = y ++ z
42 41 fveq2d φ y Base M z Base M E y + M z = E y ++ z
43 ccatcl y Word I z Word I y ++ z Word I
44 23 25 43 syl2anc φ y Base M z Base M y ++ z Word I
45 coeq2 x = y ++ z A x = A y ++ z
46 45 oveq2d x = y ++ z G A x = G A y ++ z
47 ovex G A x V
48 46 3 47 fvmpt3i y ++ z Word I E y ++ z = G A y ++ z
49 44 48 syl φ y Base M z Base M E y ++ z = G A y ++ z
50 42 49 eqtrd φ y Base M z Base M E y + M z = G A y ++ z
51 coeq2 x = y A x = A y
52 51 oveq2d x = y G A x = G A y
53 52 3 47 fvmpt3i y Word I E y = G A y
54 coeq2 x = z A x = A z
55 54 oveq2d x = z G A x = G A z
56 55 3 47 fvmpt3i z Word I E z = G A z
57 53 56 oveqan12d y Word I z Word I E y + G E z = G A y + G G A z
58 23 25 57 syl2anc φ y Base M z Base M E y + G E z = G A y + G G A z
59 38 50 58 3eqtr4d φ y Base M z Base M E y + M z = E y + G E z
60 59 ralrimivva φ y Base M z Base M E y + M z = E y + G E z
61 wrd0 Word I
62 coeq2 x = A x = A
63 co02 A =
64 62 63 eqtrdi x = A x =
65 64 oveq2d x = G A x = G
66 eqid 0 G = 0 G
67 66 gsum0 G = 0 G
68 65 67 eqtrdi x = G A x = 0 G
69 68 3 47 fvmpt3i Word I E = 0 G
70 61 69 mp1i φ E = 0 G
71 21 60 70 3jca φ E : Base M B y Base M z Base M E y + M z = E y + G E z E = 0 G
72 1 frmd0 = 0 M
73 17 2 39 35 72 66 ismhm E M MndHom G M Mnd G Mnd E : Base M B y Base M z Base M E y + M z = E y + G E z E = 0 G
74 8 4 71 73 syl21anbrc φ E M MndHom G