Metamath Proof Explorer


Theorem swrdcl

Description: Closure of the subword extractor. (Contributed by Stefan O'Rear, 16-Aug-2015) (Revised by Mario Carneiro, 26-Feb-2016)

Ref Expression
Assertion swrdcl S Word A S substr F L Word A

Proof

Step Hyp Ref Expression
1 eleq1 S substr F L = S substr F L Word A Word A
2 n0 S substr F L x x S substr F L
3 df-substr substr = s V , b × if 1 st b ..^ 2 nd b dom s x 0 ..^ 2 nd b 1 st b s x + 1 st b
4 3 elmpocl2 x S substr F L F L ×
5 opelxp F L × F L
6 4 5 sylib x S substr F L F L
7 6 exlimiv x x S substr F L F L
8 2 7 sylbi S substr F L F L
9 swrdval S Word A F L S substr F L = if F ..^ L dom S x 0 ..^ L F S x + F
10 wrdf S Word A S : 0 ..^ S A
11 10 3ad2ant1 S Word A F L S : 0 ..^ S A
12 11 ad2antrr S Word A F L F ..^ L dom S x 0 ..^ L F S : 0 ..^ S A
13 simplr S Word A F L F ..^ L dom S x 0 ..^ L F F ..^ L dom S
14 simpr S Word A F L F ..^ L dom S x 0 ..^ L F x 0 ..^ L F
15 simpll3 S Word A F L F ..^ L dom S x 0 ..^ L F L
16 simpll2 S Word A F L F ..^ L dom S x 0 ..^ L F F
17 fzoaddel2 x 0 ..^ L F L F x + F F ..^ L
18 14 15 16 17 syl3anc S Word A F L F ..^ L dom S x 0 ..^ L F x + F F ..^ L
19 13 18 sseldd S Word A F L F ..^ L dom S x 0 ..^ L F x + F dom S
20 12 fdmd S Word A F L F ..^ L dom S x 0 ..^ L F dom S = 0 ..^ S
21 19 20 eleqtrd S Word A F L F ..^ L dom S x 0 ..^ L F x + F 0 ..^ S
22 12 21 ffvelrnd S Word A F L F ..^ L dom S x 0 ..^ L F S x + F A
23 22 fmpttd S Word A F L F ..^ L dom S x 0 ..^ L F S x + F : 0 ..^ L F A
24 iswrdi x 0 ..^ L F S x + F : 0 ..^ L F A x 0 ..^ L F S x + F Word A
25 23 24 syl S Word A F L F ..^ L dom S x 0 ..^ L F S x + F Word A
26 wrd0 Word A
27 26 a1i S Word A F L ¬ F ..^ L dom S Word A
28 25 27 ifclda S Word A F L if F ..^ L dom S x 0 ..^ L F S x + F Word A
29 9 28 eqeltrd S Word A F L S substr F L Word A
30 29 3expb S Word A F L S substr F L Word A
31 8 30 sylan2 S Word A S substr F L S substr F L Word A
32 26 a1i S Word A Word A
33 1 31 32 pm2.61ne S Word A S substr F L Word A