
In this chapter we introduce classical logic, which has two truth values, True and False. Every proposition takes on a single truth value.
A proposition is a sentence that is either true or false.
Given propositions \(P\) and \(Q\):
The conjunction of \(P\) and \(Q\), denoted \(P \land Q\), is the proposition “\(P\) and \(Q\).” The statement \(P \land Q\) is true exactly when both \(P\) and \(Q\) are true.
The disjunction of \(P\) and \(Q\), denoted \(P \lor Q\), is the proposition “\(P\) or \(Q\).” The statement \(P \lor Q\) is true exactly when at least one of \(P\) or \(Q\) is true.
The negation of \(P\), denoted \(\lnot P\), is the proposition “not \(P\).” The statement \(\lnot P\) is true exactly when \(P\) is false.
Note that although the disjunction \(P \lor Q\) is translated into English as “\(P\) or \(Q\),” it means something slightly different from the way we use “or” in everyday speech. In particular, disjunction is inclusive, meaning that it is true whenever at least one of \(P\) or \(Q\) is true.
In contrast, the word “or” in everyday English is often exclusive, meaning that it is true whenever exactly one of the alternatives is true. For example, if one says, “Today, I will either go to the park or to the pool,” it is generally understood that exactly one of these activities will occur.
However, if \(P\) is the proposition “I will go to the park” and \(Q\) is the proposition “I will go to the pool,” then the logical statement \(P \lor Q\) means “I will go to the park or to the pool or both.” Throughout this course, whenever we say “or,” we mean the inclusive version corresponding to logical disjunction.
A well-formed formula is an expression involving finitely many logical connective symbols and letters representing propositions that is syntactically (i.e., grammatically) correct.
For example, \(\lnot (P \lor Q)\) is a well-formed formula, whereas \(\lor P Q\) is not.
Two well-formed formulas are said to be equivalent if and only if they have the same truth tables.
From this definition, we see that \(P \lor Q\) and \(Q \lor P\) are equivalent forms. Similarly, \(P \land Q\) and \(Q \land P\) are equivalent forms. However, there are less obvious examples, such as \[\lnot \bigl((P \lor Q) \land R\bigr) \quad \text{and} \quad \bigl((\lnot P) \lor (\lnot R)\bigr) \land \bigl((\lnot Q) \lor (\lnot R)\bigr).\]
A tautology is a well-formed formula that is true for every assignment of truth values to its components.
For example, the Law of Excluded Middle states that, for any proposition \(P\), the disjunction \(P \lor (\lnot P)\) is a tautology. The name refers to the fact that every proposition is either true or false; there are no possibilities in between, that is, the middle is excluded.
| \(P\) | \(\lnot P\) | \(P \lor (\lnot P)\) |
|---|---|---|
| True | False | True |
| False | True | True |
A contradiction is a well-formed formula that is false for every assignment of truth values to its components.
For example, for any proposition \(P\), the conjunction \(P \land (\lnot P)\) is a contradiction.
| \(P\) | \(\lnot P\) | \(P \land (\lnot P)\) |
|---|---|---|
| True | False | False |
| False | True | False |
A denial of a proposition \(P\) is any proposition that is equivalent to \(\lnot P\).
For example, for any propositions \(P\) and \(Q\), the statement \[((\lnot P) \land Q) \lor ((\lnot P) \land (\lnot Q))\] is a denial of \(P\).
Make a truth table for each of the following propositions, and determine whether any of them are contradictions or tautologies:
\((P \lor (\lnot Q)) \land (\lnot R)\),
\(((\lnot P) \lor (\lnot Q)) \land ((\lnot P) \lor Q)\),
\((P \land Q) \lor (P \land (\lnot Q)) \lor ((\lnot P) \land Q) \lor ((\lnot P) \land (\lnot Q))\),
\((P \lor Q) \land (P \lor (\lnot Q)) \land ((\lnot P) \lor Q) \land ((\lnot P) \lor (\lnot Q))\).
Let \(P\) and \(Q\) be propositions and consider the conditional statement \(P \Rightarrow Q\). Then:
the converse is \(Q \Rightarrow P\);
the contrapositive is \((\lnot Q) \Rightarrow (\lnot P)\).
A conditional statement and its contrapositive are equivalent.
A conditional statement and its converse are not equivalent.
Proof. Make the truth table. ◻
For propositions \(P\) and \(Q\), the biconditional statement \(P \Leftrightarrow Q\) is the proposition “\(P\) if and only if \(Q\).” The statement \(P \Leftrightarrow Q\) is true exactly when \(P\) and \(Q\) have the same truth value.
For propositions \(P\) and \(Q\):
\(\lnot (P \land Q)\) is equivalent to \((\lnot P) \lor (\lnot Q)\);
\(\lnot (P \lor Q)\) is equivalent to \((\lnot P) \land (\lnot Q)\).
These statements can be read in English as “the negation of a conjunction is the disjunction of the negations,” and “the negation of a disjunction is the conjunction of the negations.”
Proof. Make a truth table. ◻
For propositions \(P\) and \(Q\):
\(P \land Q\) is equivalent to \(Q \land P\);
\(P \lor Q\) is equivalent to \(Q \lor P\).
Thus, there is no ambiguity when we say “the conjunction of \(P\) and \(Q\)” or “the disjunction of \(P\) and \(Q\).”
Proof. Make a truth table. ◻
For propositions \(P\), \(Q\), and \(R\):
\(P \land (Q \land R)\) is equivalent to \((P \land Q) \land R\);
\(P \lor (Q \lor R)\) is equivalent to \((P \lor Q) \lor R\).
Thus, there is no ambiguity in the propositions \(P \land Q \land R\) or \(P \lor Q \lor R\).
Proof. Make a truth table. ◻
For propositions \(P\), \(Q\), and \(R\):
\(P \land (Q \lor R)\) is equivalent to \((P \land Q) \lor (P \land R)\);
\(P \lor (Q \land R)\) is equivalent to \((P \lor Q) \land (P \lor R)\).
This indicates that conjunction and disjunction distribute over each other.
Proof. Make a truth table. ◻
For propositions \(P\) and \(Q\):
\(P \Rightarrow Q\) is equivalent to \((\lnot P) \lor Q\);
\(\lnot (P \Rightarrow Q)\) is equivalent to \(P \land (\lnot Q)\);
\(P \Leftrightarrow Q\) is equivalent to \((P \Rightarrow Q) \land (Q \Rightarrow P)\).
Proof. Make a truth table. ◻
The logical conditional \(P \Rightarrow Q\) has several English translations, including:
If \(P\), then \(Q\).
\(P\) implies \(Q\).
\(P\) is sufficient for \(Q\).
\(P\) only if \(Q\).
\(Q\), if \(P\).
\(Q\) whenever \(P\).
\(Q\) is necessary for \(P\).
\(Q\), when \(P\).
Similarly, the biconditional \(P \Leftrightarrow Q\) translates to English phrases such as:
\(P\) if and only if \(Q\).
\(P\) is equivalent to \(Q\).
\(P\) is necessary and sufficient for \(Q\).
Remember that the sentence “\(x\) is an American” is not a proposition. This is because the truth of the statement changes based on different values of \(x\). Such a sentence is called an open sentence or predicate. However, it is quite useful to include variables in our statements, so our logic should be able to accommodate that. To this end, we introduce quantifiers. A quantifier is a symbol which states how many instances of the variable satisfy the sentence.
For an open sentence \(P(x)\), we define the propositions:
\((\exists x)\, P(x)\), which is true when there exists at least one \(x\) for which \(P(x)\) is true. The symbol \(\exists\) is called the existential quantifier.
\((\forall x)\, P(x)\), which is true when \(P(x)\) is true for every \(x\). The symbol \(\forall\) is called the universal quantifier.
The existential statement \((\exists x)\, P(x)\) may be read as:
“There exists \(x\) such that \(P(x)\).”
“There exists \(x\) for which \(P(x)\).”
“For some \(x\), \(P(x)\).”
The symbol \(\exists\) was chosen as a backwards E for “exists.”
Similarly, the universal statement \((\forall x)\, P(x)\) may be read as:
“For all \(x\), \(P(x)\).”
“For every \(x\), \(P(x)\).”
“For each \(x\), \(P(x)\).”
The symbol \(\forall\) was chosen as an inverted A for “all.”
Perhaps you think quantifiers are now obvious. If so, what is the truth value of the proposition \((\exists x)(x^2 = 2)\)? The answer is, “it depends!” In particular, it depends on the universe of discourse, that is, the set of \(x\)’s over which we are quantifying. This universe needs to be specified beforehand in order to make sense of the proposition and determine its truth value. For example, the existential statement above is false if the universe is the set of natural numbers \(\mathbb{N}\), but it is true if the universe is the set of real numbers \(\mathbb{R}\).
If the context does not make clear the universe over which we are quantifying, we may specify it explicitly by using the set membership symbol \(\in\), which may be read “is an element of.” For example, \(x \in \mathbb{R}\) may be read as:
“\(x\) is an element of the set of real numbers.”
“\(x\) is a real number.”
“\(x\) is in the set of real numbers.”
We may omit “the set of” for brevity. Now, we may rewrite our statement with respect to different universes as: \[(\exists x \in \mathbb{N})(x^2 = 2), \quad (\exists x \in \mathbb{R})(x^2 = 2).\] Now, the first statement is false, and the second statement is true, so the universe of discourse matters.
For an open sentence \(P(x)\), the proposition \((\exists! x)\, P(x)\) is true when there is exactly one \(x\) making \(P(x)\) true. This proposition may be read as “there exists a unique \(x\) such that \(P(x)\).” The symbol \(\exists!\) is called the unique existential quantifier.
The proposition \((\exists! x)\, P(x)\) is just an abbreviation for \[(\exists x)\, P(x) \;\; \land \;\; (\forall y)(\forall z)\, \bigl(P(y) \land P(z) \Rightarrow y = z\bigr).\] You should interpret this as saying: “there is some \(x\) satisfying \(P(x)\), and whenever any two elements \(y, z\) both satisfy \(P\), then they are actually the same element.”
Negation interacts with the existential and universal quantifiers in the following ways: \[\lnot (\exists x)\, P(x) \;\;\Leftrightarrow\;\; (\forall x)\, (\lnot P(x)),\] \[\lnot (\forall x)\, P(x) \;\;\Leftrightarrow\;\; (\exists x)\, (\lnot P(x)).\]
Translate the following quantified sentences into English: \[(\forall x \in \mathbb{N})\; \dots\]
A proposition is a declarative statement that is either true or false, but not both.
\(P:\) \(2+4=5\) (Always false)
\(Q:\) \(3^2=9\) (Always true)
Most mathematical statements are written as implications: \[P \Rightarrow Q\]
The truth table for implication is:
\[\begin{array}{c|c|c} P & Q & P \Rightarrow Q \\ \hline T & T & T \\ T & F & F \\ F & T & T \\ F & F & T \end{array}\]
Common proof techniques in predicate logic include direct proof, proof by contradiction, proof by contraposition, proof by cases, induction, and counterexamples. Mastery of these methods is essential for rigorous mathematical reasoning.
If \(Q\) is true, then \(P \Rightarrow Q\) is true regardless of \(P\).
Example: If there are 1000 employees in a company, then \(3^2 = 9\).
If \(P\) is false, then \(P \Rightarrow Q\) is true for any \(Q\).
Example: If \(5! = 100\), then \(3! = 6\).
Statement: For all integers \(p\) and \(q\), if \(p\) and \(q\) are odd, then \(p+q\) is even.
Proof: If \(p\) and \(q\) are odd, then \[p = 2m+1,\quad q = 2n+1\] for some integers \(m,n\). \[p+q = 2(m+n+1)\] which is even. 0◻
Statement: If \(y+y=y\), then \(y=0\).
Proof: Assume \(y+y=y\) and \(y \neq 0\). \[2y = y \Rightarrow 2 = 1\] which is a contradiction. Hence, \(y=0\). 0◻
Statement: If \(ab\) is even, then \(a\) is even or \(b\) is even.
Contrapositive: If \(a\) and \(b\) are odd, then \(ab\) is odd.
Let \[a=2m+1,\quad b=2n+1\] \[ab = 2(2mn+m+n)+1\] which is odd. 0◻
Theorem: An integer \(n\) is odd if and only if \(n^2\) is odd.
(\(\Rightarrow\)) If \(n\) is odd, then \(n=2k+1\). \[n^2 = 2(2k^2+2k)+1\] which is odd.
(\(\Leftarrow\)) Contrapositive: If \(n\) is even, then \(n^2\) is even. \[n=2k \Rightarrow n^2=4k^2\]
Thus, \(n\) is odd if and only if \(n^2\) is odd. 0◻
If \(x^2>4\), prove \(x>2\) or \(x<-2\).
Prove: If \(n\) is odd, then \(n^2\) is odd.
Disprove: If \(x^2+y^2=1\), then \(x=y\).
If \(n\) is a multiple of 6, prove \(n\) is even.
If \(n\) is prime, prove \(n\) is odd or \(n=2\).
Prove that an integer \(n\) is odd if and only if \(n^2\) is odd.
To prove an “if and only if” statement, we must prove both directions:
If \(n\) is odd, then \(n^2\) is odd.
If \(n^2\) is odd, then \(n\) is odd.
Let \[P : n \text{ is odd}, \quad Q : n^2 \text{ is odd}.\]
Assume that \(n\) is an odd integer. Then there exists an integer \(p\) such that \[n = 2p + 1.\] Squaring both sides, \[n^2 = (2p+1)^2 = 4p^2 + 4p + 1 = 2(2p^2 + 2p) + 1.\] Since \(2p^2 + 2p\) is an integer, \(n^2\) is of the form \(2k+1\) and hence is odd. Therefore, \(P \Rightarrow Q\).
We prove the contrapositive: \(\neg P \Rightarrow \neg Q\).
\[\neg P : n \text{ is even}, \quad \neg Q : n^2 \text{ is even}.\]
Assume \(n\) is an even integer. Then there exists an integer \(p\) such that \[n = 2p.\] Squaring both sides, \[n^2 = (2p)^2 = 4p^2 = 2(2p^2),\] which is even.
Thus, \(\neg P \Rightarrow \neg Q\), and therefore \(Q \Rightarrow P\).
Since both implications hold, we conclude that \[n \text{ is odd if and only if } n^2 \text{ is odd}.\]
If a number is divisible by 4, then it is divisible by 2.
Assume that \(n\) is an odd integer. Then there exists an integer \(p\) such that \[n = 2p + 1.\] Squaring both sides, \[n^2 = (2p+1)^2 = 4p^2 + 4p + 1 = 2(2p^2 + 2p) + 1.\] Since \(2p^2 + 2p\) is an integer, \(n^2\) is of the form \(2k+1\) and hence is odd. Therefore, \(P \Rightarrow Q\).
We prove the contrapositive: \(\neg P \Rightarrow \neg Q\).
\[\neg P : n \text{ is even}, \quad \neg Q : n^2 \text{ is even}.\]
Assume \(n\) is an even integer. Then there exists an integer \(p\) such that \[n = 2p.\] Squaring both sides, \[n^2 = (2p)^2 = 4p^2 = 2(2p^2),\] which is even.
Thus, \(\neg P \Rightarrow \neg Q\), and therefore \(Q \Rightarrow P\).
Since both implications hold, we conclude that \[n \text{ is odd if and only if } n^2 \text{ is odd}.\]
If a number is divisible by 4, then it is divisible by 2.
Assume \(x\) is divisible by 4. Then there exists an integer \(k\) such that \[x = 4k = 2(2k).\] Since \(2k\) is an integer, \(x\) is divisible by 2. Hence, the statement is proved.
Using contradiction, prove that if \(y + y = y\), then \(y = 0\).
Let \[P : y + y = y, \quad Q : y = 0.\]
Assume \(P\) is true and \(Q\) is false, i.e., \[2y = y \quad \text{and} \quad y \neq 0.\] Since \(y \neq 0\), we may divide both sides by \(y\): \[2 = 1,\] which is a contradiction.
Therefore, the assumption is false, and hence \(y = 0\).
Prove: For all real numbers \(x\) and \(y\), if \(x>0\) and \(y>0\), then \(xy>0\).
Proof: Let \(x\) and \(y\) be arbitrary real numbers such that \(x>0\) and \(y>0\). The product of two positive real numbers is positive. Hence, \(xy>0\). 0◻
Prove: There is no largest integer.
Proof: Assume, for the sake of contradiction, that there exists a largest integer \(n\). Then \(n+1\) is also an integer and satisfies \(n+1>n\), which contradicts the assumption. Therefore, there is no largest integer. 0◻
Prove: For all integers \(n\), if \(n^2\) is even, then \(n\) is even.
Proof: We prove the contrapositive: if \(n\) is odd, then \(n^2\) is odd.
Let \(n=2k+1\) for some integer \(k\). Then \[n^2=(2k+1)^2=4k^2+4k+1=2(2k^2+2k)+1,\] which is odd. Hence, by contraposition, if \(n^2\) is even, then \(n\) is even. 0◻
Prove: For all integers \(n\), \(n^2+n\) is even.
Proof:
Case 1: \(n\) is even. Then \(n=2k\) and \[n^2+n=4k^2+2k=2(2k^2+k),\] which is even.
Case 2: \(n\) is odd. Then \(n=2k+1\) and \[n^2+n=4k^2+6k+2=2(2k^2+3k+1),\] which is even.
Thus, in all cases, \(n^2+n\) is even. 0◻
Prove: There exists a positive integer \(n\) such that \(n^2-n-12=0\).
Proof: \[n^2-n-12=(n-4)(n+3)=0.\] Thus, \(n=4\) or \(n=-3\). Since \(4\) is positive, such an integer exists. 0◻
Prove: There is a unique real number \(x\) such that \(x+5=2x-1\).
Proof:
Existence: \[x+5=2x-1 \Rightarrow x=7.\]
Uniqueness: Assume \(y\) is another solution: \[y+5=2y-1 \Rightarrow y=7.\] Thus, the solution is unique. 0◻
Prove: \[\forall x \forall y (x<y \Rightarrow \exists z (x<z \land z<y)).\]
Proof: Let \(x<y\). Choose \[z=\frac{x+y}{2}.\] Then \(x<z<y\). Hence the statement holds. 0◻
Prove: \[1+2+3+\cdots+n=\frac{n(n+1)}{2}.\]
Proof:
Base Case: \(n=1\) is true.
Inductive Step: Assume true for \(n=k\): \[1+2+\cdots+k=\frac{k(k+1)}{2}.\] Then \[1+2+\cdots+(k+1)=\frac{(k+1)(k+2)}{2}.\]
Hence true for all \(n\in\mathbb{N}\). 0◻
Disprove: If \(xy=0\), then \(x=0\) or \(y=0\).
Counterexample: Let \(x=0\) and \(y=5\). Then \(xy=0\) but \(y\neq0\). Thus, the statement is false.
Prove: An integer \(n\) is even if and only if \(n^2\) is even.
Proof:
\((\Rightarrow)\) If \(n=2k\), then \(n^2=4k^2\), which is even.
\((\Leftarrow)\) Contrapositive: If \(n\) is odd, then \(n^2\) is odd.
Thus, the statement holds. 0◻
If \(x^2>4\), prove \(x>2\) or \(x<-2\).
If \(n\) is odd, prove \(n^2\) is odd.
Disprove: \(x^2+y^2=1 \Rightarrow x=y\).
If \(n\) is a multiple of \(6\), prove \(n\) is even.
If \(x<y\), prove \(x^2<y^2\).
Disprove: \(x^2>x \Rightarrow x>1\).
If \(a\) is even and \(b\) is odd, prove \(a+b\) is odd.
If \(x>0\), prove \(1/x>0\).
Disprove: \(x^2\ge0 \Rightarrow x\ge0\).
If \(n\) is prime, prove \(n\) is odd or \(n=2\).
Algebra I Courses · Mathematics Department · University Center of El Bayadh Nour El Bachir · 2025/2026