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

Theorem hashprg 10270
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 498 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐵𝑊)
2 snfig 6585 . . . . . 6 (𝐴𝑉 → {𝐴} ∈ Fin)
32ad2antrr 473 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {𝐴} ∈ Fin)
4 elsni 3468 . . . . . . . 8 (𝐵 ∈ {𝐴} → 𝐵 = 𝐴)
54eqcomd 2094 . . . . . . 7 (𝐵 ∈ {𝐴} → 𝐴 = 𝐵)
65necon3ai 2305 . . . . . 6 (𝐴𝐵 → ¬ 𝐵 ∈ {𝐴})
76adantl 272 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ¬ 𝐵 ∈ {𝐴})
8 hashunsng 10269 . . . . . 6 (𝐵𝑊 → (({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)))
98imp 123 . . . . 5 ((𝐵𝑊 ∧ ({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴})) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))
101, 3, 7, 9syl12anc 1173 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))
11 hashsng 10260 . . . . . . 7 (𝐴𝑉 → (♯‘{𝐴}) = 1)
1211adantr 271 . . . . . 6 ((𝐴𝑉𝐵𝑊) → (♯‘{𝐴}) = 1)
1312adantr 271 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘{𝐴}) = 1)
1413oveq1d 5681 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ((♯‘{𝐴}) + 1) = (1 + 1))
1510, 14eqtrd 2121 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘({𝐴} ∪ {𝐵})) = (1 + 1))
16 df-pr 3457 . . . 4 {𝐴, 𝐵} = ({𝐴} ∪ {𝐵})
1716fveq2i 5321 . . 3 (♯‘{𝐴, 𝐵}) = (♯‘({𝐴} ∪ {𝐵}))
18 df-2 8535 . . 3 2 = (1 + 1)
1915, 17, 183eqtr4g 2146 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → (♯‘{𝐴, 𝐵}) = 2)
20 1ne2 8676 . . . . . . 7 1 ≠ 2
2120a1i 9 . . . . . 6 ((𝐴𝑉𝐵𝑊) → 1 ≠ 2)
2212, 21eqnetrd 2280 . . . . 5 ((𝐴𝑉𝐵𝑊) → (♯‘{𝐴}) ≠ 2)
23 dfsn2 3464 . . . . . . . 8 {𝐴} = {𝐴, 𝐴}
24 preq2 3524 . . . . . . . 8 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
2523, 24syl5req 2134 . . . . . . 7 (𝐴 = 𝐵 → {𝐴, 𝐵} = {𝐴})
2625fveq2d 5322 . . . . . 6 (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) = (♯‘{𝐴}))
2726neeq1d 2274 . . . . 5 (𝐴 = 𝐵 → ((♯‘{𝐴, 𝐵}) ≠ 2 ↔ (♯‘{𝐴}) ≠ 2))
2822, 27syl5ibrcom 156 . . . 4 ((𝐴𝑉𝐵𝑊) → (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) ≠ 2))
2928necon2d 2315 . . 3 ((𝐴𝑉𝐵𝑊) → ((♯‘{𝐴, 𝐵}) = 2 → 𝐴𝐵))
3029imp 123 . 2 (((𝐴𝑉𝐵𝑊) ∧ (♯‘{𝐴, 𝐵}) = 2) → 𝐴𝐵)
3119, 30impbida 564 1 ((𝐴𝑉𝐵𝑊) → (𝐴𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104   = wceq 1290  wcel 1439  wne 2256  cun 2998  {csn 3450  {cpr 3451  cfv 5028  (class class class)co 5666  Fincfn 6511  1c1 7405   + caddc 7407  2c2 8527  chash 10237
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 580  ax-in2 581  ax-io 666  ax-5 1382  ax-7 1383  ax-gen 1384  ax-ie1 1428  ax-ie2 1429  ax-8 1441  ax-10 1442  ax-11 1443  ax-i12 1444  ax-bndl 1445  ax-4 1446  ax-13 1450  ax-14 1451  ax-17 1465  ax-i9 1469  ax-ial 1473  ax-i5r 1474  ax-ext 2071  ax-coll 3960  ax-sep 3963  ax-nul 3971  ax-pow 4015  ax-pr 4045  ax-un 4269  ax-setind 4366  ax-iinf 4416  ax-cnex 7490  ax-resscn 7491  ax-1cn 7492  ax-1re 7493  ax-icn 7494  ax-addcl 7495  ax-addrcl 7496  ax-mulcl 7497  ax-addcom 7499  ax-addass 7501  ax-distr 7503  ax-i2m1 7504  ax-0lt1 7505  ax-0id 7507  ax-rnegex 7508  ax-cnre 7510  ax-pre-ltirr 7511  ax-pre-ltwlin 7512  ax-pre-lttrn 7513  ax-pre-apti 7514  ax-pre-ltadd 7515
This theorem depends on definitions:  df-bi 116  df-dc 782  df-3or 926  df-3an 927  df-tru 1293  df-fal 1296  df-nf 1396  df-sb 1694  df-eu 1952  df-mo 1953  df-clab 2076  df-cleq 2082  df-clel 2085  df-nfc 2218  df-ne 2257  df-nel 2352  df-ral 2365  df-rex 2366  df-reu 2367  df-rab 2369  df-v 2622  df-sbc 2842  df-csb 2935  df-dif 3002  df-un 3004  df-in 3006  df-ss 3013  df-nul 3288  df-if 3398  df-pw 3435  df-sn 3456  df-pr 3457  df-op 3459  df-uni 3660  df-int 3695  df-iun 3738  df-br 3852  df-opab 3906  df-mpt 3907  df-tr 3943  df-id 4129  df-iord 4202  df-on 4204  df-ilim 4205  df-suc 4207  df-iom 4419  df-xp 4457  df-rel 4458  df-cnv 4459  df-co 4460  df-dm 4461  df-rn 4462  df-res 4463  df-ima 4464  df-iota 4993  df-fun 5030  df-fn 5031  df-f 5032  df-f1 5033  df-fo 5034  df-f1o 5035  df-fv 5036  df-riota 5622  df-ov 5669  df-oprab 5670  df-mpt2 5671  df-1st 5925  df-2nd 5926  df-recs 6084  df-irdg 6149  df-frec 6170  df-1o 6195  df-oadd 6199  df-er 6306  df-en 6512  df-dom 6513  df-fin 6514  df-pnf 7578  df-mnf 7579  df-xr 7580  df-ltxr 7581  df-le 7582  df-sub 7709  df-neg 7710  df-inn 8477  df-2 8535  df-n0 8728  df-z 8805  df-uz 9074  df-fz 9479  df-ihash 10238
This theorem is referenced by:  prhash2ex  10271  fiprsshashgt1  10279
  Copyright terms: Public domain W3C validator