ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  swrdwrdsymbg Unicode version

Theorem swrdwrdsymbg 11150
Description: A subword is a word over the symbols it consists of. (Contributed by AV, 2-Dec-2022.)
Assertion
Ref Expression
swrdwrdsymbg  |-  ( ( S  e. Word  A  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  -> 
( S substr  <. M ,  N >. )  e. Word  ( S " ( M..^ N
) ) )

Proof of Theorem swrdwrdsymbg
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 swrdval2 11137 . . . 4  |-  ( ( S  e. Word  A  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  -> 
( S substr  <. M ,  N >. )  =  ( x  e.  ( 0..^ ( N  -  M
) )  |->  ( S `
 ( x  +  M ) ) ) )
213expb 1207 . . 3  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( S substr  <. M ,  N >. )  =  ( x  e.  ( 0..^ ( N  -  M
) )  |->  ( S `
 ( x  +  M ) ) ) )
3 wrdf 11032 . . . . . . . . . 10  |-  ( S  e. Word  A  ->  S : ( 0..^ ( `  S ) ) --> A )
43ffund 5444 . . . . . . . . 9  |-  ( S  e. Word  A  ->  Fun  S )
54adantr 276 . . . . . . . 8  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  Fun  S )
65adantr 276 . . . . . . 7  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  Fun  S )
7 wrddm 11034 . . . . . . . . 9  |-  ( S  e. Word  A  ->  dom  S  =  ( 0..^ ( `  S ) ) )
8 elfzodifsumelfzo 10362 . . . . . . . . . . . . 13  |-  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  -> 
( x  e.  ( 0..^ ( N  -  M ) )  -> 
( x  +  M
)  e.  ( 0..^ ( `  S )
) ) )
98imp 124 . . . . . . . . . . . 12  |-  ( ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  /\  x  e.  ( 0..^ ( N  -  M
) ) )  -> 
( x  +  M
)  e.  ( 0..^ ( `  S )
) )
109adantl 277 . . . . . . . . . . 11  |-  ( ( dom  S  =  ( 0..^ ( `  S
) )  /\  (
( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  /\  x  e.  ( 0..^ ( N  -  M
) ) ) )  ->  ( x  +  M )  e.  ( 0..^ ( `  S
) ) )
11 eleq2 2270 . . . . . . . . . . . 12  |-  ( dom 
S  =  ( 0..^ ( `  S )
)  ->  ( (
x  +  M )  e.  dom  S  <->  ( x  +  M )  e.  ( 0..^ ( `  S
) ) ) )
1211adantr 276 . . . . . . . . . . 11  |-  ( ( dom  S  =  ( 0..^ ( `  S
) )  /\  (
( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  /\  x  e.  ( 0..^ ( N  -  M
) ) ) )  ->  ( ( x  +  M )  e. 
dom  S  <->  ( x  +  M )  e.  ( 0..^ ( `  S
) ) ) )
1310, 12mpbird 167 . . . . . . . . . 10  |-  ( ( dom  S  =  ( 0..^ ( `  S
) )  /\  (
( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  /\  x  e.  ( 0..^ ( N  -  M
) ) ) )  ->  ( x  +  M )  e.  dom  S )
1413exp32 365 . . . . . . . . 9  |-  ( dom 
S  =  ( 0..^ ( `  S )
)  ->  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  -> 
( x  e.  ( 0..^ ( N  -  M ) )  -> 
( x  +  M
)  e.  dom  S
) ) )
157, 14syl 14 . . . . . . . 8  |-  ( S  e. Word  A  ->  (
( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  -> 
( x  e.  ( 0..^ ( N  -  M ) )  -> 
( x  +  M
)  e.  dom  S
) ) )
1615imp31 256 . . . . . . 7  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  ( x  +  M )  e.  dom  S )
17 simpr 110 . . . . . . . 8  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  x  e.  ( 0..^ ( N  -  M ) ) )
18 elfzelz 10177 . . . . . . . . . . 11  |-  ( N  e.  ( 0 ... ( `  S )
)  ->  N  e.  ZZ )
1918adantl 277 . . . . . . . . . 10  |-  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  ->  N  e.  ZZ )
2019adantl 277 . . . . . . . . 9  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  N  e.  ZZ )
2120adantr 276 . . . . . . . 8  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  N  e.  ZZ )
22 elfzelz 10177 . . . . . . . . . 10  |-  ( M  e.  ( 0 ... N )  ->  M  e.  ZZ )
2322ad2antrl 490 . . . . . . . . 9  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  M  e.  ZZ )
2423adantr 276 . . . . . . . 8  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  M  e.  ZZ )
25 fzoaddel2 10351 . . . . . . . 8  |-  ( ( x  e.  ( 0..^ ( N  -  M
) )  /\  N  e.  ZZ  /\  M  e.  ZZ )  ->  (
x  +  M )  e.  ( M..^ N
) )
2617, 21, 24, 25syl3anc 1250 . . . . . . 7  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  ( x  +  M )  e.  ( M..^ N ) )
27 funfvima 5834 . . . . . . . 8  |-  ( ( Fun  S  /\  (
x  +  M )  e.  dom  S )  ->  ( ( x  +  M )  e.  ( M..^ N )  ->  ( S `  ( x  +  M
) )  e.  ( S " ( M..^ N ) ) ) )
2827imp 124 . . . . . . 7  |-  ( ( ( Fun  S  /\  ( x  +  M
)  e.  dom  S
)  /\  ( x  +  M )  e.  ( M..^ N ) )  ->  ( S `  ( x  +  M
) )  e.  ( S " ( M..^ N ) ) )
296, 16, 26, 28syl21anc 1249 . . . . . 6  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  ( S `  ( x  +  M
) )  e.  ( S " ( M..^ N ) ) )
3029fmpttd 5753 . . . . 5  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) : ( 0..^ ( N  -  M ) ) --> ( S " ( M..^ N ) ) )
31 simpll 527 . . . . . . . . . . . 12  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  S  e. Word  A
)
32 elfzoelz 10299 . . . . . . . . . . . . . 14  |-  ( x  e.  ( 0..^ ( N  -  M ) )  ->  x  e.  ZZ )
3332adantl 277 . . . . . . . . . . . . 13  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  x  e.  ZZ )
3433, 24zaddcld 9529 . . . . . . . . . . . 12  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  ( x  +  M )  e.  ZZ )
35 fvexg 5613 . . . . . . . . . . . 12  |-  ( ( S  e. Word  A  /\  ( x  +  M
)  e.  ZZ )  ->  ( S `  ( x  +  M
) )  e.  _V )
3631, 34, 35syl2anc 411 . . . . . . . . . . 11  |-  ( ( ( S  e. Word  A  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  /\  x  e.  ( 0..^ ( N  -  M ) ) )  ->  ( S `  ( x  +  M
) )  e.  _V )
3736ralrimiva 2580 . . . . . . . . . 10  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  A. x  e.  ( 0..^ ( N  -  M ) ) ( S `  ( x  +  M ) )  e.  _V )
38 eqid 2206 . . . . . . . . . . 11  |-  ( x  e.  ( 0..^ ( N  -  M ) )  |->  ( S `  ( x  +  M
) ) )  =  ( x  e.  ( 0..^ ( N  -  M ) )  |->  ( S `  ( x  +  M ) ) )
3938fnmpt 5417 . . . . . . . . . 10  |-  ( A. x  e.  ( 0..^ ( N  -  M
) ) ( S `
 ( x  +  M ) )  e. 
_V  ->  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) )  Fn  (
0..^ ( N  -  M ) ) )
4037, 39syl 14 . . . . . . . . 9  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) )  Fn  (
0..^ ( N  -  M ) ) )
41 0z 9413 . . . . . . . . . . 11  |-  0  e.  ZZ
42 elfzel2 10175 . . . . . . . . . . . 12  |-  ( M  e.  ( 0 ... N )  ->  N  e.  ZZ )
4342, 22zsubcld 9530 . . . . . . . . . . 11  |-  ( M  e.  ( 0 ... N )  ->  ( N  -  M )  e.  ZZ )
44 fzofig 10609 . . . . . . . . . . 11  |-  ( ( 0  e.  ZZ  /\  ( N  -  M
)  e.  ZZ )  ->  ( 0..^ ( N  -  M ) )  e.  Fin )
4541, 43, 44sylancr 414 . . . . . . . . . 10  |-  ( M  e.  ( 0 ... N )  ->  (
0..^ ( N  -  M ) )  e. 
Fin )
4645ad2antrl 490 . . . . . . . . 9  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( 0..^ ( N  -  M ) )  e.  Fin )
47 fihashfn 10977 . . . . . . . . 9  |-  ( ( ( x  e.  ( 0..^ ( N  -  M ) )  |->  ( S `  ( x  +  M ) ) )  Fn  ( 0..^ ( N  -  M
) )  /\  (
0..^ ( N  -  M ) )  e. 
Fin )  ->  ( `  ( x  e.  ( 0..^ ( N  -  M ) )  |->  ( S `  ( x  +  M ) ) ) )  =  ( `  ( 0..^ ( N  -  M ) ) ) )
4840, 46, 47syl2anc 411 . . . . . . . 8  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( `  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) )  =  ( `  ( 0..^ ( N  -  M
) ) ) )
49 fznn0sub 10209 . . . . . . . . . 10  |-  ( M  e.  ( 0 ... N )  ->  ( N  -  M )  e.  NN0 )
50 hashfzo0 11000 . . . . . . . . . 10  |-  ( ( N  -  M )  e.  NN0  ->  ( `  (
0..^ ( N  -  M ) ) )  =  ( N  -  M ) )
5149, 50syl 14 . . . . . . . . 9  |-  ( M  e.  ( 0 ... N )  ->  ( `  ( 0..^ ( N  -  M ) ) )  =  ( N  -  M ) )
5251ad2antrl 490 . . . . . . . 8  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( `  ( 0..^ ( N  -  M
) ) )  =  ( N  -  M
) )
5348, 52eqtrd 2239 . . . . . . 7  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( `  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) )  =  ( N  -  M
) )
5453oveq2d 5978 . . . . . 6  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( 0..^ ( `  ( x  e.  ( 0..^ ( N  -  M ) )  |->  ( S `  ( x  +  M ) ) ) ) )  =  ( 0..^ ( N  -  M ) ) )
5554feq2d 5428 . . . . 5  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( ( x  e.  ( 0..^ ( N  -  M ) )  |->  ( S `  ( x  +  M
) ) ) : ( 0..^ ( `  (
x  e.  ( 0..^ ( N  -  M
) )  |->  ( S `
 ( x  +  M ) ) ) ) ) --> ( S
" ( M..^ N
) )  <->  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) : ( 0..^ ( N  -  M ) ) --> ( S " ( M..^ N ) ) ) )
5630, 55mpbird 167 . . . 4  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) : ( 0..^ ( `  (
x  e.  ( 0..^ ( N  -  M
) )  |->  ( S `
 ( x  +  M ) ) ) ) ) --> ( S
" ( M..^ N
) ) )
5749ad2antrl 490 . . . . 5  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( N  -  M )  e.  NN0 )
5853, 57eqeltrd 2283 . . . 4  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( `  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) )  e. 
NN0 )
59 iswrdinn0 11031 . . . 4  |-  ( ( ( x  e.  ( 0..^ ( N  -  M ) )  |->  ( S `  ( x  +  M ) ) ) : ( 0..^ ( `  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) ) ) --> ( S " ( M..^ N ) )  /\  ( `  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) ) )  e. 
NN0 )  ->  (
x  e.  ( 0..^ ( N  -  M
) )  |->  ( S `
 ( x  +  M ) ) )  e. Word  ( S "
( M..^ N ) ) )
6056, 58, 59syl2anc 411 . . 3  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( x  e.  ( 0..^ ( N  -  M ) ) 
|->  ( S `  (
x  +  M ) ) )  e. Word  ( S " ( M..^ N
) ) )
612, 60eqeltrd 2283 . 2  |-  ( ( S  e. Word  A  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) ) )  ->  ( S substr  <. M ,  N >. )  e. Word  ( S " ( M..^ N
) ) )
62613impb 1202 1  |-  ( ( S  e. Word  A  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( `  S
) ) )  -> 
( S substr  <. M ,  N >. )  e. Word  ( S " ( M..^ N
) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 104    <-> wb 105    /\ w3a 981    = wceq 1373    e. wcel 2177   A.wral 2485   _Vcvv 2773   <.cop 3641    |-> cmpt 4116   dom cdm 4688   "cima 4691   Fun wfun 5279    Fn wfn 5280   -->wf 5281   ` cfv 5285  (class class class)co 5962   Fincfn 6845   0cc0 7955    + caddc 7958    - cmin 8273   NN0cn0 9325   ZZcz 9402   ...cfz 10160  ..^cfzo 10294  ♯chash 10952  Word cword 11026   substr csubstr 11131
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-coll 4170  ax-sep 4173  ax-nul 4181  ax-pow 4229  ax-pr 4264  ax-un 4493  ax-setind 4598  ax-iinf 4649  ax-cnex 8046  ax-resscn 8047  ax-1cn 8048  ax-1re 8049  ax-icn 8050  ax-addcl 8051  ax-addrcl 8052  ax-mulcl 8053  ax-addcom 8055  ax-addass 8057  ax-distr 8059  ax-i2m1 8060  ax-0lt1 8061  ax-0id 8063  ax-rnegex 8064  ax-cnre 8066  ax-pre-ltirr 8067  ax-pre-ltwlin 8068  ax-pre-lttrn 8069  ax-pre-apti 8070  ax-pre-ltadd 8071
This theorem depends on definitions:  df-bi 117  df-dc 837  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rab 2494  df-v 2775  df-sbc 3003  df-csb 3098  df-dif 3172  df-un 3174  df-in 3176  df-ss 3183  df-nul 3465  df-if 3576  df-pw 3623  df-sn 3644  df-pr 3645  df-op 3647  df-uni 3860  df-int 3895  df-iun 3938  df-br 4055  df-opab 4117  df-mpt 4118  df-tr 4154  df-id 4353  df-iord 4426  df-on 4428  df-ilim 4429  df-suc 4431  df-iom 4652  df-xp 4694  df-rel 4695  df-cnv 4696  df-co 4697  df-dm 4698  df-rn 4699  df-res 4700  df-ima 4701  df-iota 5246  df-fun 5287  df-fn 5288  df-f 5289  df-f1 5290  df-fo 5291  df-f1o 5292  df-fv 5293  df-riota 5917  df-ov 5965  df-oprab 5966  df-mpo 5967  df-1st 6244  df-2nd 6245  df-recs 6409  df-frec 6495  df-1o 6520  df-er 6638  df-en 6846  df-dom 6847  df-fin 6848  df-pnf 8139  df-mnf 8140  df-xr 8141  df-ltxr 8142  df-le 8143  df-sub 8275  df-neg 8276  df-inn 9067  df-n0 9326  df-z 9403  df-uz 9679  df-fz 10161  df-fzo 10295  df-ihash 10953  df-word 11027  df-substr 11132
This theorem is referenced by:  pfxwrdsymbg  11176
  Copyright terms: Public domain W3C validator