Metamath Proof Explorer


Theorem revccat

Description: Antiautomorphic property of the reversal operation. (Contributed by Stefan O'Rear, 27-Aug-2015)

Ref Expression
Assertion revccat SWordATWordAreverseS++T=reverseT++reverseS

Proof

Step Hyp Ref Expression
1 ccatcl SWordATWordAS++TWordA
2 revcl S++TWordAreverseS++TWordA
3 wrdfn reverseS++TWordAreverseS++TFn0..^reverseS++T
4 1 2 3 3syl SWordATWordAreverseS++TFn0..^reverseS++T
5 revlen S++TWordAreverseS++T=S++T
6 1 5 syl SWordATWordAreverseS++T=S++T
7 ccatlen SWordATWordAS++T=S+T
8 lencl SWordAS0
9 8 nn0cnd SWordAS
10 lencl TWordAT0
11 10 nn0cnd TWordAT
12 addcom STS+T=T+S
13 9 11 12 syl2an SWordATWordAS+T=T+S
14 6 7 13 3eqtrd SWordATWordAreverseS++T=T+S
15 14 oveq2d SWordATWordA0..^reverseS++T=0..^T+S
16 15 fneq2d SWordATWordAreverseS++TFn0..^reverseS++TreverseS++TFn0..^T+S
17 4 16 mpbid SWordATWordAreverseS++TFn0..^T+S
18 revcl TWordAreverseTWordA
19 revcl SWordAreverseSWordA
20 ccatcl reverseTWordAreverseSWordAreverseT++reverseSWordA
21 18 19 20 syl2anr SWordATWordAreverseT++reverseSWordA
22 wrdfn reverseT++reverseSWordAreverseT++reverseSFn0..^reverseT++reverseS
23 21 22 syl SWordATWordAreverseT++reverseSFn0..^reverseT++reverseS
24 ccatlen reverseTWordAreverseSWordAreverseT++reverseS=reverseT+reverseS
25 18 19 24 syl2anr SWordATWordAreverseT++reverseS=reverseT+reverseS
26 revlen TWordAreverseT=T
27 revlen SWordAreverseS=S
28 26 27 oveqan12rd SWordATWordAreverseT+reverseS=T+S
29 25 28 eqtrd SWordATWordAreverseT++reverseS=T+S
30 29 oveq2d SWordATWordA0..^reverseT++reverseS=0..^T+S
31 30 fneq2d SWordATWordAreverseT++reverseSFn0..^reverseT++reverseSreverseT++reverseSFn0..^T+S
32 23 31 mpbid SWordATWordAreverseT++reverseSFn0..^T+S
33 id x0..^T+Sx0..^T+S
34 10 nn0zd TWordAT
35 34 adantl SWordATWordAT
36 fzospliti x0..^T+STx0..^TxT..^T+S
37 33 35 36 syl2anr SWordATWordAx0..^T+Sx0..^TxT..^T+S
38 simpll SWordATWordAx0..^TSWordA
39 simplr SWordATWordAx0..^TTWordA
40 fzoval T0..^T=0T1
41 34 40 syl TWordA0..^T=0T1
42 41 adantl SWordATWordA0..^T=0T1
43 42 eleq2d SWordATWordAx0..^Tx0T1
44 43 biimpa SWordATWordAx0..^Tx0T1
45 fznn0sub2 x0T1T-1-x0T1
46 44 45 syl SWordATWordAx0..^TT-1-x0T1
47 41 ad2antlr SWordATWordAx0..^T0..^T=0T1
48 46 47 eleqtrrd SWordATWordAx0..^TT-1-x0..^T
49 ccatval3 SWordATWordAT-1-x0..^TS++TT1-x+S=TT-1-x
50 38 39 48 49 syl3anc SWordATWordAx0..^TS++TT1-x+S=TT-1-x
51 7 13 eqtrd SWordATWordAS++T=T+S
52 51 oveq1d SWordATWordAS++T1=T+S-1
53 11 adantl SWordATWordAT
54 9 adantr SWordATWordAS
55 1cnd SWordATWordA1
56 53 54 55 addsubd SWordATWordAT+S-1=T-1+S
57 52 56 eqtrd SWordATWordAS++T1=T-1+S
58 57 oveq1d SWordATWordAS++T-1-x=T1+S-x
59 58 adantr SWordATWordAx0..^TS++T-1-x=T1+S-x
60 peano2zm TT1
61 34 60 syl TWordAT1
62 61 zcnd TWordAT1
63 62 ad2antlr SWordATWordAx0..^TT1
64 9 ad2antrr SWordATWordAx0..^TS
65 elfzoelz x0..^Tx
66 65 zcnd x0..^Tx
67 66 adantl SWordATWordAx0..^Tx
68 63 64 67 addsubd SWordATWordAx0..^TT1+S-x=T1-x+S
69 59 68 eqtrd SWordATWordAx0..^TS++T-1-x=T1-x+S
70 69 fveq2d SWordATWordAx0..^TS++TS++T-1-x=S++TT1-x+S
71 revfv TWordAx0..^TreverseTx=TT-1-x
72 71 adantll SWordATWordAx0..^TreverseTx=TT-1-x
73 50 70 72 3eqtr4d SWordATWordAx0..^TS++TS++T-1-x=reverseTx
74 34 uzidd TWordATT
75 uzaddcl TTS0T+ST
76 74 8 75 syl2anr SWordATWordAT+ST
77 51 76 eqeltrd SWordATWordAS++TT
78 fzoss2 S++TT0..^T0..^S++T
79 77 78 syl SWordATWordA0..^T0..^S++T
80 79 sselda SWordATWordAx0..^Tx0..^S++T
81 revfv S++TWordAx0..^S++TreverseS++Tx=S++TS++T-1-x
82 1 80 81 syl2an2r SWordATWordAx0..^TreverseS++Tx=S++TS++T-1-x
83 18 ad2antlr SWordATWordAx0..^TreverseTWordA
84 19 ad2antrr SWordATWordAx0..^TreverseSWordA
85 26 adantl SWordATWordAreverseT=T
86 85 oveq2d SWordATWordA0..^reverseT=0..^T
87 86 eleq2d SWordATWordAx0..^reverseTx0..^T
88 87 biimpar SWordATWordAx0..^Tx0..^reverseT
89 ccatval1 reverseTWordAreverseSWordAx0..^reverseTreverseT++reverseSx=reverseTx
90 83 84 88 89 syl3anc SWordATWordAx0..^TreverseT++reverseSx=reverseTx
91 73 82 90 3eqtr4d SWordATWordAx0..^TreverseS++Tx=reverseT++reverseSx
92 8 nn0zd SWordAS
93 peano2zm SS1
94 92 93 syl SWordAS1
95 94 zcnd SWordAS1
96 95 ad2antrr SWordATWordAxT..^T+SS1
97 elfzoelz xT..^T+Sx
98 97 zcnd xT..^T+Sx
99 98 adantl SWordATWordAxT..^T+Sx
100 11 ad2antlr SWordATWordAxT..^T+ST
101 96 99 100 subsub3d SWordATWordAxT..^T+SS-1-xT=S1+T-x
102 26 oveq2d TWordAxreverseT=xT
103 102 oveq2d TWordAS-1-xreverseT=S-1-xT
104 103 ad2antlr SWordATWordAxT..^T+SS-1-xreverseT=S-1-xT
105 7 oveq1d SWordATWordAS++T1=S+T-1
106 54 53 55 addsubd SWordATWordAS+T-1=S-1+T
107 105 106 eqtrd SWordATWordAS++T1=S-1+T
108 107 oveq1d SWordATWordAS++T-1-x=S1+T-x
109 108 adantr SWordATWordAxT..^T+SS++T-1-x=S1+T-x
110 101 104 109 3eqtr4rd SWordATWordAxT..^T+SS++T-1-x=S-1-xreverseT
111 110 fveq2d SWordATWordAxT..^T+SSS++T-1-x=SS-1-xreverseT
112 simpll SWordATWordAxT..^T+SSWordA
113 simplr SWordATWordAxT..^T+STWordA
114 zaddcl TST+S
115 34 92 114 syl2anr SWordATWordAT+S
116 peano2zm T+ST+S-1
117 115 116 syl SWordATWordAT+S-1
118 fzoval T+ST..^T+S=TT+S-1
119 115 118 syl SWordATWordAT..^T+S=TT+S-1
120 119 eleq2d SWordATWordAxT..^T+SxTT+S-1
121 120 biimpa SWordATWordAxT..^T+SxTT+S-1
122 fzrev2i T+S-1xTT+S-1T+S-1-xT+S-1-T+S-1T+S-1-T
123 117 121 122 syl2an2r SWordATWordAxT..^T+ST+S-1-xT+S-1-T+S-1T+S-1-T
124 52 oveq1d SWordATWordAS++T-1-x=T+S-1-x
125 124 adantr SWordATWordAxT..^T+SS++T-1-x=T+S-1-x
126 92 adantr SWordATWordAS
127 fzoval S0..^S=0S1
128 126 127 syl SWordATWordA0..^S=0S1
129 117 zcnd SWordATWordAT+S-1
130 129 subidd SWordATWordAT+S-1-T+S-1=0
131 addcl TST+S
132 11 9 131 syl2anr SWordATWordAT+S
133 132 55 53 sub32d SWordATWordAT+S-1-T=T+S-T-1
134 pncan2 TST+S-T=S
135 11 9 134 syl2anr SWordATWordAT+S-T=S
136 135 oveq1d SWordATWordAT+S-T-1=S1
137 133 136 eqtrd SWordATWordAT+S-1-T=S1
138 130 137 oveq12d SWordATWordAT+S-1-T+S-1T+S-1-T=0S1
139 128 138 eqtr4d SWordATWordA0..^S=T+S-1-T+S-1T+S-1-T
140 139 adantr SWordATWordAxT..^T+S0..^S=T+S-1-T+S-1T+S-1-T
141 123 125 140 3eltr4d SWordATWordAxT..^T+SS++T-1-x0..^S
142 ccatval1 SWordATWordAS++T-1-x0..^SS++TS++T-1-x=SS++T-1-x
143 112 113 141 142 syl3anc SWordATWordAxT..^T+SS++TS++T-1-x=SS++T-1-x
144 simpl SWordATWordASWordA
145 102 ad2antlr SWordATWordAxT..^T+SxreverseT=xT
146 id xT..^T+SxT..^T+S
147 fzosubel3 xT..^T+SSxT0..^S
148 146 126 147 syl2anr SWordATWordAxT..^T+SxT0..^S
149 145 148 eqeltrd SWordATWordAxT..^T+SxreverseT0..^S
150 revfv SWordAxreverseT0..^SreverseSxreverseT=SS-1-xreverseT
151 144 149 150 syl2an2r SWordATWordAxT..^T+SreverseSxreverseT=SS-1-xreverseT
152 111 143 151 3eqtr4d SWordATWordAxT..^T+SS++TS++T-1-x=reverseSxreverseT
153 fzoss1 T0T..^T+S0..^T+S
154 nn0uz 0=0
155 153 154 eleq2s T0T..^T+S0..^T+S
156 10 155 syl TWordAT..^T+S0..^T+S
157 156 adantl SWordATWordAT..^T+S0..^T+S
158 51 oveq2d SWordATWordA0..^S++T=0..^T+S
159 157 158 sseqtrrd SWordATWordAT..^T+S0..^S++T
160 159 sselda SWordATWordAxT..^T+Sx0..^S++T
161 1 160 81 syl2an2r SWordATWordAxT..^T+SreverseS++Tx=S++TS++T-1-x
162 18 ad2antlr SWordATWordAxT..^T+SreverseTWordA
163 19 ad2antrr SWordATWordAxT..^T+SreverseSWordA
164 85 28 oveq12d SWordATWordAreverseT..^reverseT+reverseS=T..^T+S
165 164 eleq2d SWordATWordAxreverseT..^reverseT+reverseSxT..^T+S
166 165 biimpar SWordATWordAxT..^T+SxreverseT..^reverseT+reverseS
167 ccatval2 reverseTWordAreverseSWordAxreverseT..^reverseT+reverseSreverseT++reverseSx=reverseSxreverseT
168 162 163 166 167 syl3anc SWordATWordAxT..^T+SreverseT++reverseSx=reverseSxreverseT
169 152 161 168 3eqtr4d SWordATWordAxT..^T+SreverseS++Tx=reverseT++reverseSx
170 91 169 jaodan SWordATWordAx0..^TxT..^T+SreverseS++Tx=reverseT++reverseSx
171 37 170 syldan SWordATWordAx0..^T+SreverseS++Tx=reverseT++reverseSx
172 17 32 171 eqfnfvd SWordATWordAreverseS++T=reverseT++reverseS