A propositional variable (p, q, r, s, ...) is a mathematical variable representing a proposition
The value of a propositional variable is true, denoted by T, or false, denoted by F
A compound proposition is a proposition constructed by combining propositions with logical operators
Logical operators:
\(\neg\): Negation
\(\vee\): Disjunction
\(\wedge\): Conjunction
\(\oplus\): Exclusive Or
\(\rightarrow\): Conditional
\(\leftrightarrow\): Biconditional
The negation of a proposition \(p\) is denoted by \(\neg p\) and has the following truth table:
\(p\) | \(\neg p\) |
---|---|
T | F |
F | T |
The conjunction of a propositions \(p\) and \(q\) is denoted by \(p \wedge q\) and has the following truth table:
\(p\) | \(q\) | \(p \wedge q\) |
---|---|---|
T | T | T |
T | F | F |
F | T | F |
F | F | F |
The disjunction of propositions \(p\) and \(q\) is denoted by \(p \vee q\) and has the following truth table:
\(p\) | \(q\) | \(p \vee q\) |
---|---|---|
T | T | T |
T | F | T |
F | T | T |
F | F | F |
The exclusive or of propositions \(p\) and \(q\) is denoted by \(p \oplus q\) and has the following truth table:
\(p\) | \(q\) | \(p \oplus q\) |
---|---|---|
T | T | F |
T | F | T |
F | T | T |
F | F | F |
The conditional statement or implication of propositions \(p\) and \(q\) is denoted by \(p \rightarrow q\) and has the following truth table:
\(p\) | \(q\) | \(p \rightarrow q\) |
---|---|---|
T | T | T |
T | F | F |
F | T | T |
F | F | T |
\(p \rightarrow q\) is read “If \(p\) then \(q\)”
In \(p \rightarrow q\), \(p\) is the hypothesis (antecedent or premise) and \(q\) is the conclusion (or consequence)
From \(p \rightarrow q\) we can form new conditional statements
\(q \rightarrow p\) is the converse of \(p \rightarrow q\)
\(\neg q \rightarrow \neg p\) is the contrapositive of \(p \rightarrow q\)
\(\neg p \rightarrow \neg q\) is the inverse of \(p \rightarrow q\)
The biconditional of propositions \(p\) and \(q\) is denoted by \(p \leftrightarrow q\) and has the following truth table:
\(p\) | \(q\) | \(p \leftrightarrow q\) |
---|---|---|
T | T | T |
T | F | F |
F | T | F |
F | F | T |
\(p \leftrightarrow q\) is read “\(p\) if and only if \(q\)”
Truth table construction:
We need a row for every possible combination of truth values for the atomic propositions
We need a column for the compound proposition
We need a column for each subexpression (including the atomic propositions)
Two propositions are equivalent if they always have the same truth value
Example: the conditional is equivalent to the contrapositive
\(p\) | \(q\) | \(\neg p\) | \(\neg q\) | \(p \rightarrow q\) | \(\neg q \rightarrow \neg p\) |
---|---|---|---|---|---|
T | T | F | F | T | T |
T | F | F | T | F | F |
F | T | T | F | T | T |
F | F | T | T | T | T |
Operator | Precedence |
---|---|
\(\neg\) | 1 |
\(\wedge\) | 2 |
\(\vee\) | 3 |
\(\rightarrow\) | 4 |
\(\leftrightarrow\) | 5 |
A tautology is a proposition that is always true
A contradiction is a proposition that is always false
A contingency is a proposition that is neither a tautology nor a contradiction
Two compound propositions \(p\) and \(q\) are logically equivalent if \(p \leftrightarrow q\) is a tautology
This is denoted as \(p \equiv q\)
Logical equivalence can be shown with a truth table; the compound propositions \(p\) and \(q\) are equivalent if and only if the columns in the truth table agree
\(\neg (p \wedge q) \equiv \neg p \vee \neg q\)
\(\neg (p \vee q) \equiv \neg p \wedge \neg q\)
Truth table for second law:
\(p\) | \(q\) | \(\neg p\) | \(\neg q\) | \(p \vee q\) | \(\neg (p \vee q)\) | \(\neg p \wedge \neg q\) |
---|---|---|---|---|---|---|
T | T | F | F | T | F | F |
T | F | F | T | T | F | F |
F | T | T | F | T | F | F |
F | F | T | T | F | T | T |
Identity Laws: | \(p \wedge T \equiv p, \quad p \vee F \equiv p\) |
Domination Laws: | \(p \vee T \equiv T, \quad p \wedge F \equiv F\) |
Idempotent Laws: | \(p \vee p \equiv p, \quad p \wedge p \equiv p\) |
Double Negation Law: | \(\neg (\neg p) \equiv p\) |
Negation Laws: | \(p \vee \neg p \equiv T, \quad p \wedge \neg p \equiv F\) |
Commutative Laws: | \(p \vee q \equiv q \vee p, \quad p \wedge q \equiv q \wedge p\) |
Associative Laws: | \((p \wedge q) \wedge r \equiv p \wedge (q \wedge r)\) |
\((p \vee q) \vee r \equiv p \vee (q \vee r)\) | |
Distributive Laws: | \((p \vee (q \wedge r)) \equiv (p \vee q) \wedge (p \vee r)\) |
\((p \wedge (q \vee r)) \equiv (p \wedge q) \vee (p \wedge r)\) | |
Absorption Laws: | \(p \vee (p \wedge q) \equiv p\) |
\(p \wedge (p \vee q) \equiv p\) |
\(p \rightarrow q \equiv \neg p \vee q\)
\(p \rightarrow q \equiv \neg q \rightarrow \neg p\)
\(p \vee q \equiv \neg p \rightarrow q\)
\(p \wedge q \equiv \neg (p \rightarrow \neg q)\)
\(\neg (p \rightarrow q) \equiv p \wedge \neg q\)
\((p \rightarrow q) \wedge (p \rightarrow r) \equiv p \rightarrow (q \wedge r)\)
\((p \rightarrow r) \wedge (q \rightarrow r) \equiv (p \vee q) \rightarrow r\)
\((p \rightarrow q) \vee (p \rightarrow r) \equiv p \rightarrow (q \vee r)\)
\((p \rightarrow r) \vee (q \rightarrow r) \equiv (p \wedge q) \rightarrow r\)
A compound proposition can be replaced by a logically equivalent compound proposition without changing its truth value
We can show that two propositions are logically equivalent by developing a series of logically equivalent statements
To prove that \(A \equiv B\), we can develop a series of equivalences beginning with \(A\) and ending with \(B\):
\[\begin{array}{lll} A & \equiv & A_1 \\ & \equiv & A_2 \\ & \vdots & \\ & \equiv & B \\ \end{array} \]
Show that \(\neg (p \vee (\neg p \wedge q))\) is logically equivalent to \(\neg p \wedge \neg q\)
\[\begin{array}{llll} \neg (p \vee (\neg p \wedge q)) & \equiv & \neg p \wedge \neg( \neg p \wedge q) & \text{by De Morgan's law} \\ & \equiv & \neg p \wedge (\neg(\neg p) \vee \neg q) & \text{by De Morgan's law} \\ & \equiv & \neg p \wedge (p \vee \neg q) & \text{by the double negation law} \\ & \equiv & (\neg p \wedge p) \vee (\neg p \wedge \neg q) & \text{by the distributive law} \\ & \equiv & F \vee(\neg p \wedge \neg q) & \text{by the negation law} \\ & \equiv & (\neg p \wedge \neg q) \vee F & \text{by the commutative law} \\ & \equiv & (\neg p \wedge \neg q) & \text{by the identity law} \\ \end{array}\]
Show that \((p \wedge q) \rightarrow (p \vee q)\) is a tautology
\[\begin{array}{llll} (p \wedge q) \rightarrow (p \vee q) & \equiv & \neg(p \wedge q) \vee (p \vee q) & \text{by} p \rightarrow q \equiv \neg p \vee q \\ & \equiv & (\neg p \vee \neg q) \vee (p \vee q) & \text{by De Morgan's law} \\ & \equiv & (\neg p \vee p) \vee (\neg q \vee q) & \text{by the associative and} \\ & \vdots & & \text{commutative laws} \\ & \equiv & T \vee T & \text{by the negation law} \\ & \equiv & T & \text{by the domination law} \\ \end{array}\]