Metamath Proof Explorer


Theorem swrdwrdsymb

Description: A subword is a word over the symbols it consists of. (Contributed by AV, 2-Dec-2022)

Ref Expression
Assertion swrdwrdsymb S Word A S substr M N Word S M ..^ N

Proof

Step Hyp Ref Expression
1 swrdval2 S Word A M 0 N N 0 S S substr M N = x 0 ..^ N M S x + M
2 1 3expb S Word A M 0 N N 0 S S substr M N = x 0 ..^ N M S x + M
3 wrdf S Word A S : 0 ..^ S A
4 3 ffund S Word A Fun S
5 4 adantr S Word A M 0 N N 0 S Fun S
6 5 adantr S Word A M 0 N N 0 S x 0 ..^ N M Fun S
7 wrddm S Word A dom S = 0 ..^ S
8 elfzodifsumelfzo M 0 N N 0 S x 0 ..^ N M x + M 0 ..^ S
9 8 imp M 0 N N 0 S x 0 ..^ N M x + M 0 ..^ S
10 9 adantl dom S = 0 ..^ S M 0 N N 0 S x 0 ..^ N M x + M 0 ..^ S
11 eleq2 dom S = 0 ..^ S x + M dom S x + M 0 ..^ S
12 11 adantr dom S = 0 ..^ S M 0 N N 0 S x 0 ..^ N M x + M dom S x + M 0 ..^ S
13 10 12 mpbird dom S = 0 ..^ S M 0 N N 0 S x 0 ..^ N M x + M dom S
14 13 exp32 dom S = 0 ..^ S M 0 N N 0 S x 0 ..^ N M x + M dom S
15 7 14 syl S Word A M 0 N N 0 S x 0 ..^ N M x + M dom S
16 15 imp31 S Word A M 0 N N 0 S x 0 ..^ N M x + M dom S
17 simpr S Word A M 0 N N 0 S x 0 ..^ N M x 0 ..^ N M
18 elfzelz N 0 S N
19 18 adantl M 0 N N 0 S N
20 19 adantl S Word A M 0 N N 0 S N
21 20 adantr S Word A M 0 N N 0 S x 0 ..^ N M N
22 elfzelz M 0 N M
23 22 ad2antrl S Word A M 0 N N 0 S M
24 23 adantr S Word A M 0 N N 0 S x 0 ..^ N M M
25 fzoaddel2 x 0 ..^ N M N M x + M M ..^ N
26 17 21 24 25 syl3anc S Word A M 0 N N 0 S x 0 ..^ N M x + M M ..^ N
27 funfvima Fun S x + M dom S x + M M ..^ N S x + M S M ..^ N
28 27 imp Fun S x + M dom S x + M M ..^ N S x + M S M ..^ N
29 6 16 26 28 syl21anc S Word A M 0 N N 0 S x 0 ..^ N M S x + M S M ..^ N
30 29 fmpttd S Word A M 0 N N 0 S x 0 ..^ N M S x + M : 0 ..^ N M S M ..^ N
31 fvex S x + M V
32 eqid x 0 ..^ N M S x + M = x 0 ..^ N M S x + M
33 31 32 fnmpti x 0 ..^ N M S x + M Fn 0 ..^ N M
34 hashfn x 0 ..^ N M S x + M Fn 0 ..^ N M x 0 ..^ N M S x + M = 0 ..^ N M
35 33 34 mp1i M 0 N x 0 ..^ N M S x + M = 0 ..^ N M
36 fznn0sub M 0 N N M 0
37 hashfzo0 N M 0 0 ..^ N M = N M
38 36 37 syl M 0 N 0 ..^ N M = N M
39 35 38 eqtrd M 0 N x 0 ..^ N M S x + M = N M
40 39 oveq2d M 0 N 0 ..^ x 0 ..^ N M S x + M = 0 ..^ N M
41 40 feq2d M 0 N x 0 ..^ N M S x + M : 0 ..^ x 0 ..^ N M S x + M S M ..^ N x 0 ..^ N M S x + M : 0 ..^ N M S M ..^ N
42 41 ad2antrl S Word A M 0 N N 0 S x 0 ..^ N M S x + M : 0 ..^ x 0 ..^ N M S x + M S M ..^ N x 0 ..^ N M S x + M : 0 ..^ N M S M ..^ N
43 30 42 mpbird S Word A M 0 N N 0 S x 0 ..^ N M S x + M : 0 ..^ x 0 ..^ N M S x + M S M ..^ N
44 iswrdb x 0 ..^ N M S x + M Word S M ..^ N x 0 ..^ N M S x + M : 0 ..^ x 0 ..^ N M S x + M S M ..^ N
45 43 44 sylibr S Word A M 0 N N 0 S x 0 ..^ N M S x + M Word S M ..^ N
46 2 45 eqeltrd S Word A M 0 N N 0 S S substr M N Word S M ..^ N
47 46 expcom M 0 N N 0 S S Word A S substr M N Word S M ..^ N
48 swrdnd0 S Word A ¬ M 0 N N 0 S S substr M N =
49 wrd0 Word S M ..^ N
50 eleq1 S substr M N = S substr M N Word S M ..^ N Word S M ..^ N
51 49 50 mpbiri S substr M N = S substr M N Word S M ..^ N
52 48 51 syl6com ¬ M 0 N N 0 S S Word A S substr M N Word S M ..^ N
53 47 52 pm2.61i S Word A S substr M N Word S M ..^ N