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

Theorem ccatval1 11665
Description: Value of a symbol in the left half of a concatenated word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by Mario Carneiro, 22-Sep-2015.)
Assertion
Ref Expression
ccatval1  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  ( ( S concat  T ) `  I
)  =  ( S `
 I ) )

Proof of Theorem ccatval1
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 ccatfval 11662 . . 3  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( S concat  T )  =  ( x  e.  ( 0..^ ( (
# `  S )  +  ( # `  T
) ) )  |->  if ( x  e.  ( 0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) ) ) )
213adant3 977 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  ( S concat  T
)  =  ( x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) 
|->  if ( x  e.  ( 0..^ ( # `  S ) ) ,  ( S `  x
) ,  ( T `
 ( x  -  ( # `  S ) ) ) ) ) )
3 eleq1 2440 . . . 4  |-  ( x  =  I  ->  (
x  e.  ( 0..^ ( # `  S
) )  <->  I  e.  ( 0..^ ( # `  S
) ) ) )
4 fveq2 5661 . . . 4  |-  ( x  =  I  ->  ( S `  x )  =  ( S `  I ) )
5 oveq1 6020 . . . . 5  |-  ( x  =  I  ->  (
x  -  ( # `  S ) )  =  ( I  -  ( # `
 S ) ) )
65fveq2d 5665 . . . 4  |-  ( x  =  I  ->  ( T `  ( x  -  ( # `  S
) ) )  =  ( T `  (
I  -  ( # `  S ) ) ) )
73, 4, 6ifbieq12d 3697 . . 3  |-  ( x  =  I  ->  if ( x  e.  (
0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) )  =  if ( I  e.  ( 0..^ ( # `  S
) ) ,  ( S `  I ) ,  ( T `  ( I  -  ( # `
 S ) ) ) ) )
8 iftrue 3681 . . . 4  |-  ( I  e.  ( 0..^ (
# `  S )
)  ->  if (
I  e.  ( 0..^ ( # `  S
) ) ,  ( S `  I ) ,  ( T `  ( I  -  ( # `
 S ) ) ) )  =  ( S `  I ) )
983ad2ant3 980 . . 3  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  if ( I  e.  ( 0..^ (
# `  S )
) ,  ( S `
 I ) ,  ( T `  (
I  -  ( # `  S ) ) ) )  =  ( S `
 I ) )
107, 9sylan9eqr 2434 . 2  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S
) ) )  /\  x  =  I )  ->  if ( x  e.  ( 0..^ ( # `  S ) ) ,  ( S `  x
) ,  ( T `
 ( x  -  ( # `  S ) ) ) )  =  ( S `  I
) )
11 wrdfin 11654 . . . . . . . . 9  |-  ( S  e. Word  B  ->  S  e.  Fin )
1211adantr 452 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
13 hashcl 11559 . . . . . . . 8  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
1412, 13syl 16 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  NN0 )
1514nn0zd 10298 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  ZZ )
16 wrdfin 11654 . . . . . . . . . 10  |-  ( T  e. Word  B  ->  T  e.  Fin )
1716adantl 453 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  e.  Fin )
18 hashcl 11559 . . . . . . . . 9  |-  ( T  e.  Fin  ->  ( # `
 T )  e. 
NN0 )
1917, 18syl 16 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  NN0 )
2019nn0zd 10298 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  ZZ )
2115, 20zaddcld 10304 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  +  ( # `  T ) )  e.  ZZ )
2214nn0red 10200 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  RR )
23 nn0addge1 10191 . . . . . . 7  |-  ( ( ( # `  S
)  e.  RR  /\  ( # `  T )  e.  NN0 )  -> 
( # `  S )  <_  ( ( # `  S )  +  (
# `  T )
) )
2422, 19, 23syl2anc 643 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  <_  ( ( # `
 S )  +  ( # `  T
) ) )
25 eluz2 10419 . . . . . 6  |-  ( ( ( # `  S
)  +  ( # `  T ) )  e.  ( ZZ>= `  ( # `  S
) )  <->  ( ( # `
 S )  e.  ZZ  /\  ( (
# `  S )  +  ( # `  T
) )  e.  ZZ  /\  ( # `  S
)  <_  ( ( # `
 S )  +  ( # `  T
) ) ) )
2615, 21, 24, 25syl3anbrc 1138 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  +  ( # `  T ) )  e.  ( ZZ>= `  ( # `  S
) ) )
27 fzoss2 11086 . . . . 5  |-  ( ( ( # `  S
)  +  ( # `  T ) )  e.  ( ZZ>= `  ( # `  S
) )  ->  (
0..^ ( # `  S
) )  C_  (
0..^ ( ( # `  S )  +  (
# `  T )
) ) )
2826, 27syl 16 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( 0..^ ( # `  S ) )  C_  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )
2928sselda 3284 . . 3  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  I  e.  ( 0..^ ( # `  S
) ) )  ->  I  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
30293impa 1148 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  I  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )
31 fvex 5675 . . 3  |-  ( S `
 I )  e. 
_V
3231a1i 11 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  ( S `  I )  e.  _V )
332, 10, 30, 32fvmptd 5742 1  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  ( ( S concat  T ) `  I
)  =  ( S `
 I ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 359    /\ w3a 936    = wceq 1649    e. wcel 1717   _Vcvv 2892    C_ wss 3256   ifcif 3675   class class class wbr 4146    e. cmpt 4200   ` cfv 5387  (class class class)co 6013   Fincfn 7038   RRcr 8915   0cc0 8916    + caddc 8919    <_ cle 9047    - cmin 9216   NN0cn0 10146   ZZcz 10207   ZZ>=cuz 10413  ..^cfzo 11058   #chash 11538  Word cword 11637   concat cconcat 11638
This theorem is referenced by:  ccatrid  11669  ccatass  11670  ccatswrd  11693  swrdccat1  11694  splfv1  11704  splfv2a  11705  cats1un  11710  revccat  11718  cats1fv  11743  gsumccat  14707  efgsp1  15289  efgredlemd  15296  efgrelexlemb  15302
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2361  ax-rep 4254  ax-sep 4264  ax-nul 4272  ax-pow 4311  ax-pr 4337  ax-un 4634  ax-cnex 8972  ax-resscn 8973  ax-1cn 8974  ax-icn 8975  ax-addcl 8976  ax-addrcl 8977  ax-mulcl 8978  ax-mulrcl 8979  ax-mulcom 8980  ax-addass 8981  ax-mulass 8982  ax-distr 8983  ax-i2m1 8984  ax-1ne0 8985  ax-1rid 8986  ax-rnegex 8987  ax-rrecex 8988  ax-cnre 8989  ax-pre-lttri 8990  ax-pre-lttrn 8991  ax-pre-ltadd 8992  ax-pre-mulgt0 8993
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2235  df-mo 2236  df-clab 2367  df-cleq 2373  df-clel 2376  df-nfc 2505  df-ne 2545  df-nel 2546  df-ral 2647  df-rex 2648  df-reu 2649  df-rab 2651  df-v 2894  df-sbc 3098  df-csb 3188  df-dif 3259  df-un 3261  df-in 3263  df-ss 3270  df-pss 3272  df-nul 3565  df-if 3676  df-pw 3737  df-sn 3756  df-pr 3757  df-tp 3758  df-op 3759  df-uni 3951  df-int 3986  df-iun 4030  df-br 4147  df-opab 4201  df-mpt 4202  df-tr 4237  df-eprel 4428  df-id 4432  df-po 4437  df-so 4438  df-fr 4475  df-we 4477  df-ord 4518  df-on 4519  df-lim 4520  df-suc 4521  df-om 4779  df-xp 4817  df-rel 4818  df-cnv 4819  df-co 4820  df-dm 4821  df-rn 4822  df-res 4823  df-ima 4824  df-iota 5351  df-fun 5389  df-fn 5390  df-f 5391  df-f1 5392  df-fo 5393  df-f1o 5394  df-fv 5395  df-ov 6016  df-oprab 6017  df-mpt2 6018  df-1st 6281  df-2nd 6282  df-riota 6478  df-recs 6562  df-rdg 6597  df-1o 6653  df-oadd 6657  df-er 6834  df-en 7039  df-dom 7040  df-sdom 7041  df-fin 7042  df-card 7752  df-pnf 9048  df-mnf 9049  df-xr 9050  df-ltxr 9051  df-le 9052  df-sub 9218  df-neg 9219  df-nn 9926  df-n0 10147  df-z 10208  df-uz 10414  df-fz 10969  df-fzo 11059  df-hash 11539  df-word 11643  df-concat 11644
  Copyright terms: Public domain W3C validator