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 486 | . . . . 5 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → 𝐵 ∈ 𝑊) | |
2 | elsni 4602 | . . . . . . 7 ⊢ (𝐵 ∈ {𝐴} → 𝐵 = 𝐴) | |
3 | 2 | eqcomd 2744 | . . . . . 6 ⊢ (𝐵 ∈ {𝐴} → 𝐴 = 𝐵) |
4 | 3 | necon3ai 2967 | . . . . 5 ⊢ (𝐴 ≠ 𝐵 → ¬ 𝐵 ∈ {𝐴}) |
5 | snfi 8922 | . . . . . 6 ⊢ {𝐴} ∈ Fin | |
6 | hashunsng 14220 | . . . . . . 7 ⊢ (𝐵 ∈ 𝑊 → (({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1))) | |
7 | 6 | imp 408 | . . . . . 6 ⊢ ((𝐵 ∈ 𝑊 ∧ ({𝐴} ∈ Fin ∧ ¬ 𝐵 ∈ {𝐴})) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
8 | 5, 7 | mpanr1 702 | . . . . 5 ⊢ ((𝐵 ∈ 𝑊 ∧ ¬ 𝐵 ∈ {𝐴}) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
9 | 1, 4, 8 | syl2an 597 | . . . 4 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘({𝐴} ∪ {𝐵})) = ((♯‘{𝐴}) + 1)) |
10 | hashsng 14197 | . . . . . . 7 ⊢ (𝐴 ∈ 𝑉 → (♯‘{𝐴}) = 1) | |
11 | 10 | adantr 482 | . . . . . 6 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (♯‘{𝐴}) = 1) |
12 | 11 | adantr 482 | . . . . 5 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘{𝐴}) = 1) |
13 | 12 | oveq1d 7365 | . . . 4 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → ((♯‘{𝐴}) + 1) = (1 + 1)) |
14 | 9, 13 | eqtrd 2778 | . . 3 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘({𝐴} ∪ {𝐵})) = (1 + 1)) |
15 | df-pr 4588 | . . . 4 ⊢ {𝐴, 𝐵} = ({𝐴} ∪ {𝐵}) | |
16 | 15 | fveq2i 6841 | . . 3 ⊢ (♯‘{𝐴, 𝐵}) = (♯‘({𝐴} ∪ {𝐵})) |
17 | df-2 12150 | . . 3 ⊢ 2 = (1 + 1) | |
18 | 14, 16, 17 | 3eqtr4g 2803 | . 2 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ 𝐴 ≠ 𝐵) → (♯‘{𝐴, 𝐵}) = 2) |
19 | 1ne2 12295 | . . . . . . 7 ⊢ 1 ≠ 2 | |
20 | 19 | a1i 11 | . . . . . 6 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → 1 ≠ 2) |
21 | 11, 20 | eqnetrd 3010 | . . . . 5 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (♯‘{𝐴}) ≠ 2) |
22 | dfsn2 4598 | . . . . . . . 8 ⊢ {𝐴} = {𝐴, 𝐴} | |
23 | preq2 4694 | . . . . . . . 8 ⊢ (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵}) | |
24 | 22, 23 | eqtr2id 2791 | . . . . . . 7 ⊢ (𝐴 = 𝐵 → {𝐴, 𝐵} = {𝐴}) |
25 | 24 | fveq2d 6842 | . . . . . 6 ⊢ (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) = (♯‘{𝐴})) |
26 | 25 | neeq1d 3002 | . . . . 5 ⊢ (𝐴 = 𝐵 → ((♯‘{𝐴, 𝐵}) ≠ 2 ↔ (♯‘{𝐴}) ≠ 2)) |
27 | 21, 26 | syl5ibrcom 247 | . . . 4 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (𝐴 = 𝐵 → (♯‘{𝐴, 𝐵}) ≠ 2)) |
28 | 27 | necon2d 2965 | . . 3 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((♯‘{𝐴, 𝐵}) = 2 → 𝐴 ≠ 𝐵)) |
29 | 28 | imp 408 | . 2 ⊢ (((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) ∧ (♯‘{𝐴, 𝐵}) = 2) → 𝐴 ≠ 𝐵) |
30 | 18, 29 | impbida 800 | 1 ⊢ ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (𝐴 ≠ 𝐵 ↔ (♯‘{𝐴, 𝐵}) = 2)) |
Colors of variables: wff setvar class |
Syntax hints: ¬ wn 3 → wi 4 ↔ wb 205 ∧ wa 397 = wceq 1542 ∈ wcel 2107 ≠ wne 2942 ∪ cun 3907 {csn 4585 {cpr 4587 ‘cfv 6492 (class class class)co 7350 Fincfn 8817 1c1 10986 + caddc 10988 2c2 12142 ♯chash 14158 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1798 ax-4 1812 ax-5 1914 ax-6 1972 ax-7 2012 ax-8 2109 ax-9 2117 ax-10 2138 ax-11 2155 ax-12 2172 ax-ext 2709 ax-sep 5255 ax-nul 5262 ax-pow 5319 ax-pr 5383 ax-un 7663 ax-cnex 11041 ax-resscn 11042 ax-1cn 11043 ax-icn 11044 ax-addcl 11045 ax-addrcl 11046 ax-mulcl 11047 ax-mulrcl 11048 ax-mulcom 11049 ax-addass 11050 ax-mulass 11051 ax-distr 11052 ax-i2m1 11053 ax-1ne0 11054 ax-1rid 11055 ax-rnegex 11056 ax-rrecex 11057 ax-cnre 11058 ax-pre-lttri 11059 ax-pre-lttrn 11060 ax-pre-ltadd 11061 ax-pre-mulgt0 11062 |
This theorem depends on definitions: df-bi 206 df-an 398 df-or 847 df-3or 1089 df-3an 1090 df-tru 1545 df-fal 1555 df-ex 1783 df-nf 1787 df-sb 2069 df-mo 2540 df-eu 2569 df-clab 2716 df-cleq 2730 df-clel 2816 df-nfc 2888 df-ne 2943 df-nel 3049 df-ral 3064 df-rex 3073 df-reu 3353 df-rab 3407 df-v 3446 df-sbc 3739 df-csb 3855 df-dif 3912 df-un 3914 df-in 3916 df-ss 3926 df-pss 3928 df-nul 4282 df-if 4486 df-pw 4561 df-sn 4586 df-pr 4588 df-op 4592 df-uni 4865 df-int 4907 df-iun 4955 df-br 5105 df-opab 5167 df-mpt 5188 df-tr 5222 df-id 5529 df-eprel 5535 df-po 5543 df-so 5544 df-fr 5586 df-we 5588 df-xp 5637 df-rel 5638 df-cnv 5639 df-co 5640 df-dm 5641 df-rn 5642 df-res 5643 df-ima 5644 df-pred 6250 df-ord 6317 df-on 6318 df-lim 6319 df-suc 6320 df-iota 6444 df-fun 6494 df-fn 6495 df-f 6496 df-f1 6497 df-fo 6498 df-f1o 6499 df-fv 6500 df-riota 7306 df-ov 7353 df-oprab 7354 df-mpo 7355 df-om 7794 df-1st 7912 df-2nd 7913 df-frecs 8180 df-wrecs 8211 df-recs 8285 df-rdg 8324 df-1o 8380 df-oadd 8384 df-er 8582 df-en 8818 df-dom 8819 df-sdom 8820 df-fin 8821 df-dju 9771 df-card 9809 df-pnf 11125 df-mnf 11126 df-xr 11127 df-ltxr 11128 df-le 11129 df-sub 11321 df-neg 11322 df-nn 12088 df-2 12150 df-n0 12348 df-z 12434 df-uz 12697 df-fz 13354 df-hash 14159 |
This theorem is referenced by: hashprb 14225 prhash2ex 14227 hashfun 14265 hash2exprb 14298 nehash2 14301 hashtpg 14312 elss2prb 14314 wrdlen2i 14763 isnzr2hash 20657 upgrex 27829 umgrbi 27838 usgr1e 27979 usgrexmplef 27993 cusgrexilem2 28176 cusgrfilem1 28189 umgr2v2e 28259 vdegp1bi 28271 eulerpathpr 28970 ccfldextdgrr 32127 coinflipprob 32840 cusgredgex 33476 subfacp1lem1 33534 poimirlem9 35973 fourierdlem54 44123 fourierdlem102 44171 fourierdlem103 44172 fourierdlem104 44173 fourierdlem114 44183 prpair 45411 prproropf1olem1 45413 paireqne 45421 prprspr2 45428 reuprpr 45433 |
Copyright terms: Public domain | W3C validator |