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

Theorem cats1un 12491
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 12414 . . . . . 6  |-  ( B  e.  X  ->  <" B ">  e. Word  X )
2 ccatcl 12395 . . . . . 6  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( A concat  <" B "> )  e. Word  X )
31, 2sylan2 474 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  e. Word  X
)
4 wrdf 12361 . . . . 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 12396 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( # `
 ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
71, 6sylan2 474 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
8 s1len 12417 . . . . . . . . 9  |-  ( # `  <" B "> )  =  1
98oveq2i 6214 . . . . . . . 8  |-  ( (
# `  A )  +  ( # `  <" B "> )
)  =  ( (
# `  A )  +  1 )
107, 9syl6eq 2511 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  1 ) )
1110oveq2d 6219 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( 0..^ ( ( # `  A
)  +  1 ) ) )
12 lencl 12370 . . . . . . . . 9  |-  ( A  e. Word  X  ->  ( # `
 A )  e. 
NN0 )
1312adantr 465 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  NN0 )
14 nn0uz 11009 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  0 )
1513, 14syl6eleq 2552 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  ( ZZ>= ` 
0 ) )
16 fzosplitsn 11753 . . . . . . 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 2495 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1918feq2d 5658 . . . 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 210 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> ) : ( ( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) --> X )
21 ffn 5670 . . 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 12361 . . . . 5  |-  ( A  e. Word  X  ->  A : ( 0..^ (
# `  A )
) --> X )
2423adantr 465 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A : ( 0..^ ( # `  A
) ) --> X )
25 eqid 2454 . . . . . 6  |-  { <. (
# `  A ) ,  B >. }  =  { <. ( # `  A
) ,  B >. }
26 fsng 5994 . . . . . 6  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  ( { <. ( # `
 A ) ,  B >. } : {
( # `  A ) } --> { B }  <->  {
<. ( # `  A
) ,  B >. }  =  { <. ( # `
 A ) ,  B >. } ) )
2725, 26mpbiri 233 . . . . 5  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
2812, 27sylan 471 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
29 fzonel 11685 . . . . . 6  |-  -.  ( # `
 A )  e.  ( 0..^ ( # `  A ) )
3029a1i 11 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
31 disjsn 4047 . . . . 5  |-  ( ( ( 0..^ ( # `  A ) )  i^i 
{ ( # `  A
) } )  =  (/) 
<->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
3230, 31sylibr 212 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( 0..^ (
# `  A )
)  i^i  { ( # `
 A ) } )  =  (/) )
33 fun 5686 . . . 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 1218 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> ( X  u.  { B }
) )
35 ffn 5670 . . 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 3608 . . 3  |-  ( x  e.  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } )  <->  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )
38 ccatval1 12397 . . . . . . 7  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  x  e.  ( 0..^ ( # `  A ) ) )  ->  ( ( A concat  <" B "> ) `  x )  =  ( A `  x ) )
391, 38syl3an2 1253 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
40393expa 1188 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
41 simpr 461 . . . . . . . 8  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  e.  ( 0..^ ( # `  A
) ) )
42 nelne2 2782 . . . . . . . 8  |-  ( ( x  e.  ( 0..^ ( # `  A
) )  /\  -.  ( # `  A )  e.  ( 0..^ (
# `  A )
) )  ->  x  =/=  ( # `  A
) )
4341, 29, 42sylancl 662 . . . . . . 7  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  =/=  ( # `  A
) )
4443necomd 2723 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( # `  A )  =/=  x )
45 fvunsn 6022 . . . . . 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 2498 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
48 fvex 5812 . . . . . . . . 9  |-  ( # `  A )  e.  _V
4948a1i 11 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  _V )
50 elex 3087 . . . . . . . . 9  |-  ( B  e.  X  ->  B  e.  _V )
5150adantl 466 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  B  e.  _V )
52 fdm 5674 . . . . . . . . . . 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 2524 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( # `  A
)  e.  dom  A  <->  (
# `  A )  e.  ( 0..^ ( # `  A ) ) ) )
5529, 54mtbiri 303 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  dom  A
)
56 fsnunfv 6030 . . . . . . . 8  |-  ( ( ( # `  A
)  e.  _V  /\  B  e.  _V  /\  -.  ( # `  A )  e.  dom  A )  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) )  =  B )
5749, 51, 55, 56syl3anc 1219 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) )  =  B )
58 simpl 457 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A  e. Word  X )
591adantl 466 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  <" B ">  e. Word  X )
60 1nn 10447 . . . . . . . . . . . 12  |-  1  e.  NN
618, 60eqeltri 2538 . . . . . . . . . . 11  |-  ( # `  <" B "> )  e.  NN
6261a1i 11 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  <" B "> )  e.  NN )
63 lbfzo0 11706 . . . . . . . . . 10  |-  ( 0  e.  ( 0..^ (
# `  <" B "> ) )  <->  ( # `  <" B "> )  e.  NN )
6462, 63sylibr 212 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  0  e.  ( 0..^ ( # `  <" B "> )
) )
65 ccatval3 12399 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  0  e.  ( 0..^ ( # `  <" B "> ) ) )  -> 
( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
6658, 59, 64, 65syl3anc 1219 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
67 s1fv 12419 . . . . . . . . 9  |-  ( B  e.  X  ->  ( <" B "> `  0 )  =  B )
6867adantl 466 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( <" B "> `  0 )  =  B )
6966, 68eqtrd 2495 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  B )
7013nn0cnd 10752 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  CC )
7170addid2d 9684 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0  +  (
# `  A )
)  =  ( # `  A ) )
7271fveq2d 5806 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( ( A concat  <" B "> ) `  ( # `  A
) ) )
7357, 69, 723eqtr2rd 2502 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  ( # `
 A ) )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
74 elsni 4013 . . . . . . . 8  |-  ( x  e.  { ( # `  A ) }  ->  x  =  ( # `  A
) )
7574fveq2d 5806 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x
)  =  ( ( A concat  <" B "> ) `  ( # `  A ) ) )
7674fveq2d 5806 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
7775, 76eqeq12d 2476 . . . . . 6  |-  ( x  e.  { ( # `  A ) }  ->  ( ( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x )  <->  ( ( A concat  <" B "> ) `  ( # `  A ) )  =  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) ) ) )
7873, 77syl5ibrcom 222 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( x  e.  {
( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x ) ) )
7978imp 429 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  { ( # `  A
) } )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
8047, 79jaodan 783 . . 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 475 . 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 5912 1  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  =  ( A  u.  { <. (
# `  A ) ,  B >. } ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 368    /\ wa 369    = wceq 1370    e. wcel 1758    =/= wne 2648   _Vcvv 3078    u. cun 3437    i^i cin 3438   (/)c0 3748   {csn 3988   <.cop 3994   dom cdm 4951    Fn wfn 5524   -->wf 5525   ` cfv 5529  (class class class)co 6203   0cc0 9396   1c1 9397    + caddc 9399   NNcn 10436   NN0cn0 10693   ZZ>=cuz 10975  ..^cfzo 11668   #chash 12223  Word cword 12342   concat cconcat 12344   <"cs1 12345
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1955  ax-ext 2432  ax-rep 4514  ax-sep 4524  ax-nul 4532  ax-pow 4581  ax-pr 4642  ax-un 6485  ax-cnex 9452  ax-resscn 9453  ax-1cn 9454  ax-icn 9455  ax-addcl 9456  ax-addrcl 9457  ax-mulcl 9458  ax-mulrcl 9459  ax-mulcom 9460  ax-addass 9461  ax-mulass 9462  ax-distr 9463  ax-i2m1 9464  ax-1ne0 9465  ax-1rid 9466  ax-rnegex 9467  ax-rrecex 9468  ax-cnre 9469  ax-pre-lttri 9470  ax-pre-lttrn 9471  ax-pre-ltadd 9472  ax-pre-mulgt0 9473
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2266  df-mo 2267  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2650  df-nel 2651  df-ral 2804  df-rex 2805  df-reu 2806  df-rab 2808  df-v 3080  df-sbc 3295  df-csb 3399  df-dif 3442  df-un 3444  df-in 3446  df-ss 3453  df-pss 3455  df-nul 3749  df-if 3903  df-pw 3973  df-sn 3989  df-pr 3991  df-tp 3993  df-op 3995  df-uni 4203  df-int 4240  df-iun 4284  df-br 4404  df-opab 4462  df-mpt 4463  df-tr 4497  df-eprel 4743  df-id 4747  df-po 4752  df-so 4753  df-fr 4790  df-we 4792  df-ord 4833  df-on 4834  df-lim 4835  df-suc 4836  df-xp 4957  df-rel 4958  df-cnv 4959  df-co 4960  df-dm 4961  df-rn 4962  df-res 4963  df-ima 4964  df-iota 5492  df-fun 5531  df-fn 5532  df-f 5533  df-f1 5534  df-fo 5535  df-f1o 5536  df-fv 5537  df-riota 6164  df-ov 6206  df-oprab 6207  df-mpt2 6208  df-om 6590  df-1st 6690  df-2nd 6691  df-recs 6945  df-rdg 6979  df-1o 7033  df-oadd 7037  df-er 7214  df-en 7424  df-dom 7425  df-sdom 7426  df-fin 7427  df-card 8223  df-pnf 9534  df-mnf 9535  df-xr 9536  df-ltxr 9537  df-le 9538  df-sub 9711  df-neg 9712  df-nn 10437  df-n0 10694  df-z 10761  df-uz 10976  df-fz 11558  df-fzo 11669  df-hash 12224  df-word 12350  df-concat 12352  df-s1 12353
This theorem is referenced by:  s2prop  12645  s4prop  12646  pgpfaclem1  16707  vdegp1ai  23777  vdegp1bi  23778  wwlknext  30524
  Copyright terms: Public domain W3C validator