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

Theorem hash2pwpr 12676
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 4186 . . . . 5  |-  ~P { X ,  Y }  =  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } )
21eleq2i 2541 . . . 4  |-  ( P  e.  ~P { X ,  Y }  <->  P  e.  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } ) )
3 elun 3565 . . . 4  |-  ( P  e.  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } )  <->  ( P  e.  { (/) ,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } ) )
42, 3bitri 257 . . 3  |-  ( P  e.  ~P { X ,  Y }  <->  ( P  e.  { (/) ,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } ) )
5 elpri 3976 . . . . 5  |-  ( P  e.  { (/) ,  { X } }  ->  ( P  =  (/)  \/  P  =  { X } ) )
6 elpri 3976 . . . . 5  |-  ( P  e.  { { Y } ,  { X ,  Y } }  ->  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )
75, 6orim12i 525 . . . 4  |-  ( ( P  e.  { (/) ,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } )  ->  ( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y } ) ) )
8 fveq2 5879 . . . . . . . 8  |-  ( P  =  (/)  ->  ( # `  P )  =  (
# `  (/) ) )
9 hash0 12586 . . . . . . . . . 10  |-  ( # `  (/) )  =  0
109eqeq2i 2483 . . . . . . . . 9  |-  ( (
# `  P )  =  ( # `  (/) )  <->  ( # `  P
)  =  0 )
11 eqeq1 2475 . . . . . . . . . 10  |-  ( (
# `  P )  =  0  ->  (
( # `  P )  =  2  <->  0  = 
2 ) )
12 0ne2 10844 . . . . . . . . . . 11  |-  0  =/=  2
13 eqneqall 2654 . . . . . . . . . . 11  |-  ( 0  =  2  ->  (
0  =/=  2  ->  P  =  { X ,  Y } ) )
1412, 13mpi 20 . . . . . . . . . 10  |-  ( 0  =  2  ->  P  =  { X ,  Y } )
1511, 14syl6bi 236 . . . . . . . . 9  |-  ( (
# `  P )  =  0  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
1610, 15sylbi 200 . . . . . . . 8  |-  ( (
# `  P )  =  ( # `  (/) )  -> 
( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
178, 16syl 17 . . . . . . 7  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
18 hashsng 12587 . . . . . . . . 9  |-  ( X  e.  _V  ->  ( # `
 { X }
)  =  1 )
19 fveq2 5879 . . . . . . . . . . . 12  |-  ( { X }  =  P  ->  ( # `  { X } )  =  (
# `  P )
)
2019eqcoms 2479 . . . . . . . . . . 11  |-  ( P  =  { X }  ->  ( # `  { X } )  =  (
# `  P )
)
2120eqeq1d 2473 . . . . . . . . . 10  |-  ( P  =  { X }  ->  ( ( # `  { X } )  =  1  <-> 
( # `  P )  =  1 ) )
22 eqeq1 2475 . . . . . . . . . . 11  |-  ( (
# `  P )  =  1  ->  (
( # `  P )  =  2  <->  1  = 
2 ) )
23 1ne2 10845 . . . . . . . . . . . 12  |-  1  =/=  2
24 eqneqall 2654 . . . . . . . . . . . 12  |-  ( 1  =  2  ->  (
1  =/=  2  ->  P  =  { X ,  Y } ) )
2523, 24mpi 20 . . . . . . . . . . 11  |-  ( 1  =  2  ->  P  =  { X ,  Y } )
2622, 25syl6bi 236 . . . . . . . . . 10  |-  ( (
# `  P )  =  1  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
2721, 26syl6bi 236 . . . . . . . . 9  |-  ( P  =  { X }  ->  ( ( # `  { X } )  =  1  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
2818, 27syl5com 30 . . . . . . . 8  |-  ( X  e.  _V  ->  ( P  =  { X }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
29 snprc 4027 . . . . . . . . 9  |-  ( -.  X  e.  _V  <->  { X }  =  (/) )
30 eqeq2 2482 . . . . . . . . . 10  |-  ( { X }  =  (/)  ->  ( P  =  { X }  <->  P  =  (/) ) )
318, 9syl6eq 2521 . . . . . . . . . . . 12  |-  ( P  =  (/)  ->  ( # `  P )  =  0 )
3231eqeq1d 2473 . . . . . . . . . . 11  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  <->  0  = 
2 ) )
3332, 14syl6bi 236 . . . . . . . . . 10  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
3430, 33syl6bi 236 . . . . . . . . 9  |-  ( { X }  =  (/)  ->  ( P  =  { X }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) ) )
3529, 34sylbi 200 . . . . . . . 8  |-  ( -.  X  e.  _V  ->  ( P  =  { X }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
3628, 35pm2.61i 169 . . . . . . 7  |-  ( P  =  { X }  ->  ( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
3717, 36jaoi 386 . . . . . 6  |-  ( ( P  =  (/)  \/  P  =  { X } )  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) )
38 hashsng 12587 . . . . . . . . 9  |-  ( Y  e.  _V  ->  ( # `
 { Y }
)  =  1 )
39 fveq2 5879 . . . . . . . . . . . 12  |-  ( { Y }  =  P  ->  ( # `  { Y } )  =  (
# `  P )
)
4039eqcoms 2479 . . . . . . . . . . 11  |-  ( P  =  { Y }  ->  ( # `  { Y } )  =  (
# `  P )
)
4140eqeq1d 2473 . . . . . . . . . 10  |-  ( P  =  { Y }  ->  ( ( # `  { Y } )  =  1  <-> 
( # `  P )  =  1 ) )
4241, 26syl6bi 236 . . . . . . . . 9  |-  ( P  =  { Y }  ->  ( ( # `  { Y } )  =  1  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
4338, 42syl5com 30 . . . . . . . 8  |-  ( Y  e.  _V  ->  ( P  =  { Y }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
44 snprc 4027 . . . . . . . . 9  |-  ( -.  Y  e.  _V  <->  { Y }  =  (/) )
45 eqeq2 2482 . . . . . . . . . 10  |-  ( { Y }  =  (/)  ->  ( P  =  { Y }  <->  P  =  (/) ) )
468eqeq1d 2473 . . . . . . . . . . 11  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  <->  ( # `  (/) )  =  2 ) )
479eqeq1i 2476 . . . . . . . . . . . 12  |-  ( (
# `  (/) )  =  2  <->  0  =  2 )
4847, 14sylbi 200 . . . . . . . . . . 11  |-  ( (
# `  (/) )  =  2  ->  P  =  { X ,  Y }
)
4946, 48syl6bi 236 . . . . . . . . . 10  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
5045, 49syl6bi 236 . . . . . . . . 9  |-  ( { Y }  =  (/)  ->  ( P  =  { Y }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) ) )
5144, 50sylbi 200 . . . . . . . 8  |-  ( -.  Y  e.  _V  ->  ( P  =  { Y }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
5243, 51pm2.61i 169 . . . . . . 7  |-  ( P  =  { Y }  ->  ( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
53 ax-1 6 . . . . . . 7  |-  ( P  =  { X ,  Y }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
5452, 53jaoi 386 . . . . . 6  |-  ( ( P  =  { Y }  \/  P  =  { X ,  Y }
)  ->  ( ( # `
 P )  =  2  ->  P  =  { X ,  Y }
) )
5537, 54jaoi 386 . . . . 5  |-  ( ( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
5655com12 31 . . . 4  |-  ( (
# `  P )  =  2  ->  (
( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )  ->  P  =  { X ,  Y } ) )
577, 56syl5 32 . . 3  |-  ( (
# `  P )  =  2  ->  (
( P  e.  { (/)
,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } )  ->  P  =  { X ,  Y } ) )
584, 57syl5bi 225 . 2  |-  ( (
# `  P )  =  2  ->  ( P  e.  ~P { X ,  Y }  ->  P  =  { X ,  Y } ) )
5958imp 436 1  |-  ( ( ( # `  P
)  =  2  /\  P  e.  ~P { X ,  Y }
)  ->  P  =  { X ,  Y }
)
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 375    /\ wa 376    = wceq 1452    e. wcel 1904    =/= wne 2641   _Vcvv 3031    u. cun 3388   (/)c0 3722   ~Pcpw 3942   {csn 3959   {cpr 3961   ` cfv 5589   0cc0 9557   1c1 9558   2c2 10681   #chash 12553
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-int 4227  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-we 4800  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-1o 7200  df-er 7381  df-en 7588  df-dom 7589  df-sdom 7590  df-fin 7591  df-card 8391  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-nn 10632  df-2 10690  df-n0 10894  df-z 10962  df-uz 11183  df-fz 11811  df-hash 12554
This theorem is referenced by:  pr2pwpr  12677
  Copyright terms: Public domain W3C validator