Metamath Proof Explorer


Theorem ccatswrd

Description: Joining two adjacent subwords makes a longer subword. (Contributed by Stefan O'Rear, 20-Aug-2015)

Ref Expression
Assertion ccatswrd SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZ=SsubstrXZ

Proof

Step Hyp Ref Expression
1 swrdcl SWordASsubstrXYWordA
2 1 adantr SWordAX0YY0ZZ0SSsubstrXYWordA
3 swrdcl SWordASsubstrYZWordA
4 3 adantr SWordAX0YY0ZZ0SSsubstrYZWordA
5 ccatcl SsubstrXYWordASsubstrYZWordASsubstrXY++SsubstrYZWordA
6 2 4 5 syl2anc SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZWordA
7 wrdfn SsubstrXY++SsubstrYZWordASsubstrXY++SsubstrYZFn0..^SsubstrXY++SsubstrYZ
8 6 7 syl SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZFn0..^SsubstrXY++SsubstrYZ
9 ccatlen SsubstrXYWordASsubstrYZWordASsubstrXY++SsubstrYZ=SsubstrXY+SsubstrYZ
10 2 4 9 syl2anc SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZ=SsubstrXY+SsubstrYZ
11 simpl SWordAX0YY0ZZ0SSWordA
12 simpr1 SWordAX0YY0ZZ0SX0Y
13 simpr2 SWordAX0YY0ZZ0SY0Z
14 simpr3 SWordAX0YY0ZZ0SZ0S
15 fzass4 Y0SZYSY0ZZ0S
16 15 biimpri Y0ZZ0SY0SZYS
17 16 simpld Y0ZZ0SY0S
18 13 14 17 syl2anc SWordAX0YY0ZZ0SY0S
19 swrdlen SWordAX0YY0SSsubstrXY=YX
20 11 12 18 19 syl3anc SWordAX0YY0ZZ0SSsubstrXY=YX
21 swrdlen SWordAY0ZZ0SSsubstrYZ=ZY
22 21 3adant3r1 SWordAX0YY0ZZ0SSsubstrYZ=ZY
23 20 22 oveq12d SWordAX0YY0ZZ0SSsubstrXY+SsubstrYZ=YX+Z-Y
24 13 elfzelzd SWordAX0YY0ZZ0SY
25 24 zcnd SWordAX0YY0ZZ0SY
26 12 elfzelzd SWordAX0YY0ZZ0SX
27 26 zcnd SWordAX0YY0ZZ0SX
28 14 elfzelzd SWordAX0YY0ZZ0SZ
29 28 zcnd SWordAX0YY0ZZ0SZ
30 25 27 29 npncan3d SWordAX0YY0ZZ0SYX+Z-Y=ZX
31 10 23 30 3eqtrd SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZ=ZX
32 31 oveq2d SWordAX0YY0ZZ0S0..^SsubstrXY++SsubstrYZ=0..^ZX
33 32 fneq2d SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZFn0..^SsubstrXY++SsubstrYZSsubstrXY++SsubstrYZFn0..^ZX
34 8 33 mpbid SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZFn0..^ZX
35 swrdcl SWordASsubstrXZWordA
36 35 adantr SWordAX0YY0ZZ0SSsubstrXZWordA
37 wrdfn SsubstrXZWordASsubstrXZFn0..^SsubstrXZ
38 36 37 syl SWordAX0YY0ZZ0SSsubstrXZFn0..^SsubstrXZ
39 fzass4 X0ZYXZX0YY0Z
40 39 biimpri X0YY0ZX0ZYXZ
41 40 simpld X0YY0ZX0Z
42 12 13 41 syl2anc SWordAX0YY0ZZ0SX0Z
43 swrdlen SWordAX0ZZ0SSsubstrXZ=ZX
44 11 42 14 43 syl3anc SWordAX0YY0ZZ0SSsubstrXZ=ZX
45 44 oveq2d SWordAX0YY0ZZ0S0..^SsubstrXZ=0..^ZX
46 45 fneq2d SWordAX0YY0ZZ0SSsubstrXZFn0..^SsubstrXZSsubstrXZFn0..^ZX
47 38 46 mpbid SWordAX0YY0ZZ0SSsubstrXZFn0..^ZX
48 24 26 zsubcld SWordAX0YY0ZZ0SYX
49 48 anim1ci SWordAX0YY0ZZ0Sx0..^ZXx0..^ZXYX
50 fzospliti x0..^ZXYXx0..^YXxYX..^ZX
51 49 50 syl SWordAX0YY0ZZ0Sx0..^ZXx0..^YXxYX..^ZX
52 1 ad2antrr SWordAX0YY0ZZ0Sx0..^YXSsubstrXYWordA
53 3 ad2antrr SWordAX0YY0ZZ0Sx0..^YXSsubstrYZWordA
54 20 oveq2d SWordAX0YY0ZZ0S0..^SsubstrXY=0..^YX
55 54 eleq2d SWordAX0YY0ZZ0Sx0..^SsubstrXYx0..^YX
56 55 biimpar SWordAX0YY0ZZ0Sx0..^YXx0..^SsubstrXY
57 ccatval1 SsubstrXYWordASsubstrYZWordAx0..^SsubstrXYSsubstrXY++SsubstrYZx=SsubstrXYx
58 52 53 56 57 syl3anc SWordAX0YY0ZZ0Sx0..^YXSsubstrXY++SsubstrYZx=SsubstrXYx
59 simpll SWordAX0YY0ZZ0Sx0..^YXSWordA
60 simplr1 SWordAX0YY0ZZ0Sx0..^YXX0Y
61 18 adantr SWordAX0YY0ZZ0Sx0..^YXY0S
62 simpr SWordAX0YY0ZZ0Sx0..^YXx0..^YX
63 swrdfv SWordAX0YY0Sx0..^YXSsubstrXYx=Sx+X
64 59 60 61 62 63 syl31anc SWordAX0YY0ZZ0Sx0..^YXSsubstrXYx=Sx+X
65 58 64 eqtrd SWordAX0YY0ZZ0Sx0..^YXSsubstrXY++SsubstrYZx=Sx+X
66 1 ad2antrr SWordAX0YY0ZZ0SxYX..^ZXSsubstrXYWordA
67 3 ad2antrr SWordAX0YY0ZZ0SxYX..^ZXSsubstrYZWordA
68 23 30 eqtrd SWordAX0YY0ZZ0SSsubstrXY+SsubstrYZ=ZX
69 20 68 oveq12d SWordAX0YY0ZZ0SSsubstrXY..^SsubstrXY+SsubstrYZ=YX..^ZX
70 69 eleq2d SWordAX0YY0ZZ0SxSsubstrXY..^SsubstrXY+SsubstrYZxYX..^ZX
71 70 biimpar SWordAX0YY0ZZ0SxYX..^ZXxSsubstrXY..^SsubstrXY+SsubstrYZ
72 ccatval2 SsubstrXYWordASsubstrYZWordAxSsubstrXY..^SsubstrXY+SsubstrYZSsubstrXY++SsubstrYZx=SsubstrYZxSsubstrXY
73 66 67 71 72 syl3anc SWordAX0YY0ZZ0SxYX..^ZXSsubstrXY++SsubstrYZx=SsubstrYZxSsubstrXY
74 simpll SWordAX0YY0ZZ0SxYX..^ZXSWordA
75 simplr2 SWordAX0YY0ZZ0SxYX..^ZXY0Z
76 simplr3 SWordAX0YY0ZZ0SxYX..^ZXZ0S
77 20 oveq2d SWordAX0YY0ZZ0SxSsubstrXY=xYX
78 77 adantr SWordAX0YY0ZZ0SxYX..^ZXxSsubstrXY=xYX
79 30 oveq2d SWordAX0YY0ZZ0SYX..^YX+Z-Y=YX..^ZX
80 79 eleq2d SWordAX0YY0ZZ0SxYX..^YX+Z-YxYX..^ZX
81 80 biimpar SWordAX0YY0ZZ0SxYX..^ZXxYX..^YX+Z-Y
82 28 24 zsubcld SWordAX0YY0ZZ0SZY
83 82 adantr SWordAX0YY0ZZ0SxYX..^ZXZY
84 fzosubel3 xYX..^YX+Z-YZYxYX0..^ZY
85 81 83 84 syl2anc SWordAX0YY0ZZ0SxYX..^ZXxYX0..^ZY
86 78 85 eqeltrd SWordAX0YY0ZZ0SxYX..^ZXxSsubstrXY0..^ZY
87 swrdfv SWordAY0ZZ0SxSsubstrXY0..^ZYSsubstrYZxSsubstrXY=Sx-SsubstrXY+Y
88 74 75 76 86 87 syl31anc SWordAX0YY0ZZ0SxYX..^ZXSsubstrYZxSsubstrXY=Sx-SsubstrXY+Y
89 77 oveq1d SWordAX0YY0ZZ0Sx-SsubstrXY+Y=x-YX+Y
90 89 adantr SWordAX0YY0ZZ0SxYX..^ZXx-SsubstrXY+Y=x-YX+Y
91 elfzoelz xYX..^ZXx
92 91 zcnd xYX..^ZXx
93 92 adantl SWordAX0YY0ZZ0SxYX..^ZXx
94 25 27 subcld SWordAX0YY0ZZ0SYX
95 94 adantr SWordAX0YY0ZZ0SxYX..^ZXYX
96 25 adantr SWordAX0YY0ZZ0SxYX..^ZXY
97 93 95 96 subadd23d SWordAX0YY0ZZ0SxYX..^ZXx-YX+Y=x+Y-YX
98 25 27 nncand SWordAX0YY0ZZ0SYYX=X
99 98 oveq2d SWordAX0YY0ZZ0Sx+Y-YX=x+X
100 99 adantr SWordAX0YY0ZZ0SxYX..^ZXx+Y-YX=x+X
101 90 97 100 3eqtrd SWordAX0YY0ZZ0SxYX..^ZXx-SsubstrXY+Y=x+X
102 101 fveq2d SWordAX0YY0ZZ0SxYX..^ZXSx-SsubstrXY+Y=Sx+X
103 73 88 102 3eqtrd SWordAX0YY0ZZ0SxYX..^ZXSsubstrXY++SsubstrYZx=Sx+X
104 65 103 jaodan SWordAX0YY0ZZ0Sx0..^YXxYX..^ZXSsubstrXY++SsubstrYZx=Sx+X
105 51 104 syldan SWordAX0YY0ZZ0Sx0..^ZXSsubstrXY++SsubstrYZx=Sx+X
106 simpll SWordAX0YY0ZZ0Sx0..^ZXSWordA
107 42 adantr SWordAX0YY0ZZ0Sx0..^ZXX0Z
108 simplr3 SWordAX0YY0ZZ0Sx0..^ZXZ0S
109 simpr SWordAX0YY0ZZ0Sx0..^ZXx0..^ZX
110 swrdfv SWordAX0ZZ0Sx0..^ZXSsubstrXZx=Sx+X
111 106 107 108 109 110 syl31anc SWordAX0YY0ZZ0Sx0..^ZXSsubstrXZx=Sx+X
112 105 111 eqtr4d SWordAX0YY0ZZ0Sx0..^ZXSsubstrXY++SsubstrYZx=SsubstrXZx
113 34 47 112 eqfnfvd SWordAX0YY0ZZ0SSsubstrXY++SsubstrYZ=SsubstrXZ