Discrete Mathematics: Logic Lecture 1 - Statements, Negation, Conjunction, and Disjunction

Introduction to Discrete Mathematics

  • Discrete Mathematics is the study of the mathematical properties of sets, systems, and structures that possess countably many elements.

  • Key areas of study include:

    • Relations

    • Enumerative combinatorics

    • Algorithms

    • Graph theory

    • And more

  • It has wide-ranging applications in various fields:

    • Computer Science

    • Engineering

    • Communications

    • Transportation

    • And other areas requiring the analysis of discrete data and structures.

Statements and Truth Values

  • Categories of Sentences: Sentences can be categorized into four types:

    • Declarative

    • Interrogative (questions)

    • Imperative (commands)

    • Exclamatory

  • In logic, the primary focus is on declarative sentences.

  • Definition 1: Statement

    • A statement is defined as a declarative sentence that is definitively either true or false, but cannot be both simultaneously.

  • Truth Value:

    • Every statement possesses a truth value, which is either True (TT) or False (FF).

  • Examples of determining truth values:

    • 1/2+1/3=5/61/2 + 1/3 = 5/6 (TT)

    • 2/3+1/5=1/22/3 + 1/5 = 1/2 (FF)

    • 31.732\sqrt{3} \ne 1.732 (TT - since 3\sqrt{3} is irrational and 1.7321.732 is a rational approximation)

    • π=22/7\pi = 22/7 (FF - π\pi is irrational, 22/722/7 is a rational approximation)

    • (x+a)2=x2+2ax+a2(x+a)^2 = x^2 + 2ax + a^2 (This is an identity, always true for any x,ax, a)

    • (2)2=2\sqrt{(-2)^2} = -2 (FF - (2)2=4=2\sqrt{(-2)^2} = \sqrt{4} = 2)

    • 2x+1=102x + 1 = 10 (This is an open sentence, not a statement by itself as its truth value depends on xx)

Open Sentences

  • Definition 2: Open Sentence

    • An open sentence is a declarative sentence that contains one or more variables.

    • Its truth or falseness is contingent upon the specific values assigned to these variables.

  • Example: P(a,b):a+bP(a, b) : a + b is odd, where aa and bb are integers.

    • If a=1,b=2a=1, b=2, then 1+2=31+2=3 is odd (TT).

    • If a=2,b=4a=2, b=4, then 2+4=62+4=6 is odd (FF).

  • Problem Objective: When dealing with open sentences, the objective typically is to identify all variable values for which the sentence evaluates to true (or false).

Logical Connectives and Compound Statements

  • Statements can be combined to form new, more complex statements.

  • The fundamental challenge is to establish rules for efficiently computing the truth value of these new, compound statements.

  • Truth tables are an essential tool for this purpose.

Negation

  • Definition 3: Negation (P\sim P)

    • The negation of a statement PP is the statement "not PP", denoted by P\sim P (other notations may also be used).

    • The negation operator acts on a single statement, $P$, to produce a new statement with the opposite truth value.

  • Truth Table for Negation:

    • If PP is True, P\sim P is False.

    • If PP is False, P\sim P is True.
      \begin{array}{|c|c|}
      \hline
      P & \sim P \
      \hline
      T & F \
      \hline
      F & T \
      \hline
      \end{array}

  • Application to Open Sentences: The negation operator can also be applied to open sentences.

    • If P : x + 3 > 0, then P:x+30\sim P : x + 3 \le 0

Conjunction

  • Definition 4: Conjunction (PQP \land Q)

    • For two statements PP and QQ, their conjunction is the statement "PP and QQ", denoted by PQP \land Q.

    • The conjunction operator acts on a pair of statements, PP and QQ, and produces a single statement that is true only when both PP and QQ are true.

  • Truth Table for Conjunction:
    \begin{array}{|c|c|c|}
    \hline
    P & Q & P \land Q \
    \hline
    T & T & T \
    \hline
    T & F & F \
    \hline
    F & T & F \
    \hline
    F & F & F \
    \hline
    \end{array}

  • Application to Open Sentences: Conjunction can also be applied to open sentences.

Disjunction

  • Definition 5: Disjunction (PQP \lor Q)

    • For two statements PP and QQ, their disjunction is the statement "PP or QQ", denoted by PQP \lor Q.

    • The disjunction operator acts on a pair of statements, PP and QQ, and produces a single statement that is true only when at least one of PP or QQ is true (this is known as inclusive or).

  • Truth Table for Disjunction:
    \begin{array}{|c|c|c|}
    \hline
    P & Q & P \lor Q \
    \hline
    T & T & T \
    \hline
    T & F & T \
    \hline
    F & T & T \
    \hline
    F & F & F \
    \hline
    \end{array}

  • Application to Open Sentences: Disjunction can also be applied to open sentences.

Exclusive OR

  • The phrase "PP or QQ" can sometimes imply that exactly one of PP or QQ must be true. This is distinct from inclusive or.

  • If it is intended that both PP and QQ cannot be true simultaneously, this is called exclusive or.

  • Definition 6: Exclusive OR (PQP \oplus Q)

    • For two statements PP and QQ, the exclusive or of PP and QQ is a statement that is true when exactly one of PP or QQ is true.

  • Truth Table for Exclusive OR:
    \begin{array}{|c|c|c|}
    \hline
    P & Q & P \oplus Q \
    \hline
    T & T & F \
    \hline
    T & F & T \
    \hline
    F & T & T \
    \hline
    F & F & F \
    \hline
    \end{array}

  • Application to Open Sentences: Exclusive or can also be applied to open sentences.

Compound Statements and Logical Equivalence

  • The symbols ,,,\sim, \land, \lor, \oplus are known as logical connectives.

  • Definition 7: Compound Statement

    • A compound statement is a statement formed by combining one or more simple statements using one or more logical connectives.

    • Compound statements can become very intricate.

    • A key interest in logic is simplifying compound statements as much as possible.

  • Definition 8: Logical Equivalence (RSR \equiv S)

    • Two compound statements, RR and SS, constructed from the same component statements, are considered logically equivalent if they consistently have the same truth value for every possible combination of truth values of their component statements.

    • This is denoted as RSR \equiv S.

    • If their truth values differ for even one combination, they are not logically equivalent, written as R≢SR \not\equiv S.

Laws of Logic

Commutative Laws

  • Theorem 1: Commutative Laws

    • For any two statements PP and QQ:

      • \begin{equation}P \land Q \equiv Q \land P\end{equation}

      • \begin{equation}P \lor Q \equiv Q \lor P\end{equation}

  • Proof Idea: These laws can be proven by constructing truth tables for both sides of the equivalence and demonstrating that their final truth value columns are identical.

  • Application to Open Sentences: These laws also apply to open sentences.

    • Example: "n2+4nn^2 + 4n is even or n^2 - 9 < 0" is logically equivalent to "n^2 - 9 < 0 or n2+4nn^2 + 4n is even".

De Morgan's Laws

  • Theorem 2: De Morgan's Laws

    • For any two statements PP and QQ, the following equivalences hold:

      • (a) \begin{equation}\sim (P \lor Q) \equiv (\sim P) \land (\sim Q)\end{equation}

      • (b) \begin{equation}\sim (P \land Q) \equiv (\sim P) \lor (\sim Q)\end{equation}

  • Proof of (a) using Truth Table: \begin{array}{|c|c|c|c|c|c|c|} \hline P & Q & P \lor Q & \sim (P \lor Q) & \sim P & \sim Q & (\sim P) \land (\sim Q) \ \hline T & T & T & F & F & F & F \ \hline T & F & T & F & F & T & F \ \hline F & T & T & F & T & F & F \ \hline F & F & F & T & T & T & T \ \hline \end{array}

    • The columns for (PQ)\sim (P \lor Q) and (P)(Q)( \sim P) \land (\sim Q) are identical, thus proving their logical equivalence.

  • De Morgan's Laws for Open Sentences: These laws similarly apply to open sentences.

    • Let P:aP: a is odd, Q:bQ: b is odd.

      1. PQP \lor Q: "aa is odd or bb is odd."

      2. (PQ)\sim (P \lor Q): "It is not the case that ( aa is odd or bb is odd )" or "Neither aa is odd, nor bb is odd."

      3. Restate (PQ)\sim (P \lor Q) using De Morgan's Law (a): (P)(Q)( \sim P) \land (\sim Q): "aa is not odd (i.e., aa is even) and bb is not odd (i.e., bb is even)".

  • Theorem 3: Double Negation Law

    • For every statement PP, \begin{equation}P \equiv \sim (\sim P)\end{equation}. A statement is logically equivalent to the negation of its negation.

Exercise: Proof using De Morgan's Laws

  • Problem: Prove that (P(Q))(P)Q\sim (P \lor (\sim Q)) \equiv (\sim P) \land Q

  • Hint: Apply an appropriate De Morgan's Law by treating Q\sim Q as a single statement (e.g., let R=QR = \sim Q).

    • Then (PR)(P)(R)\sim (P \lor R) \equiv (\sim P) \land (\sim R)

    • Substituting back R=QR = \sim Q, we get (P)((Q))( \sim P) \land (\sim (\sim Q))

    • By the Double Negation Law ((Q)Q\sim (\sim Q) \equiv Q), this simplifies to (P)Q( \sim P) \land Q.

    • Thus, (P(Q))(P)Q\sim (P \lor (\sim Q)) \equiv (\sim P) \land Q is proven.

Associative and Distributive Laws

  • Theorem 4: Associative and Distributive Laws

    • Let P,QP, Q, and RR be three statements.

    • (a) Associative Laws:

      • \begin{equation}P \lor (Q \lor R) \equiv (P \lor Q) \lor R\end{equation}

      • \begin{equation}P \land (Q \land R) \equiv (P \land Q) \land R\end{equation}

      • These laws indicate that the grouping of statements in a series of disjunctions or conjunctions does not affect the logical equivalence of the compound statement.

    • (b) Distributive Laws:

      • \begin{equation}P \lor (Q \land R) \equiv (P \lor Q) \land (P \lor R)\end{equation}

      • \begin{equation}P \land (Q \lor R) \equiv (P \land Q) \lor (P \land R)\end{equation}

      • These laws are analogous to distributive laws in algebra, showing how disjunction distributes over conjunction, and vice-versa.

  • Proof Idea: Both sets of laws can be proven by constructing comprehensive truth tables, showing that the truth values for both sides of each equivalence are identical for all possible combinations of truth values for P,QP, Q, and RR.