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

Theorem ccatcl 12270
Description: The concatenation of two words is a word. (Contributed by FL, 2-Feb-2014.) (Proof shortened by Stefan O'Rear, 15-Aug-2015.)
Assertion
Ref Expression
ccatcl  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( S concat  T )  e. Word  B )

Proof of Theorem ccatcl
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 ccatfval 12269 . 2  |-  ( ( 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 ) ) ) ) ) )
2 wrdf 12236 . . . . . . 7  |-  ( S  e. Word  B  ->  S : ( 0..^ (
# `  S )
) --> B )
32ad2antrr 720 . . . . . 6  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  S : ( 0..^ (
# `  S )
) --> B )
43ffvelrnda 5840 . . . . 5  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  x  e.  ( 0..^ ( # `  S
) ) )  -> 
( S `  x
)  e.  B )
5 wrdf 12236 . . . . . . . 8  |-  ( T  e. Word  B  ->  T : ( 0..^ (
# `  T )
) --> B )
65adantl 463 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T : ( 0..^ ( # `  T
) ) --> B )
76ad2antrr 720 . . . . . 6  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  T : ( 0..^ (
# `  T )
) --> B )
8 simpr 458 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
9 wrdfin 12244 . . . . . . . . . . . . . 14  |-  ( S  e. Word  B  ->  S  e.  Fin )
109adantr 462 . . . . . . . . . . . . 13  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
11 hashcl 12122 . . . . . . . . . . . . 13  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
1210, 11syl 16 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  NN0 )
1312nn0zd 10741 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  ZZ )
1413adantr 462 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( # `  S )  e.  ZZ )
15 fzospliti 11577 . . . . . . . . . 10  |-  ( ( x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  e.  ( 0..^ ( # `  S ) )  \/  x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) ) )
168, 14, 15syl2anc 656 . . . . . . . . 9  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( x  e.  ( 0..^ ( # `  S
) )  \/  x  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) ) )
1716orcanai 899 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  x  e.  ( ( # `
 S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
1813ad2antrr 720 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( # `  S )  e.  ZZ )
19 fzosubel 11595 . . . . . . . 8  |-  ( ( x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  -  ( # `  S ) )  e.  ( ( ( # `  S
)  -  ( # `  S ) )..^ ( ( ( # `  S
)  +  ( # `  T ) )  -  ( # `  S ) ) ) )
2017, 18, 19syl2anc 656 . . . . . . 7  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( x  -  ( # `
 S ) )  e.  ( ( (
# `  S )  -  ( # `  S
) )..^ ( ( ( # `  S
)  +  ( # `  T ) )  -  ( # `  S ) ) ) )
2112nn0cnd 10634 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  CC )
2221subidd 9703 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  -  ( # `  S ) )  =  0 )
23 wrdfin 12244 . . . . . . . . . . . . 13  |-  ( T  e. Word  B  ->  T  e.  Fin )
2423adantl 463 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  e.  Fin )
25 hashcl 12122 . . . . . . . . . . . 12  |-  ( T  e.  Fin  ->  ( # `
 T )  e. 
NN0 )
2624, 25syl 16 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  NN0 )
2726nn0cnd 10634 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  CC )
2821, 27pncan2d 9717 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) )  =  ( # `  T
) )
2922, 28oveq12d 6108 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  -  ( # `
 S ) )..^ ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) ) )  =  ( 0..^ (
# `  T )
) )
3029ad2antrr 720 . . . . . . 7  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( ( ( # `  S )  -  ( # `
 S ) )..^ ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) ) )  =  ( 0..^ (
# `  T )
) )
3120, 30eleqtrd 2517 . . . . . 6  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( x  -  ( # `
 S ) )  e.  ( 0..^ (
# `  T )
) )
327, 31ffvelrnd 5841 . . . . 5  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( T `  (
x  -  ( # `  S ) ) )  e.  B )
334, 32ifclda 3818 . . . 4  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  if ( x  e.  ( 0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) )  e.  B
)
34 eqid 2441 . . . 4  |-  ( x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) 
|->  if ( x  e.  ( 0..^ ( # `  S ) ) ,  ( S `  x
) ,  ( T `
 ( x  -  ( # `  S ) ) ) ) )  =  ( x  e.  ( 0..^ ( (
# `  S )  +  ( # `  T
) ) )  |->  if ( x  e.  ( 0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) ) )
3533, 34fmptd 5864 . . 3  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) )  |->  if ( x  e.  ( 0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) ) ) : ( 0..^ ( (
# `  S )  +  ( # `  T
) ) ) --> B )
36 iswrdi 12235 . . 3  |-  ( ( x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) 
|->  if ( x  e.  ( 0..^ ( # `  S ) ) ,  ( S `  x
) ,  ( T `
 ( x  -  ( # `  S ) ) ) ) ) : ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) --> B  ->  ( x  e.  ( 0..^ ( (
# `  S )  +  ( # `  T
) ) )  |->  if ( x  e.  ( 0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) ) )  e. Word  B )
3735, 36syl 16 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) )  |->  if ( x  e.  ( 0..^ ( # `  S
) ) ,  ( S `  x ) ,  ( T `  ( x  -  ( # `
 S ) ) ) ) )  e. Word  B )
381, 37eqeltrd 2515 1  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( S concat  T )  e. Word  B )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 368    /\ wa 369    = wceq 1364    e. wcel 1761   ifcif 3788    e. cmpt 4347   -->wf 5411   ` cfv 5415  (class class class)co 6090   Fincfn 7306   0cc0 9278    + caddc 9281    - cmin 9591   NN0cn0 10575   ZZcz 10642  ..^cfzo 11544   #chash 12099  Word cword 12217   concat cconcat 12219
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-8 1763  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-rep 4400  ax-sep 4410  ax-nul 4418  ax-pow 4467  ax-pr 4528  ax-un 6371  ax-cnex 9334  ax-resscn 9335  ax-1cn 9336  ax-icn 9337  ax-addcl 9338  ax-addrcl 9339  ax-mulcl 9340  ax-mulrcl 9341  ax-mulcom 9342  ax-addass 9343  ax-mulass 9344  ax-distr 9345  ax-i2m1 9346  ax-1ne0 9347  ax-1rid 9348  ax-rnegex 9349  ax-rrecex 9350  ax-cnre 9351  ax-pre-lttri 9352  ax-pre-lttrn 9353  ax-pre-ltadd 9354  ax-pre-mulgt0 9355
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 961  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2261  df-mo 2262  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rab 2722  df-v 2972  df-sbc 3184  df-csb 3286  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-pss 3341  df-nul 3635  df-if 3789  df-pw 3859  df-sn 3875  df-pr 3877  df-tp 3879  df-op 3881  df-uni 4089  df-int 4126  df-iun 4170  df-br 4290  df-opab 4348  df-mpt 4349  df-tr 4383  df-eprel 4628  df-id 4632  df-po 4637  df-so 4638  df-fr 4675  df-we 4677  df-ord 4718  df-on 4719  df-lim 4720  df-suc 4721  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-rn 4847  df-res 4848  df-ima 4849  df-iota 5378  df-fun 5417  df-fn 5418  df-f 5419  df-f1 5420  df-fo 5421  df-f1o 5422  df-fv 5423  df-riota 6049  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-om 6476  df-1st 6576  df-2nd 6577  df-recs 6828  df-rdg 6862  df-1o 6916  df-oadd 6920  df-er 7097  df-en 7307  df-dom 7308  df-sdom 7309  df-fin 7310  df-card 8105  df-pnf 9416  df-mnf 9417  df-xr 9418  df-ltxr 9419  df-le 9420  df-sub 9593  df-neg 9594  df-nn 10319  df-n0 10576  df-z 10643  df-uz 10858  df-fz 11434  df-fzo 11545  df-hash 12100  df-word 12225  df-concat 12227
This theorem is referenced by:  ccatsymb  12277  ccatlid  12280  ccatrid  12281  ccatass  12282  lswccatn0lsw  12283  lswccat0lsw  12284  ccatws1cl  12299  ccatswrd  12346  swrdccat1  12347  swrdccat2  12348  cats1un  12366  swrdccatfn  12369  swrdccatin1  12370  swrdccatin2  12374  swrdccatin12lem2c  12375  swrdccatin12  12378  splcl  12390  spllen  12392  splfv1  12393  splfv2a  12394  splval2  12395  revccat  12402  cshwcl  12431  cats1cld  12478  cats1cli  12480  gsumccat  15512  gsumspl  15515  gsumwspan  15517  frmdplusg  15525  frmdmnd  15530  frmdsssubm  15532  frmdup1  15535  psgnuni  15998  efginvrel2  16217  efgsp1  16227  efgredleme  16233  efgredlemc  16235  efgcpbllemb  16245  efgcpbl2  16247  frgpuplem  16262  frgpup1  16265  psgnghm  17969  sseqf  26705  ofcccat  26872  signstfvn  26900  signstfvp  26902  signstfvc  26905  signsvfn  26913  signsvtn  26915  signshf  26919  wwlknext  30281  clwlkisclwwlk2  30377  clwwlkel  30380  wwlkext2clwwlk  30390  numclwwlkovf2ex  30604  numclwlk1lem2foa  30609  numclwlk1lem2fo  30613
  Copyright terms: Public domain W3C validator