Metamath Proof Explorer


Theorem swrdrn3

Description: Express the range of a subword. Stronger version of swrdrn2 . (Contributed by Thierry Arnoux, 13-Dec-2023)

Ref Expression
Assertion swrdrn3 W Word V M 0 N N 0 W ran W substr M N = W M ..^ N

Proof

Step Hyp Ref Expression
1 simpr W Word V M 0 N N 0 W i 0 ..^ N M i 0 ..^ N M
2 simpl3 W Word V M 0 N N 0 W i 0 ..^ N M N 0 W
3 2 elfzelzd W Word V M 0 N N 0 W i 0 ..^ N M N
4 simpl2 W Word V M 0 N N 0 W i 0 ..^ N M M 0 N
5 4 elfzelzd W Word V M 0 N N 0 W i 0 ..^ N M M
6 fzoaddel2 i 0 ..^ N M N M i + M M ..^ N
7 1 3 5 6 syl3anc W Word V M 0 N N 0 W i 0 ..^ N M i + M M ..^ N
8 simpr W Word V M 0 N N 0 W j M ..^ N j M ..^ N
9 simpl2 W Word V M 0 N N 0 W j M ..^ N M 0 N
10 9 elfzelzd W Word V M 0 N N 0 W j M ..^ N M
11 10 zcnd W Word V M 0 N N 0 W j M ..^ N M
12 simpl3 W Word V M 0 N N 0 W j M ..^ N N 0 W
13 12 elfzelzd W Word V M 0 N N 0 W j M ..^ N N
14 13 zcnd W Word V M 0 N N 0 W j M ..^ N N
15 11 14 pncan3d W Word V M 0 N N 0 W j M ..^ N M + N - M = N
16 15 oveq2d W Word V M 0 N N 0 W j M ..^ N M ..^ M + N - M = M ..^ N
17 8 16 eleqtrrd W Word V M 0 N N 0 W j M ..^ N j M ..^ M + N - M
18 13 10 zsubcld W Word V M 0 N N 0 W j M ..^ N N M
19 fzosubel3 j M ..^ M + N - M N M j M 0 ..^ N M
20 17 18 19 syl2anc W Word V M 0 N N 0 W j M ..^ N j M 0 ..^ N M
21 simpr W Word V M 0 N N 0 W j M ..^ N i = j M i = j M
22 21 oveq1d W Word V M 0 N N 0 W j M ..^ N i = j M i + M = j - M + M
23 22 eqeq2d W Word V M 0 N N 0 W j M ..^ N i = j M j = i + M j = j - M + M
24 fzossz M ..^ N
25 24 8 sselid W Word V M 0 N N 0 W j M ..^ N j
26 25 zcnd W Word V M 0 N N 0 W j M ..^ N j
27 26 11 npcand W Word V M 0 N N 0 W j M ..^ N j - M + M = j
28 27 eqcomd W Word V M 0 N N 0 W j M ..^ N j = j - M + M
29 20 23 28 rspcedvd W Word V M 0 N N 0 W j M ..^ N i 0 ..^ N M j = i + M
30 eqcom y = W j W j = y
31 simpr W Word V M 0 N N 0 W j = i + M j = i + M
32 31 fveq2d W Word V M 0 N N 0 W j = i + M W j = W i + M
33 32 eqeq2d W Word V M 0 N N 0 W j = i + M y = W j y = W i + M
34 30 33 bitr3id W Word V M 0 N N 0 W j = i + M W j = y y = W i + M
35 7 29 34 rexxfrd W Word V M 0 N N 0 W j M ..^ N W j = y i 0 ..^ N M y = W i + M
36 eqid i 0 ..^ N M W i + M = i 0 ..^ N M W i + M
37 fvex W i + M V
38 36 37 elrnmpti y ran i 0 ..^ N M W i + M i 0 ..^ N M y = W i + M
39 35 38 bitr4di W Word V M 0 N N 0 W j M ..^ N W j = y y ran i 0 ..^ N M W i + M
40 wrdf W Word V W : 0 ..^ W V
41 40 3ad2ant1 W Word V M 0 N N 0 W W : 0 ..^ W V
42 41 ffnd W Word V M 0 N N 0 W W Fn 0 ..^ W
43 elfzuz M 0 N M 0
44 43 3ad2ant2 W Word V M 0 N N 0 W M 0
45 fzoss1 M 0 M ..^ N 0 ..^ N
46 44 45 syl W Word V M 0 N N 0 W M ..^ N 0 ..^ N
47 elfzuz3 N 0 W W N
48 47 3ad2ant3 W Word V M 0 N N 0 W W N
49 fzoss2 W N 0 ..^ N 0 ..^ W
50 48 49 syl W Word V M 0 N N 0 W 0 ..^ N 0 ..^ W
51 46 50 sstrd W Word V M 0 N N 0 W M ..^ N 0 ..^ W
52 42 51 fvelimabd W Word V M 0 N N 0 W y W M ..^ N j M ..^ N W j = y
53 swrdval2 W Word V M 0 N N 0 W W substr M N = i 0 ..^ N M W i + M
54 53 rneqd W Word V M 0 N N 0 W ran W substr M N = ran i 0 ..^ N M W i + M
55 54 eleq2d W Word V M 0 N N 0 W y ran W substr M N y ran i 0 ..^ N M W i + M
56 39 52 55 3bitr4rd W Word V M 0 N N 0 W y ran W substr M N y W M ..^ N
57 56 eqrdv W Word V M 0 N N 0 W ran W substr M N = W M ..^ N