| Intuitionistic Logic Explorer |
< Previous
Next >
Nearby theorems |
||
| Mirrors > Home > ILE Home > Th. List > hashprg | 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 | simplr 528 | . . . . 5 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → 𝐵 ∈ 𝑊) | |
| 2 | snfig 6913 | . . . . . 6 ⊢ (𝐴 ∈ 𝑉 → {𝐴} ∈ Fin) | |
| 3 | 2 | ad2antrr 488 | . . . . 5 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → {𝐴} ∈ Fin) |
| 4 | elsni 3652 | . . . . . . . 8 ⊢ (𝐵 ∈ {𝐴} → 𝐵 = 𝐴) | |
| 5 | 4 | eqcomd 2212 | . . . . . . 7 ⊢ (𝐵 ∈ {𝐴} → 𝐴 = 𝐵) |
| 6 | 5 | necon3ai 2426 | . . . . . 6 ⊢ (𝐴 ≠ 𝐵 → ¬ 𝐵 ∈ {𝐴}) |
| 7 | 6 | adantl 277 | . . . . 5 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → ¬ 𝐵 ∈ {𝐴}) |
| 8 | hashunsng 10959 | . . . . . 6 ⊢ (𝐵 ∈ 𝑊 → (({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))) | |
| 9 | 8 | imp 124 | . . . . 5 ⊢ ((𝐵 ∈ 𝑊 ∧ ({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴})) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
| 10 | 1, 3, 7, 9 | syl12anc 1248 | . . . 4 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
| 11 | hashsng 10950 | . . . . . . 7 ⊢ (𝐴 ∈ 𝑉 → (♯‘{𝐴}) = 1) | |
| 12 | 11 | adantr 276 | . . . . . 6 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (♯‘{𝐴}) = 1) |
| 13 | 12 | adantr 276 | . . . . 5 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘{𝐴}) = 1) |
| 14 | 13 | oveq1d 5966 | . . . 4 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → ((♯‘{𝐴}) + 1) = (1 + 1)) |
| 15 | 10, 14 | eqtrd 2239 | . . 3 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘({𝐴} ∪ {𝐵})) = (1 + 1)) |
| 16 | df-pr 3641 | . . . 4 ⊢ {𝐴, 𝐵} = ({𝐴} ∪ {𝐵}) | |
| 17 | 16 | fveq2i 5586 | . . 3 ⊢ (♯‘{𝐴, 𝐵}) = (♯‘({𝐴} ∪ {𝐵})) |
| 18 | df-2 9102 | . . 3 ⊢ 2 = (1 + 1) | |
| 19 | 15, 17, 18 | 3eqtr4g 2264 | . 2 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘{𝐴, 𝐵}) = 2) |
| 20 | 1ne2 9250 | . . . . . . 7 ⊢ 1 ≠ 2 | |
| 21 | 20 | a1i 9 | . . . . . 6 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → 1 ≠ 2) |
| 22 | 12, 21 | eqnetrd 2401 | . . . . 5 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (♯‘{𝐴}) ≠ 2) |
| 23 | dfsn2 3648 | . . . . . . . 8 ⊢ {𝐴} = {𝐴, 𝐴} | |
| 24 | preq2 3712 | . . . . . . . 8 ⊢ (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵}) | |
| 25 | 23, 24 | eqtr2id 2252 | . . . . . . 7 ⊢ (𝐴 = 𝐵 → {𝐴, 𝐵} = {𝐴}) |
| 26 | 25 | fveq2d 5587 | . . . . . 6 ⊢ (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) = (♯‘{𝐴})) |
| 27 | 26 | neeq1d 2395 | . . . . 5 ⊢ (𝐴 = 𝐵 → ((♯‘{𝐴, 𝐵}) ≠ 2 ↔ (♯‘{𝐴}) ≠ 2)) |
| 28 | 22, 27 | syl5ibrcom 157 | . . . 4 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) ≠ 2)) |
| 29 | 28 | necon2d 2436 | . . 3 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((♯‘{𝐴, 𝐵}) = 2 → 𝐴 ≠ 𝐵)) |
| 30 | 29 | imp 124 | . 2 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ (♯‘{𝐴, 𝐵}) = 2) → 𝐴 ≠ 𝐵) |
| 31 | 19, 30 | impbida 596 | 1 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (𝐴 ≠ 𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2)) |
| Colors of variables: wff set class |
| Syntax hints: ¬ wn 3 → wi 4 ∧ wa 104 ↔ wb 105 = wceq 1373 ∈ wcel 2177 ≠ wne 2377 ∪ cun 3165 {csn 3634 {cpr 3635 ‘cfv 5276 (class class class)co 5951 Fincfn 6834 1c1 7933 + caddc 7935 2c2 9094 ♯chash 10927 |
| 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 4163 ax-sep 4166 ax-nul 4174 ax-pow 4222 ax-pr 4257 ax-un 4484 ax-setind 4589 ax-iinf 4640 ax-cnex 8023 ax-resscn 8024 ax-1cn 8025 ax-1re 8026 ax-icn 8027 ax-addcl 8028 ax-addrcl 8029 ax-mulcl 8030 ax-addcom 8032 ax-addass 8034 ax-distr 8036 ax-i2m1 8037 ax-0lt1 8038 ax-0id 8040 ax-rnegex 8041 ax-cnre 8043 ax-pre-ltirr 8044 ax-pre-ltwlin 8045 ax-pre-lttrn 8046 ax-pre-apti 8047 ax-pre-ltadd 8048 |
| 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 3000 df-csb 3095 df-dif 3169 df-un 3171 df-in 3173 df-ss 3180 df-nul 3462 df-if 3573 df-pw 3619 df-sn 3640 df-pr 3641 df-op 3643 df-uni 3853 df-int 3888 df-iun 3931 df-br 4048 df-opab 4110 df-mpt 4111 df-tr 4147 df-id 4344 df-iord 4417 df-on 4419 df-ilim 4420 df-suc 4422 df-iom 4643 df-xp 4685 df-rel 4686 df-cnv 4687 df-co 4688 df-dm 4689 df-rn 4690 df-res 4691 df-ima 4692 df-iota 5237 df-fun 5278 df-fn 5279 df-f 5280 df-f1 5281 df-fo 5282 df-f1o 5283 df-fv 5284 df-riota 5906 df-ov 5954 df-oprab 5955 df-mpo 5956 df-1st 6233 df-2nd 6234 df-recs 6398 df-irdg 6463 df-frec 6484 df-1o 6509 df-oadd 6513 df-er 6627 df-en 6835 df-dom 6836 df-fin 6837 df-pnf 8116 df-mnf 8117 df-xr 8118 df-ltxr 8119 df-le 8120 df-sub 8252 df-neg 8253 df-inn 9044 df-2 9102 df-n0 9303 df-z 9380 df-uz 9656 df-fz 10138 df-ihash 10928 |
| This theorem is referenced by: prhash2ex 10961 fiprsshashgt1 10969 |
| Copyright terms: Public domain | W3C validator |