Description: The size of the union of finite sets is the sum of their sizes minus the size of the intersection. (Contributed by Mario Carneiro, 6-Aug-2017)
Ref | Expression | ||
---|---|---|---|
Assertion | hashun3 | |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | diffi | |
|
2 | 1 | adantl | |
3 | simpl | |
|
4 | inss1 | |
|
5 | ssfi | |
|
6 | 3 4 5 | sylancl | |
7 | sslin | |
|
8 | 4 7 | ax-mp | |
9 | disjdifr | |
|
10 | sseq0 | |
|
11 | 8 9 10 | mp2an | |
12 | 11 | a1i | |
13 | hashun | |
|
14 | 2 6 12 13 | syl3anc | |
15 | incom | |
|
16 | 15 | uneq2i | |
17 | uncom | |
|
18 | inundif | |
|
19 | 16 17 18 | 3eqtri | |
20 | 19 | a1i | |
21 | 20 | fveq2d | |
22 | 14 21 | eqtr3d | |
23 | hashcl | |
|
24 | 23 | adantl | |
25 | 24 | nn0cnd | |
26 | hashcl | |
|
27 | 6 26 | syl | |
28 | 27 | nn0cnd | |
29 | hashcl | |
|
30 | 2 29 | syl | |
31 | 30 | nn0cnd | |
32 | 25 28 31 | subadd2d | |
33 | 22 32 | mpbird | |
34 | 33 | oveq2d | |
35 | hashcl | |
|
36 | 35 | adantr | |
37 | 36 | nn0cnd | |
38 | 37 25 28 | addsubassd | |
39 | undif2 | |
|
40 | 39 | fveq2i | |
41 | disjdif | |
|
42 | 41 | a1i | |
43 | hashun | |
|
44 | 3 2 42 43 | syl3anc | |
45 | 40 44 | eqtr3id | |
46 | 34 38 45 | 3eqtr4rd | |