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

Theorem cats1un 11821
Description: Express a word with an extra symbol as the union of the word and the new value. (Contributed by Mario Carneiro, 28-Feb-2016.)
Assertion
Ref Expression
cats1un  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  =  ( A  u.  { <. (
# `  A ) ,  B >. } ) )

Proof of Theorem cats1un
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 s1cl 11786 . . . . . 6  |-  ( B  e.  X  ->  <" B ">  e. Word  X )
2 ccatcl 11774 . . . . . 6  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( A concat  <" B "> )  e. Word  X )
31, 2sylan2 462 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  e. Word  X
)
4 wrdf 11764 . . . . 5  |-  ( ( A concat  <" B "> )  e. Word  X  -> 
( A concat  <" B "> ) : ( 0..^ ( # `  ( A concat  <" B "> ) ) ) --> X )
53, 4syl 16 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> ) : ( 0..^ ( # `  ( A concat  <" B "> ) ) ) --> X )
6 ccatlen 11775 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( # `
 ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
71, 6sylan2 462 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
8 s1len 11789 . . . . . . . . 9  |-  ( # `  <" B "> )  =  1
98oveq2i 6121 . . . . . . . 8  |-  ( (
# `  A )  +  ( # `  <" B "> )
)  =  ( (
# `  A )  +  1 )
107, 9syl6eq 2490 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  1 ) )
1110oveq2d 6126 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( 0..^ ( ( # `  A
)  +  1 ) ) )
12 lencl 11766 . . . . . . . . 9  |-  ( A  e. Word  X  ->  ( # `
 A )  e. 
NN0 )
1312adantr 453 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  NN0 )
14 nn0uz 10551 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  0 )
1513, 14syl6eleq 2532 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  ( ZZ>= ` 
0 ) )
16 fzosplitsn 11226 . . . . . . 7  |-  ( (
# `  A )  e.  ( ZZ>= `  0 )  ->  ( 0..^ ( (
# `  A )  +  1 ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1715, 16syl 16 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( (
# `  A )  +  1 ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1811, 17eqtrd 2474 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1918feq2d 5610 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) : ( 0..^ ( # `  ( A concat  <" B "> ) ) ) --> X  <-> 
( A concat  <" B "> ) : ( ( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) --> X ) )
205, 19mpbid 203 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> ) : ( ( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) --> X )
21 ffn 5620 . . 3  |-  ( ( A concat  <" B "> ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> X  -> 
( A concat  <" B "> )  Fn  (
( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) )
2220, 21syl 16 . 2  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  Fn  (
( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) )
23 wrdf 11764 . . . . 5  |-  ( A  e. Word  X  ->  A : ( 0..^ (
# `  A )
) --> X )
2423adantr 453 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A : ( 0..^ ( # `  A
) ) --> X )
25 eqid 2442 . . . . . 6  |-  { <. (
# `  A ) ,  B >. }  =  { <. ( # `  A
) ,  B >. }
26 fsng 5936 . . . . . 6  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  ( { <. ( # `
 A ) ,  B >. } : {
( # `  A ) } --> { B }  <->  {
<. ( # `  A
) ,  B >. }  =  { <. ( # `
 A ) ,  B >. } ) )
2725, 26mpbiri 226 . . . . 5  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
2812, 27sylan 459 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
29 fzonel 11183 . . . . . 6  |-  -.  ( # `
 A )  e.  ( 0..^ ( # `  A ) )
3029a1i 11 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
31 disjsn 3892 . . . . 5  |-  ( ( ( 0..^ ( # `  A ) )  i^i 
{ ( # `  A
) } )  =  (/) 
<->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
3230, 31sylibr 205 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( 0..^ (
# `  A )
)  i^i  { ( # `
 A ) } )  =  (/) )
33 fun 5636 . . . 4  |-  ( ( ( A : ( 0..^ ( # `  A
) ) --> X  /\  {
<. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )  /\  (
( 0..^ ( # `  A ) )  i^i 
{ ( # `  A
) } )  =  (/) )  ->  ( A  u.  { <. ( # `
 A ) ,  B >. } ) : ( ( 0..^ (
# `  A )
)  u.  { (
# `  A ) } ) --> ( X  u.  { B }
) )
3424, 28, 32, 33syl21anc 1184 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> ( X  u.  { B }
) )
35 ffn 5620 . . 3  |-  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) : ( ( 0..^ (
# `  A )
)  u.  { (
# `  A ) } ) --> ( X  u.  { B }
)  ->  ( A  u.  { <. ( # `  A
) ,  B >. } )  Fn  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
3634, 35syl 16 . 2  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } )  Fn  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
37 elun 3474 . . 3  |-  ( x  e.  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } )  <->  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )
38 ccatval1 11776 . . . . . . 7  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  x  e.  ( 0..^ ( # `  A ) ) )  ->  ( ( A concat  <" B "> ) `  x )  =  ( A `  x ) )
391, 38syl3an2 1219 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
40393expa 1154 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
41 simpr 449 . . . . . . . 8  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  e.  ( 0..^ ( # `  A
) ) )
42 nelne2 2700 . . . . . . . 8  |-  ( ( x  e.  ( 0..^ ( # `  A
) )  /\  -.  ( # `  A )  e.  ( 0..^ (
# `  A )
) )  ->  x  =/=  ( # `  A
) )
4341, 29, 42sylancl 645 . . . . . . 7  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  =/=  ( # `  A
) )
4443necomd 2693 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( # `  A )  =/=  x )
45 fvunsn 5954 . . . . . 6  |-  ( (
# `  A )  =/=  x  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x )  =  ( A `  x ) )
4644, 45syl 16 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  x )  =  ( A `  x ) )
4740, 46eqtr4d 2477 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
48 fvex 5771 . . . . . . . . 9  |-  ( # `  A )  e.  _V
4948a1i 11 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  _V )
50 elex 2970 . . . . . . . . 9  |-  ( B  e.  X  ->  B  e.  _V )
5150adantl 454 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  B  e.  _V )
52 fdm 5624 . . . . . . . . . . 11  |-  ( A : ( 0..^ (
# `  A )
) --> X  ->  dom  A  =  ( 0..^ (
# `  A )
) )
5324, 52syl 16 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  dom  A  =  ( 0..^ ( # `  A
) ) )
5453eleq2d 2509 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( # `  A
)  e.  dom  A  <->  (
# `  A )  e.  ( 0..^ ( # `  A ) ) ) )
5529, 54mtbiri 296 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  dom  A
)
56 fsnunfv 5962 . . . . . . . 8  |-  ( ( ( # `  A
)  e.  _V  /\  B  e.  _V  /\  -.  ( # `  A )  e.  dom  A )  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) )  =  B )
5749, 51, 55, 56syl3anc 1185 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) )  =  B )
58 simpl 445 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A  e. Word  X )
591adantl 454 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  <" B ">  e. Word  X )
60 1nn 10042 . . . . . . . . . . . 12  |-  1  e.  NN
618, 60eqeltri 2512 . . . . . . . . . . 11  |-  ( # `  <" B "> )  e.  NN
6261a1i 11 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  <" B "> )  e.  NN )
63 lbfzo0 11201 . . . . . . . . . 10  |-  ( 0  e.  ( 0..^ (
# `  <" B "> ) )  <->  ( # `  <" B "> )  e.  NN )
6462, 63sylibr 205 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  0  e.  ( 0..^ ( # `  <" B "> )
) )
65 ccatval3 11778 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  0  e.  ( 0..^ ( # `  <" B "> ) ) )  -> 
( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
6658, 59, 64, 65syl3anc 1185 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
67 s1fv 11791 . . . . . . . . 9  |-  ( B  e.  X  ->  ( <" B "> `  0 )  =  B )
6867adantl 454 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( <" B "> `  0 )  =  B )
6966, 68eqtrd 2474 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  B )
7013nn0cnd 10307 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  CC )
7170addid2d 9298 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0  +  (
# `  A )
)  =  ( # `  A ) )
7271fveq2d 5761 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( ( A concat  <" B "> ) `  ( # `  A
) ) )
7357, 69, 723eqtr2rd 2481 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  ( # `
 A ) )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
74 elsni 3862 . . . . . . . 8  |-  ( x  e.  { ( # `  A ) }  ->  x  =  ( # `  A
) )
7574fveq2d 5761 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x
)  =  ( ( A concat  <" B "> ) `  ( # `  A ) ) )
7674fveq2d 5761 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
7775, 76eqeq12d 2456 . . . . . 6  |-  ( x  e.  { ( # `  A ) }  ->  ( ( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x )  <->  ( ( A concat  <" B "> ) `  ( # `  A ) )  =  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) ) ) )
7873, 77syl5ibrcom 215 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( x  e.  {
( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x ) ) )
7978imp 420 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  { ( # `  A
) } )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
8047, 79jaodan 762 . . 3  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
8137, 80sylan2b 463 . 2  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( ( 0..^ (
# `  A )
)  u.  { (
# `  A ) } ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
8222, 36, 81eqfnfvd 5859 1  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  =  ( A  u.  { <. (
# `  A ) ,  B >. } ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 359    /\ wa 360    = wceq 1653    e. wcel 1727    =/= wne 2605   _Vcvv 2962    u. cun 3304    i^i cin 3305   (/)c0 3613   {csn 3838   <.cop 3841   dom cdm 4907    Fn wfn 5478   -->wf 5479   ` cfv 5483  (class class class)co 6110   0cc0 9021   1c1 9022    + caddc 9024   NNcn 10031   NN0cn0 10252   ZZ>=cuz 10519  ..^cfzo 11166   #chash 11649  Word cword 11748   concat cconcat 11749   <"cs1 11750
This theorem is referenced by:  s2prop  11892  s4prop  11893  pgpfaclem1  15670  vdegp1ai  21737  vdegp1bi  21738
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 1668  ax-8 1689  ax-13 1729  ax-14 1731  ax-6 1746  ax-7 1751  ax-11 1763  ax-12 1953  ax-ext 2423  ax-rep 4345  ax-sep 4355  ax-nul 4363  ax-pow 4406  ax-pr 4432  ax-un 4730  ax-cnex 9077  ax-resscn 9078  ax-1cn 9079  ax-icn 9080  ax-addcl 9081  ax-addrcl 9082  ax-mulcl 9083  ax-mulrcl 9084  ax-mulcom 9085  ax-addass 9086  ax-mulass 9087  ax-distr 9088  ax-i2m1 9089  ax-1ne0 9090  ax-1rid 9091  ax-rnegex 9092  ax-rrecex 9093  ax-cnre 9094  ax-pre-lttri 9095  ax-pre-lttrn 9096  ax-pre-ltadd 9097  ax-pre-mulgt0 9098
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 2291  df-mo 2292  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2567  df-ne 2607  df-nel 2608  df-ral 2716  df-rex 2717  df-reu 2718  df-rab 2720  df-v 2964  df-sbc 3168  df-csb 3268  df-dif 3309  df-un 3311  df-in 3313  df-ss 3320  df-pss 3322  df-nul 3614  df-if 3764  df-pw 3825  df-sn 3844  df-pr 3845  df-tp 3846  df-op 3847  df-uni 4040  df-int 4075  df-iun 4119  df-br 4238  df-opab 4292  df-mpt 4293  df-tr 4328  df-eprel 4523  df-id 4527  df-po 4532  df-so 4533  df-fr 4570  df-we 4572  df-ord 4613  df-on 4614  df-lim 4615  df-suc 4616  df-om 4875  df-xp 4913  df-rel 4914  df-cnv 4915  df-co 4916  df-dm 4917  df-rn 4918  df-res 4919  df-ima 4920  df-iota 5447  df-fun 5485  df-fn 5486  df-f 5487  df-f1 5488  df-fo 5489  df-f1o 5490  df-fv 5491  df-ov 6113  df-oprab 6114  df-mpt2 6115  df-1st 6378  df-2nd 6379  df-riota 6578  df-recs 6662  df-rdg 6697  df-1o 6753  df-oadd 6757  df-er 6934  df-en 7139  df-dom 7140  df-sdom 7141  df-fin 7142  df-card 7857  df-pnf 9153  df-mnf 9154  df-xr 9155  df-ltxr 9156  df-le 9157  df-sub 9324  df-neg 9325  df-nn 10032  df-n0 10253  df-z 10314  df-uz 10520  df-fz 11075  df-fzo 11167  df-hash 11650  df-word 11754  df-concat 11755  df-s1 11756
  Copyright terms: Public domain W3C validator