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

Theorem wrd2f1tovbij 12954
Description: There is a bijection between words of length two with a fixed first symbol contained in a pair and the symbols contained in a pair together with the fixed symbol. (Contributed by Alexander van der Vekens, 28-Jul-2018.)
Assertion
Ref Expression
wrd2f1tovbij  |-  ( ( V  e.  Y  /\  P  e.  V )  ->  E. f  f : { w  e. Word  V  |  ( ( # `  w )  =  2  /\  ( w ` 
0 )  =  P  /\  { ( w `
 0 ) ,  ( w `  1
) }  e.  X
) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X }
)
Distinct variable groups:    P, f, n, w    f, V, n, w    f, X, n, w
Allowed substitution hints:    Y( w, f, n)

Proof of Theorem wrd2f1tovbij
Dummy variables  p  t  u  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 wrdexg 12609 . . . 4  |-  ( V  e.  Y  -> Word  V  e. 
_V )
21adantr 463 . . 3  |-  ( ( V  e.  Y  /\  P  e.  V )  -> Word  V  e.  _V )
3 rabexg 4544 . . 3  |-  (Word  V  e.  _V  ->  { t  e. Word  V  |  ( (
# `  t )  =  2  /\  (
t `  0 )  =  P  /\  { ( t `  0 ) ,  ( t ` 
1 ) }  e.  X ) }  e.  _V )
4 mptexg 6123 . . 3  |-  ( { t  e. Word  V  | 
( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) }  e.  _V  ->  (
x  e.  { t  e. Word  V  |  ( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) } 
|->  ( x `  1
) )  e.  _V )
52, 3, 43syl 18 . 2  |-  ( ( V  e.  Y  /\  P  e.  V )  ->  ( x  e.  {
t  e. Word  V  | 
( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) } 
|->  ( x `  1
) )  e.  _V )
6 fveq2 5849 . . . . . . 7  |-  ( w  =  u  ->  ( # `
 w )  =  ( # `  u
) )
76eqeq1d 2404 . . . . . 6  |-  ( w  =  u  ->  (
( # `  w )  =  2  <->  ( # `  u
)  =  2 ) )
8 fveq1 5848 . . . . . . 7  |-  ( w  =  u  ->  (
w `  0 )  =  ( u ` 
0 ) )
98eqeq1d 2404 . . . . . 6  |-  ( w  =  u  ->  (
( w `  0
)  =  P  <->  ( u `  0 )  =  P ) )
10 fveq1 5848 . . . . . . . 8  |-  ( w  =  u  ->  (
w `  1 )  =  ( u ` 
1 ) )
118, 10preq12d 4059 . . . . . . 7  |-  ( w  =  u  ->  { ( w `  0 ) ,  ( w ` 
1 ) }  =  { ( u ` 
0 ) ,  ( u `  1 ) } )
1211eleq1d 2471 . . . . . 6  |-  ( w  =  u  ->  ( { ( w ` 
0 ) ,  ( w `  1 ) }  e.  X  <->  { (
u `  0 ) ,  ( u ` 
1 ) }  e.  X ) )
137, 9, 123anbi123d 1301 . . . . 5  |-  ( w  =  u  ->  (
( ( # `  w
)  =  2  /\  ( w `  0
)  =  P  /\  { ( w `  0
) ,  ( w `
 1 ) }  e.  X )  <->  ( ( # `
 u )  =  2  /\  ( u `
 0 )  =  P  /\  { ( u `  0 ) ,  ( u ` 
1 ) }  e.  X ) ) )
1413cbvrabv 3058 . . . 4  |-  { w  e. Word  V  |  ( (
# `  w )  =  2  /\  (
w `  0 )  =  P  /\  { ( w `  0 ) ,  ( w ` 
1 ) }  e.  X ) }  =  { u  e. Word  V  | 
( ( # `  u
)  =  2  /\  ( u `  0
)  =  P  /\  { ( u `  0
) ,  ( u `
 1 ) }  e.  X ) }
15 preq2 4052 . . . . . 6  |-  ( n  =  p  ->  { P ,  n }  =  { P ,  p }
)
1615eleq1d 2471 . . . . 5  |-  ( n  =  p  ->  ( { P ,  n }  e.  X  <->  { P ,  p }  e.  X )
)
1716cbvrabv 3058 . . . 4  |-  { n  e.  V  |  { P ,  n }  e.  X }  =  {
p  e.  V  |  { P ,  p }  e.  X }
18 fveq2 5849 . . . . . . . 8  |-  ( t  =  w  ->  ( # `
 t )  =  ( # `  w
) )
1918eqeq1d 2404 . . . . . . 7  |-  ( t  =  w  ->  (
( # `  t )  =  2  <->  ( # `  w
)  =  2 ) )
20 fveq1 5848 . . . . . . . 8  |-  ( t  =  w  ->  (
t `  0 )  =  ( w ` 
0 ) )
2120eqeq1d 2404 . . . . . . 7  |-  ( t  =  w  ->  (
( t `  0
)  =  P  <->  ( w `  0 )  =  P ) )
22 fveq1 5848 . . . . . . . . 9  |-  ( t  =  w  ->  (
t `  1 )  =  ( w ` 
1 ) )
2320, 22preq12d 4059 . . . . . . . 8  |-  ( t  =  w  ->  { ( t `  0 ) ,  ( t ` 
1 ) }  =  { ( w ` 
0 ) ,  ( w `  1 ) } )
2423eleq1d 2471 . . . . . . 7  |-  ( t  =  w  ->  ( { ( t ` 
0 ) ,  ( t `  1 ) }  e.  X  <->  { (
w `  0 ) ,  ( w ` 
1 ) }  e.  X ) )
2519, 21, 243anbi123d 1301 . . . . . 6  |-  ( t  =  w  ->  (
( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X )  <->  ( ( # `
 w )  =  2  /\  ( w `
 0 )  =  P  /\  { ( w `  0 ) ,  ( w ` 
1 ) }  e.  X ) ) )
2625cbvrabv 3058 . . . . 5  |-  { t  e. Word  V  |  ( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) }  =  { w  e. Word  V  |  ( ( # `
 w )  =  2  /\  ( w `
 0 )  =  P  /\  { ( w `  0 ) ,  ( w ` 
1 ) }  e.  X ) }
27 mpteq1 4475 . . . . 5  |-  ( { t  e. Word  V  | 
( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) }  =  { w  e. Word  V  |  ( ( # `
 w )  =  2  /\  ( w `
 0 )  =  P  /\  { ( w `  0 ) ,  ( w ` 
1 ) }  e.  X ) }  ->  ( x  e.  { t  e. Word  V  |  ( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) } 
|->  ( x `  1
) )  =  ( x  e.  { w  e. Word  V  |  ( (
# `  w )  =  2  /\  (
w `  0 )  =  P  /\  { ( w `  0 ) ,  ( w ` 
1 ) }  e.  X ) }  |->  ( x `  1 ) ) )
2826, 27ax-mp 5 . . . 4  |-  ( x  e.  { t  e. Word  V  |  ( ( # `
 t )  =  2  /\  ( t `
 0 )  =  P  /\  { ( t `  0 ) ,  ( t ` 
1 ) }  e.  X ) }  |->  ( x `  1 ) )  =  ( x  e.  { w  e. Word  V  |  ( ( # `
 w )  =  2  /\  ( w `
 0 )  =  P  /\  { ( w `  0 ) ,  ( w ` 
1 ) }  e.  X ) }  |->  ( x `  1 ) )
2914, 17, 28wwlktovf1o 12953 . . 3  |-  ( P  e.  V  ->  (
x  e.  { t  e. Word  V  |  ( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) } 
|->  ( x `  1
) ) : {
w  e. Word  V  | 
( ( # `  w
)  =  2  /\  ( w `  0
)  =  P  /\  { ( w `  0
) ,  ( w `
 1 ) }  e.  X ) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X } )
3029adantl 464 . 2  |-  ( ( V  e.  Y  /\  P  e.  V )  ->  ( x  e.  {
t  e. Word  V  | 
( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) } 
|->  ( x `  1
) ) : {
w  e. Word  V  | 
( ( # `  w
)  =  2  /\  ( w `  0
)  =  P  /\  { ( w `  0
) ,  ( w `
 1 ) }  e.  X ) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X } )
31 f1oeq1 5790 . . 3  |-  ( f  =  ( x  e. 
{ t  e. Word  V  |  ( ( # `  t )  =  2  /\  ( t ` 
0 )  =  P  /\  { ( t `
 0 ) ,  ( t `  1
) }  e.  X
) }  |->  ( x `
 1 ) )  ->  ( f : { w  e. Word  V  |  ( ( # `  w )  =  2  /\  ( w ` 
0 )  =  P  /\  { ( w `
 0 ) ,  ( w `  1
) }  e.  X
) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X }  <->  ( x  e.  { t  e. Word  V  |  ( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) } 
|->  ( x `  1
) ) : {
w  e. Word  V  | 
( ( # `  w
)  =  2  /\  ( w `  0
)  =  P  /\  { ( w `  0
) ,  ( w `
 1 ) }  e.  X ) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X } ) )
3231spcegv 3145 . 2  |-  ( ( x  e.  { t  e. Word  V  |  ( ( # `  t
)  =  2  /\  ( t `  0
)  =  P  /\  { ( t `  0
) ,  ( t `
 1 ) }  e.  X ) } 
|->  ( x `  1
) )  e.  _V  ->  ( ( x  e. 
{ t  e. Word  V  |  ( ( # `  t )  =  2  /\  ( t ` 
0 )  =  P  /\  { ( t `
 0 ) ,  ( t `  1
) }  e.  X
) }  |->  ( x `
 1 ) ) : { w  e. Word  V  |  ( ( # `
 w )  =  2  /\  ( w `
 0 )  =  P  /\  { ( w `  0 ) ,  ( w ` 
1 ) }  e.  X ) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X }  ->  E. f  f : { w  e. Word  V  |  ( ( # `  w )  =  2  /\  ( w ` 
0 )  =  P  /\  { ( w `
 0 ) ,  ( w `  1
) }  e.  X
) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X }
) )
335, 30, 32sylc 59 1  |-  ( ( V  e.  Y  /\  P  e.  V )  ->  E. f  f : { w  e. Word  V  |  ( ( # `  w )  =  2  /\  ( w ` 
0 )  =  P  /\  { ( w `
 0 ) ,  ( w `  1
) }  e.  X
) } -1-1-onto-> { n  e.  V  |  { P ,  n }  e.  X }
)
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 367    /\ w3a 974    = wceq 1405   E.wex 1633    e. wcel 1842   {crab 2758   _Vcvv 3059   {cpr 3974    |-> cmpt 4453   -1-1-onto->wf1o 5568   ` cfv 5569   0cc0 9522   1c1 9523   2c2 10626   #chash 12452  Word cword 12583
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1639  ax-4 1652  ax-5 1725  ax-6 1771  ax-7 1814  ax-8 1844  ax-9 1846  ax-10 1861  ax-11 1866  ax-12 1878  ax-13 2026  ax-ext 2380  ax-rep 4507  ax-sep 4517  ax-nul 4525  ax-pow 4572  ax-pr 4630  ax-un 6574  ax-cnex 9578  ax-resscn 9579  ax-1cn 9580  ax-icn 9581  ax-addcl 9582  ax-addrcl 9583  ax-mulcl 9584  ax-mulrcl 9585  ax-mulcom 9586  ax-addass 9587  ax-mulass 9588  ax-distr 9589  ax-i2m1 9590  ax-1ne0 9591  ax-1rid 9592  ax-rnegex 9593  ax-rrecex 9594  ax-cnre 9595  ax-pre-lttri 9596  ax-pre-lttrn 9597  ax-pre-ltadd 9598  ax-pre-mulgt0 9599
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 975  df-3an 976  df-tru 1408  df-ex 1634  df-nf 1638  df-sb 1764  df-eu 2242  df-mo 2243  df-clab 2388  df-cleq 2394  df-clel 2397  df-nfc 2552  df-ne 2600  df-nel 2601  df-ral 2759  df-rex 2760  df-reu 2761  df-rmo 2762  df-rab 2763  df-v 3061  df-sbc 3278  df-csb 3374  df-dif 3417  df-un 3419  df-in 3421  df-ss 3428  df-pss 3430  df-nul 3739  df-if 3886  df-pw 3957  df-sn 3973  df-pr 3975  df-tp 3977  df-op 3979  df-uni 4192  df-int 4228  df-iun 4273  df-br 4396  df-opab 4454  df-mpt 4455  df-tr 4490  df-eprel 4734  df-id 4738  df-po 4744  df-so 4745  df-fr 4782  df-we 4784  df-xp 4829  df-rel 4830  df-cnv 4831  df-co 4832  df-dm 4833  df-rn 4834  df-res 4835  df-ima 4836  df-pred 5367  df-ord 5413  df-on 5414  df-lim 5415  df-suc 5416  df-iota 5533  df-fun 5571  df-fn 5572  df-f 5573  df-f1 5574  df-fo 5575  df-f1o 5576  df-fv 5577  df-riota 6240  df-ov 6281  df-oprab 6282  df-mpt2 6283  df-om 6684  df-1st 6784  df-2nd 6785  df-wrecs 7013  df-recs 7075  df-rdg 7113  df-1o 7167  df-oadd 7171  df-er 7348  df-map 7459  df-pm 7460  df-en 7555  df-dom 7556  df-sdom 7557  df-fin 7558  df-card 8352  df-cda 8580  df-pnf 9660  df-mnf 9661  df-xr 9662  df-ltxr 9663  df-le 9664  df-sub 9843  df-neg 9844  df-nn 10577  df-2 10635  df-n0 10837  df-z 10906  df-uz 11128  df-fz 11727  df-fzo 11855  df-hash 12453  df-word 12591
This theorem is referenced by:  rusgranumwwlkl1  25363
  Copyright terms: Public domain W3C validator