Set theory provides the foundational language of modern mathematics, describing collections of objects (sets) and operations on them. It underpins data structures, logic, functions, and reasoning used across computer science.
Details
Concepts
Basic notions: set, element, subset (⊆), proper subset (⊂), empty set ∅, universal set U
Operations: union (∪), intersection (∩), difference (\), complement (¬ or superscript c)
Algebraic laws: commutativity, associativity, distributivity, De Morgan's laws
Relations to logic: membership as predicates; sets defined by comprehension
Functions as sets of ordered pairs; Cartesian product A × B; power set 𝒫(A)
Exercises
Hands-on
Prove De Morgan's law: (A ∪ B)c = Ac ∩ Bc using element-chasing.
Given sets A={1,2,3}, B={2,3,4}, C={3,4,5}, compute (A ∪ B) \ C and A × (B \ C).