Metamath Proof Explorer


Theorem ccatass

Description: Associative law for concatenation of words. (Contributed by Stefan O'Rear, 15-Aug-2015)

Ref Expression
Assertion ccatass SWordBTWordBUWordBS++T++U=S++T++U

Proof

Step Hyp Ref Expression
1 ccatcl SWordBTWordBS++TWordB
2 ccatcl S++TWordBUWordBS++T++UWordB
3 1 2 stoic3 SWordBTWordBUWordBS++T++UWordB
4 wrdfn S++T++UWordBS++T++UFn0..^S++T++U
5 3 4 syl SWordBTWordBUWordBS++T++UFn0..^S++T++U
6 ccatlen S++TWordBUWordBS++T++U=S++T+U
7 1 6 stoic3 SWordBTWordBUWordBS++T++U=S++T+U
8 ccatlen SWordBTWordBS++T=S+T
9 8 3adant3 SWordBTWordBUWordBS++T=S+T
10 9 oveq1d SWordBTWordBUWordBS++T+U=S+T+U
11 7 10 eqtrd SWordBTWordBUWordBS++T++U=S+T+U
12 11 oveq2d SWordBTWordBUWordB0..^S++T++U=0..^S+T+U
13 12 fneq2d SWordBTWordBUWordBS++T++UFn0..^S++T++US++T++UFn0..^S+T+U
14 5 13 mpbid SWordBTWordBUWordBS++T++UFn0..^S+T+U
15 simp1 SWordBTWordBUWordBSWordB
16 ccatcl TWordBUWordBT++UWordB
17 16 3adant1 SWordBTWordBUWordBT++UWordB
18 ccatcl SWordBT++UWordBS++T++UWordB
19 15 17 18 syl2anc SWordBTWordBUWordBS++T++UWordB
20 wrdfn S++T++UWordBS++T++UFn0..^S++T++U
21 19 20 syl SWordBTWordBUWordBS++T++UFn0..^S++T++U
22 ccatlen TWordBUWordBT++U=T+U
23 22 3adant1 SWordBTWordBUWordBT++U=T+U
24 23 oveq2d SWordBTWordBUWordBS+T++U=S+T+U
25 ccatlen SWordBT++UWordBS++T++U=S+T++U
26 15 17 25 syl2anc SWordBTWordBUWordBS++T++U=S+T++U
27 lencl SWordBS0
28 27 3ad2ant1 SWordBTWordBUWordBS0
29 28 nn0cnd SWordBTWordBUWordBS
30 lencl TWordBT0
31 30 3ad2ant2 SWordBTWordBUWordBT0
32 31 nn0cnd SWordBTWordBUWordBT
33 lencl UWordBU0
34 33 3ad2ant3 SWordBTWordBUWordBU0
35 34 nn0cnd SWordBTWordBUWordBU
36 29 32 35 addassd SWordBTWordBUWordBS+T+U=S+T+U
37 24 26 36 3eqtr4d SWordBTWordBUWordBS++T++U=S+T+U
38 37 oveq2d SWordBTWordBUWordB0..^S++T++U=0..^S+T+U
39 38 fneq2d SWordBTWordBUWordBS++T++UFn0..^S++T++US++T++UFn0..^S+T+U
40 21 39 mpbid SWordBTWordBUWordBS++T++UFn0..^S+T+U
41 28 nn0zd SWordBTWordBUWordBS
42 fzospliti x0..^S+T+USx0..^SxS..^S+T+U
43 42 ex x0..^S+T+USx0..^SxS..^S+T+U
44 41 43 mpan9 SWordBTWordBUWordBx0..^S+T+Ux0..^SxS..^S+T+U
45 simp2 SWordBTWordBUWordBTWordB
46 id x0..^Sx0..^S
47 ccatval1 SWordBTWordBx0..^SS++Tx=Sx
48 15 45 46 47 syl2an3an SWordBTWordBUWordBx0..^SS++Tx=Sx
49 1 3adant3 SWordBTWordBUWordBS++TWordB
50 49 adantr SWordBTWordBUWordBx0..^SS++TWordB
51 simpl3 SWordBTWordBUWordBx0..^SUWordB
52 41 uzidd SWordBTWordBUWordBSS
53 uzaddcl SST0S+TS
54 52 31 53 syl2anc SWordBTWordBUWordBS+TS
55 fzoss2 S+TS0..^S0..^S+T
56 54 55 syl SWordBTWordBUWordB0..^S0..^S+T
57 9 oveq2d SWordBTWordBUWordB0..^S++T=0..^S+T
58 56 57 sseqtrrd SWordBTWordBUWordB0..^S0..^S++T
59 58 sselda SWordBTWordBUWordBx0..^Sx0..^S++T
60 ccatval1 S++TWordBUWordBx0..^S++TS++T++Ux=S++Tx
61 50 51 59 60 syl3anc SWordBTWordBUWordBx0..^SS++T++Ux=S++Tx
62 ccatval1 SWordBT++UWordBx0..^SS++T++Ux=Sx
63 15 17 46 62 syl2an3an SWordBTWordBUWordBx0..^SS++T++Ux=Sx
64 48 61 63 3eqtr4d SWordBTWordBUWordBx0..^SS++T++Ux=S++T++Ux
65 31 nn0zd SWordBTWordBUWordBT
66 41 65 zaddcld SWordBTWordBUWordBS+T
67 fzospliti xS..^S+T+US+TxS..^S+TxS+T..^S+T+U
68 67 ex xS..^S+T+US+TxS..^S+TxS+T..^S+T+U
69 66 68 mpan9 SWordBTWordBUWordBxS..^S+T+UxS..^S+TxS+T..^S+T+U
70 id xS..^S+TxS..^S+T
71 ccatval2 SWordBTWordBxS..^S+TS++Tx=TxS
72 15 45 70 71 syl2an3an SWordBTWordBUWordBxS..^S+TS++Tx=TxS
73 simpl2 SWordBTWordBUWordBxS..^S+TTWordB
74 simpl3 SWordBTWordBUWordBxS..^S+TUWordB
75 fzosubel3 xS..^S+TTxS0..^T
76 75 ex xS..^S+TTxS0..^T
77 65 76 mpan9 SWordBTWordBUWordBxS..^S+TxS0..^T
78 ccatval1 TWordBUWordBxS0..^TT++UxS=TxS
79 73 74 77 78 syl3anc SWordBTWordBUWordBxS..^S+TT++UxS=TxS
80 72 79 eqtr4d SWordBTWordBUWordBxS..^S+TS++Tx=T++UxS
81 49 adantr SWordBTWordBUWordBxS..^S+TS++TWordB
82 fzoss1 S0S..^S+T0..^S+T
83 nn0uz 0=0
84 82 83 eleq2s S0S..^S+T0..^S+T
85 28 84 syl SWordBTWordBUWordBS..^S+T0..^S+T
86 85 57 sseqtrrd SWordBTWordBUWordBS..^S+T0..^S++T
87 86 sselda SWordBTWordBUWordBxS..^S+Tx0..^S++T
88 81 74 87 60 syl3anc SWordBTWordBUWordBxS..^S+TS++T++Ux=S++Tx
89 simpl1 SWordBTWordBUWordBxS..^S+TSWordB
90 17 adantr SWordBTWordBUWordBxS..^S+TT++UWordB
91 66 uzidd SWordBTWordBUWordBS+TS+T
92 uzaddcl S+TS+TU0S+T+US+T
93 91 34 92 syl2anc SWordBTWordBUWordBS+T+US+T
94 fzoss2 S+T+US+TS..^S+TS..^S+T+U
95 93 94 syl SWordBTWordBUWordBS..^S+TS..^S+T+U
96 24 36 eqtr4d SWordBTWordBUWordBS+T++U=S+T+U
97 96 oveq2d SWordBTWordBUWordBS..^S+T++U=S..^S+T+U
98 95 97 sseqtrrd SWordBTWordBUWordBS..^S+TS..^S+T++U
99 98 sselda SWordBTWordBUWordBxS..^S+TxS..^S+T++U
100 ccatval2 SWordBT++UWordBxS..^S+T++US++T++Ux=T++UxS
101 89 90 99 100 syl3anc SWordBTWordBUWordBxS..^S+TS++T++Ux=T++UxS
102 80 88 101 3eqtr4d SWordBTWordBUWordBxS..^S+TS++T++Ux=S++T++Ux
103 9 oveq2d SWordBTWordBUWordBxS++T=xS+T
104 103 adantr SWordBTWordBUWordBxS+T..^S+T+UxS++T=xS+T
105 elfzoelz xS+T..^S+T+Ux
106 105 zcnd xS+T..^S+T+Ux
107 106 adantl SWordBTWordBUWordBxS+T..^S+T+Ux
108 29 adantr SWordBTWordBUWordBxS+T..^S+T+US
109 32 adantr SWordBTWordBUWordBxS+T..^S+T+UT
110 107 108 109 subsub4d SWordBTWordBUWordBxS+T..^S+T+Ux-S-T=xS+T
111 104 110 eqtr4d SWordBTWordBUWordBxS+T..^S+T+UxS++T=x-S-T
112 111 fveq2d SWordBTWordBUWordBxS+T..^S+T+UUxS++T=Ux-S-T
113 simpl2 SWordBTWordBUWordBxS+T..^S+T+UTWordB
114 simpl3 SWordBTWordBUWordBxS+T..^S+T+UUWordB
115 36 oveq2d SWordBTWordBUWordBS+T..^S+T+U=S+T..^S+T+U
116 115 eleq2d SWordBTWordBUWordBxS+T..^S+T+UxS+T..^S+T+U
117 116 biimpa SWordBTWordBUWordBxS+T..^S+T+UxS+T..^S+T+U
118 34 nn0zd SWordBTWordBUWordBU
119 65 118 zaddcld SWordBTWordBUWordBT+U
120 41 65 119 3jca SWordBTWordBUWordBSTT+U
121 120 adantr SWordBTWordBUWordBxS+T..^S+T+USTT+U
122 fzosubel2 xS+T..^S+T+USTT+UxST..^T+U
123 117 121 122 syl2anc SWordBTWordBUWordBxS+T..^S+T+UxST..^T+U
124 ccatval2 TWordBUWordBxST..^T+UT++UxS=Ux-S-T
125 113 114 123 124 syl3anc SWordBTWordBUWordBxS+T..^S+T+UT++UxS=Ux-S-T
126 112 125 eqtr4d SWordBTWordBUWordBxS+T..^S+T+UUxS++T=T++UxS
127 49 adantr SWordBTWordBUWordBxS+T..^S+T+US++TWordB
128 9 10 oveq12d SWordBTWordBUWordBS++T..^S++T+U=S+T..^S+T+U
129 128 eleq2d SWordBTWordBUWordBxS++T..^S++T+UxS+T..^S+T+U
130 129 biimpar SWordBTWordBUWordBxS+T..^S+T+UxS++T..^S++T+U
131 ccatval2 S++TWordBUWordBxS++T..^S++T+US++T++Ux=UxS++T
132 127 114 130 131 syl3anc SWordBTWordBUWordBxS+T..^S+T+US++T++Ux=UxS++T
133 simpl1 SWordBTWordBUWordBxS+T..^S+T+USWordB
134 17 adantr SWordBTWordBUWordBxS+T..^S+T+UT++UWordB
135 fzoss1 S+TSS+T..^S+T+US..^S+T+U
136 54 135 syl SWordBTWordBUWordBS+T..^S+T+US..^S+T+U
137 136 97 sseqtrrd SWordBTWordBUWordBS+T..^S+T+US..^S+T++U
138 137 sselda SWordBTWordBUWordBxS+T..^S+T+UxS..^S+T++U
139 133 134 138 100 syl3anc SWordBTWordBUWordBxS+T..^S+T+US++T++Ux=T++UxS
140 126 132 139 3eqtr4d SWordBTWordBUWordBxS+T..^S+T+US++T++Ux=S++T++Ux
141 102 140 jaodan SWordBTWordBUWordBxS..^S+TxS+T..^S+T+US++T++Ux=S++T++Ux
142 69 141 syldan SWordBTWordBUWordBxS..^S+T+US++T++Ux=S++T++Ux
143 64 142 jaodan SWordBTWordBUWordBx0..^SxS..^S+T+US++T++Ux=S++T++Ux
144 44 143 syldan SWordBTWordBUWordBx0..^S+T+US++T++Ux=S++T++Ux
145 14 40 144 eqfnfvd SWordBTWordBUWordBS++T++U=S++T++U