MathIsimple

Lesson 5-1: Sets & Logic

Master set operations, logical connectives, truth tables, predicates, quantifiers, and logical reasoning with practical applications in discrete mathematics.

Learning Objectives

  • Perform set algebra and prove identities using laws.
  • Build and analyze truth tables for complex propositions.
  • Translate between natural language and quantifiers/predicates.
  • Spot common fallacies and correctly negate quantified statements.

Core Set Operations

Basic Operations

AB (Union): elements in A or BA \cup B \text{ (Union): elements in A or B}
AB (Intersection): elements in both A and BA \cap B \text{ (Intersection): elements in both A and B}
AB (Difference): elements in A not in BA - B \text{ (Difference): elements in A not in B}

Complement & Laws

A (Complement): elements not in A\overline{A} \text{ (Complement): elements not in A}
AB=AB\overline{A \cup B} = \overline{A} \cap \overline{B}
AB=AB\overline{A \cap B} = \overline{A} \cup \overline{B}

Set Laws (De Morgan's Laws)

De Morgan's Laws

AB=AB\overline{A \cup B} = \overline{A} \cap \overline{B}
AB=AB\overline{A \cap B} = \overline{A} \cup \overline{B}

The complement of a union is the intersection of complements, and vice versa.

Other Important Laws

A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)
A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)

Propositional Logic

Logical Connectives

¬p (NOT): negation\neg p \text{ (NOT): negation}
pq (AND): conjunctionp \land q \text{ (AND): conjunction}
pq (OR): disjunctionp \lor q \text{ (OR): disjunction}
pq (IF-THEN): implicationp \to q \text{ (IF-THEN): implication}

Truth Table Example

pqp ∧ qp ∨ qp → q
TTTTT
TFFTF
FTFTT
FFFFT

Predicates and Quantifiers

Universal Quantifier

xS,P(x) (For all x in S, P(x) is true)\forall x \in S, P(x) \text{ (For all x in S, P(x) is true)}

Example: "All students are hardworking" becomes xStudents,Hardworking(x)\forall x \in \text{Students}, \text{Hardworking}(x)

Existential Quantifier

xS,P(x) (There exists x in S such that P(x) is true)\exists x \in S, P(x) \text{ (There exists x in S such that P(x) is true)}

Example: "Some students are brilliant" becomes xStudents,Brilliant(x)\exists x \in \text{Students}, \text{Brilliant}(x)

Worked Examples

Example 1: Set Operations

Given A={1,2,3}A = \{1, 2, 3\} and B={2,3,4}B = \{2, 3, 4\}, find ABA \cup B and ABA \cap B.

Solution:

AB={1,2,3,4}A \cup B = \{1, 2, 3, 4\}
AB={2,3}A \cap B = \{2, 3\}

Example 2: Logical Negation

Negate the statement: "All birds can fly"

Solution:

¬(xBirds,CanFly(x))\neg(\forall x \in \text{Birds}, \text{CanFly}(x))
xBirds,¬CanFly(x)\exists x \in \text{Birds}, \neg\text{CanFly}(x)

"There exists a bird that cannot fly"

Practice Problems

Problem 1

Prove that AB=AB\overline{A \cup B} = \overline{A} \cap \overline{B} using De Morgan's law.

xABxABxA and xBxABx \in \overline{A \cup B} \Leftrightarrow x \notin A \cup B \Leftrightarrow x \notin A \text{ and } x \notin B \Leftrightarrow x \in \overline{A} \cap \overline{B}

Problem 2

Create a truth table for (pq)(qr)(p \to q) \land (q \to r).

This is a chain of implications: pqr\text{This is a chain of implications: } p \to q \to r

Key Takeaways

  • Set operations follow specific algebraic laws similar to arithmetic.
  • De Morgan's laws are fundamental for working with complements.
  • Truth tables provide a systematic way to analyze logical statements.
  • Quantifiers allow us to express statements about all or some elements.
  • Proper negation of quantified statements requires careful attention to quantifier changes.
Continue to Lesson 5-2 for graph theory basics.