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

Theorem ccatcl 11736
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 11735 . 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 11726 . . . . . . 7  |-  ( S  e. Word  B  ->  S : ( 0..^ (
# `  S )
) --> B )
32ad2antrr 707 . . . . . 6  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  S : ( 0..^ (
# `  S )
) --> B )
43ffvelrnda 5863 . . . . 5  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  x  e.  ( 0..^ ( # `  S
) ) )  -> 
( S `  x
)  e.  B )
5 wrdf 11726 . . . . . . . 8  |-  ( T  e. Word  B  ->  T : ( 0..^ (
# `  T )
) --> B )
65adantl 453 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T : ( 0..^ ( # `  T
) ) --> B )
76ad2antrr 707 . . . . . 6  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  T : ( 0..^ (
# `  T )
) --> B )
8 simpr 448 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  ->  x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
9 wrdfin 11727 . . . . . . . . . . . . . 14  |-  ( S  e. Word  B  ->  S  e.  Fin )
109adantr 452 . . . . . . . . . . . . 13  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  S  e.  Fin )
11 hashcl 11632 . . . . . . . . . . . . 13  |-  ( S  e.  Fin  ->  ( # `
 S )  e. 
NN0 )
1210, 11syl 16 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  NN0 )
1312nn0zd 10366 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  ZZ )
1413adantr 452 . . . . . . . . . 10  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( # `  S )  e.  ZZ )
15 fzospliti 11158 . . . . . . . . . 10  |-  ( ( x  e.  ( 0..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  e.  ( 0..^ ( # `  S ) )  \/  x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) ) )
168, 14, 15syl2anc 643 . . . . . . . . 9  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  -> 
( x  e.  ( 0..^ ( # `  S
) )  \/  x  e.  ( ( # `  S
)..^ ( ( # `  S )  +  (
# `  T )
) ) ) )
1716orcanai 880 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  ->  x  e.  ( ( # `
 S )..^ ( ( # `  S
)  +  ( # `  T ) ) ) )
1813ad2antrr 707 . . . . . . . 8  |-  ( ( ( ( S  e. Word  B  /\  T  e. Word  B
)  /\  x  e.  ( 0..^ ( ( # `  S )  +  (
# `  T )
) ) )  /\  -.  x  e.  (
0..^ ( # `  S
) ) )  -> 
( # `  S )  e.  ZZ )
19 fzosubel 11170 . . . . . . . 8  |-  ( ( x  e.  ( (
# `  S )..^ ( ( # `  S
)  +  ( # `  T ) ) )  /\  ( # `  S
)  e.  ZZ )  ->  ( x  -  ( # `  S ) )  e.  ( ( ( # `  S
)  -  ( # `  S ) )..^ ( ( ( # `  S
)  +  ( # `  T ) )  -  ( # `  S ) ) ) )
2017, 18, 19syl2anc 643 . . . . . . 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 10269 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  S
)  e.  CC )
2221subidd 9392 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( # `  S
)  -  ( # `  S ) )  =  0 )
23 wrdfin 11727 . . . . . . . . . . . . 13  |-  ( T  e. Word  B  ->  T  e.  Fin )
2423adantl 453 . . . . . . . . . . . 12  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  e.  Fin )
25 hashcl 11632 . . . . . . . . . . . 12  |-  ( T  e.  Fin  ->  ( # `
 T )  e. 
NN0 )
2624, 25syl 16 . . . . . . . . . . 11  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  NN0 )
2726nn0cnd 10269 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( # `  T
)  e.  CC )
2821, 27pncan2d 9406 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) )  =  ( # `  T
) )
2922, 28oveq12d 6092 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( # `  S )  -  ( # `
 S ) )..^ ( ( ( # `  S )  +  (
# `  T )
)  -  ( # `  S ) ) )  =  ( 0..^ (
# `  T )
) )
3029ad2antrr 707 . . . . . . 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 2512 . . . . . 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 5864 . . . . 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 3759 . . . 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 2436 . . . 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 5886 . . 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 11724 . . 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 2510 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 358    /\ wa 359    = wceq 1652    e. wcel 1725   ifcif 3732    e. cmpt 4259   -->wf 5443   ` cfv 5447  (class class class)co 6074   Fincfn 7102   0cc0 8983    + caddc 8986    - cmin 9284   NN0cn0 10214   ZZcz 10275  ..^cfzo 11128   #chash 11611  Word cword 11710   concat cconcat 11711
This theorem is referenced by:  ccatlid  11741  ccatrid  11742  ccatass  11743  ccatswrd  11766  swrdccat1  11767  swrdccat2  11768  splcl  11774  spllen  11776  splfv1  11777  splfv2a  11778  splval2  11779  cats1un  11783  revccat  11791  cats1cld  11812  cats1cli  11814  gsumccat  14780  gsumspl  14782  gsumwspan  14784  frmdplusg  14792  frmdmnd  14797  frmdsssubm  14799  frmdup1  14802  efginvrel2  15352  efgsp1  15362  efgredleme  15368  efgredlemc  15370  efgcpbllemb  15380  efgcpbl2  15382  frgpuplem  15397  frgpup1  15400  psgnuni  27391  psgnghm  27406  ccatsymb  28153  swrdccatfn  28171  swrdccatin1  28172  swrdccatin2  28177  swrdccatin12lem3c  28178  swrdccatin12  28181  cshwcl  28207  2cshw1  28218  2cshw2  28222
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-rep 4313  ax-sep 4323  ax-nul 4331  ax-pow 4370  ax-pr 4396  ax-un 4694  ax-cnex 9039  ax-resscn 9040  ax-1cn 9041  ax-icn 9042  ax-addcl 9043  ax-addrcl 9044  ax-mulcl 9045  ax-mulrcl 9046  ax-mulcom 9047  ax-addass 9048  ax-mulass 9049  ax-distr 9050  ax-i2m1 9051  ax-1ne0 9052  ax-1rid 9053  ax-rnegex 9054  ax-rrecex 9055  ax-cnre 9056  ax-pre-lttri 9057  ax-pre-lttrn 9058  ax-pre-ltadd 9059  ax-pre-mulgt0 9060
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2703  df-rex 2704  df-reu 2705  df-rab 2707  df-v 2951  df-sbc 3155  df-csb 3245  df-dif 3316  df-un 3318  df-in 3320  df-ss 3327  df-pss 3329  df-nul 3622  df-if 3733  df-pw 3794  df-sn 3813  df-pr 3814  df-tp 3815  df-op 3816  df-uni 4009  df-int 4044  df-iun 4088  df-br 4206  df-opab 4260  df-mpt 4261  df-tr 4296  df-eprel 4487  df-id 4491  df-po 4496  df-so 4497  df-fr 4534  df-we 4536  df-ord 4577  df-on 4578  df-lim 4579  df-suc 4580  df-om 4839  df-xp 4877  df-rel 4878  df-cnv 4879  df-co 4880  df-dm 4881  df-rn 4882  df-res 4883  df-ima 4884  df-iota 5411  df-fun 5449  df-fn 5450  df-f 5451  df-f1 5452  df-fo 5453  df-f1o 5454  df-fv 5455  df-ov 6077  df-oprab 6078  df-mpt2 6079  df-1st 6342  df-2nd 6343  df-riota 6542  df-recs 6626  df-rdg 6661  df-1o 6717  df-oadd 6721  df-er 6898  df-en 7103  df-dom 7104  df-sdom 7105  df-fin 7106  df-card 7819  df-pnf 9115  df-mnf 9116  df-xr 9117  df-ltxr 9118  df-le 9119  df-sub 9286  df-neg 9287  df-nn 9994  df-n0 10215  df-z 10276  df-uz 10482  df-fz 11037  df-fzo 11129  df-hash 11612  df-word 11716  df-concat 11717
  Copyright terms: Public domain W3C validator