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

Theorem cats1un 12692
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 ++  <" B "> )  =  ( A  u.  { <. (
# `  A ) ,  B >. } ) )

Proof of Theorem cats1un
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 ccatws1cl 12613 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A ++  <" B "> )  e. Word  X
)
2 wrdf 12538 . . . . 5  |-  ( ( A ++  <" B "> )  e. Word  X  -> 
( A ++  <" B "> ) : ( 0..^ ( # `  ( A ++  <" B "> ) ) ) --> X )
31, 2syl 16 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A ++  <" B "> ) : ( 0..^ ( # `  ( A ++  <" B "> ) ) ) --> X )
4 ccatws1len 12615 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  ( A ++  <" B "> ) )  =  ( ( # `  A
)  +  1 ) )
54oveq2d 6286 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A ++  <" B "> ) ) )  =  ( 0..^ ( ( # `  A
)  +  1 ) ) )
6 lencl 12549 . . . . . . . . 9  |-  ( A  e. Word  X  ->  ( # `
 A )  e. 
NN0 )
76adantr 463 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  NN0 )
8 nn0uz 11116 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  0 )
97, 8syl6eleq 2552 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  ( ZZ>= ` 
0 ) )
10 fzosplitsn 11899 . . . . . . 7  |-  ( (
# `  A )  e.  ( ZZ>= `  0 )  ->  ( 0..^ ( (
# `  A )  +  1 ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
119, 10syl 16 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( (
# `  A )  +  1 ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
125, 11eqtrd 2495 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0..^ ( # `  ( A ++  <" B "> ) ) )  =  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
1312feq2d 5700 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A ++  <" B "> ) : ( 0..^ (
# `  ( A ++  <" B "> ) ) ) --> X  <-> 
( A ++  <" B "> ) : ( ( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) --> X ) )
143, 13mpbid 210 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A ++  <" B "> ) : ( ( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) --> X )
15 ffn 5713 . . 3  |-  ( ( A ++  <" B "> ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> X  -> 
( A ++  <" B "> )  Fn  (
( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) )
1614, 15syl 16 . 2  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A ++  <" B "> )  Fn  (
( 0..^ ( # `  A ) )  u. 
{ ( # `  A
) } ) )
17 wrdf 12538 . . . . 5  |-  ( A  e. Word  X  ->  A : ( 0..^ (
# `  A )
) --> X )
1817adantr 463 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A : ( 0..^ ( # `  A
) ) --> X )
19 eqid 2454 . . . . . 6  |-  { <. (
# `  A ) ,  B >. }  =  { <. ( # `  A
) ,  B >. }
20 fsng 6046 . . . . . 6  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  ( { <. ( # `
 A ) ,  B >. } : {
( # `  A ) } --> { B }  <->  {
<. ( # `  A
) ,  B >. }  =  { <. ( # `
 A ) ,  B >. } ) )
2119, 20mpbiri 233 . . . . 5  |-  ( ( ( # `  A
)  e.  NN0  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
226, 21sylan 469 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  { <. ( # `  A
) ,  B >. } : { ( # `  A ) } --> { B } )
23 fzonel 11817 . . . . . 6  |-  -.  ( # `
 A )  e.  ( 0..^ ( # `  A ) )
2423a1i 11 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
25 disjsn 4076 . . . . 5  |-  ( ( ( 0..^ ( # `  A ) )  i^i 
{ ( # `  A
) } )  =  (/) 
<->  -.  ( # `  A
)  e.  ( 0..^ ( # `  A
) ) )
2624, 25sylibr 212 . . . 4  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( 0..^ (
# `  A )
)  i^i  { ( # `
 A ) } )  =  (/) )
27 fun 5730 . . . 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 }
) )
2818, 22, 26, 27syl21anc 1225 . . 3  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } ) : ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) --> ( X  u.  { B }
) )
29 ffn 5713 . . 3  |-  ( ( A  u.  { <. (
# `  A ) ,  B >. } ) : ( ( 0..^ (
# `  A )
)  u.  { (
# `  A ) } ) --> ( X  u.  { B }
)  ->  ( A  u.  { <. ( # `  A
) ,  B >. } )  Fn  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
3028, 29syl 16 . 2  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A  u.  { <. ( # `  A
) ,  B >. } )  Fn  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } ) )
31 elun 3631 . . 3  |-  ( x  e.  ( ( 0..^ ( # `  A
) )  u.  {
( # `  A ) } )  <->  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )
32 ccats1val1 12619 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A ++  <" B "> ) `  x )  =  ( A `  x ) )
33323expa 1194 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A ++  <" B "> ) `  x )  =  ( A `  x ) )
34 simpr 459 . . . . . . . 8  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  e.  ( 0..^ ( # `  A
) ) )
35 nelne2 2784 . . . . . . . 8  |-  ( ( x  e.  ( 0..^ ( # `  A
) )  /\  -.  ( # `  A )  e.  ( 0..^ (
# `  A )
) )  ->  x  =/=  ( # `  A
) )
3634, 23, 35sylancl 660 . . . . . . 7  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  ->  x  =/=  ( # `  A
) )
3736necomd 2725 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( # `  A )  =/=  x )
38 fvunsn 6079 . . . . . 6  |-  ( (
# `  A )  =/=  x  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x )  =  ( A `  x ) )
3937, 38syl 16 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  x )  =  ( A `  x ) )
4033, 39eqtr4d 2498 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( 0..^ ( # `  A
) ) )  -> 
( ( A ++  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x ) )
41 fvex 5858 . . . . . . . . 9  |-  ( # `  A )  e.  _V
4241a1i 11 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  _V )
43 elex 3115 . . . . . . . . 9  |-  ( B  e.  X  ->  B  e.  _V )
4443adantl 464 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  B  e.  _V )
45 fdm 5717 . . . . . . . . . . 11  |-  ( A : ( 0..^ (
# `  A )
) --> X  ->  dom  A  =  ( 0..^ (
# `  A )
) )
4618, 45syl 16 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  dom  A  =  ( 0..^ ( # `  A
) ) )
4746eleq2d 2524 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( # `  A
)  e.  dom  A  <->  (
# `  A )  e.  ( 0..^ ( # `  A ) ) ) )
4823, 47mtbiri 301 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  -.  ( # `  A
)  e.  dom  A
)
49 fsnunfv 6087 . . . . . . . 8  |-  ( ( ( # `  A
)  e.  _V  /\  B  e.  _V  /\  -.  ( # `  A )  e.  dom  A )  ->  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) )  =  B )
5042, 44, 48, 49syl3anc 1226 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A  u.  {
<. ( # `  A
) ,  B >. } ) `  ( # `  A ) )  =  B )
51 simpl 455 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  A  e. Word  X )
52 s1cl 12603 . . . . . . . . . 10  |-  ( B  e.  X  ->  <" B ">  e. Word  X )
5352adantl 464 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  <" B ">  e. Word  X )
54 s1len 12606 . . . . . . . . . . . 12  |-  ( # `  <" B "> )  =  1
55 1nn 10542 . . . . . . . . . . . 12  |-  1  e.  NN
5654, 55eqeltri 2538 . . . . . . . . . . 11  |-  ( # `  <" B "> )  e.  NN
5756a1i 11 . . . . . . . . . 10  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  <" B "> )  e.  NN )
58 lbfzo0 11839 . . . . . . . . . 10  |-  ( 0  e.  ( 0..^ (
# `  <" B "> ) )  <->  ( # `  <" B "> )  e.  NN )
5957, 58sylibr 212 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  0  e.  ( 0..^ ( # `  <" B "> )
) )
60 ccatval3 12586 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  <" B ">  e. Word  X  /\  0  e.  ( 0..^ ( # `  <" B "> ) ) )  -> 
( ( A ++  <" B "> ) `  ( 0  +  (
# `  A )
) )  =  (
<" B "> `  0 ) )
6151, 53, 59, 60syl3anc 1226 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A ++  <" B "> ) `  ( 0  +  (
# `  A )
) )  =  (
<" B "> `  0 ) )
62 s1fv 12608 . . . . . . . . 9  |-  ( B  e.  X  ->  ( <" B "> `  0 )  =  B )
6362adantl 464 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( <" B "> `  0 )  =  B )
6461, 63eqtrd 2495 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A ++  <" B "> ) `  ( 0  +  (
# `  A )
) )  =  B )
657nn0cnd 10850 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( # `  A
)  e.  CC )
6665addid2d 9770 . . . . . . . 8  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( 0  +  (
# `  A )
)  =  ( # `  A ) )
6766fveq2d 5852 . . . . . . 7  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A ++  <" B "> ) `  ( 0  +  (
# `  A )
) )  =  ( ( A ++  <" B "> ) `  ( # `
 A ) ) )
6850, 64, 673eqtr2rd 2502 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( ( A ++  <" B "> ) `  ( # `  A
) )  =  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  ( # `  A ) ) )
69 elsni 4041 . . . . . . . 8  |-  ( x  e.  { ( # `  A ) }  ->  x  =  ( # `  A
) )
7069fveq2d 5852 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A ++  <" B "> ) `  x
)  =  ( ( A ++  <" B "> ) `  ( # `  A ) ) )
7169fveq2d 5852 . . . . . . 7  |-  ( x  e.  { ( # `  A ) }  ->  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  ( # `  A ) ) )
7270, 71eqeq12d 2476 . . . . . 6  |-  ( x  e.  { ( # `  A ) }  ->  ( ( ( A ++  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x )  <-> 
( ( A ++  <" B "> ) `  ( # `  A
) )  =  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  ( # `  A ) ) ) )
7368, 72syl5ibrcom 222 . . . . 5  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( x  e.  {
( # `  A ) }  ->  ( ( A ++  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `
 A ) ,  B >. } ) `  x ) ) )
7473imp 427 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  { ( # `  A
) } )  -> 
( ( A ++  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x ) )
7540, 74jaodan 783 . . 3  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  ( x  e.  ( 0..^ ( # `  A ) )  \/  x  e.  { (
# `  A ) } ) )  -> 
( ( A ++  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x ) )
7631, 75sylan2b 473 . 2  |-  ( ( ( A  e. Word  X  /\  B  e.  X
)  /\  x  e.  ( ( 0..^ (
# `  A )
)  u.  { (
# `  A ) } ) )  -> 
( ( A ++  <" B "> ) `  x )  =  ( ( A  u.  { <. ( # `  A
) ,  B >. } ) `  x ) )
7716, 30, 76eqfnfvd 5960 1  |-  ( ( A  e. Word  X  /\  B  e.  X )  ->  ( A ++  <" B "> )  =  ( A  u.  { <. (
# `  A ) ,  B >. } ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 366    /\ wa 367    = wceq 1398    e. wcel 1823    =/= wne 2649   _Vcvv 3106    u. cun 3459    i^i cin 3460   (/)c0 3783   {csn 4016   <.cop 4022   dom cdm 4988    Fn wfn 5565   -->wf 5566   ` cfv 5570  (class class class)co 6270   0cc0 9481   1c1 9482    + caddc 9484   NNcn 10531   NN0cn0 10791   ZZ>=cuz 11082  ..^cfzo 11799   #chash 12387  Word cword 12518   ++ cconcat 12520   <"cs1 12521
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1623  ax-4 1636  ax-5 1709  ax-6 1752  ax-7 1795  ax-8 1825  ax-9 1827  ax-10 1842  ax-11 1847  ax-12 1859  ax-13 2004  ax-ext 2432  ax-rep 4550  ax-sep 4560  ax-nul 4568  ax-pow 4615  ax-pr 4676  ax-un 6565  ax-cnex 9537  ax-resscn 9538  ax-1cn 9539  ax-icn 9540  ax-addcl 9541  ax-addrcl 9542  ax-mulcl 9543  ax-mulrcl 9544  ax-mulcom 9545  ax-addass 9546  ax-mulass 9547  ax-distr 9548  ax-i2m1 9549  ax-1ne0 9550  ax-1rid 9551  ax-rnegex 9552  ax-rrecex 9553  ax-cnre 9554  ax-pre-lttri 9555  ax-pre-lttrn 9556  ax-pre-ltadd 9557  ax-pre-mulgt0 9558
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 972  df-3an 973  df-tru 1401  df-ex 1618  df-nf 1622  df-sb 1745  df-eu 2288  df-mo 2289  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2651  df-nel 2652  df-ral 2809  df-rex 2810  df-reu 2811  df-rmo 2812  df-rab 2813  df-v 3108  df-sbc 3325  df-csb 3421  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-pss 3477  df-nul 3784  df-if 3930  df-pw 4001  df-sn 4017  df-pr 4019  df-tp 4021  df-op 4023  df-uni 4236  df-int 4272  df-iun 4317  df-br 4440  df-opab 4498  df-mpt 4499  df-tr 4533  df-eprel 4780  df-id 4784  df-po 4789  df-so 4790  df-fr 4827  df-we 4829  df-ord 4870  df-on 4871  df-lim 4872  df-suc 4873  df-xp 4994  df-rel 4995  df-cnv 4996  df-co 4997  df-dm 4998  df-rn 4999  df-res 5000  df-ima 5001  df-iota 5534  df-fun 5572  df-fn 5573  df-f 5574  df-f1 5575  df-fo 5576  df-f1o 5577  df-fv 5578  df-riota 6232  df-ov 6273  df-oprab 6274  df-mpt2 6275  df-om 6674  df-1st 6773  df-2nd 6774  df-recs 7034  df-rdg 7068  df-1o 7122  df-oadd 7126  df-er 7303  df-en 7510  df-dom 7511  df-sdom 7512  df-fin 7513  df-card 8311  df-cda 8539  df-pnf 9619  df-mnf 9620  df-xr 9621  df-ltxr 9622  df-le 9623  df-sub 9798  df-neg 9799  df-nn 10532  df-2 10590  df-n0 10792  df-z 10861  df-uz 11083  df-fz 11676  df-fzo 11800  df-hash 12388  df-word 12526  df-concat 12528  df-s1 12529
This theorem is referenced by:  s2prop  12853  s4prop  12854  pgpfaclem1  17327  wwlknext  24926  vdegp1ai  25186  vdegp1bi  25187
  Copyright terms: Public domain W3C validator