Set operations
On this page
This English edition is an AI candidate and does not yet have an OCME Atlas (GPT-6) Twin closure receipt.
Union, intersection, difference, and relative complement construct new sets from existing sets through element-membership conditions.
mko-set-operations · definition · v0.10.0
Mathematical statement
For sets A and B in one domain, the union contains elements belonging to at least one set, the intersection contains elements belonging to both, and A\B contains elements belonging to A but not B. A complement must be relative to an explicit universe U and is written U\A.
Representative formula (exact TeX)
A\cup B
Assumptions
- A and B are sets in the same ambient type or the same explicit universe U.
- When complement is used, the universe U or ambient type is explicitly specified.
Symbol scope
A— left setB— right set∪— set-union operation
Intuition, definition, and misconceptions
A∪B contains every element appearing in A or B, with repeated occurrences still counting as one set element. A∩B retains only elements common to both sets.
A\B is directional and retains only elements in A that are not in B, so it generally differs from B\A.
Complement is not an absolute operation detached from a domain. A finite exercise must first list its universe U, after which the relative complement of A is U\A. In Lean Set α, complement is interpreted relative to the ambient type α and its universal set.
Common mistakes include swapping union and intersection, assuming A\B equals B\A, or listing a complement without specifying a universe.
Adopted derivation guide
Set operations: union, intersection, difference and complement in an explicit universeThe original MKO is retained. The guide has its own append-only revision and verification boundaries, not a new Lean proof.
Prerequisites
- Set membership — All four set operations define their output through membership in the input sets.
Verification boundary
This entry is an AI candidate for set operations. Finite enumeration checks only concrete examples and is not a proof of universal properties of the four operations.
not_formalized
This does not mean the content is false; it means no replayable computational or formal evidence is registered yet.
Next obligation
Bind exact statements, sources, versions, and axiom receipts for Set.mem_union, intersection membership, Set.mem_sdiff, and Set.mem_compl_iff separately.
Same-source structured data
This page and the interactive view use the same object and existing language edition; this adds no proof or human review.
Canonical MKO JSON · Plain Markdown