Metamath Proof Explorer


Theorem swrdval2

Description: Value of the subword extractor in its intended domain. (Contributed by Stefan O'Rear, 15-Aug-2015) (Proof shortened by AV, 2-May-2020)

Ref Expression
Assertion swrdval2 S Word A F 0 L L 0 S S substr F L = x 0 ..^ L F S x + F

Proof

Step Hyp Ref Expression
1 simp1 S Word A F 0 L L 0 S S Word A
2 elfzelz F 0 L F
3 2 3ad2ant2 S Word A F 0 L L 0 S F
4 elfzelz L 0 S L
5 4 3ad2ant3 S Word A F 0 L L 0 S L
6 swrdval S Word A F L S substr F L = if F ..^ L dom S x 0 ..^ L F S x + F
7 1 3 5 6 syl3anc S Word A F 0 L L 0 S S substr F L = if F ..^ L dom S x 0 ..^ L F S x + F
8 elfzuz F 0 L F 0
9 8 3ad2ant2 S Word A F 0 L L 0 S F 0
10 fzoss1 F 0 F ..^ L 0 ..^ L
11 9 10 syl S Word A F 0 L L 0 S F ..^ L 0 ..^ L
12 elfzuz3 L 0 S S L
13 12 3ad2ant3 S Word A F 0 L L 0 S S L
14 fzoss2 S L 0 ..^ L 0 ..^ S
15 13 14 syl S Word A F 0 L L 0 S 0 ..^ L 0 ..^ S
16 11 15 sstrd S Word A F 0 L L 0 S F ..^ L 0 ..^ S
17 wrddm S Word A dom S = 0 ..^ S
18 17 3ad2ant1 S Word A F 0 L L 0 S dom S = 0 ..^ S
19 16 18 sseqtrrd S Word A F 0 L L 0 S F ..^ L dom S
20 19 iftrued S Word A F 0 L L 0 S if F ..^ L dom S x 0 ..^ L F S x + F = x 0 ..^ L F S x + F
21 7 20 eqtrd S Word A F 0 L L 0 S S substr F L = x 0 ..^ L F S x + F