,

Contents · Set theory basics


Overview

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

  • 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

  1. Prove De Morgan's law: (A ∪ B)c = Ac ∩ Bc using element-chasing.
  2. Given sets A={1,2,3}, B={2,3,4}, C={3,4,5}, compute (A ∪ B) \ C and A × (B \ C).