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

Theorem cats1un 11753
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 11718 . . . . . 6  |-  ( B  e.  X  ->  <" B ">  e. Word  X )
2 ccatcl 11706 . . . . . 6  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( A concat  <" B "> )  e. Word  X )
31, 2sylan2 461 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  e. Word  X
)
4 wrdf 11696 . . . . 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 11707 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( # `
 ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
71, 6sylan2 461 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
8 s1len 11721 . . . . . . . . 9  |-  ( # `  <" B "> )  =  1
98oveq2i 6059 . . . . . . . 8  |-  ( (
# `  A )  +  ( # `  <" B "> )
)  =  ( (
# `  A )  +  1 )
107, 9syl6eq 2460 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  1 ) )
1110oveq2d 6064 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( 0..^ ( ( # `  A
)  +  1 ) ) )
12 lencl 11698 . . . . . . . . 9  |-  ( A  e. Word  X  ->  ( # `
 A )  e. 
NN0 )
1312adantr 452 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  NN0 )
14 nn0uz 10484 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  0 )
1513, 14syl6eleq 2502 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  ( ZZ>= ` 
0 ) )
16 fzosplitsn 11158 . . . . . . 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 2444 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1918feq2d 5548 . . . 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 202 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> ) : ( ( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) --> X )
21 ffn 5558 . . 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 11696 . . . . 5  |-  ( A  e. Word  X  ->  A : ( 0..^ (
# `  A )
) --> X )
2423adantr 452 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A : ( 0..^ ( # `  A
) ) --> X )
25 eqid 2412 . . . . . 6  |-  { <. (
# `  A ) ,  B >. }  =  { <. ( # `  A
) ,  B >. }
26 fsng 5874 . . . . . 6  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  ( { <. ( # `
 A ) ,  B >. } : {
( # `  A ) } --> { B }  <->  {
<. ( # `  A
) ,  B >. }  =  { <. ( # `
 A ) ,  B >. } ) )
2725, 26mpbiri 225 . . . . 5  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
2812, 27sylan 458 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
29 fzonel 11115 . . . . . 6  |-  -.  ( # `
 A )  e.  ( 0..^ ( # `  A ) )
3029a1i 11 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
31 disjsn 3836 . . . . 5  |-  ( ( ( 0..^ ( # `  A ) )  i^i 
{ ( # `  A
) } )  =  (/) 
<->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
3230, 31sylibr 204 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( 0..^ (
# `  A )
)  i^i  { ( # `
 A ) } )  =  (/) )
33 fun 5574 . . . 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 1183 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> ( X  u.  { B }
) )
35 ffn 5558 . . 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 3456 . . 3  |-  ( x  e.  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } )  <->  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )
38 ccatval1 11708 . . . . . . 7  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  x  e.  ( 0..^ ( # `  A ) ) )  ->  ( ( A concat  <" B "> ) `  x )  =  ( A `  x ) )
391, 38syl3an2 1218 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
40393expa 1153 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
41 simpr 448 . . . . . . . 8  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  e.  ( 0..^ ( # `  A
) ) )
42 nelne2 2665 . . . . . . . 8  |-  ( ( x  e.  ( 0..^ ( # `  A
) )  /\  -.  ( # `  A )  e.  ( 0..^ (
# `  A )
) )  ->  x  =/=  ( # `  A
) )
4341, 29, 42sylancl 644 . . . . . . 7  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  =/=  ( # `  A
) )
4443necomd 2658 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( # `  A )  =/=  x )
45 fvunsn 5892 . . . . . 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 2447 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
48 fvex 5709 . . . . . . . . 9  |-  ( # `  A )  e.  _V
4948a1i 11 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  _V )
50 elex 2932 . . . . . . . . 9  |-  ( B  e.  X  ->  B  e.  _V )
5150adantl 453 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  B  e.  _V )
52 fdm 5562 . . . . . . . . . . 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 2479 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( # `  A
)  e.  dom  A  <->  (
# `  A )  e.  ( 0..^ ( # `  A ) ) ) )
5529, 54mtbiri 295 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  dom  A
)
56 fsnunfv 5900 . . . . . . . 8  |-  ( ( ( # `  A
)  e.  _V  /\  B  e.  _V  /\  -.  ( # `  A )  e.  dom  A )  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) )  =  B )
5749, 51, 55, 56syl3anc 1184 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) )  =  B )
58 simpl 444 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A  e. Word  X )
591adantl 453 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  <" B ">  e. Word  X )
60 1nn 9975 . . . . . . . . . . . 12  |-  1  e.  NN
618, 60eqeltri 2482 . . . . . . . . . . 11  |-  ( # `  <" B "> )  e.  NN
6261a1i 11 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  <" B "> )  e.  NN )
63 lbfzo0 11133 . . . . . . . . . 10  |-  ( 0  e.  ( 0..^ (
# `  <" B "> ) )  <->  ( # `  <" B "> )  e.  NN )
6462, 63sylibr 204 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  0  e.  ( 0..^ ( # `  <" B "> )
) )
65 ccatval3 11710 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  0  e.  ( 0..^ ( # `  <" B "> ) ) )  -> 
( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
6658, 59, 64, 65syl3anc 1184 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
67 s1fv 11723 . . . . . . . . 9  |-  ( B  e.  X  ->  ( <" B "> `  0 )  =  B )
6867adantl 453 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( <" B "> `  0 )  =  B )
6966, 68eqtrd 2444 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  B )
7013nn0cnd 10240 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  CC )
7170addid2d 9231 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0  +  (
# `  A )
)  =  ( # `  A ) )
7271fveq2d 5699 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( ( A concat  <" B "> ) `  ( # `  A
) ) )
7357, 69, 723eqtr2rd 2451 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  ( # `
 A ) )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
74 elsni 3806 . . . . . . . 8  |-  ( x  e.  { ( # `  A ) }  ->  x  =  ( # `  A
) )
7574fveq2d 5699 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x
)  =  ( ( A concat  <" B "> ) `  ( # `  A ) ) )
7674fveq2d 5699 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
7775, 76eqeq12d 2426 . . . . . 6  |-  ( x  e.  { ( # `  A ) }  ->  ( ( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x )  <->  ( ( A concat  <" B "> ) `  ( # `  A ) )  =  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) ) ) )
7873, 77syl5ibrcom 214 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( x  e.  {
( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x ) ) )
7978imp 419 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  { ( # `  A
) } )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
8047, 79jaodan 761 . . 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 462 . 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 5797 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 358    /\ wa 359    = wceq 1649    e. wcel 1721    =/= wne 2575   _Vcvv 2924    u. cun 3286    i^i cin 3287   (/)c0 3596   {csn 3782   <.cop 3785   dom cdm 4845    Fn wfn 5416   -->wf 5417   ` cfv 5421  (class class class)co 6048   0cc0 8954   1c1 8955    + caddc 8957   NNcn 9964   NN0cn0 10185   ZZ>=cuz 10452  ..^cfzo 11098   #chash 11581  Word cword 11680   concat cconcat 11681   <"cs1 11682
This theorem is referenced by:  s2prop  11824  s4prop  11825  pgpfaclem1  15602  vdegp1ai  21667  vdegp1bi  21668
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2393  ax-rep 4288  ax-sep 4298  ax-nul 4306  ax-pow 4345  ax-pr 4371  ax-un 4668  ax-cnex 9010  ax-resscn 9011  ax-1cn 9012  ax-icn 9013  ax-addcl 9014  ax-addrcl 9015  ax-mulcl 9016  ax-mulrcl 9017  ax-mulcom 9018  ax-addass 9019  ax-mulass 9020  ax-distr 9021  ax-i2m1 9022  ax-1ne0 9023  ax-1rid 9024  ax-rnegex 9025  ax-rrecex 9026  ax-cnre 9027  ax-pre-lttri 9028  ax-pre-lttrn 9029  ax-pre-ltadd 9030  ax-pre-mulgt0 9031
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2266  df-mo 2267  df-clab 2399  df-cleq 2405  df-clel 2408  df-nfc 2537  df-ne 2577  df-nel 2578  df-ral 2679  df-rex 2680  df-reu 2681  df-rab 2683  df-v 2926  df-sbc 3130  df-csb 3220  df-dif 3291  df-un 3293  df-in 3295  df-ss 3302  df-pss 3304  df-nul 3597  df-if 3708  df-pw 3769  df-sn 3788  df-pr 3789  df-tp 3790  df-op 3791  df-uni 3984  df-int 4019  df-iun 4063  df-br 4181  df-opab 4235  df-mpt 4236  df-tr 4271  df-eprel 4462  df-id 4466  df-po 4471  df-so 4472  df-fr 4509  df-we 4511  df-ord 4552  df-on 4553  df-lim 4554  df-suc 4555  df-om 4813  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-res 4857  df-ima 4858  df-iota 5385  df-fun 5423  df-fn 5424  df-f 5425  df-f1 5426  df-fo 5427  df-f1o 5428  df-fv 5429  df-ov 6051  df-oprab 6052  df-mpt2 6053  df-1st 6316  df-2nd 6317  df-riota 6516  df-recs 6600  df-rdg 6635  df-1o 6691  df-oadd 6695  df-er 6872  df-en 7077  df-dom 7078  df-sdom 7079  df-fin 7080  df-card 7790  df-pnf 9086  df-mnf 9087  df-xr 9088  df-ltxr 9089  df-le 9090  df-sub 9257  df-neg 9258  df-nn 9965  df-n0 10186  df-z 10247  df-uz 10453  df-fz 11008  df-fzo 11099  df-hash 11582  df-word 11686  df-concat 11687  df-s1 11688
  Copyright terms: Public domain W3C validator