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

Theorem cats1un 11476
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 11441 . . . . . 6  |-  ( B  e.  X  ->  <" B ">  e. Word  X )
2 ccatcl 11429 . . . . . 6  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( A concat  <" B "> )  e. Word  X )
31, 2sylan2 460 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  e. Word  X
)
4 wrdf 11419 . . . . 5  |-  ( ( A concat  <" B "> )  e. Word  X  -> 
( A concat  <" B "> ) : ( 0..^ ( # `  ( A concat  <" B "> ) ) ) --> X )
53, 4syl 15 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> ) : ( 0..^ ( # `  ( A concat  <" B "> ) ) ) --> X )
6 ccatlen 11430 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X )  ->  ( # `
 ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
71, 6sylan2 460 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  ( # `  <" B "> ) ) )
8 s1len 11444 . . . . . . . . 9  |-  ( # `  <" B "> )  =  1
98oveq2i 5869 . . . . . . . 8  |-  ( (
# `  A )  +  ( # `  <" B "> )
)  =  ( (
# `  A )  +  1 )
107, 9syl6eq 2331 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  1 ) )
1110oveq2d 5874 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( 0..^ ( ( # `  A
)  +  1 ) ) )
12 lencl 11421 . . . . . . . . 9  |-  ( A  e. Word  X  ->  ( # `
 A )  e. 
NN0 )
1312adantr 451 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  NN0 )
14 nn0uz 10262 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  0 )
1513, 14syl6eleq 2373 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  ( ZZ>= ` 
0 ) )
16 fzosplitsn 10920 . . . . . . 7  |-  ( (
# `  A )  e.  ( ZZ>= `  0 )  ->  ( 0..^ ( (
# `  A )  +  1 ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1715, 16syl 15 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( (
# `  A )  +  1 ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1811, 17eqtrd 2315 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1918feq2d 5380 . . . 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 201 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> ) : ( ( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) --> X )
21 ffn 5389 . . 3  |-  ( ( A concat  <" B "> ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> X  -> 
( A concat  <" B "> )  Fn  (
( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) )
2220, 21syl 15 . 2  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A concat  <" B "> )  Fn  (
( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) )
23 wrdf 11419 . . . . 5  |-  ( A  e. Word  X  ->  A : ( 0..^ (
# `  A )
) --> X )
2423adantr 451 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A : ( 0..^ ( # `  A
) ) --> X )
25 eqid 2283 . . . . . 6  |-  { <. (
# `  A ) ,  B >. }  =  { <. ( # `  A
) ,  B >. }
26 fsng 5697 . . . . . 6  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  ( { <. ( # `
 A ) ,  B >. } : {
( # `  A ) } --> { B }  <->  {
<. ( # `  A
) ,  B >. }  =  { <. ( # `
 A ) ,  B >. } ) )
2725, 26mpbiri 224 . . . . 5  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
2812, 27sylan 457 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
29 fzonel 10887 . . . . . 6  |-  -.  ( # `
 A )  e.  ( 0..^ ( # `  A ) )
3029a1i 10 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
31 disjsn 3693 . . . . 5  |-  ( ( ( 0..^ ( # `  A ) )  i^i 
{ ( # `  A
) } )  =  (/) 
<->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
3230, 31sylibr 203 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( 0..^ (
# `  A )
)  i^i  { ( # `
 A ) } )  =  (/) )
33 fun 5405 . . . 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 1181 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> ( X  u.  { B }
) )
35 ffn 5389 . . 3  |-  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) : ( ( 0..^ (
# `  A )
)  u.  { (
# `  A ) } ) --> ( X  u.  { B }
)  ->  ( A  u.  { <. ( # `  A
) ,  B >. } )  Fn  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
3634, 35syl 15 . 2  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } )  Fn  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
37 elun 3316 . . 3  |-  ( x  e.  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } )  <->  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )
38 ccatval1 11431 . . . . . . 7  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  x  e.  ( 0..^ ( # `  A ) ) )  ->  ( ( A concat  <" B "> ) `  x )  =  ( A `  x ) )
391, 38syl3an2 1216 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
40393expa 1151 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( A `
 x ) )
41 simpr 447 . . . . . . . 8  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  e.  ( 0..^ ( # `  A
) ) )
42 nelne2 2536 . . . . . . . 8  |-  ( ( x  e.  ( 0..^ ( # `  A
) )  /\  -.  ( # `  A )  e.  ( 0..^ (
# `  A )
) )  ->  x  =/=  ( # `  A
) )
4341, 29, 42sylancl 643 . . . . . . 7  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  =/=  ( # `  A
) )
4443necomd 2529 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( # `  A )  =/=  x )
45 fvunsn 5712 . . . . . 6  |-  ( (
# `  A )  =/=  x  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x )  =  ( A `  x ) )
4644, 45syl 15 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  x )  =  ( A `  x ) )
4740, 46eqtr4d 2318 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
48 fvex 5539 . . . . . . . . 9  |-  ( # `  A )  e.  _V
4948a1i 10 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  _V )
50 elex 2796 . . . . . . . . 9  |-  ( B  e.  X  ->  B  e.  _V )
5150adantl 452 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  B  e.  _V )
52 fdm 5393 . . . . . . . . . . 11  |-  ( A : ( 0..^ (
# `  A )
) --> X  ->  dom  A  =  ( 0..^ (
# `  A )
) )
5324, 52syl 15 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  dom  A  =  ( 0..^ ( # `  A
) ) )
5453eleq2d 2350 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( # `  A
)  e.  dom  A  <->  (
# `  A )  e.  ( 0..^ ( # `  A ) ) ) )
5529, 54mtbiri 294 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  dom  A
)
56 fsnunfv 5720 . . . . . . . 8  |-  ( ( ( # `  A
)  e.  _V  /\  B  e.  _V  /\  -.  ( # `  A )  e.  dom  A )  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) )  =  B )
5749, 51, 55, 56syl3anc 1182 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) )  =  B )
58 simpl 443 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A  e. Word  X )
591adantl 452 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  <" B ">  e. Word  X )
60 1nn 9757 . . . . . . . . . . . 12  |-  1  e.  NN
618, 60eqeltri 2353 . . . . . . . . . . 11  |-  ( # `  <" B "> )  e.  NN
6261a1i 10 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  <" B "> )  e.  NN )
63 lbfzo0 10903 . . . . . . . . . 10  |-  ( 0  e.  ( 0..^ (
# `  <" B "> ) )  <->  ( # `  <" B "> )  e.  NN )
6462, 63sylibr 203 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  0  e.  ( 0..^ ( # `  <" B "> )
) )
65 ccatval3 11433 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  0  e.  ( 0..^ ( # `  <" B "> ) ) )  -> 
( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
6658, 59, 64, 65syl3anc 1182 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( <" B "> `  0 )
)
67 s1fv 11446 . . . . . . . . 9  |-  ( B  e.  X  ->  ( <" B "> `  0 )  =  B )
6867adantl 452 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( <" B "> `  0 )  =  B )
6966, 68eqtrd 2315 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  B )
7013nn0cnd 10020 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  CC )
7170addid2d 9013 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0  +  (
# `  A )
)  =  ( # `  A ) )
7271fveq2d 5529 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( ( A concat  <" B "> ) `  ( # `  A
) ) )
7357, 69, 723eqtr2rd 2322 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  ( # `
 A ) )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
74 elsni 3664 . . . . . . . 8  |-  ( x  e.  { ( # `  A ) }  ->  x  =  ( # `  A
) )
7574fveq2d 5529 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x
)  =  ( ( A concat  <" B "> ) `  ( # `  A ) ) )
7674fveq2d 5529 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
7775, 76eqeq12d 2297 . . . . . 6  |-  ( x  e.  { ( # `  A ) }  ->  ( ( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x )  <->  ( ( A concat  <" B "> ) `  ( # `  A ) )  =  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) ) ) )
7873, 77syl5ibrcom 213 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( x  e.  {
( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x ) ) )
7978imp 418 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  { ( # `  A
) } )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
8047, 79jaodan 760 . . 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 461 . 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 5625 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 357    /\ wa 358    = wceq 1623    e. wcel 1684    =/= wne 2446   _Vcvv 2788    u. cun 3150    i^i cin 3151   (/)c0 3455   {csn 3640   <.cop 3643   dom cdm 4689    Fn wfn 5250   -->wf 5251   ` cfv 5255  (class class class)co 5858   0cc0 8737   1c1 8738    + caddc 8740   NNcn 9746   NN0cn0 9965   ZZ>=cuz 10230  ..^cfzo 10870   #chash 11337  Word cword 11403   concat cconcat 11404   <"cs1 11405
This theorem is referenced by:  pgpfaclem1  15316  vdegp1ai  23908  vdegp1bi  23909  s2prop  28089  s4prop  28090
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-oadd 6483  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-card 7572  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-nn 9747  df-n0 9966  df-z 10025  df-uz 10231  df-fz 10783  df-fzo 10871  df-hash 11338  df-word 11409  df-concat 11410  df-s1 11411
  Copyright terms: Public domain W3C validator