Metamath Proof Explorer


Theorem swrdfv2

Description: A symbol in an extracted subword, indexed using the word's indices. (Contributed by AV, 5-May-2020)

Ref Expression
Assertion swrdfv2 S Word V F 0 L F L S X F ..^ L S substr F L X F = S X

Proof

Step Hyp Ref Expression
1 simp1 S Word V F 0 L F L S S Word V
2 simpl F 0 L F F 0
3 eluznn0 F 0 L F L 0
4 eluzle L F F L
5 4 adantl F 0 L F F L
6 2 3 5 3jca F 0 L F F 0 L 0 F L
7 6 3ad2ant2 S Word V F 0 L F L S F 0 L 0 F L
8 elfz2nn0 F 0 L F 0 L 0 F L
9 7 8 sylibr S Word V F 0 L F L S F 0 L
10 3 anim1i F 0 L F L S L 0 L S
11 10 3adant1 S Word V F 0 L F L S L 0 L S
12 lencl S Word V S 0
13 12 3ad2ant1 S Word V F 0 L F L S S 0
14 fznn0 S 0 L 0 S L 0 L S
15 13 14 syl S Word V F 0 L F L S L 0 S L 0 L S
16 11 15 mpbird S Word V F 0 L F L S L 0 S
17 1 9 16 3jca S Word V F 0 L F L S S Word V F 0 L L 0 S
18 17 adantr S Word V F 0 L F L S X F ..^ L S Word V F 0 L L 0 S
19 nn0cn F 0 F
20 eluzelcn L F L
21 pncan3 F L F + L - F = L
22 19 20 21 syl2an F 0 L F F + L - F = L
23 22 eqcomd F 0 L F L = F + L - F
24 23 3ad2ant2 S Word V F 0 L F L S L = F + L - F
25 24 oveq2d S Word V F 0 L F L S F ..^ L = F ..^ F + L - F
26 25 eleq2d S Word V F 0 L F L S X F ..^ L X F ..^ F + L - F
27 26 biimpa S Word V F 0 L F L S X F ..^ L X F ..^ F + L - F
28 eluzelz L F L
29 28 adantl F 0 L F L
30 nn0z F 0 F
31 30 adantr F 0 L F F
32 29 31 zsubcld F 0 L F L F
33 32 3ad2ant2 S Word V F 0 L F L S L F
34 33 adantr S Word V F 0 L F L S X F ..^ L L F
35 fzosubel3 X F ..^ F + L - F L F X F 0 ..^ L F
36 27 34 35 syl2anc S Word V F 0 L F L S X F ..^ L X F 0 ..^ L F
37 swrdfv S Word V F 0 L L 0 S X F 0 ..^ L F S substr F L X F = S X - F + F
38 18 36 37 syl2anc S Word V F 0 L F L S X F ..^ L S substr F L X F = S X - F + F
39 elfzoelz X F ..^ L X
40 39 zcnd X F ..^ L X
41 19 adantr F 0 L F F
42 41 3ad2ant2 S Word V F 0 L F L S F
43 npcan X F X - F + F = X
44 40 42 43 syl2anr S Word V F 0 L F L S X F ..^ L X - F + F = X
45 44 fveq2d S Word V F 0 L F L S X F ..^ L S X - F + F = S X
46 38 45 eqtrd S Word V F 0 L F L S X F ..^ L S substr F L X F = S X