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

Theorem ccatval1 12395
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 12392 . . 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 2526 . . . 4  |-  ( x  =  I  ->  (
x  e.  ( 0..^ ( # `  S
) )  <->  I  e.  ( 0..^ ( # `  S
) ) ) )
4 fveq2 5800 . . . 4  |-  ( x  =  I  ->  ( S `  x )  =  ( S `  I ) )
5 oveq1 6208 . . . . 5  |-  ( x  =  I  ->  (
x  -  ( # `  S ) )  =  ( I  -  ( # `
 S ) ) )
65fveq2d 5804 . . . 4  |-  ( x  =  I  ->  ( T `  ( x  -  ( # `  S
) ) )  =  ( T `  (
I  -  ( # `  S ) ) ) )
73, 4, 6ifbieq12d 3925 . . 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 3906 . . . 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 2517 . 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 12367 . . . . . . . . 9  |-  ( S  e. Word  B  ->  S  e.  Fin )
1211adantr 465 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
13 hashcl 12244 . . . . . . . 8  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
1412, 13syl 16 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  NN0 )
1514nn0zd 10857 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  ZZ )
16 wrdfin 12367 . . . . . . . . . 10  |-  ( T  e. Word  B  ->  T  e.  Fin )
1716adantl 466 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  e.  Fin )
18 hashcl 12244 . . . . . . . . 9  |-  ( T  e.  Fin  ->  ( # `
 T )  e. 
NN0 )
1917, 18syl 16 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  NN0 )
2019nn0zd 10857 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  ZZ )
2115, 20zaddcld 10863 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  +  ( # `  T ) )  e.  ZZ )
2214nn0red 10749 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  RR )
23 nn0addge1 10738 . . . . . . 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 10979 . . . . . 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 11695 . . . . 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 3465 . . 3  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  I  e.  ( 0..^ ( # `  S
) ) )  ->  I  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
30293impa 1183 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( 0..^ ( # `  S ) ) )  ->  I  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )
31 fvex 5810 . . 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 5889 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 1370    e. wcel 1758   _Vcvv 3078    C_ wss 3437   ifcif 3900   class class class wbr 4401    |-> cmpt 4459   ` cfv 5527  (class class class)co 6201   Fincfn 7421   RRcr 9393   0cc0 9394    + caddc 9397    <_ cle 9531    - cmin 9707   NN0cn0 10691   ZZcz 10758   ZZ>=cuz 10973  ..^cfzo 11666   #chash 12221  Word cword 12340   concat cconcat 12342
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1955  ax-ext 2432  ax-rep 4512  ax-sep 4522  ax-nul 4530  ax-pow 4579  ax-pr 4640  ax-un 6483  ax-cnex 9450  ax-resscn 9451  ax-1cn 9452  ax-icn 9453  ax-addcl 9454  ax-addrcl 9455  ax-mulcl 9456  ax-mulrcl 9457  ax-mulcom 9458  ax-addass 9459  ax-mulass 9460  ax-distr 9461  ax-i2m1 9462  ax-1ne0 9463  ax-1rid 9464  ax-rnegex 9465  ax-rrecex 9466  ax-cnre 9467  ax-pre-lttri 9468  ax-pre-lttrn 9469  ax-pre-ltadd 9470  ax-pre-mulgt0 9471
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2266  df-mo 2267  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2650  df-nel 2651  df-ral 2804  df-rex 2805  df-reu 2806  df-rab 2808  df-v 3080  df-sbc 3295  df-csb 3397  df-dif 3440  df-un 3442  df-in 3444  df-ss 3451  df-pss 3453  df-nul 3747  df-if 3901  df-pw 3971  df-sn 3987  df-pr 3989  df-tp 3991  df-op 3993  df-uni 4201  df-int 4238  df-iun 4282  df-br 4402  df-opab 4460  df-mpt 4461  df-tr 4495  df-eprel 4741  df-id 4745  df-po 4750  df-so 4751  df-fr 4788  df-we 4790  df-ord 4831  df-on 4832  df-lim 4833  df-suc 4834  df-xp 4955  df-rel 4956  df-cnv 4957  df-co 4958  df-dm 4959  df-rn 4960  df-res 4961  df-ima 4962  df-iota 5490  df-fun 5529  df-fn 5530  df-f 5531  df-f1 5532  df-fo 5533  df-f1o 5534  df-fv 5535  df-riota 6162  df-ov 6204  df-oprab 6205  df-mpt2 6206  df-om 6588  df-1st 6688  df-2nd 6689  df-recs 6943  df-rdg 6977  df-1o 7031  df-oadd 7035  df-er 7212  df-en 7422  df-dom 7423  df-sdom 7424  df-fin 7425  df-card 8221  df-pnf 9532  df-mnf 9533  df-xr 9534  df-ltxr 9535  df-le 9536  df-sub 9709  df-neg 9710  df-nn 10435  df-n0 10692  df-z 10759  df-uz 10974  df-fz 11556  df-fzo 11667  df-hash 12222  df-word 12348  df-concat 12350
This theorem is referenced by:  ccatsymb  12400  ccatfv0  12401  ccatval1lsw  12402  ccatrid  12404  ccatass  12405  ccats1val1  12425  ccatswrd  12469  swrdccat1  12470  cats1un  12489  swrdccatin1  12493  swrdccatin12lem3  12500  swrdccatin12  12501  splfv1  12516  splfv2a  12517  revccat  12525  cshwidxmod  12559  cats1fv  12605  gsumccat  15639  efgsp1  16356  efgredlemd  16363  efgrelexlemb  16369  signstfvn  27115  signstfvp  27117  signstfvneq0  27118  ccat2s1p1  30414  ccat2s1fvw  30420  clwwlkel  30604  wwlkext2clwwlk  30614
  Copyright terms: Public domain W3C validator