MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  swrd0val Structured version   Unicode version

Theorem swrd0val 12322
Description: Value of the subword extractor for left-anchored subwords. (Contributed by Stefan O'Rear, 24-Aug-2015.)
Assertion
Ref Expression
swrd0val  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( S substr  <. 0 ,  L >. )  =  ( S  |`  ( 0..^ L ) ) )

Proof of Theorem swrd0val
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 elfzelz 11458 . . . . . . . 8  |-  ( L  e.  ( 0 ... ( # `  S
) )  ->  L  e.  ZZ )
21adantl 466 . . . . . . 7  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  ->  L  e.  ZZ )
32zcnd 10753 . . . . . 6  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  ->  L  e.  CC )
43subid1d 9713 . . . . 5  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( L  -  0 )  =  L )
54oveq2d 6112 . . . 4  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( 0..^ ( L  -  0 ) )  =  ( 0..^ L ) )
65mpteq1d 4378 . . 3  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( x  e.  ( 0..^ ( L  - 
0 ) )  |->  ( S `  ( x  +  0 ) ) )  =  ( x  e.  ( 0..^ L )  |->  ( S `  ( x  +  0
) ) ) )
7 elfzoelz 11558 . . . . . . . 8  |-  ( x  e.  ( 0..^ L )  ->  x  e.  ZZ )
87zcnd 10753 . . . . . . 7  |-  ( x  e.  ( 0..^ L )  ->  x  e.  CC )
98addid1d 9574 . . . . . 6  |-  ( x  e.  ( 0..^ L )  ->  ( x  +  0 )  =  x )
109fveq2d 5700 . . . . 5  |-  ( x  e.  ( 0..^ L )  ->  ( S `  ( x  +  0 ) )  =  ( S `  x ) )
1110adantl 466 . . . 4  |-  ( ( ( S  e. Word  A  /\  L  e.  (
0 ... ( # `  S
) ) )  /\  x  e.  ( 0..^ L ) )  -> 
( S `  (
x  +  0 ) )  =  ( S `
 x ) )
1211mpteq2dva 4383 . . 3  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( x  e.  ( 0..^ L )  |->  ( S `  ( x  +  0 ) ) )  =  ( x  e.  ( 0..^ L )  |->  ( S `  x ) ) )
136, 12eqtrd 2475 . 2  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( x  e.  ( 0..^ ( L  - 
0 ) )  |->  ( S `  ( x  +  0 ) ) )  =  ( x  e.  ( 0..^ L )  |->  ( S `  x ) ) )
14 simpl 457 . . 3  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  ->  S  e. Word  A )
15 elfzuz 11454 . . . . 5  |-  ( L  e.  ( 0 ... ( # `  S
) )  ->  L  e.  ( ZZ>= `  0 )
)
1615adantl 466 . . . 4  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  ->  L  e.  ( ZZ>= ` 
0 ) )
17 eluzfz1 11463 . . . 4  |-  ( L  e.  ( ZZ>= `  0
)  ->  0  e.  ( 0 ... L
) )
1816, 17syl 16 . . 3  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
0  e.  ( 0 ... L ) )
19 simpr 461 . . 3  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  ->  L  e.  ( 0 ... ( # `  S
) ) )
20 swrdval2 12321 . . 3  |-  ( ( S  e. Word  A  /\  0  e.  ( 0 ... L )  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( S substr  <. 0 ,  L >. )  =  ( x  e.  ( 0..^ ( L  -  0 ) )  |->  ( S `
 ( x  + 
0 ) ) ) )
2114, 18, 19, 20syl3anc 1218 . 2  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( S substr  <. 0 ,  L >. )  =  ( x  e.  ( 0..^ ( L  -  0 ) )  |->  ( S `
 ( x  + 
0 ) ) ) )
22 wrdf 12245 . . . 4  |-  ( S  e. Word  A  ->  S : ( 0..^ (
# `  S )
) --> A )
2322adantr 465 . . 3  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  ->  S : ( 0..^ (
# `  S )
) --> A )
24 elfzuz3 11455 . . . . 5  |-  ( L  e.  ( 0 ... ( # `  S
) )  ->  ( # `
 S )  e.  ( ZZ>= `  L )
)
2524adantl 466 . . . 4  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( # `  S )  e.  ( ZZ>= `  L
) )
26 fzoss2 11582 . . . 4  |-  ( (
# `  S )  e.  ( ZZ>= `  L )  ->  ( 0..^ L ) 
C_  ( 0..^ (
# `  S )
) )
2725, 26syl 16 . . 3  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( 0..^ L ) 
C_  ( 0..^ (
# `  S )
) )
2823, 27feqresmpt 5750 . 2  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( S  |`  (
0..^ L ) )  =  ( x  e.  ( 0..^ L ) 
|->  ( S `  x
) ) )
2913, 21, 283eqtr4d 2485 1  |-  ( ( S  e. Word  A  /\  L  e.  ( 0 ... ( # `  S
) ) )  -> 
( S substr  <. 0 ,  L >. )  =  ( S  |`  ( 0..^ L ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1369    e. wcel 1756    C_ wss 3333   <.cop 3888    e. cmpt 4355    |` cres 4847   -->wf 5419   ` cfv 5423  (class class class)co 6096   0cc0 9287    + caddc 9290    - cmin 9600   ZZcz 10651   ZZ>=cuz 10866   ...cfz 11442  ..^cfzo 11553   #chash 12108  Word cword 12226   substr csubstr 12230
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-rep 4408  ax-sep 4418  ax-nul 4426  ax-pow 4475  ax-pr 4536  ax-un 6377  ax-cnex 9343  ax-resscn 9344  ax-1cn 9345  ax-icn 9346  ax-addcl 9347  ax-addrcl 9348  ax-mulcl 9349  ax-mulrcl 9350  ax-mulcom 9351  ax-addass 9352  ax-mulass 9353  ax-distr 9354  ax-i2m1 9355  ax-1ne0 9356  ax-1rid 9357  ax-rnegex 9358  ax-rrecex 9359  ax-cnre 9360  ax-pre-lttri 9361  ax-pre-lttrn 9362  ax-pre-ltadd 9363  ax-pre-mulgt0 9364
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2573  df-ne 2613  df-nel 2614  df-ral 2725  df-rex 2726  df-reu 2727  df-rab 2729  df-v 2979  df-sbc 3192  df-csb 3294  df-dif 3336  df-un 3338  df-in 3340  df-ss 3347  df-pss 3349  df-nul 3643  df-if 3797  df-pw 3867  df-sn 3883  df-pr 3885  df-tp 3887  df-op 3889  df-uni 4097  df-int 4134  df-iun 4178  df-br 4298  df-opab 4356  df-mpt 4357  df-tr 4391  df-eprel 4637  df-id 4641  df-po 4646  df-so 4647  df-fr 4684  df-we 4686  df-ord 4727  df-on 4728  df-lim 4729  df-suc 4730  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-res 4857  df-ima 4858  df-iota 5386  df-fun 5425  df-fn 5426  df-f 5427  df-f1 5428  df-fo 5429  df-f1o 5430  df-fv 5431  df-riota 6057  df-ov 6099  df-oprab 6100  df-mpt2 6101  df-om 6482  df-1st 6582  df-2nd 6583  df-recs 6837  df-rdg 6871  df-1o 6925  df-oadd 6929  df-er 7106  df-en 7316  df-dom 7317  df-sdom 7318  df-fin 7319  df-card 8114  df-pnf 9425  df-mnf 9426  df-xr 9427  df-ltxr 9428  df-le 9429  df-sub 9602  df-neg 9603  df-nn 10328  df-n0 10585  df-z 10652  df-uz 10867  df-fz 11443  df-fzo 11554  df-hash 12109  df-word 12234  df-substr 12238
This theorem is referenced by:  swrd0len  12323  swrdn0  12329  swrdccat1  12356  psgnunilem5  16005  efgsres  16240  efgredlemd  16246  efgredlem  16249  iwrdsplit  26775  wrdsplex  26944  signsvtn0  26976  wwlkm1edg  30372
  Copyright terms: Public domain W3C validator