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

Theorem ccatval1 12268
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 12265 . . 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 1008 . 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 2498 . . . 4  |-  ( x  =  I  ->  (
x  e.  ( 0..^ ( # `  S
) )  <->  I  e.  ( 0..^ ( # `  S
) ) ) )
4 fveq2 5686 . . . 4  |-  ( x  =  I  ->  ( S `  x )  =  ( S `  I ) )
5 oveq1 6093 . . . . 5  |-  ( x  =  I  ->  (
x  -  ( # `  S ) )  =  ( I  -  ( # `
 S ) ) )
65fveq2d 5690 . . . 4  |-  ( x  =  I  ->  ( T `  ( x  -  ( # `  S
) ) )  =  ( T `  (
I  -  ( # `  S ) ) ) )
73, 4, 6ifbieq12d 3811 . . 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 3792 . . . 4  |-  ( I  e.  ( 0..^ (
# `  S )
)  ->  if (
I  e.  ( 0..^ ( # `  S
) ) ,  ( S `  I ) ,  ( T `  ( I  -  ( # `
 S ) ) ) )  =  ( S `  I ) )
983ad2ant3 1011 . . 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 2492 . 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 12240 . . . . . . . . 9  |-  ( S  e. Word  B  ->  S  e.  Fin )
1211adantr 465 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
13 hashcl 12118 . . . . . . . 8  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
1412, 13syl 16 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  NN0 )
1514nn0zd 10737 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  ZZ )
16 wrdfin 12240 . . . . . . . . . 10  |-  ( T  e. Word  B  ->  T  e.  Fin )
1716adantl 466 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  e.  Fin )
18 hashcl 12118 . . . . . . . . 9  |-  ( T  e.  Fin  ->  ( # `
 T )  e. 
NN0 )
1917, 18syl 16 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  NN0 )
2019nn0zd 10737 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  ZZ )
2115, 20zaddcld 10743 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  +  ( # `  T ) )  e.  ZZ )
2214nn0red 10629 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  RR )
23 nn0addge1 10618 . . . . . . 7  |-  ( ( ( # `  S
)  e.  RR  /\  ( # `  T )  e.  NN0 )  -> 
( # `  S )  <_  ( ( # `  S )  +  (
# `  T )
) )
2422, 19, 23syl2anc 661 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  <_  ( ( # `
 S )  +  ( # `  T
) ) )
25 eluz2 10859 . . . . . 6  |-  ( ( ( # `  S
)  +  ( # `  T ) )  e.  ( ZZ>= `  ( # `  S
) )  <->  ( ( # `
 S )  e.  ZZ  /\  ( (
# `  S )  +  ( # `  T
) )  e.  ZZ  /\  ( # `  S
)  <_  ( ( # `
 S )  +  ( # `  T
) ) ) )
2615, 21, 24, 25syl3anbrc 1172 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  +  ( # `  T ) )  e.  ( ZZ>= `  ( # `  S
) ) )
27 fzoss2 11569 . . . . 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 3351 . . 3  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  I  e.  ( 0..^ ( # `  S
) ) )  ->  I  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
30293impa 1182 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  I  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )
31 fvex 5696 . . 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 5774 1  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  ( ( S concat  T ) `  I
)  =  ( S `
 I ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756   _Vcvv 2967    C_ wss 3323   ifcif 3786   class class class wbr 4287    e. cmpt 4345   ` cfv 5413  (class class class)co 6086   Fincfn 7302   RRcr 9273   0cc0 9274    + caddc 9277    <_ cle 9411    - cmin 9587   NN0cn0 10571   ZZcz 10638   ZZ>=cuz 10853  ..^cfzo 11540   #chash 12095  Word cword 12213   concat cconcat 12215
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 2419  ax-rep 4398  ax-sep 4408  ax-nul 4416  ax-pow 4465  ax-pr 4526  ax-un 6367  ax-cnex 9330  ax-resscn 9331  ax-1cn 9332  ax-icn 9333  ax-addcl 9334  ax-addrcl 9335  ax-mulcl 9336  ax-mulrcl 9337  ax-mulcom 9338  ax-addass 9339  ax-mulass 9340  ax-distr 9341  ax-i2m1 9342  ax-1ne0 9343  ax-1rid 9344  ax-rnegex 9345  ax-rrecex 9346  ax-cnre 9347  ax-pre-lttri 9348  ax-pre-lttrn 9349  ax-pre-ltadd 9350  ax-pre-mulgt0 9351
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 2256  df-mo 2257  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2715  df-rex 2716  df-reu 2717  df-rab 2719  df-v 2969  df-sbc 3182  df-csb 3284  df-dif 3326  df-un 3328  df-in 3330  df-ss 3337  df-pss 3339  df-nul 3633  df-if 3787  df-pw 3857  df-sn 3873  df-pr 3875  df-tp 3877  df-op 3879  df-uni 4087  df-int 4124  df-iun 4168  df-br 4288  df-opab 4346  df-mpt 4347  df-tr 4381  df-eprel 4627  df-id 4631  df-po 4636  df-so 4637  df-fr 4674  df-we 4676  df-ord 4717  df-on 4718  df-lim 4719  df-suc 4720  df-xp 4841  df-rel 4842  df-cnv 4843  df-co 4844  df-dm 4845  df-rn 4846  df-res 4847  df-ima 4848  df-iota 5376  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-riota 6047  df-ov 6089  df-oprab 6090  df-mpt2 6091  df-om 6472  df-1st 6572  df-2nd 6573  df-recs 6824  df-rdg 6858  df-1o 6912  df-oadd 6916  df-er 7093  df-en 7303  df-dom 7304  df-sdom 7305  df-fin 7306  df-card 8101  df-pnf 9412  df-mnf 9413  df-xr 9414  df-ltxr 9415  df-le 9416  df-sub 9589  df-neg 9590  df-nn 10315  df-n0 10572  df-z 10639  df-uz 10854  df-fz 11430  df-fzo 11541  df-hash 12096  df-word 12221  df-concat 12223
This theorem is referenced by:  ccatsymb  12273  ccatfv0  12274  ccatval1lsw  12275  ccatrid  12277  ccatass  12278  ccats1val1  12298  ccatswrd  12342  swrdccat1  12343  cats1un  12362  swrdccatin1  12366  swrdccatin12lem3  12373  swrdccatin12  12374  splfv1  12389  splfv2a  12390  revccat  12398  cshwidxmod  12432  cats1fv  12478  gsumccat  15510  efgsp1  16225  efgredlemd  16232  efgrelexlemb  16238  signstfvn  26922  signstfvp  26924  signstfvneq0  26925  ccat2s1p1  30218  ccat2s1fvw  30224  clwwlkel  30408  wwlkext2clwwlk  30418
  Copyright terms: Public domain W3C validator