Metamath Proof Explorer


Theorem swrdnd

Description: The value of the subword extractor is the empty set (undefined) if the range is not valid. (Contributed by Alexander van der Vekens, 16-Mar-2018) (Proof shortened by AV, 2-May-2020)

Ref Expression
Assertion swrdnd W Word V F L F < 0 L F W < L W substr F L =

Proof

Step Hyp Ref Expression
1 3orcomb F < 0 L F W < L F < 0 W < L L F
2 df-3or F < 0 W < L L F F < 0 W < L L F
3 1 2 bitri F < 0 L F W < L F < 0 W < L L F
4 swrdlend W Word V F L L F W substr F L =
5 4 com12 L F W Word V F L W substr F L =
6 swrdval W Word V F L W substr F L = if F ..^ L dom W i 0 ..^ L F W i + F
7 6 adantl F < 0 W < L ¬ L F W Word V F L W substr F L = if F ..^ L dom W i 0 ..^ L F W i + F
8 zre F F
9 0red F 0
10 8 9 ltnled F F < 0 ¬ 0 F
11 10 3ad2ant2 W Word V F L F < 0 ¬ 0 F
12 lencl W Word V W 0
13 12 nn0red W Word V W
14 zre L L
15 13 14 anim12i W Word V L W L
16 15 3adant2 W Word V F L W L
17 ltnle W L W < L ¬ L W
18 16 17 syl W Word V F L W < L ¬ L W
19 11 18 orbi12d W Word V F L F < 0 W < L ¬ 0 F ¬ L W
20 19 biimpcd F < 0 W < L W Word V F L ¬ 0 F ¬ L W
21 20 adantr F < 0 W < L ¬ L F W Word V F L ¬ 0 F ¬ L W
22 21 imp F < 0 W < L ¬ L F W Word V F L ¬ 0 F ¬ L W
23 ianor ¬ 0 F L W ¬ 0 F ¬ L W
24 22 23 sylibr F < 0 W < L ¬ L F W Word V F L ¬ 0 F L W
25 3simpc W Word V F L F L
26 12 nn0zd W Word V W
27 0z 0
28 26 27 jctil W Word V 0 W
29 28 3ad2ant1 W Word V F L 0 W
30 ltnle F L F < L ¬ L F
31 8 14 30 syl2an F L F < L ¬ L F
32 31 3adant1 W Word V F L F < L ¬ L F
33 32 biimprcd ¬ L F W Word V F L F < L
34 33 adantl F < 0 W < L ¬ L F W Word V F L F < L
35 34 imp F < 0 W < L ¬ L F W Word V F L F < L
36 ssfzo12bi F L 0 W F < L F ..^ L 0 ..^ W 0 F L W
37 25 29 35 36 syl2an23an F < 0 W < L ¬ L F W Word V F L F ..^ L 0 ..^ W 0 F L W
38 24 37 mtbird F < 0 W < L ¬ L F W Word V F L ¬ F ..^ L 0 ..^ W
39 wrddm W Word V dom W = 0 ..^ W
40 39 sseq2d W Word V F ..^ L dom W F ..^ L 0 ..^ W
41 40 notbid W Word V ¬ F ..^ L dom W ¬ F ..^ L 0 ..^ W
42 41 3ad2ant1 W Word V F L ¬ F ..^ L dom W ¬ F ..^ L 0 ..^ W
43 42 adantl F < 0 W < L ¬ L F W Word V F L ¬ F ..^ L dom W ¬ F ..^ L 0 ..^ W
44 38 43 mpbird F < 0 W < L ¬ L F W Word V F L ¬ F ..^ L dom W
45 44 iffalsed F < 0 W < L ¬ L F W Word V F L if F ..^ L dom W i 0 ..^ L F W i + F =
46 7 45 eqtrd F < 0 W < L ¬ L F W Word V F L W substr F L =
47 46 exp31 F < 0 W < L ¬ L F W Word V F L W substr F L =
48 47 impcom ¬ L F F < 0 W < L W Word V F L W substr F L =
49 5 48 jaoi3 L F F < 0 W < L W Word V F L W substr F L =
50 49 orcoms F < 0 W < L L F W Word V F L W substr F L =
51 3 50 sylbi F < 0 L F W < L W Word V F L W substr F L =
52 51 com12 W Word V F L F < 0 L F W < L W substr F L =