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

Theorem ccatcl 12557
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 12556 . 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 12518 . . . . . . 7  |-  ( S  e. Word  B  ->  S : ( 0..^ (
# `  S )
) --> B )
32ad2antrr 725 . . . . . 6  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  S : ( 0..^ (
# `  S )
) --> B )
43ffvelrnda 6020 . . . . 5  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  x  e.  ( 0..^ ( # `  S
) ) )  -> 
( S `  x
)  e.  B )
5 wrdf 12518 . . . . . . . 8  |-  ( T  e. Word  B  ->  T : ( 0..^ (
# `  T )
) --> B )
65adantl 466 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T : ( 0..^ ( # `  T
) ) --> B )
76ad2antrr 725 . . . . . 6  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  T : ( 0..^ (
# `  T )
) --> B )
8 simpr 461 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
9 wrdfin 12526 . . . . . . . . . . . . . 14  |-  ( S  e. Word  B  ->  S  e.  Fin )
109adantr 465 . . . . . . . . . . . . 13  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
11 hashcl 12395 . . . . . . . . . . . . 13  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
1210, 11syl 16 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  NN0 )
1312nn0zd 10963 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  ZZ )
1413adantr 465 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( # `  S )  e.  ZZ )
15 fzospliti 11824 . . . . . . . . . 10  |-  ( ( x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  e.  ( 0..^ ( # `  S ) )  \/  x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) ) )
168, 14, 15syl2anc 661 . . . . . . . . 9  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( x  e.  ( 0..^ ( # `  S
) )  \/  x  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) ) )
1716orcanai 911 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  x  e.  ( ( # `
 S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
1813ad2antrr 725 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( # `  S )  e.  ZZ )
19 fzosubel 11842 . . . . . . . 8  |-  ( ( x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  -  ( # `  S ) )  e.  ( ( ( # `  S
)  -  ( # `  S ) )..^ ( ( ( # `  S
)  +  ( # `  T ) )  -  ( # `  S ) ) ) )
2017, 18, 19syl2anc 661 . . . . . . 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 10853 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  CC )
2221subidd 9917 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  -  ( # `  S ) )  =  0 )
23 wrdfin 12526 . . . . . . . . . . . . 13  |-  ( T  e. Word  B  ->  T  e.  Fin )
2423adantl 466 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  e.  Fin )
25 hashcl 12395 . . . . . . . . . . . 12  |-  ( T  e.  Fin  ->  ( # `
 T )  e. 
NN0 )
2624, 25syl 16 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  NN0 )
2726nn0cnd 10853 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  CC )
2821, 27pncan2d 9931 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) )  =  ( # `  T
) )
2922, 28oveq12d 6301 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  -  ( # `
 S ) )..^ ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) ) )  =  ( 0..^ (
# `  T )
) )
3029ad2antrr 725 . . . . . . 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 2557 . . . . . 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 6021 . . . . 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 3971 . . . 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 2467 . . . 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 6044 . . 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 12517 . . 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 2555 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 1379    e. wcel 1767   ifcif 3939    |-> cmpt 4505   -->wf 5583   ` cfv 5587  (class class class)co 6283   Fincfn 7516   0cc0 9491    + caddc 9494    - cmin 9804   NN0cn0 10794   ZZcz 10863  ..^cfzo 11791   #chash 12372  Word cword 12499   concat cconcat 12501
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6575  ax-cnex 9547  ax-resscn 9548  ax-1cn 9549  ax-icn 9550  ax-addcl 9551  ax-addrcl 9552  ax-mulcl 9553  ax-mulrcl 9554  ax-mulcom 9555  ax-addass 9556  ax-mulass 9557  ax-distr 9558  ax-i2m1 9559  ax-1ne0 9560  ax-1rid 9561  ax-rnegex 9562  ax-rrecex 9563  ax-cnre 9564  ax-pre-lttri 9565  ax-pre-lttrn 9566  ax-pre-ltadd 9567  ax-pre-mulgt0 9568
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5550  df-fun 5589  df-fn 5590  df-f 5591  df-f1 5592  df-fo 5593  df-f1o 5594  df-fv 5595  df-riota 6244  df-ov 6286  df-oprab 6287  df-mpt2 6288  df-om 6680  df-1st 6784  df-2nd 6785  df-recs 7042  df-rdg 7076  df-1o 7130  df-oadd 7134  df-er 7311  df-en 7517  df-dom 7518  df-sdom 7519  df-fin 7520  df-card 8319  df-pnf 9629  df-mnf 9630  df-xr 9631  df-ltxr 9632  df-le 9633  df-sub 9806  df-neg 9807  df-nn 10536  df-n0 10795  df-z 10864  df-uz 11082  df-fz 11672  df-fzo 11792  df-hash 12373  df-word 12507  df-concat 12509
This theorem is referenced by:  ccatsymb  12564  ccatlid  12567  ccatrid  12568  ccatass  12569  lswccatn0lsw  12570  lswccat0lsw  12571  ccatws1cl  12586  ccatswrd  12643  swrdccat1  12644  swrdccat2  12645  cats1un  12663  swrdccatfn  12669  swrdccatin1  12670  swrdccatin2  12674  swrdccatin12lem2c  12675  swrdccatin12  12678  splcl  12690  spllen  12692  splfv1  12693  splfv2a  12694  splval2  12695  revccat  12702  cshwcl  12731  cats1cld  12782  cats1cli  12784  gsumccat  15838  gsumspl  15841  gsumwspan  15843  frmdplusg  15851  frmdmnd  15856  frmdsssubm  15858  frmdup1  15861  psgnuni  16327  efginvrel2  16548  efgsp1  16558  efgredleme  16564  efgredlemc  16566  efgcpbllemb  16576  efgcpbl2  16578  frgpuplem  16593  frgpup1  16596  psgnghm  18399  wwlknext  24416  clwlkisclwwlk2  24482  clwwlkel  24485  wwlkext2clwwlk  24495  numclwwlkovf2ex  24779  numclwlk1lem2foa  24784  numclwlk1lem2fo  24788  sseqf  27987  ofcccat  28154  signstfvn  28182  signstfvp  28184  signstfvc  28187  signsvfn  28195  signsvtn  28197  signshf  28201
  Copyright terms: Public domain W3C validator