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

Theorem hash2pwpr 12281
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 4182 . . . . 5  |-  ~P { X ,  Y }  =  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } )
21eleq2i 2527 . . . 4  |-  ( P  e.  ~P { X ,  Y }  <->  P  e.  ( { (/) ,  { X } }  u.  { { Y } ,  { X ,  Y } } ) )
3 elun 3592 . . . 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 516 . . . 4  |-  ( ( P  e.  { (/) ,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } )  ->  ( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y } ) ) )
8 fveq2 5786 . . . . . . . 8  |-  ( P  =  (/)  ->  ( # `  P )  =  (
# `  (/) ) )
9 hash0 12233 . . . . . . . . . 10  |-  ( # `  (/) )  =  0
109eqeq2i 2468 . . . . . . . . 9  |-  ( (
# `  P )  =  ( # `  (/) )  <->  ( # `  P
)  =  0 )
11 eqeq1 2454 . . . . . . . . . 10  |-  ( (
# `  P )  =  0  ->  (
( # `  P )  =  2  <->  0  = 
2 ) )
12 2ne0 10512 . . . . . . . . . . . 12  |-  2  =/=  0
1312necomi 2716 . . . . . . . . . . 11  |-  0  =/=  2
14 eqneqall 2655 . . . . . . . . . . 11  |-  ( 0  =  2  ->  (
0  =/=  2  ->  P  =  { X ,  Y } ) )
1513, 14mpi 17 . . . . . . . . . 10  |-  ( 0  =  2  ->  P  =  { X ,  Y } )
1611, 15syl6bi 228 . . . . . . . . 9  |-  ( (
# `  P )  =  0  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
1710, 16sylbi 195 . . . . . . . 8  |-  ( (
# `  P )  =  ( # `  (/) )  -> 
( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
188, 17syl 16 . . . . . . 7  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
19 hashsng 12234 . . . . . . . . 9  |-  ( X  e.  _V  ->  ( # `
 { X }
)  =  1 )
20 fveq2 5786 . . . . . . . . . . . 12  |-  ( { X }  =  P  ->  ( # `  { X } )  =  (
# `  P )
)
2120eqcoms 2462 . . . . . . . . . . 11  |-  ( P  =  { X }  ->  ( # `  { X } )  =  (
# `  P )
)
2221eqeq1d 2453 . . . . . . . . . 10  |-  ( P  =  { X }  ->  ( ( # `  { X } )  =  1  <-> 
( # `  P )  =  1 ) )
23 eqeq1 2454 . . . . . . . . . . 11  |-  ( (
# `  P )  =  1  ->  (
( # `  P )  =  2  <->  1  = 
2 ) )
24 1ne2 10632 . . . . . . . . . . . 12  |-  1  =/=  2
25 eqneqall 2655 . . . . . . . . . . . 12  |-  ( 1  =  2  ->  (
1  =/=  2  ->  P  =  { X ,  Y } ) )
2624, 25mpi 17 . . . . . . . . . . 11  |-  ( 1  =  2  ->  P  =  { X ,  Y } )
2723, 26syl6bi 228 . . . . . . . . . 10  |-  ( (
# `  P )  =  1  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
2822, 27syl6bi 228 . . . . . . . . 9  |-  ( P  =  { X }  ->  ( ( # `  { X } )  =  1  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
2919, 28syl5com 30 . . . . . . . 8  |-  ( X  e.  _V  ->  ( P  =  { X }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
30 snprc 4034 . . . . . . . . 9  |-  ( -.  X  e.  _V  <->  { X }  =  (/) )
31 eqeq2 2465 . . . . . . . . . 10  |-  ( { X }  =  (/)  ->  ( P  =  { X }  <->  P  =  (/) ) )
328, 9syl6eq 2507 . . . . . . . . . . . 12  |-  ( P  =  (/)  ->  ( # `  P )  =  0 )
3332eqeq1d 2453 . . . . . . . . . . 11  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  <->  0  = 
2 ) )
3433, 15syl6bi 228 . . . . . . . . . 10  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
3531, 34syl6bi 228 . . . . . . . . 9  |-  ( { X }  =  (/)  ->  ( P  =  { X }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) ) )
3630, 35sylbi 195 . . . . . . . 8  |-  ( -.  X  e.  _V  ->  ( P  =  { X }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
3729, 36pm2.61i 164 . . . . . . 7  |-  ( P  =  { X }  ->  ( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
3818, 37jaoi 379 . . . . . 6  |-  ( ( P  =  (/)  \/  P  =  { X } )  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) )
39 hashsng 12234 . . . . . . . . 9  |-  ( Y  e.  _V  ->  ( # `
 { Y }
)  =  1 )
40 fveq2 5786 . . . . . . . . . . . 12  |-  ( { Y }  =  P  ->  ( # `  { Y } )  =  (
# `  P )
)
4140eqcoms 2462 . . . . . . . . . . 11  |-  ( P  =  { Y }  ->  ( # `  { Y } )  =  (
# `  P )
)
4241eqeq1d 2453 . . . . . . . . . 10  |-  ( P  =  { Y }  ->  ( ( # `  { Y } )  =  1  <-> 
( # `  P )  =  1 ) )
4342, 27syl6bi 228 . . . . . . . . 9  |-  ( P  =  { Y }  ->  ( ( # `  { Y } )  =  1  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
4439, 43syl5com 30 . . . . . . . 8  |-  ( Y  e.  _V  ->  ( P  =  { Y }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
45 snprc 4034 . . . . . . . . 9  |-  ( -.  Y  e.  _V  <->  { Y }  =  (/) )
46 eqeq2 2465 . . . . . . . . . 10  |-  ( { Y }  =  (/)  ->  ( P  =  { Y }  <->  P  =  (/) ) )
478eqeq1d 2453 . . . . . . . . . . 11  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  <->  ( # `  (/) )  =  2 ) )
489eqeq1i 2457 . . . . . . . . . . . 12  |-  ( (
# `  (/) )  =  2  <->  0  =  2 )
4948, 15sylbi 195 . . . . . . . . . . 11  |-  ( (
# `  (/) )  =  2  ->  P  =  { X ,  Y }
)
5047, 49syl6bi 228 . . . . . . . . . 10  |-  ( P  =  (/)  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
5146, 50syl6bi 228 . . . . . . . . 9  |-  ( { Y }  =  (/)  ->  ( P  =  { Y }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) ) )
5245, 51sylbi 195 . . . . . . . 8  |-  ( -.  Y  e.  _V  ->  ( P  =  { Y }  ->  ( ( # `  P )  =  2  ->  P  =  { X ,  Y }
) ) )
5344, 52pm2.61i 164 . . . . . . 7  |-  ( P  =  { Y }  ->  ( ( # `  P
)  =  2  ->  P  =  { X ,  Y } ) )
54 ax-1 6 . . . . . . 7  |-  ( P  =  { X ,  Y }  ->  ( (
# `  P )  =  2  ->  P  =  { X ,  Y } ) )
5553, 54jaoi 379 . . . . . 6  |-  ( ( P  =  { Y }  \/  P  =  { X ,  Y }
)  ->  ( ( # `
 P )  =  2  ->  P  =  { X ,  Y }
) )
5638, 55jaoi 379 . . . . 5  |-  ( ( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )  ->  (
( # `  P )  =  2  ->  P  =  { X ,  Y } ) )
5756com12 31 . . . 4  |-  ( (
# `  P )  =  2  ->  (
( ( P  =  (/)  \/  P  =  { X } )  \/  ( P  =  { Y }  \/  P  =  { X ,  Y }
) )  ->  P  =  { X ,  Y } ) )
587, 57syl5 32 . . 3  |-  ( (
# `  P )  =  2  ->  (
( P  e.  { (/)
,  { X } }  \/  P  e.  { { Y } ,  { X ,  Y } } )  ->  P  =  { X ,  Y } ) )
594, 58syl5bi 217 . 2  |-  ( (
# `  P )  =  2  ->  ( P  e.  ~P { X ,  Y }  ->  P  =  { X ,  Y } ) )
6059imp 429 1  |-  ( ( ( # `  P
)  =  2  /\  P  e.  ~P { X ,  Y }
)  ->  P  =  { X ,  Y }
)
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 368    /\ wa 369    = wceq 1370    e. wcel 1758    =/= wne 2642   _Vcvv 3065    u. cun 3421   (/)c0 3732   ~Pcpw 3955   {csn 3972   {cpr 3974   ` cfv 5513   0cc0 9380   1c1 9381   2c2 10469   #chash 12201
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-sep 4508  ax-nul 4516  ax-pow 4565  ax-pr 4626  ax-un 6469  ax-cnex 9436  ax-resscn 9437  ax-1cn 9438  ax-icn 9439  ax-addcl 9440  ax-addrcl 9441  ax-mulcl 9442  ax-mulrcl 9443  ax-mulcom 9444  ax-addass 9445  ax-mulass 9446  ax-distr 9447  ax-i2m1 9448  ax-1ne0 9449  ax-1rid 9450  ax-rnegex 9451  ax-rrecex 9452  ax-cnre 9453  ax-pre-lttri 9454  ax-pre-lttrn 9455  ax-pre-ltadd 9456  ax-pre-mulgt0 9457
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2599  df-ne 2644  df-nel 2645  df-ral 2798  df-rex 2799  df-reu 2800  df-rab 2802  df-v 3067  df-sbc 3282  df-csb 3384  df-dif 3426  df-un 3428  df-in 3430  df-ss 3437  df-pss 3439  df-nul 3733  df-if 3887  df-pw 3957  df-sn 3973  df-pr 3975  df-tp 3977  df-op 3979  df-uni 4187  df-int 4224  df-iun 4268  df-br 4388  df-opab 4446  df-mpt 4447  df-tr 4481  df-eprel 4727  df-id 4731  df-po 4736  df-so 4737  df-fr 4774  df-we 4776  df-ord 4817  df-on 4818  df-lim 4819  df-suc 4820  df-xp 4941  df-rel 4942  df-cnv 4943  df-co 4944  df-dm 4945  df-rn 4946  df-res 4947  df-ima 4948  df-iota 5476  df-fun 5515  df-fn 5516  df-f 5517  df-f1 5518  df-fo 5519  df-f1o 5520  df-fv 5521  df-riota 6148  df-ov 6190  df-oprab 6191  df-mpt2 6192  df-om 6574  df-1st 6674  df-2nd 6675  df-recs 6929  df-rdg 6963  df-1o 7017  df-er 7198  df-en 7408  df-dom 7409  df-sdom 7410  df-fin 7411  df-card 8207  df-pnf 9518  df-mnf 9519  df-xr 9520  df-ltxr 9521  df-le 9522  df-sub 9695  df-neg 9696  df-nn 10421  df-2 10478  df-n0 10678  df-z 10745  df-uz 10960  df-fz 11536  df-hash 12202
This theorem is referenced by:  pr2pwpr  12282
  Copyright terms: Public domain W3C validator