| Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
| Mirrors > Home > MPE Home > Th. List > hashprg | Structured version Visualization version GIF version | ||
| 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.) |
| Ref | Expression |
|---|---|
| hashprg | ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (𝐴 ≠ 𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2)) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | simpr 490 | . . . . 5 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → 𝐵 ∈ 𝑊) | |
| 2 | elsni 4603 | . . . . . . 7 ⊢ (𝐵 ∈ {𝐴} → 𝐵 = 𝐴) | |
| 3 | 2 | eqcomd 2775 | . . . . . 6 ⊢ (𝐵 ∈ {𝐴} → 𝐴 = 𝐵) |
| 4 | 3 | necon3ai 2990 | . . . . 5 ⊢ (𝐴 ≠ 𝐵 → ¬ 𝐵 ∈ {𝐴}) |
| 5 | snfi 9113 | . . . . . 6 ⊢ {𝐴} ∈ Fin | |
| 6 | hashunsng 14581 | . . . . . . 7 ⊢ (𝐵 ∈ 𝑊 → (({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))) | |
| 7 | 6 | imp 412 | . . . . . 6 ⊢ ((𝐵 ∈ 𝑊 ∧ ({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴})) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
| 8 | 5, 7 | mpanr1 716 | . . . . 5 ⊢ ((𝐵 ∈ 𝑊 ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
| 9 | 1, 4, 8 | syl2an 608 | . . . 4 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
| 10 | hashsng 14558 | . . . . . . 7 ⊢ (𝐴 ∈ 𝑉 → (♯‘{𝐴}) = 1) | |
| 11 | 10 | adantr 486 | . . . . . 6 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (♯‘{𝐴}) = 1) |
| 12 | 11 | adantr 486 | . . . . 5 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘{𝐴}) = 1) |
| 13 | 12 | oveq1d 7470 | . . . 4 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → ((♯‘{𝐴}) + 1) = (1 + 1)) |
| 14 | 9, 13 | eqtrd 2804 | . . 3 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘({𝐴} ∪ {𝐵})) = (1 + 1)) |
| 15 | df-pr 4593 | . . . 4 ⊢ {𝐴, 𝐵} = ({𝐴} ∪ {𝐵}) | |
| 16 | 15 | fveq2i 6923 | . . 3 ⊢ (♯‘{𝐴, 𝐵}) = (♯‘({𝐴} ∪ {𝐵})) |
| 17 | df-2 12449 | . . 3 ⊢ 2 = (1 + 1) | |
| 18 | 14, 16, 17 | 3eqtr4g 2829 | . 2 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘{𝐴, 𝐵}) = 2) |
| 19 | 1ne2 12597 | . . . . . . 7 ⊢ 1 ≠ 2 | |
| 20 | 19 | a1i 11 | . . . . . 6 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → 1 ≠ 2) |
| 21 | 11, 20 | eqnetrd 3032 | . . . . 5 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (♯‘{𝐴}) ≠ 2) |
| 22 | dfsn2 4599 | . . . . . . . 8 ⊢ {𝐴} = {𝐴, 𝐴} | |
| 23 | preq2 4700 | . . . . . . . 8 ⊢ (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵}) | |
| 24 | 22, 23 | eqtr2id 2817 | . . . . . . 7 ⊢ (𝐴 = 𝐵 → {𝐴, 𝐵} = {𝐴}) |
| 25 | 24 | fveq2d 6924 | . . . . . 6 ⊢ (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) = (♯‘{𝐴})) |
| 26 | 25 | neeq1d 3024 | . . . . 5 ⊢ (𝐴 = 𝐵 → ((♯‘{𝐴, 𝐵}) ≠ 2 ↔ (♯‘{𝐴}) ≠ 2)) |
| 27 | 21, 26 | syl5ibrcom 250 | . . . 4 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) ≠ 2)) |
| 28 | 27 | necon2d 2988 | . . 3 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((♯‘{𝐴, 𝐵}) = 2 → 𝐴 ≠ 𝐵)) |
| 29 | 28 | imp 412 | . 2 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ (♯‘{𝐴, 𝐵}) = 2) → 𝐴 ≠ 𝐵) |
| 30 | 18, 29 | impbida 813 | 1 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (𝐴 ≠ 𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2)) |
| Colors of variables: wff setvar class |
| This proof depends on syntax axioms: ¬ wn 3 → wi 4 ↔ wb 209 ∧ wa 401 = wceq 1572 ∈ wcel 2151 ≠ wne 2965 ∪ cun 4154 {csn 4590 {cpr 4592 ‘cfv 6570 (class class class)co 7455 Fincfn 9015 1c1 11244 + caddc 11246 2c2 12441 ♯chash 14519 |
| This proof depends on axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1830 ax-4 1844 ax-5 1947 ax-6 2004 ax-7 2045 ax-8 2153 ax-9 2161 ax-10 2184 ax-11 2201 ax-12 2220 ax-ext 2741 ax-sep 5258 ax-nul 5269 ax-pow 5337 ax-pr 5401 ax-un 7787 ax-cnex 11299 ax-resscn 11300 ax-1cn 11301 ax-icn 11302 ax-addcl 11303 ax-addrcl 11304 ax-mulcl 11305 ax-mulrcl 11306 ax-mulcom 11307 ax-addass 11308 ax-mulass 11309 ax-distr 11310 ax-i2m1 11311 ax-1ne0 11312 ax-1rid 11313 ax-rnegex 11314 ax-rrecex 11315 ax-cnre 11316 ax-pre-lttri 11317 ax-pre-lttrn 11318 ax-pre-ltadd 11319 ax-pre-mulgt0 11320 |
| This proof depends on definitions: df-bi 210 df-an 402 df-or 862 df-3or 1105 df-3an 1106 df-tru 1575 df-fal 1585 df-ex 1815 df-nf 1819 df-sb 2105 df-mo 2571 df-eu 2601 df-clab 2748 df-cleq 2761 df-clel 2845 df-nfc 2919 df-ne 2966 df-nel 3072 df-ral 3087 df-rex 3097 df-reu 3372 df-rab 3419 df-v 3458 df-sbc 3745 df-csb 3854 df-ss 3903 df-pss 4019 df-dif 4052 df-in 4096 df-un 4156 df-nul 4284 df-if 4488 df-pw 4564 df-sn 4591 df-pr 4593 df-op 4844 df-uni 4876 df-int 4916 df-iun 4961 df-br 5112 df-opab 5177 df-mpt 5196 df-tr 5222 df-id 5556 df-eprel 5561 df-po 5569 df-so 5570 df-fr 5614 df-we 5616 df-xp 5667 df-rel 5668 df-cnv 5669 df-co 5670 df-dm 5671 df-rn 5672 df-res 5673 df-ima 5674 df-pred 6334 df-ord 6395 df-on 6396 df-lim 6397 df-suc 6398 df-iota 6524 df-fun 6572 df-fn 6573 df-f 6574 df-f1 6575 df-fo 6576 df-f1o 6577 df-fv 6578 df-riota 7412 df-ov 7458 df-oprab 7459 df-mpo 7460 df-om 7916 df-1st 8039 df-2nd 8040 df-frecs 8341 df-wrecs 8372 df-recs 8421 df-rdg 8460 df-1o 8518 df-oadd 8522 df-er 8759 df-en 9016 df-dom 9017 df-sdom 9018 df-fin 9019 df-dju 10023 df-card 10061 df-pnf 11388 df-mnf 11389 df-xr 11390 df-ltxr 11391 df-le 11392 df-sub 11586 df-neg 11587 df-nn 12380 df-2 12449 df-n0 12651 df-z 12738 df-uz 13010 df-fz 13684 df-hash 14520 |
| This theorem is used by: hashprb 14586 prhash2ex 14588 hashfun 14627 hash2exprb 14661 nehash2 14664 hashtpg 14675 elss2prb 14678 hash3tpexb 14684 wrdlen2i 15140 isnzr2hash 20832 upgrex 29740 umgrbi 29749 usgr1e 29896 usgrexmplef 29910 cusgrexilem2 30093 cusgrfilem1 30106 umgr2v2e 30176 vdegp1bi 30188 eulerpathpr 30911 drngidlhash 34098 ccfldextdgrr 34426 coinflipprob 35234 cusgredgex 36123 subfacp1lem1 36171 poimirlem9 38835 fourierdlem54 47520 fourierdlem102 47568 fourierdlem103 47569 fourierdlem104 47570 fourierdlem114 47580 prpair 48933 prproropf1olem1 48935 paireqne 48943 prprspr2 48950 reuprpr 48955 stgrusgra 49407 gpgusgralem 49504 |
| Copyright terms: Public domain | W3C validator |