Metamath Proof Explorer


Theorem ccatmulgnn0dir

Description: Concatenation of words follow the rule mulgnn0dir (although applying mulgnn0dir would require S to be a set). In this case A is <" K "> to the power M in the free monoid. (Contributed by Thierry Arnoux, 5-Oct-2018)

Ref Expression
Hypotheses ccatmulgnn0dir.a A=0..^M×K
ccatmulgnn0dir.b B=0..^N×K
ccatmulgnn0dir.c C=0..^M+N×K
ccatmulgnn0dir.k φKS
ccatmulgnn0dir.m φM0
ccatmulgnn0dir.n φN0
Assertion ccatmulgnn0dir φA++B=C

Proof

Step Hyp Ref Expression
1 ccatmulgnn0dir.a A=0..^M×K
2 ccatmulgnn0dir.b B=0..^N×K
3 ccatmulgnn0dir.c C=0..^M+N×K
4 ccatmulgnn0dir.k φKS
5 ccatmulgnn0dir.m φM0
6 ccatmulgnn0dir.n φN0
7 1 fveq2i A=0..^M×K
8 fzofi 0..^MFin
9 snfi KFin
10 hashxp 0..^MFinKFin0..^M×K=0..^MK
11 8 9 10 mp2an 0..^M×K=0..^MK
12 7 11 eqtri A=0..^MK
13 hashfzo0 M00..^M=M
14 5 13 syl φ0..^M=M
15 hashsng KSK=1
16 4 15 syl φK=1
17 14 16 oveq12d φ0..^MK= M1
18 12 17 eqtrid φA= M1
19 5 nn0cnd φM
20 19 mulridd φ M1=M
21 18 20 eqtrd φA=M
22 2 fveq2i B=0..^N×K
23 fzofi 0..^NFin
24 hashxp 0..^NFinKFin0..^N×K=0..^NK
25 23 9 24 mp2an 0..^N×K=0..^NK
26 22 25 eqtri B=0..^NK
27 hashfzo0 N00..^N=N
28 6 27 syl φ0..^N=N
29 28 16 oveq12d φ0..^NK= N1
30 26 29 eqtrid φB= N1
31 6 nn0cnd φN
32 31 mulridd φ N1=N
33 30 32 eqtrd φB=N
34 21 33 oveq12d φA+B=M+N
35 34 oveq2d φ0..^A+B=0..^M+N
36 simpll φi0..^A+Bi0..^Aφ
37 simpr φi0..^A+Bi0..^Ai0..^A
38 21 oveq2d φ0..^A=0..^M
39 36 38 syl φi0..^A+Bi0..^A0..^A=0..^M
40 37 39 eleqtrd φi0..^A+Bi0..^Ai0..^M
41 fconstg KS0..^M×K:0..^MK
42 4 41 syl φ0..^M×K:0..^MK
43 1 a1i φA=0..^M×K
44 43 feq1d φA:0..^MK0..^M×K:0..^MK
45 42 44 mpbird φA:0..^MK
46 fvconst A:0..^MKi0..^MAi=K
47 45 46 sylan φi0..^MAi=K
48 36 40 47 syl2anc φi0..^A+Bi0..^AAi=K
49 simpll φi0..^A+B¬i0..^Aφ
50 simplr φi0..^A+B¬i0..^Ai0..^A+B
51 simpr φi0..^A+B¬i0..^A¬i0..^A
52 21 5 eqeltrd φA0
53 49 52 syl φi0..^A+B¬i0..^AA0
54 53 nn0zd φi0..^A+B¬i0..^AA
55 33 6 eqeltrd φB0
56 49 55 syl φi0..^A+B¬i0..^AB0
57 56 nn0zd φi0..^A+B¬i0..^AB
58 fzocatel i0..^A+B¬i0..^AABiA0..^B
59 50 51 54 57 58 syl22anc φi0..^A+B¬i0..^AiA0..^B
60 33 oveq2d φ0..^B=0..^N
61 49 60 syl φi0..^A+B¬i0..^A0..^B=0..^N
62 59 61 eleqtrd φi0..^A+B¬i0..^AiA0..^N
63 fconstg KS0..^N×K:0..^NK
64 4 63 syl φ0..^N×K:0..^NK
65 2 a1i φB=0..^N×K
66 65 feq1d φB:0..^NK0..^N×K:0..^NK
67 64 66 mpbird φB:0..^NK
68 fvconst B:0..^NKiA0..^NBiA=K
69 67 68 sylan φiA0..^NBiA=K
70 49 62 69 syl2anc φi0..^A+B¬i0..^ABiA=K
71 48 70 ifeqda φi0..^A+Bifi0..^AAiBiA=K
72 35 71 mpteq12dva φi0..^A+Bifi0..^AAiBiA=i0..^M+NK
73 ovex 0..^MV
74 snex KV
75 73 74 xpex 0..^M×KV
76 1 75 eqeltri AV
77 ovex 0..^NV
78 77 74 xpex 0..^N×KV
79 2 78 eqeltri BV
80 ccatfval AVBVA++B=i0..^A+Bifi0..^AAiBiA
81 76 79 80 mp2an A++B=i0..^A+Bifi0..^AAiBiA
82 fconstmpt 0..^M+N×K=i0..^M+NK
83 3 82 eqtri C=i0..^M+NK
84 72 81 83 3eqtr4g φA++B=C