ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  hashprg Unicode version

Theorem hashprg 10966
Description: The size of an unordered pair. (Contributed by Mario Carneiro, 27-Sep-2013.) (Revised by Mario Carneiro, 5-May-2016.) (Revised by AV, 18-Sep-2021.)
Assertion
Ref Expression
hashprg  |-  ( ( A  e.  V  /\  B  e.  W )  ->  ( A  =/=  B  <->  ( `  { A ,  B } )  =  2 ) )

Proof of Theorem hashprg
StepHypRef Expression
1 simplr 528 . . . . 5  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  B  e.  W )
2 snfig 6917 . . . . . 6  |-  ( A  e.  V  ->  { A }  e.  Fin )
32ad2antrr 488 . . . . 5  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  { A }  e.  Fin )
4 elsni 3653 . . . . . . . 8  |-  ( B  e.  { A }  ->  B  =  A )
54eqcomd 2212 . . . . . . 7  |-  ( B  e.  { A }  ->  A  =  B )
65necon3ai 2426 . . . . . 6  |-  ( A  =/=  B  ->  -.  B  e.  { A } )
76adantl 277 . . . . 5  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  -.  B  e.  { A } )
8 hashunsng 10965 . . . . . 6  |-  ( B  e.  W  ->  (
( { A }  e.  Fin  /\  -.  B  e.  { A } )  ->  ( `  ( { A }  u.  { B } ) )  =  ( ( `  { A } )  +  1 ) ) )
98imp 124 . . . . 5  |-  ( ( B  e.  W  /\  ( { A }  e.  Fin  /\  -.  B  e. 
{ A } ) )  ->  ( `  ( { A }  u.  { B } ) )  =  ( ( `  { A } )  +  1 ) )
101, 3, 7, 9syl12anc 1248 . . . 4  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  ( `  ( { A }  u.  { B } ) )  =  ( ( `  { A } )  +  1 ) )
11 hashsng 10956 . . . . . . 7  |-  ( A  e.  V  ->  ( `  { A } )  =  1 )
1211adantr 276 . . . . . 6  |-  ( ( A  e.  V  /\  B  e.  W )  ->  ( `  { A } )  =  1 )
1312adantr 276 . . . . 5  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  ( `  { A } )  =  1 )
1413oveq1d 5969 . . . 4  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  ( ( `  { A } )  +  1 )  =  ( 1  +  1 ) )
1510, 14eqtrd 2239 . . 3  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  ( `  ( { A }  u.  { B } ) )  =  ( 1  +  1 ) )
16 df-pr 3642 . . . 4  |-  { A ,  B }  =  ( { A }  u.  { B } )
1716fveq2i 5589 . . 3  |-  ( `  { A ,  B }
)  =  ( `  ( { A }  u.  { B } ) )
18 df-2 9108 . . 3  |-  2  =  ( 1  +  1 )
1915, 17, 183eqtr4g 2264 . 2  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  A  =/=  B )  ->  ( `  { A ,  B }
)  =  2 )
20 1ne2 9256 . . . . . . 7  |-  1  =/=  2
2120a1i 9 . . . . . 6  |-  ( ( A  e.  V  /\  B  e.  W )  ->  1  =/=  2 )
2212, 21eqnetrd 2401 . . . . 5  |-  ( ( A  e.  V  /\  B  e.  W )  ->  ( `  { A } )  =/=  2
)
23 dfsn2 3649 . . . . . . . 8  |-  { A }  =  { A ,  A }
24 preq2 3713 . . . . . . . 8  |-  ( A  =  B  ->  { A ,  A }  =  { A ,  B }
)
2523, 24eqtr2id 2252 . . . . . . 7  |-  ( A  =  B  ->  { A ,  B }  =  { A } )
2625fveq2d 5590 . . . . . 6  |-  ( A  =  B  ->  ( `  { A ,  B } )  =  ( `  { A } ) )
2726neeq1d 2395 . . . . 5  |-  ( A  =  B  ->  (
( `  { A ,  B } )  =/=  2  <->  ( `  { A } )  =/=  2 ) )
2822, 27syl5ibrcom 157 . . . 4  |-  ( ( A  e.  V  /\  B  e.  W )  ->  ( A  =  B  ->  ( `  { A ,  B } )  =/=  2 ) )
2928necon2d 2436 . . 3  |-  ( ( A  e.  V  /\  B  e.  W )  ->  ( ( `  { A ,  B }
)  =  2  ->  A  =/=  B ) )
3029imp 124 . 2  |-  ( ( ( A  e.  V  /\  B  e.  W
)  /\  ( `  { A ,  B }
)  =  2 )  ->  A  =/=  B
)
3119, 30impbida 596 1  |-  ( ( A  e.  V  /\  B  e.  W )  ->  ( A  =/=  B  <->  ( `  { A ,  B } )  =  2 ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 104    <-> wb 105    = wceq 1373    e. wcel 2177    =/= wne 2377    u. cun 3166   {csn 3635   {cpr 3636   ` cfv 5277  (class class class)co 5954   Fincfn 6837   1c1 7939    + caddc 7941   2c2 9100  ♯chash 10933
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-coll 4164  ax-sep 4167  ax-nul 4175  ax-pow 4223  ax-pr 4258  ax-un 4485  ax-setind 4590  ax-iinf 4641  ax-cnex 8029  ax-resscn 8030  ax-1cn 8031  ax-1re 8032  ax-icn 8033  ax-addcl 8034  ax-addrcl 8035  ax-mulcl 8036  ax-addcom 8038  ax-addass 8040  ax-distr 8042  ax-i2m1 8043  ax-0lt1 8044  ax-0id 8046  ax-rnegex 8047  ax-cnre 8049  ax-pre-ltirr 8050  ax-pre-ltwlin 8051  ax-pre-lttrn 8052  ax-pre-apti 8053  ax-pre-ltadd 8054
This theorem depends on definitions:  df-bi 117  df-dc 837  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rab 2494  df-v 2775  df-sbc 3001  df-csb 3096  df-dif 3170  df-un 3172  df-in 3174  df-ss 3181  df-nul 3463  df-if 3574  df-pw 3620  df-sn 3641  df-pr 3642  df-op 3644  df-uni 3854  df-int 3889  df-iun 3932  df-br 4049  df-opab 4111  df-mpt 4112  df-tr 4148  df-id 4345  df-iord 4418  df-on 4420  df-ilim 4421  df-suc 4423  df-iom 4644  df-xp 4686  df-rel 4687  df-cnv 4688  df-co 4689  df-dm 4690  df-rn 4691  df-res 4692  df-ima 4693  df-iota 5238  df-fun 5279  df-fn 5280  df-f 5281  df-f1 5282  df-fo 5283  df-f1o 5284  df-fv 5285  df-riota 5909  df-ov 5957  df-oprab 5958  df-mpo 5959  df-1st 6236  df-2nd 6237  df-recs 6401  df-irdg 6466  df-frec 6487  df-1o 6512  df-oadd 6516  df-er 6630  df-en 6838  df-dom 6839  df-fin 6840  df-pnf 8122  df-mnf 8123  df-xr 8124  df-ltxr 8125  df-le 8126  df-sub 8258  df-neg 8259  df-inn 9050  df-2 9108  df-n0 9309  df-z 9386  df-uz 9662  df-fz 10144  df-ihash 10934
This theorem is referenced by:  prhash2ex  10967  fiprsshashgt1  10975
  Copyright terms: Public domain W3C validator