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

Theorem ccatcl 11748
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 11747 . 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 11738 . . . . . . 7  |-  ( S  e. Word  B  ->  S : ( 0..^ (
# `  S )
) --> B )
32ad2antrr 708 . . . . . 6  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  S : ( 0..^ (
# `  S )
) --> B )
43ffvelrnda 5873 . . . . 5  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  x  e.  ( 0..^ ( # `  S
) ) )  -> 
( S `  x
)  e.  B )
5 wrdf 11738 . . . . . . . 8  |-  ( T  e. Word  B  ->  T : ( 0..^ (
# `  T )
) --> B )
65adantl 454 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T : ( 0..^ ( # `  T
) ) --> B )
76ad2antrr 708 . . . . . 6  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  T : ( 0..^ (
# `  T )
) --> B )
8 simpr 449 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
9 wrdfin 11739 . . . . . . . . . . . . . 14  |-  ( S  e. Word  B  ->  S  e.  Fin )
109adantr 453 . . . . . . . . . . . . 13  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
11 hashcl 11644 . . . . . . . . . . . . 13  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
1210, 11syl 16 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  NN0 )
1312nn0zd 10378 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  ZZ )
1413adantr 453 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( # `  S )  e.  ZZ )
15 fzospliti 11170 . . . . . . . . . 10  |-  ( ( x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  e.  ( 0..^ ( # `  S ) )  \/  x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) ) )
168, 14, 15syl2anc 644 . . . . . . . . 9  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( x  e.  ( 0..^ ( # `  S
) )  \/  x  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) ) )
1716orcanai 881 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  x  e.  ( ( # `
 S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
1813ad2antrr 708 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( # `  S )  e.  ZZ )
19 fzosubel 11182 . . . . . . . 8  |-  ( ( x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  -  ( # `  S ) )  e.  ( ( ( # `  S
)  -  ( # `  S ) )..^ ( ( ( # `  S
)  +  ( # `  T ) )  -  ( # `  S ) ) ) )
2017, 18, 19syl2anc 644 . . . . . . 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 10281 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  CC )
2221subidd 9404 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  -  ( # `  S ) )  =  0 )
23 wrdfin 11739 . . . . . . . . . . . . 13  |-  ( T  e. Word  B  ->  T  e.  Fin )
2423adantl 454 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  e.  Fin )
25 hashcl 11644 . . . . . . . . . . . 12  |-  ( T  e.  Fin  ->  ( # `
 T )  e. 
NN0 )
2624, 25syl 16 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  NN0 )
2726nn0cnd 10281 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  CC )
2821, 27pncan2d 9418 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) )  =  ( # `  T
) )
2922, 28oveq12d 6102 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  -  ( # `
 S ) )..^ ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) ) )  =  ( 0..^ (
# `  T )
) )
3029ad2antrr 708 . . . . . . 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 2514 . . . . . 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 5874 . . . . 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 3768 . . . 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 2438 . . . 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 5896 . . 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 11736 . . 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 2512 1  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( S concat  T )  e. Word  B )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 359    /\ wa 360    = wceq 1653    e. wcel 1726   ifcif 3741    e. cmpt 4269   -->wf 5453   ` cfv 5457  (class class class)co 6084   Fincfn 7112   0cc0 8995    + caddc 8998    - cmin 9296   NN0cn0 10226   ZZcz 10287  ..^cfzo 11140   #chash 11623  Word cword 11722   concat cconcat 11723
This theorem is referenced by:  ccatlid  11753  ccatrid  11754  ccatass  11755  ccatswrd  11778  swrdccat1  11779  swrdccat2  11780  splcl  11786  spllen  11788  splfv1  11789  splfv2a  11790  splval2  11791  cats1un  11795  revccat  11803  cats1cld  11824  cats1cli  11826  gsumccat  14792  gsumspl  14794  gsumwspan  14796  frmdplusg  14804  frmdmnd  14809  frmdsssubm  14811  frmdup1  14814  efginvrel2  15364  efgsp1  15374  efgredleme  15380  efgredlemc  15382  efgcpbllemb  15392  efgcpbl2  15394  frgpuplem  15409  frgpup1  15412  psgnuni  27413  psgnghm  27428  ccatsymb  28211  swrdccatfn  28238  swrdccatin1  28239  swrdccatin2  28244  swrdccatin12lem3c  28245  swrdccatin12  28248  cshwcl  28274  2cshw1  28285  2cshw2  28289  lstccats1fst  28297
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-rep 4323  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704  ax-cnex 9051  ax-resscn 9052  ax-1cn 9053  ax-icn 9054  ax-addcl 9055  ax-addrcl 9056  ax-mulcl 9057  ax-mulrcl 9058  ax-mulcom 9059  ax-addass 9060  ax-mulass 9061  ax-distr 9062  ax-i2m1 9063  ax-1ne0 9064  ax-1rid 9065  ax-rnegex 9066  ax-rrecex 9067  ax-cnre 9068  ax-pre-lttri 9069  ax-pre-lttrn 9070  ax-pre-ltadd 9071  ax-pre-mulgt0 9072
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-int 4053  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-tr 4306  df-eprel 4497  df-id 4501  df-po 4506  df-so 4507  df-fr 4544  df-we 4546  df-ord 4587  df-on 4588  df-lim 4589  df-suc 4590  df-om 4849  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-1st 6352  df-2nd 6353  df-riota 6552  df-recs 6636  df-rdg 6671  df-1o 6727  df-oadd 6731  df-er 6908  df-en 7113  df-dom 7114  df-sdom 7115  df-fin 7116  df-card 7831  df-pnf 9127  df-mnf 9128  df-xr 9129  df-ltxr 9130  df-le 9131  df-sub 9298  df-neg 9299  df-nn 10006  df-n0 10227  df-z 10288  df-uz 10494  df-fz 11049  df-fzo 11141  df-hash 11624  df-word 11728  df-concat 11729
  Copyright terms: Public domain W3C validator