Category: Logic and Proof Level: 201
(A ∪ B)' = A' ∩ B'
Union, intersection, difference, and complement each shade a region of a Venn diagram. De Morgan's law says the outside of a union equals the overlap of the two outsides.
The rectangle U holds the numbers 1 to 10. Circle A holds 1 to 5 and circle B holds 4 to 7. The overlap holds the numbers in both.
A = {1, 2, 3, 4, 5}, B = {4, 5, 6, 7}
Shade everything inside either circle. The union collects every element of A and every element of B.
A ∪ B = {1, 2, 3, 4, 5, 6, 7}
Shade only the overlap. The intersection keeps the elements that belong to both sets.
A ∩ B = {4, 5}
Start with A and remove the part inside B. The difference is the crescent of A outside the overlap.
A - B = {1, 2, 3}
Shade everything in U outside circle A. The complement depends on the universe: here it is every number from 1 to 10 that is not in A.
A' = {6, 7, 8, 9, 10}
Shade what lies outside both circles. Only the numbers in neither set remain.
(A ∪ B)' = {8, 9, 10}
Stripe the outside of A one way and the outside of B the other way. The crosshatched region is the same region as the outside of the union.
(A ∪ B)' = A' ∩ B' = {8, 9, 10}
cd svg-generator python3 -m svgmath render set-operations --out /tmp/set-operations
Source: svgmath/diagrams/logic.py