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

Theorem cats1un 11566
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 11531 . . . . . 6  |-  ( B  e.  X  ->  <" B ">  e. Word  X )
2 ccatcl 11519 . . . . . 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 11509 . . . . 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 11520 . . . . . . . . 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 11534 . . . . . . . . 9  |-  ( # `  <" B "> )  =  1
98oveq2i 5953 . . . . . . . 8  |-  ( (
# `  A )  +  ( # `  <" B "> )
)  =  ( (
# `  A )  +  1 )
107, 9syl6eq 2406 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A concat  <" B "> ) )  =  ( ( # `  A
)  +  1 ) )
1110oveq2d 5958 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( 0..^ ( ( # `  A
)  +  1 ) ) )
12 lencl 11511 . . . . . . . . 9  |-  ( A  e. Word  X  ->  ( # `
 A )  e. 
NN0 )
1312adantr 451 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  NN0 )
14 nn0uz 10351 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  0 )
1513, 14syl6eleq 2448 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  ( ZZ>= ` 
0 ) )
16 fzosplitsn 11009 . . . . . . 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 2390 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A concat  <" B "> ) ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1918feq2d 5459 . . . 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 5469 . . 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 11509 . . . . 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 2358 . . . . . 6  |-  { <. (
# `  A ) ,  B >. }  =  { <. ( # `  A
) ,  B >. }
26 fsng 5777 . . . . . 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 10976 . . . . . 6  |-  -.  ( # `
 A )  e.  ( 0..^ ( # `  A ) )
3029a1i 10 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
31 disjsn 3769 . . . . 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 5485 . . . 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 5469 . . 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 3392 . . 3  |-  ( x  e.  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } )  <->  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )
38 ccatval1 11521 . . . . . . 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 2611 . . . . . . . 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 2604 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( # `  A )  =/=  x )
45 fvunsn 5793 . . . . . 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 2393 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A concat  <" B "> ) `  x
)  =  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) `  x ) )
48 fvex 5619 . . . . . . . . 9  |-  ( # `  A )  e.  _V
4948a1i 10 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  _V )
50 elex 2872 . . . . . . . . 9  |-  ( B  e.  X  ->  B  e.  _V )
5150adantl 452 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  B  e.  _V )
52 fdm 5473 . . . . . . . . . . 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 2425 . . . . . . . . 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 5801 . . . . . . . 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 9844 . . . . . . . . . . . 12  |-  1  e.  NN
618, 60eqeltri 2428 . . . . . . . . . . 11  |-  ( # `  <" B "> )  e.  NN
6261a1i 10 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  <" B "> )  e.  NN )
63 lbfzo0 10992 . . . . . . . . . 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 11523 . . . . . . . . 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 11536 . . . . . . . . 9  |-  ( B  e.  X  ->  ( <" B "> `  0 )  =  B )
6867adantl 452 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( <" B "> `  0 )  =  B )
6966, 68eqtrd 2390 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  B )
7013nn0cnd 10109 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  CC )
7170addid2d 9100 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0  +  (
# `  A )
)  =  ( # `  A ) )
7271fveq2d 5609 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  (
0  +  ( # `  A ) ) )  =  ( ( A concat  <" B "> ) `  ( # `  A
) ) )
7357, 69, 723eqtr2rd 2397 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A concat  <" B "> ) `  ( # `
 A ) )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
74 elsni 3740 . . . . . . . 8  |-  ( x  e.  { ( # `  A ) }  ->  x  =  ( # `  A
) )
7574fveq2d 5609 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A concat  <" B "> ) `  x
)  =  ( ( A concat  <" B "> ) `  ( # `  A ) ) )
7674fveq2d 5609 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
7775, 76eqeq12d 2372 . . . . . 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 5705 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 1642    e. wcel 1710    =/= wne 2521   _Vcvv 2864    u. cun 3226    i^i cin 3227   (/)c0 3531   {csn 3716   <.cop 3719   dom cdm 4768    Fn wfn 5329   -->wf 5330   ` cfv 5334  (class class class)co 5942   0cc0 8824   1c1 8825    + caddc 8827   NNcn 9833   NN0cn0 10054   ZZ>=cuz 10319  ..^cfzo 10959   #chash 11427  Word cword 11493   concat cconcat 11494   <"cs1 11495
This theorem is referenced by:  pgpfaclem1  15409  vdegp1ai  24312  vdegp1bi  24313  s2prop  27492  s4prop  27493
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1546  ax-5 1557  ax-17 1616  ax-9 1654  ax-8 1675  ax-13 1712  ax-14 1714  ax-6 1729  ax-7 1734  ax-11 1746  ax-12 1930  ax-ext 2339  ax-rep 4210  ax-sep 4220  ax-nul 4228  ax-pow 4267  ax-pr 4293  ax-un 4591  ax-cnex 8880  ax-resscn 8881  ax-1cn 8882  ax-icn 8883  ax-addcl 8884  ax-addrcl 8885  ax-mulcl 8886  ax-mulrcl 8887  ax-mulcom 8888  ax-addass 8889  ax-mulass 8890  ax-distr 8891  ax-i2m1 8892  ax-1ne0 8893  ax-1rid 8894  ax-rnegex 8895  ax-rrecex 8896  ax-cnre 8897  ax-pre-lttri 8898  ax-pre-lttrn 8899  ax-pre-ltadd 8900  ax-pre-mulgt0 8901
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1319  df-ex 1542  df-nf 1545  df-sb 1649  df-eu 2213  df-mo 2214  df-clab 2345  df-cleq 2351  df-clel 2354  df-nfc 2483  df-ne 2523  df-nel 2524  df-ral 2624  df-rex 2625  df-reu 2626  df-rab 2628  df-v 2866  df-sbc 3068  df-csb 3158  df-dif 3231  df-un 3233  df-in 3235  df-ss 3242  df-pss 3244  df-nul 3532  df-if 3642  df-pw 3703  df-sn 3722  df-pr 3723  df-tp 3724  df-op 3725  df-uni 3907  df-int 3942  df-iun 3986  df-br 4103  df-opab 4157  df-mpt 4158  df-tr 4193  df-eprel 4384  df-id 4388  df-po 4393  df-so 4394  df-fr 4431  df-we 4433  df-ord 4474  df-on 4475  df-lim 4476  df-suc 4477  df-om 4736  df-xp 4774  df-rel 4775  df-cnv 4776  df-co 4777  df-dm 4778  df-rn 4779  df-res 4780  df-ima 4781  df-iota 5298  df-fun 5336  df-fn 5337  df-f 5338  df-f1 5339  df-fo 5340  df-f1o 5341  df-fv 5342  df-ov 5945  df-oprab 5946  df-mpt2 5947  df-1st 6206  df-2nd 6207  df-riota 6388  df-recs 6472  df-rdg 6507  df-1o 6563  df-oadd 6567  df-er 6744  df-en 6949  df-dom 6950  df-sdom 6951  df-fin 6952  df-card 7659  df-pnf 8956  df-mnf 8957  df-xr 8958  df-ltxr 8959  df-le 8960  df-sub 9126  df-neg 9127  df-nn 9834  df-n0 10055  df-z 10114  df-uz 10320  df-fz 10872  df-fzo 10960  df-hash 11428  df-word 11499  df-concat 11500  df-s1 11501
  Copyright terms: Public domain W3C validator