Union¶
Core Idea¶
The union of several collections is the set of elements in at least one of them — the defining commitment is inclusive OR. It is associative, commutative, and idempotent, monotone upward (adding a contributor can only grow the result), and collapses the overlap (a multiply-included element appears once), so it is not concatenation or a sum.
How would you explain it like I'm…
The Big Combined Pile
Everything In Any Bag
Inclusive-OR Pooling
Broad Use¶
- Mathematics and logic: set union, the disjunction of predicates, and the lattice join.
- Combinatorics: inclusion–exclusion, the canonical formula for the size of a union of overlapping sets.
- Databases: the SQL
UNIONoperator (deduplicating, whereUNION ALLkeeps every row). - Type theory: the sum/variant type — a value of
A | Bis anAor aB. - Probability: the event \(A \cup B\), with \(P(A \cup B) = P(A) + P(B) - P(A \cap B)\).
- Access control: a principal's effective permissions are the union of those granted by each role, so adding a role can only expand capability.
Clarity¶
Converts vague phrasing into a precise question — "everyone affected by any of these policies" becomes "the union of the affected sets" — and corrects the most common error: double-counting the overlap by summing parts that share elements.
Manages Complexity¶
Collapses N membership questions into one, with closed-form lattice facts (order and grouping free, re-merging a no-op) and inclusion–exclusion turning "how big is the combined set?" into a structured alternating sum over the overlaps.
Abstract Reasoning¶
Trains a reasoner to decompose any "combined" or "either/or" requirement into named collections, expect growth as contributors accumulate, and correct for the overlap rather than naively summing.
Knowledge Transfer¶
- Data integration → access control: the enumerate-grow-deduplicate-and-correct menu ports unchanged from merging record sets to combining role permissions.
- Across domains: the diagnosis "our combined total is overstated because we summed overlapping sources" reads identically whether the sources are databases, roles, events, or taxa.
Example¶
A SQL UNION of regional customer queries consolidates the lists and deduplicates
shoppers appearing in several regions to one row each — and inclusion–exclusion warns that
the consolidated count is not the sum of the per-region counts.
Relationships to Other Abstractions¶
Current abstraction Union Prime
Parents (1) — more general patterns this builds on
-
Union presupposes Set and Membership Prime
Union presupposes collections with settled membership tests before inclusive-OR pooling can be defined.
Children (4) — more specific cases that build on this
-
Collectively exhaustive events Domain-specific is a kind of Union
The proposed strict upward parent is
prime:union. -
Conical surface Domain-specific is a kind of Union
Conical Surface instantiates Union because it is constituted by gathering every point on every generator line selected by the apex-directrix incidence rule; no single generator is the surface.
-
Topological Space Domain-specific is part of Union
Arbitrary Union is one of the two named collection operations under which a topology must remain closed.
-
Phragmen–Brouwer theorem Domain-specific is a decomposition of Union
Union (
prime:union).
Hierarchy path (1) — routes to 1 parentless root
- Union → Set and Membership
Not to Be Confused With¶
- Union is not Intersection because intersection takes AND (membership in every collection) and narrows to the overlap, whereas union takes OR (membership in any one) and enlarges to the combined whole — adding a contributor shrinks one but grows the other.
- Union is not Aggregation because aggregation condenses to a summary value and counts multiplicities, whereas union merges into a set in which every member remains present and the overlap is absorbed.
- Union is not Concatenation because concatenation (multiset sum) keeps every copy, whereas set union keeps one copy — the difference is exactly the over-counted overlap.