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

Theorem hashprg 14355
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 ((𝐴𝑉𝐵𝑊) → (𝐴𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2))

Proof of Theorem hashprg
StepHypRef Expression
1 simpr 485 . . . . 5 ((𝐴𝑉𝐵𝑊) → 𝐵𝑊)
2 elsni 4579 . . . . . . 7 (𝐵 ∈ {𝐴} → 𝐵 = 𝐴)
32eqcomd 2746 . . . . . 6 (𝐵 ∈ {𝐴} → 𝐴 = 𝐵)
43necon3ai 2960 . . . . 5 (𝐴𝐵 → ¬ 𝐵 ∈ {𝐴})
5 snfi 8987 . . . . . 6 {𝐴} ∈ Fin
6 hashunsng 14352 . . . . . . 7 (𝐵𝑊 → (({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)))
76imp 407 . . . . . 6 ((𝐵𝑊 ∧ ({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴})) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))
85, 7mpanr1 709 . . . . 5 ((𝐵𝑊 ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))
91, 4, 8syl2an 602 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))
10 hashsng 14329 . . . . . . 7 (𝐴𝑉 → (♯‘{𝐴}) = 1)
1110adantr 481 . . . . . 6 ((𝐴𝑉𝐵𝑊) → (♯‘{𝐴}) = 1)
1211adantr 481 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘{𝐴}) = 1)
1312oveq1d 7378 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ((♯‘{𝐴}) + 1) = (1 + 1))
149, 13eqtrd 2775 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘({𝐴} ∪ {𝐵})) = (1 + 1))
15 df-pr 4565 . . . 4 {𝐴, 𝐵} = ({𝐴} ∪ {𝐵})
1615fveq2i 6837 . . 3 (♯‘{𝐴, 𝐵}) = (♯‘({𝐴} ∪ {𝐵}))
17 df-2 12242 . . 3 2 = (1 + 1)
1814, 16, 173eqtr4g 2800 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘{𝐴, 𝐵}) = 2)
19 1ne2 12382 . . . . . . 7 1 ≠ 2
2019a1i 11 . . . . . 6 ((𝐴𝑉𝐵𝑊) → 1 ≠ 2)
2111, 20eqnetrd 3002 . . . . 5 ((𝐴𝑉𝐵𝑊) → (♯‘{𝐴}) ≠ 2)
22 dfsn2 4575 . . . . . . . 8 {𝐴} = {𝐴, 𝐴}
23 preq2 4673 . . . . . . . 8 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
2422, 23eqtr2id 2788 . . . . . . 7 (𝐴 = 𝐵 → {𝐴, 𝐵} = {𝐴})
2524fveq2d 6838 . . . . . 6 (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) = (♯‘{𝐴}))
2625neeq1d 2994 . . . . 5 (𝐴 = 𝐵 → ((♯‘{𝐴, 𝐵}) ≠ 2 ↔ (♯‘{𝐴}) ≠ 2))
2721, 26syl5ibrcom 248 . . . 4 ((𝐴𝑉𝐵𝑊) → (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) ≠ 2))
2827necon2d 2958 . . 3 ((𝐴𝑉𝐵𝑊) → ((♯‘{𝐴, 𝐵}) = 2 → 𝐴𝐵))
2928imp 407 . 2 (((𝐴𝑉𝐵𝑊) ∧ (♯‘{𝐴, 𝐵}) = 2) → 𝐴𝐵)
3018, 29impbida 806 1 ((𝐴𝑉𝐵𝑊) → (𝐴𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 207  wa 396   = wceq 1547  wcel 2119  wne 2935  cun 3888  {csn 4562  {cpr 4564  cfv 6492  (class class class)co 7363  Fincfn 8890  1c1 11037   + caddc 11039  2c2 12234  chash 14290
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1974  ax-7 2015  ax-8 2121  ax-9 2129  ax-10 2152  ax-11 2168  ax-12 2189  ax-ext 2712  ax-sep 5225  ax-nul 5235  ax-pow 5301  ax-pr 5369  ax-un 7685  ax-cnex 11092  ax-resscn 11093  ax-1cn 11094  ax-icn 11095  ax-addcl 11096  ax-addrcl 11097  ax-mulcl 11098  ax-mulrcl 11099  ax-mulcom 11100  ax-addass 11101  ax-mulass 11102  ax-distr 11103  ax-i2m1 11104  ax-1ne0 11105  ax-1rid 11106  ax-rnegex 11107  ax-rrecex 11108  ax-cnre 11109  ax-pre-lttri 11110  ax-pre-lttrn 11111  ax-pre-ltadd 11112  ax-pre-mulgt0 11113
This theorem depends on definitions:  df-bi 208  df-an 397  df-or 854  df-3or 1093  df-3an 1094  df-tru 1550  df-fal 1560  df-ex 1787  df-nf 1791  df-sb 2074  df-mo 2543  df-eu 2573  df-clab 2719  df-cleq 2732  df-clel 2815  df-nfc 2889  df-ne 2936  df-nel 3040  df-ral 3055  df-rex 3065  df-reu 3346  df-rab 3393  df-v 3434  df-sbc 3731  df-csb 3839  df-dif 3893  df-un 3895  df-in 3897  df-ss 3907  df-pss 3910  df-nul 4269  df-if 4462  df-pw 4538  df-sn 4563  df-pr 4565  df-op 4569  df-uni 4846  df-int 4885  df-iun 4930  df-br 5080  df-opab 5142  df-mpt 5161  df-tr 5187  df-id 5520  df-eprel 5525  df-po 5533  df-so 5534  df-fr 5578  df-we 5580  df-xp 5631  df-rel 5632  df-cnv 5633  df-co 5634  df-dm 5635  df-rn 5636  df-res 5637  df-ima 5638  df-pred 6259  df-ord 6320  df-on 6321  df-lim 6322  df-suc 6323  df-iota 6448  df-fun 6494  df-fn 6495  df-f 6496  df-f1 6497  df-fo 6498  df-f1o 6499  df-fv 6500  df-riota 7320  df-ov 7366  df-oprab 7367  df-mpo 7368  df-om 7814  df-1st 7938  df-2nd 7939  df-frecs 8228  df-wrecs 8259  df-recs 8308  df-rdg 8346  df-1o 8402  df-oadd 8406  df-er 8640  df-en 8891  df-dom 8892  df-sdom 8893  df-fin 8894  df-dju 9823  df-card 9861  df-pnf 11179  df-mnf 11180  df-xr 11181  df-ltxr 11182  df-le 11183  df-sub 11377  df-neg 11378  df-nn 12173  df-2 12242  df-n0 12436  df-z 12523  df-uz 12787  df-fz 13460  df-hash 14291
This theorem is referenced by:  hashprb  14357  prhash2ex  14359  hashfun  14397  hash2exprb  14431  nehash2  14434  hashtpg  14445  elss2prb  14448  hash3tpexb  14454  wrdlen2i  14902  isnzr2hash  20498  upgrex  29186  umgrbi  29195  usgr1e  29339  usgrexmplef  29353  cusgrexilem2  29536  cusgrfilem1  29549  umgr2v2e  29619  vdegp1bi  29631  eulerpathpr  30335  drngidlhash  33524  ccfldextdgrr  33863  coinflipprob  34671  cusgredgex  35351  subfacp1lem1  35408  poimirlem9  37997  fourierdlem54  46604  fourierdlem102  46652  fourierdlem103  46653  fourierdlem104  46654  fourierdlem114  46664  prpair  47977  prproropf1olem1  47979  paireqne  47987  prprspr2  47994  reuprpr  47999  stgrusgra  48451  gpgusgralem  48548
  Copyright terms: Public domain W3C validator