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

Theorem hashprg 10802
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 simplr 528 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐵𝑊)
2 snfig 6828 . . . . . 6 (𝐴𝑉 → {𝐴} ∈ Fin)
32ad2antrr 488 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {𝐴} ∈ Fin)
4 elsni 3622 . . . . . . . 8 (𝐵 ∈ {𝐴} → 𝐵 = 𝐴)
54eqcomd 2193 . . . . . . 7 (𝐵 ∈ {𝐴} → 𝐴 = 𝐵)
65necon3ai 2406 . . . . . 6 (𝐴𝐵 → ¬ 𝐵 ∈ {𝐴})
76adantl 277 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ¬ 𝐵 ∈ {𝐴})
8 hashunsng 10801 . . . . . 6 (𝐵𝑊 → (({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)))
98imp 124 . . . . 5 ((𝐵𝑊 ∧ ({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴})) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))
101, 3, 7, 9syl12anc 1246 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))
11 hashsng 10792 . . . . . . 7 (𝐴𝑉 → (♯‘{𝐴}) = 1)
1211adantr 276 . . . . . 6 ((𝐴𝑉𝐵𝑊) → (♯‘{𝐴}) = 1)
1312adantr 276 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘{𝐴}) = 1)
1413oveq1d 5903 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ((♯‘{𝐴}) + 1) = (1 + 1))
1510, 14eqtrd 2220 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘({𝐴} ∪ {𝐵})) = (1 + 1))
16 df-pr 3611 . . . 4 {𝐴, 𝐵} = ({𝐴} ∪ {𝐵})
1716fveq2i 5530 . . 3 (♯‘{𝐴, 𝐵}) = (♯‘({𝐴} ∪ {𝐵}))
18 df-2 8992 . . 3 2 = (1 + 1)
1915, 17, 183eqtr4g 2245 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘{𝐴, 𝐵}) = 2)
20 1ne2 9139 . . . . . . 7 1 ≠ 2
2120a1i 9 . . . . . 6 ((𝐴𝑉𝐵𝑊) → 1 ≠ 2)
2212, 21eqnetrd 2381 . . . . 5 ((𝐴𝑉𝐵𝑊) → (♯‘{𝐴}) ≠ 2)
23 dfsn2 3618 . . . . . . . 8 {𝐴} = {𝐴, 𝐴}
24 preq2 3682 . . . . . . . 8 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
2523, 24eqtr2id 2233 . . . . . . 7 (𝐴 = 𝐵 → {𝐴, 𝐵} = {𝐴})
2625fveq2d 5531 . . . . . 6 (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) = (♯‘{𝐴}))
2726neeq1d 2375 . . . . 5 (𝐴 = 𝐵 → ((♯‘{𝐴, 𝐵}) ≠ 2 ↔ (♯‘{𝐴}) ≠ 2))
2822, 27syl5ibrcom 157 . . . 4 ((𝐴𝑉𝐵𝑊) → (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) ≠ 2))
2928necon2d 2416 . . 3 ((𝐴𝑉𝐵𝑊) → ((♯‘{𝐴, 𝐵}) = 2 → 𝐴𝐵))
3029imp 124 . 2 (((𝐴𝑉𝐵𝑊) ∧ (♯‘{𝐴, 𝐵}) = 2) → 𝐴𝐵)
3119, 30impbida 596 1 ((𝐴𝑉𝐵𝑊) → (𝐴𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 104  wb 105   = wceq 1363  wcel 2158  wne 2357  cun 3139  {csn 3604  {cpr 3605  cfv 5228  (class class class)co 5888  Fincfn 6754  1c1 7826   + caddc 7828  2c2 8984  chash 10769
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 710  ax-5 1457  ax-7 1458  ax-gen 1459  ax-ie1 1503  ax-ie2 1504  ax-8 1514  ax-10 1515  ax-11 1516  ax-i12 1517  ax-bndl 1519  ax-4 1520  ax-17 1536  ax-i9 1540  ax-ial 1544  ax-i5r 1545  ax-13 2160  ax-14 2161  ax-ext 2169  ax-coll 4130  ax-sep 4133  ax-nul 4141  ax-pow 4186  ax-pr 4221  ax-un 4445  ax-setind 4548  ax-iinf 4599  ax-cnex 7916  ax-resscn 7917  ax-1cn 7918  ax-1re 7919  ax-icn 7920  ax-addcl 7921  ax-addrcl 7922  ax-mulcl 7923  ax-addcom 7925  ax-addass 7927  ax-distr 7929  ax-i2m1 7930  ax-0lt1 7931  ax-0id 7933  ax-rnegex 7934  ax-cnre 7936  ax-pre-ltirr 7937  ax-pre-ltwlin 7938  ax-pre-lttrn 7939  ax-pre-apti 7940  ax-pre-ltadd 7941
This theorem depends on definitions:  df-bi 117  df-dc 836  df-3or 980  df-3an 981  df-tru 1366  df-fal 1369  df-nf 1471  df-sb 1773  df-eu 2039  df-mo 2040  df-clab 2174  df-cleq 2180  df-clel 2183  df-nfc 2318  df-ne 2358  df-nel 2453  df-ral 2470  df-rex 2471  df-reu 2472  df-rab 2474  df-v 2751  df-sbc 2975  df-csb 3070  df-dif 3143  df-un 3145  df-in 3147  df-ss 3154  df-nul 3435  df-if 3547  df-pw 3589  df-sn 3610  df-pr 3611  df-op 3613  df-uni 3822  df-int 3857  df-iun 3900  df-br 4016  df-opab 4077  df-mpt 4078  df-tr 4114  df-id 4305  df-iord 4378  df-on 4380  df-ilim 4381  df-suc 4383  df-iom 4602  df-xp 4644  df-rel 4645  df-cnv 4646  df-co 4647  df-dm 4648  df-rn 4649  df-res 4650  df-ima 4651  df-iota 5190  df-fun 5230  df-fn 5231  df-f 5232  df-f1 5233  df-fo 5234  df-f1o 5235  df-fv 5236  df-riota 5844  df-ov 5891  df-oprab 5892  df-mpo 5893  df-1st 6155  df-2nd 6156  df-recs 6320  df-irdg 6385  df-frec 6406  df-1o 6431  df-oadd 6435  df-er 6549  df-en 6755  df-dom 6756  df-fin 6757  df-pnf 8008  df-mnf 8009  df-xr 8010  df-ltxr 8011  df-le 8012  df-sub 8144  df-neg 8145  df-inn 8934  df-2 8992  df-n0 9191  df-z 9268  df-uz 9543  df-fz 10023  df-ihash 10770
This theorem is referenced by:  prhash2ex  10803  fiprsshashgt1  10811
  Copyright terms: Public domain W3C validator