Metamath Proof Explorer


Theorem swrdswrd

Description: A subword of a subword is a subword. (Contributed by Alexander van der Vekens, 4-Apr-2018)

Ref Expression
Assertion swrdswrd WWordVN0WM0NK0NMLKNMWsubstrMNsubstrKL=WsubstrM+KM+L

Proof

Step Hyp Ref Expression
1 swrdcl WWordVWsubstrMNWordV
2 1 3ad2ant1 WWordVN0WM0NWsubstrMNWordV
3 2 adantr WWordVN0WM0NK0NMLKNMWsubstrMNWordV
4 elfz0ubfz0 K0NMLKNMK0L
5 4 adantl WWordVN0WM0NK0NMLKNMK0L
6 elfzuz K0NMK0
7 6 adantl WWordVN0WM0NK0NMK0
8 fzss1 K0KNM0NM
9 7 8 syl WWordVN0WM0NK0NMKNM0NM
10 9 sseld WWordVN0WM0NK0NMLKNML0NM
11 10 impr WWordVN0WM0NK0NMLKNML0NM
12 3ancomb WWordVN0WM0NWWordVM0NN0W
13 12 biimpi WWordVN0WM0NWWordVM0NN0W
14 13 adantr WWordVN0WM0NK0NMLKNMWWordVM0NN0W
15 swrdlen WWordVM0NN0WWsubstrMN=NM
16 14 15 syl WWordVN0WM0NK0NMLKNMWsubstrMN=NM
17 16 oveq2d WWordVN0WM0NK0NMLKNM0WsubstrMN=0NM
18 11 17 eleqtrrd WWordVN0WM0NK0NMLKNML0WsubstrMN
19 swrdval2 WsubstrMNWordVK0LL0WsubstrMNWsubstrMNsubstrKL=x0..^LKWsubstrMNx+K
20 3 5 18 19 syl3anc WWordVN0WM0NK0NMLKNMWsubstrMNsubstrKL=x0..^LKWsubstrMNx+K
21 fvex WsubstrMNx+KV
22 eqid x0..^LKWsubstrMNx+K=x0..^LKWsubstrMNx+K
23 21 22 fnmpti x0..^LKWsubstrMNx+KFn0..^LK
24 23 a1i WWordVN0WM0NK0NMLKNMx0..^LKWsubstrMNx+KFn0..^LK
25 swrdswrdlem WWordVN0WM0NK0NMLKNMWWordVM+K0M+LM+L0W
26 swrdvalfn WWordVM+K0M+LM+L0WWsubstrM+KM+LFn0..^M+L-M+K
27 25 26 syl WWordVN0WM0NK0NMLKNMWsubstrM+KM+LFn0..^M+L-M+K
28 elfzelz M0NM
29 elfzelz LKNML
30 elfzelz K0NMK
31 zcn MM
32 31 adantr MLKM
33 zcn LL
34 33 ad2antrl MLKL
35 zcn KK
36 35 ad2antll MLKK
37 pnpcan MLKM+L-M+K=LK
38 37 eqcomd MLKLK=M+L-M+K
39 32 34 36 38 syl3anc MLKLK=M+L-M+K
40 39 expcom LKMLK=M+L-M+K
41 29 30 40 syl2anr K0NMLKNMMLK=M+L-M+K
42 28 41 syl5com M0NK0NMLKNMLK=M+L-M+K
43 42 3ad2ant3 WWordVN0WM0NK0NMLKNMLK=M+L-M+K
44 43 imp WWordVN0WM0NK0NMLKNMLK=M+L-M+K
45 44 oveq2d WWordVN0WM0NK0NMLKNM0..^LK=0..^M+L-M+K
46 45 fneq2d WWordVN0WM0NK0NMLKNMWsubstrM+KM+LFn0..^LKWsubstrM+KM+LFn0..^M+L-M+K
47 27 46 mpbird WWordVN0WM0NK0NMLKNMWsubstrM+KM+LFn0..^LK
48 simpr WWordVN0WM0NK0NMLKNMy0..^LKy0..^LK
49 fvex Wy+K+MV
50 oveq1 x=yx+K=y+K
51 50 fvoveq1d x=yWx+K+M=Wy+K+M
52 eqid x0..^LKWx+K+M=x0..^LKWx+K+M
53 51 52 fvmptg y0..^LKWy+K+MVx0..^LKWx+K+My=Wy+K+M
54 48 49 53 sylancl WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKWx+K+My=Wy+K+M
55 zcn yy
56 55 31 35 3anim123i yMKyMK
57 56 3expa yMKyMK
58 add32r yMKy+M+K=y+K+M
59 58 eqcomd yMKy+K+M=y+M+K
60 57 59 syl yMKy+K+M=y+M+K
61 60 exp31 yMKy+K+M=y+M+K
62 61 com13 KMyy+K+M=y+M+K
63 30 62 syl K0NMMyy+K+M=y+M+K
64 63 adantr K0NMLKNMMyy+K+M=y+M+K
65 28 64 syl5com M0NK0NMLKNMyy+K+M=y+M+K
66 65 3ad2ant3 WWordVN0WM0NK0NMLKNMyy+K+M=y+M+K
67 66 imp WWordVN0WM0NK0NMLKNMyy+K+M=y+M+K
68 elfzoelz y0..^LKy
69 67 68 impel WWordVN0WM0NK0NMLKNMy0..^LKy+K+M=y+M+K
70 69 fveq2d WWordVN0WM0NK0NMLKNMy0..^LKWy+K+M=Wy+M+K
71 54 70 eqtrd WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKWx+K+My=Wy+M+K
72 13 ad3antrrr WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKWWordVM0NN0W
73 elfz2nn0 K0NMK0NM0KNM
74 elfz2 LKNMKNMLKLLNM
75 elfzo0 x0..^LKx0LKx<LK
76 nn0re x0x
77 76 ad2antrl K0x0Lx
78 nn0re K0K
79 78 adantr K0x0LK
80 zre LL
81 80 ad2antll K0x0LL
82 ltaddsub xKLx+K<Lx<LK
83 82 bicomd xKLx<LKx+K<L
84 77 79 81 83 syl3anc K0x0Lx<LKx+K<L
85 nn0addcl x0K0x+K0
86 85 ex x0K0x+K0
87 86 adantr x0LK0x+K0
88 87 impcom K0x0Lx+K0
89 88 ad3antrrr K0x0Lx+K<LNM0LNMx+K0
90 elnn0z x+K0x+K0x+K
91 0red x+KL0
92 zre x+Kx+K
93 92 adantr x+KLx+K
94 80 adantl x+KLL
95 lelttr 0x+KL0x+Kx+K<L0<L
96 91 93 94 95 syl3anc x+KL0x+Kx+K<L0<L
97 0red LNM00
98 80 adantr LNM0L
99 nn0re NM0NM
100 99 adantl LNM0NM
101 ltletr 0LNM0<LLNM0<NM
102 97 98 100 101 syl3anc LNM00<LLNM0<NM
103 elnnnn0b NMNM00<NM
104 103 simplbi2 NM00<NMNM
105 104 adantl LNM00<NMNM
106 102 105 syld LNM00<LLNMNM
107 106 exp4b LNM00<LLNMNM
108 107 com23 L0<LNM0LNMNM
109 108 adantl x+KL0<LNM0LNMNM
110 96 109 syld x+KL0x+Kx+K<LNM0LNMNM
111 110 expd x+KL0x+Kx+K<LNM0LNMNM
112 111 a1d x+KLx0K00x+Kx+K<LNM0LNMNM
113 112 ex x+KLx0K00x+Kx+K<LNM0LNMNM
114 113 com24 x+K0x+Kx0K0Lx+K<LNM0LNMNM
115 114 imp x+K0x+Kx0K0Lx+K<LNM0LNMNM
116 90 115 sylbi x+K0x0K0Lx+K<LNM0LNMNM
117 85 116 mpcom x0K0Lx+K<LNM0LNMNM
118 117 impancom x0LK0x+K<LNM0LNMNM
119 118 impcom K0x0Lx+K<LNM0LNMNM
120 119 imp41 K0x0Lx+K<LNM0LNMNM
121 nn0readdcl x0K0x+K
122 121 ex x0K0x+K
123 122 adantr x0LK0x+K
124 123 impcom K0x0Lx+K
125 ltletr x+KLNMx+K<LLNMx+K<NM
126 124 81 99 125 syl2an3an K0x0LNM0x+K<LLNMx+K<NM
127 126 exp4b K0x0LNM0x+K<LLNMx+K<NM
128 127 com23 K0x0Lx+K<LNM0LNMx+K<NM
129 128 imp41 K0x0Lx+K<LNM0LNMx+K<NM
130 elfzo0 x+K0..^NMx+K0NMx+K<NM
131 89 120 129 130 syl3anbrc K0x0Lx+K<LNM0LNMx+K0..^NM
132 131 exp41 K0x0Lx+K<LNM0LNMx+K0..^NM
133 84 132 sylbid K0x0Lx<LKNM0LNMx+K0..^NM
134 133 ex K0x0Lx<LKNM0LNMx+K0..^NM
135 134 com24 K0NM0x<LKx0LLNMx+K0..^NM
136 135 imp K0NM0x<LKx0LLNMx+K0..^NM
137 136 com13 x0Lx<LKK0NM0LNMx+K0..^NM
138 137 impancom x0x<LKLK0NM0LNMx+K0..^NM
139 138 3adant2 x0LKx<LKLK0NM0LNMx+K0..^NM
140 75 139 sylbi x0..^LKLK0NM0LNMx+K0..^NM
141 140 com14 LNMLK0NM0x0..^LKx+K0..^NM
142 141 adantl KLLNMLK0NM0x0..^LKx+K0..^NM
143 142 com12 LKLLNMK0NM0x0..^LKx+K0..^NM
144 143 3ad2ant3 KNMLKLLNMK0NM0x0..^LKx+K0..^NM
145 144 imp KNMLKLLNMK0NM0x0..^LKx+K0..^NM
146 74 145 sylbi LKNMK0NM0x0..^LKx+K0..^NM
147 146 com12 K0NM0LKNMx0..^LKx+K0..^NM
148 147 3adant3 K0NM0KNMLKNMx0..^LKx+K0..^NM
149 73 148 sylbi K0NMLKNMx0..^LKx+K0..^NM
150 149 imp K0NMLKNMx0..^LKx+K0..^NM
151 150 adantl WWordVN0WM0NK0NMLKNMx0..^LKx+K0..^NM
152 151 adantr WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKx+K0..^NM
153 152 imp WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKx+K0..^NM
154 swrdfv WWordVM0NN0Wx+K0..^NMWsubstrMNx+K=Wx+K+M
155 72 153 154 syl2anc WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKWsubstrMNx+K=Wx+K+M
156 155 mpteq2dva WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKWsubstrMNx+K=x0..^LKWx+K+M
157 156 fveq1d WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKWsubstrMNx+Ky=x0..^LKWx+K+My
158 25 adantr WWordVN0WM0NK0NMLKNMy0..^LKWWordVM+K0M+LM+L0W
159 31 33 35 3anim123i MLKMLK
160 159 3expa MLKMLK
161 160 38 syl MLKLK=M+L-M+K
162 161 exp31 MLKLK=M+L-M+K
163 162 com3l LKMLK=M+L-M+K
164 29 163 syl LKNMKMLK=M+L-M+K
165 30 164 mpan9 K0NMLKNMMLK=M+L-M+K
166 28 165 syl5com M0NK0NMLKNMLK=M+L-M+K
167 166 3ad2ant3 WWordVN0WM0NK0NMLKNMLK=M+L-M+K
168 167 imp WWordVN0WM0NK0NMLKNMLK=M+L-M+K
169 168 oveq2d WWordVN0WM0NK0NMLKNM0..^LK=0..^M+L-M+K
170 169 eleq2d WWordVN0WM0NK0NMLKNMy0..^LKy0..^M+L-M+K
171 170 biimpa WWordVN0WM0NK0NMLKNMy0..^LKy0..^M+L-M+K
172 swrdfv WWordVM+K0M+LM+L0Wy0..^M+L-M+KWsubstrM+KM+Ly=Wy+M+K
173 158 171 172 syl2anc WWordVN0WM0NK0NMLKNMy0..^LKWsubstrM+KM+Ly=Wy+M+K
174 71 157 173 3eqtr4d WWordVN0WM0NK0NMLKNMy0..^LKx0..^LKWsubstrMNx+Ky=WsubstrM+KM+Ly
175 24 47 174 eqfnfvd WWordVN0WM0NK0NMLKNMx0..^LKWsubstrMNx+K=WsubstrM+KM+L
176 20 175 eqtrd WWordVN0WM0NK0NMLKNMWsubstrMNsubstrKL=WsubstrM+KM+L
177 176 ex WWordVN0WM0NK0NMLKNMWsubstrMNsubstrKL=WsubstrM+KM+L