Metamath Proof Explorer


Theorem swrd0

Description: A subword of an empty set is always the empty set. (Contributed by AV, 31-Mar-2018) (Revised by AV, 20-Oct-2018) (Proof shortened by AV, 2-May-2020)

Ref Expression
Assertion swrd0 substr F L =

Proof

Step Hyp Ref Expression
1 opelxp F L V × × V F L ×
2 opelxp F L × F L
3 swrdval V F L substr F L = if F ..^ L dom x 0 ..^ L F x + F
4 fzonlt0 F L ¬ F < L F ..^ L =
5 4 biimprd F L F ..^ L = ¬ F < L
6 5 con2d F L F < L ¬ F ..^ L =
7 6 impcom F < L F L ¬ F ..^ L =
8 ss0 F ..^ L F ..^ L =
9 7 8 nsyl F < L F L ¬ F ..^ L
10 dm0 dom =
11 10 a1i F < L F L dom =
12 11 sseq2d F < L F L F ..^ L dom F ..^ L
13 9 12 mtbird F < L F L ¬ F ..^ L dom
14 13 iffalsed F < L F L if F ..^ L dom x 0 ..^ L F x + F =
15 ssidd ¬ F < L F L
16 4 biimpac ¬ F < L F L F ..^ L =
17 10 a1i ¬ F < L F L dom =
18 15 16 17 3sstr4d ¬ F < L F L F ..^ L dom
19 18 iftrued ¬ F < L F L if F ..^ L dom x 0 ..^ L F x + F = x 0 ..^ L F x + F
20 zre L L
21 zre F F
22 lenlt L F L F ¬ F < L
23 22 bicomd L F ¬ F < L L F
24 20 21 23 syl2anr F L ¬ F < L L F
25 fzo0n F L L F 0 ..^ L F =
26 24 25 bitrd F L ¬ F < L 0 ..^ L F =
27 26 biimpac ¬ F < L F L 0 ..^ L F =
28 27 mpteq1d ¬ F < L F L x 0 ..^ L F x + F = x x + F
29 28 dmeqd ¬ F < L F L dom x 0 ..^ L F x + F = dom x x + F
30 ral0 x x + F V
31 dmmptg x x + F V dom x x + F =
32 30 31 mp1i ¬ F < L F L dom x x + F =
33 29 32 eqtrd ¬ F < L F L dom x 0 ..^ L F x + F =
34 mptrel Rel x 0 ..^ L F x + F
35 reldm0 Rel x 0 ..^ L F x + F x 0 ..^ L F x + F = dom x 0 ..^ L F x + F =
36 34 35 mp1i ¬ F < L F L x 0 ..^ L F x + F = dom x 0 ..^ L F x + F =
37 33 36 mpbird ¬ F < L F L x 0 ..^ L F x + F =
38 19 37 eqtrd ¬ F < L F L if F ..^ L dom x 0 ..^ L F x + F =
39 14 38 pm2.61ian F L if F ..^ L dom x 0 ..^ L F x + F =
40 39 3adant1 V F L if F ..^ L dom x 0 ..^ L F x + F =
41 3 40 eqtrd V F L substr F L =
42 41 3expb V F L substr F L =
43 2 42 sylan2b V F L × substr F L =
44 1 43 sylbi F L V × × substr F L =
45 df-substr substr = s V , b × if 1 st b ..^ 2 nd b dom s z 0 ..^ 2 nd b 1 st b s z + 1 st b
46 ovex 0 ..^ 2 nd b 1 st b V
47 46 mptex z 0 ..^ 2 nd b 1 st b s z + 1 st b V
48 0ex V
49 47 48 ifex if 1 st b ..^ 2 nd b dom s z 0 ..^ 2 nd b 1 st b s z + 1 st b V
50 45 49 dmmpo dom substr = V × ×
51 44 50 eleq2s F L dom substr substr F L =
52 df-ov substr F L = substr F L
53 ndmfv ¬ F L dom substr substr F L =
54 52 53 eqtrid ¬ F L dom substr substr F L =
55 51 54 pm2.61i substr F L =