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

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

Proof of Theorem ccatval2
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 ccatfval 12384 . . 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.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( S concat  T )  =  ( x  e.  ( 0..^ ( (
# `  S )  +  ( # `  T
) ) )  |->  if ( x  e.  ( 0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) ) ) )
3 eleq1 2523 . . . 4  |-  ( x  =  I  ->  (
x  e.  ( 0..^ ( # `  S
) )  <->  I  e.  ( 0..^ ( # `  S
) ) ) )
4 fveq2 5792 . . . 4  |-  ( x  =  I  ->  ( S `  x )  =  ( S `  I ) )
5 oveq1 6200 . . . . 5  |-  ( x  =  I  ->  (
x  -  ( # `  S ) )  =  ( I  -  ( # `
 S ) ) )
65fveq2d 5796 . . . 4  |-  ( x  =  I  ->  ( T `  ( x  -  ( # `  S
) ) )  =  ( T `  (
I  -  ( # `  S ) ) ) )
73, 4, 6ifbieq12d 3917 . . 3  |-  ( x  =  I  ->  if ( x  e.  (
0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) )  =  if ( I  e.  ( 0..^ ( # `  S
) ) ,  ( S `  I ) ,  ( T `  ( I  -  ( # `
 S ) ) ) ) )
8 fzodisj 11693 . . . . . 6  |-  ( ( 0..^ ( # `  S
) )  i^i  (
( # `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) )  =  (/)
9 minel 3835 . . . . . 6  |-  ( ( I  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( ( 0..^ ( # `  S
) )  i^i  (
( # `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) )  =  (/) )  ->  -.  I  e.  (
0..^ ( # `  S
) ) )
108, 9mpan2 671 . . . . 5  |-  ( I  e.  ( ( # `  S )..^ ( (
# `  S )  +  ( # `  T
) ) )  ->  -.  I  e.  (
0..^ ( # `  S
) ) )
11103ad2ant3 1011 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  -.  I  e.  (
0..^ ( # `  S
) ) )
12 iffalse 3900 . . . 4  |-  ( -.  I  e.  ( 0..^ ( # `  S
) )  ->  if ( I  e.  (
0..^ ( # `  S
) ) ,  ( S `  I ) ,  ( T `  ( I  -  ( # `
 S ) ) ) )  =  ( T `  ( I  -  ( # `  S
) ) ) )
1311, 12syl 16 . . 3  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  if ( I  e.  ( 0..^ ( # `  S
) ) ,  ( S `  I ) ,  ( T `  ( I  -  ( # `
 S ) ) ) )  =  ( T `  ( I  -  ( # `  S
) ) ) )
147, 13sylan9eqr 2514 . 2  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( ( # `
 S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) )  /\  x  =  I )  ->  if ( x  e.  (
0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) )  =  ( T `  ( I  -  ( # `  S
) ) ) )
15 wrdfin 12359 . . . . . 6  |-  ( S  e. Word  B  ->  S  e.  Fin )
1615adantr 465 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
17 hashcl 12236 . . . . 5  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
18 fzoss1 11686 . . . . . 6  |-  ( (
# `  S )  e.  ( ZZ>= `  0 )  ->  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) )  C_  (
0..^ ( ( # `  S )  +  (
# `  T )
) ) )
19 nn0uz 10999 . . . . . 6  |-  NN0  =  ( ZZ>= `  0 )
2018, 19eleq2s 2559 . . . . 5  |-  ( (
# `  S )  e.  NN0  ->  ( ( # `
 S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) 
C_  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
2116, 17, 203syl 20 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) )  C_  (
0..^ ( ( # `  S )  +  (
# `  T )
) ) )
2221sseld 3456 . . 3  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( I  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) )  ->  I  e.  ( 0..^ ( (
# `  S )  +  ( # `  T
) ) ) ) )
23223impia 1185 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  I  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
24 fvex 5802 . . 3  |-  ( T `
 ( I  -  ( # `  S ) ) )  e.  _V
2524a1i 11 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( T `  (
I  -  ( # `  S ) ) )  e.  _V )
262, 14, 23, 25fvmptd 5881 1  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  I  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( ( S concat  T
) `  I )  =  ( T `  ( I  -  ( # `
 S ) ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758   _Vcvv 3071    i^i cin 3428    C_ wss 3429   (/)c0 3738   ifcif 3892    |-> cmpt 4451   ` cfv 5519  (class class class)co 6193   Fincfn 7413   0cc0 9386    + caddc 9389    - cmin 9699   NN0cn0 10683   ZZ>=cuz 10965  ..^cfzo 11658   #chash 12213  Word cword 12332   concat cconcat 12334
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 1952  ax-ext 2430  ax-rep 4504  ax-sep 4514  ax-nul 4522  ax-pow 4571  ax-pr 4632  ax-un 6475  ax-cnex 9442  ax-resscn 9443  ax-1cn 9444  ax-icn 9445  ax-addcl 9446  ax-addrcl 9447  ax-mulcl 9448  ax-mulrcl 9449  ax-mulcom 9450  ax-addass 9451  ax-mulass 9452  ax-distr 9453  ax-i2m1 9454  ax-1ne0 9455  ax-1rid 9456  ax-rnegex 9457  ax-rrecex 9458  ax-cnre 9459  ax-pre-lttri 9460  ax-pre-lttrn 9461  ax-pre-ltadd 9462  ax-pre-mulgt0 9463
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 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rab 2804  df-v 3073  df-sbc 3288  df-csb 3390  df-dif 3432  df-un 3434  df-in 3436  df-ss 3443  df-pss 3445  df-nul 3739  df-if 3893  df-pw 3963  df-sn 3979  df-pr 3981  df-tp 3983  df-op 3985  df-uni 4193  df-int 4230  df-iun 4274  df-br 4394  df-opab 4452  df-mpt 4453  df-tr 4487  df-eprel 4733  df-id 4737  df-po 4742  df-so 4743  df-fr 4780  df-we 4782  df-ord 4823  df-on 4824  df-lim 4825  df-suc 4826  df-xp 4947  df-rel 4948  df-cnv 4949  df-co 4950  df-dm 4951  df-rn 4952  df-res 4953  df-ima 4954  df-iota 5482  df-fun 5521  df-fn 5522  df-f 5523  df-f1 5524  df-fo 5525  df-f1o 5526  df-fv 5527  df-riota 6154  df-ov 6196  df-oprab 6197  df-mpt2 6198  df-om 6580  df-1st 6680  df-2nd 6681  df-recs 6935  df-rdg 6969  df-1o 7023  df-oadd 7027  df-er 7204  df-en 7414  df-dom 7415  df-sdom 7416  df-fin 7417  df-card 8213  df-pnf 9524  df-mnf 9525  df-xr 9526  df-ltxr 9527  df-le 9528  df-sub 9701  df-neg 9702  df-nn 10427  df-n0 10684  df-z 10751  df-uz 10966  df-fz 11548  df-fzo 11659  df-hash 12214  df-word 12340  df-concat 12342
This theorem is referenced by:  ccatval3  12389  ccatsymb  12392  ccatlid  12395  ccatass  12397  ccats1val2  12418  ccatswrd  12461  swrdccatin12lem2  12491  swrdccatin12  12493  revccat  12517  cshwidxmod  12551  ccat2s1p2  30407  ccatw2s1p1  30410  ccatw2s1p2  30411
  Copyright terms: Public domain W3C validator