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

Theorem hash2pwpr 12568
Description: If the size of a subset of an unordered pair is 2, the subset is the pair itself. (Contributed by Alexander van der Vekens, 9-Dec-2018.)
Assertion
Ref Expression
hash2pwpr  |-  ( ( ( # `  P
)  =  2  /\  P  e.  ~P { X ,  Y }
)  ->  P  =  { X ,  Y }
)

Proof of Theorem hash2pwpr
StepHypRef Expression
1 pwpr 4187 . . . . 5  |-  ~P { X ,  Y }  =  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } )
21eleq2i 2480 . . . 4  |-  ( P  e.  ~P { X ,  Y }  <->  P  e.  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } ) )
3 elun 3584 . . . 4  |-  ( P  e.  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } )  <->  ( P  e.  { (/) ,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } ) )
42, 3bitri 249 . . 3  |-  ( P  e.  ~P { X ,  Y }  <->  ( P  e.  { (/) ,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } ) )
5 elpri 3992 . . . . 5  |-  ( P  e.  { (/) ,  { X } }  ->  ( P  =  (/)  \/  P  =  { X } ) )
6 elpri 3992 . . . . 5  |-  ( P  e.  { { Y } ,  { X ,  Y } }  ->  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )
75, 6orim12i 514 . . . 4  |-  ( ( P  e.  { (/) ,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } )  ->  ( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y } ) ) )
8 fveq2 5849 . . . . . . . 8  |-  ( P  =  (/)  ->  ( # `  P )  =  (
# `  (/) ) )
9 hash0 12485 . . . . . . . . . 10  |-  ( # `  (/) )  =  0
109eqeq2i 2420 . . . . . . . . 9  |-  ( (
# `  P )  =  ( # `  (/) )  <->  ( # `  P
)  =  0 )
11 eqeq1 2406 . . . . . . . . . 10  |-  ( (
# `  P )  =  0  ->  (
( # `  P )  =  2  <->  0  = 
2 ) )
12 0ne2 10788 . . . . . . . . . . 11  |-  0  =/=  2
13 eqneqall 2610 . . . . . . . . . . 11  |-  ( 0  =  2  ->  (
0  =/=  2  ->  P  =  { X ,  Y } ) )
1412, 13mpi 20 . . . . . . . . . 10  |-  ( 0  =  2  ->  P  =  { X ,  Y } )
1511, 14syl6bi 228 . . . . . . . . 9  |-  ( (
# `  P )  =  0  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
1610, 15sylbi 195 . . . . . . . 8  |-  ( (
# `  P )  =  ( # `  (/) )  -> 
( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
178, 16syl 17 . . . . . . 7  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
18 hashsng 12486 . . . . . . . . 9  |-  ( X  e.  _V  ->  ( # `
 { X }
)  =  1 )
19 fveq2 5849 . . . . . . . . . . . 12  |-  ( { X }  =  P  ->  ( # `  { X } )  =  (
# `  P )
)
2019eqcoms 2414 . . . . . . . . . . 11  |-  ( P  =  { X }  ->  ( # `  { X } )  =  (
# `  P )
)
2120eqeq1d 2404 . . . . . . . . . 10  |-  ( P  =  { X }  ->  ( ( # `  { X } )  =  1  <-> 
( # `  P )  =  1 ) )
22 eqeq1 2406 . . . . . . . . . . 11  |-  ( (
# `  P )  =  1  ->  (
( # `  P )  =  2  <->  1  = 
2 ) )
23 1ne2 10789 . . . . . . . . . . . 12  |-  1  =/=  2
24 eqneqall 2610 . . . . . . . . . . . 12  |-  ( 1  =  2  ->  (
1  =/=  2  ->  P  =  { X ,  Y } ) )
2523, 24mpi 20 . . . . . . . . . . 11  |-  ( 1  =  2  ->  P  =  { X ,  Y } )
2622, 25syl6bi 228 . . . . . . . . . 10  |-  ( (
# `  P )  =  1  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
2721, 26syl6bi 228 . . . . . . . . 9  |-  ( P  =  { X }  ->  ( ( # `  { X } )  =  1  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
2818, 27syl5com 28 . . . . . . . 8  |-  ( X  e.  _V  ->  ( P  =  { X }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
29 snprc 4035 . . . . . . . . 9  |-  ( -.  X  e.  _V  <->  { X }  =  (/) )
30 eqeq2 2417 . . . . . . . . . 10  |-  ( { X }  =  (/)  ->  ( P  =  { X }  <->  P  =  (/) ) )
318, 9syl6eq 2459 . . . . . . . . . . . 12  |-  ( P  =  (/)  ->  ( # `  P )  =  0 )
3231eqeq1d 2404 . . . . . . . . . . 11  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  <->  0  = 
2 ) )
3332, 14syl6bi 228 . . . . . . . . . 10  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
3430, 33syl6bi 228 . . . . . . . . 9  |-  ( { X }  =  (/)  ->  ( P  =  { X }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) ) )
3529, 34sylbi 195 . . . . . . . 8  |-  ( -.  X  e.  _V  ->  ( P  =  { X }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
3628, 35pm2.61i 164 . . . . . . 7  |-  ( P  =  { X }  ->  ( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
3717, 36jaoi 377 . . . . . 6  |-  ( ( P  =  (/)  \/  P  =  { X } )  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) )
38 hashsng 12486 . . . . . . . . 9  |-  ( Y  e.  _V  ->  ( # `
 { Y }
)  =  1 )
39 fveq2 5849 . . . . . . . . . . . 12  |-  ( { Y }  =  P  ->  ( # `  { Y } )  =  (
# `  P )
)
4039eqcoms 2414 . . . . . . . . . . 11  |-  ( P  =  { Y }  ->  ( # `  { Y } )  =  (
# `  P )
)
4140eqeq1d 2404 . . . . . . . . . 10  |-  ( P  =  { Y }  ->  ( ( # `  { Y } )  =  1  <-> 
( # `  P )  =  1 ) )
4241, 26syl6bi 228 . . . . . . . . 9  |-  ( P  =  { Y }  ->  ( ( # `  { Y } )  =  1  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
4338, 42syl5com 28 . . . . . . . 8  |-  ( Y  e.  _V  ->  ( P  =  { Y }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
44 snprc 4035 . . . . . . . . 9  |-  ( -.  Y  e.  _V  <->  { Y }  =  (/) )
45 eqeq2 2417 . . . . . . . . . 10  |-  ( { Y }  =  (/)  ->  ( P  =  { Y }  <->  P  =  (/) ) )
468eqeq1d 2404 . . . . . . . . . . 11  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  <->  ( # `  (/) )  =  2 ) )
479eqeq1i 2409 . . . . . . . . . . . 12  |-  ( (
# `  (/) )  =  2  <->  0  =  2 )
4847, 14sylbi 195 . . . . . . . . . . 11  |-  ( (
# `  (/) )  =  2  ->  P  =  { X ,  Y }
)
4946, 48syl6bi 228 . . . . . . . . . 10  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
5045, 49syl6bi 228 . . . . . . . . 9  |-  ( { Y }  =  (/)  ->  ( P  =  { Y }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) ) )
5144, 50sylbi 195 . . . . . . . 8  |-  ( -.  Y  e.  _V  ->  ( P  =  { Y }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
5243, 51pm2.61i 164 . . . . . . 7  |-  ( P  =  { Y }  ->  ( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
53 ax-1 6 . . . . . . 7  |-  ( P  =  { X ,  Y }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
5452, 53jaoi 377 . . . . . 6  |-  ( ( P  =  { Y }  \/  P  =  { X ,  Y }
)  ->  ( ( # `
 P )  =  2  ->  P  =  { X ,  Y }
) )
5537, 54jaoi 377 . . . . 5  |-  ( ( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
5655com12 29 . . . 4  |-  ( (
# `  P )  =  2  ->  (
( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )  ->  P  =  { X ,  Y } ) )
577, 56syl5 30 . . 3  |-  ( (
# `  P )  =  2  ->  (
( P  e.  { (/)
,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } )  ->  P  =  { X ,  Y } ) )
584, 57syl5bi 217 . 2  |-  ( (
# `  P )  =  2  ->  ( P  e.  ~P { X ,  Y }  ->  P  =  { X ,  Y } ) )
5958imp 427 1  |-  ( ( ( # `  P
)  =  2  /\  P  e.  ~P { X ,  Y }
)  ->  P  =  { X ,  Y }
)
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 366    /\ wa 367    = wceq 1405    e. wcel 1842    =/= wne 2598   _Vcvv 3059    u. cun 3412   (/)c0 3738   ~Pcpw 3955   {csn 3972   {cpr 3974   ` cfv 5569   0cc0 9522   1c1 9523   2c2 10626   #chash 12452
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-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-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-er 7348  df-en 7555  df-dom 7556  df-sdom 7557  df-fin 7558  df-card 8352  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-hash 12453
This theorem is referenced by:  pr2pwpr  12569
  Copyright terms: Public domain W3C validator