3.1: Propositions and Logical Operators
- Page ID
- 80504
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Propositions
Definition \(\PageIndex{1}\): Proposition
A proposition is a sentence to which one and only one of the terms true or false can be meaningfully applied.
Example \(\PageIndex{1}\): Some Propositions
“Four is even,”, “\(4 \in \{1,3, 5\}\)” and “\(43 > 21\)” are propositions.
In traditional logic, a declarative statement with a definite truth value is considered a proposition. Although our ultimate aim is to discuss mathematical logic, we won't separate ourselves completely from the traditional setting. This is natural because the basic assumptions, or postulates, of mathematical logic are modeled after the logic we use in everyday life. Since compound sentences are frequently used in everyday speech, we expect that logical propositions contain connectives like the word “and.” The statement “Europa supports life or Mars supports life” is a proposition and, hence, must have a definite truth value. Whatever that truth value is, it should be the same as the truth value of “Mars supports life or Europa supports life.”
Logical Operations
There are several ways in which we commonly combine simple statements into compound ones. The words/phrases and, or, not, if ... then..., and ...if and only if ... can be added to one or more propositions to create a new proposition. To avoid any confusion, we will precisely define each one's meaning and introduce its standard symbol. With the exception of negation (not), all of the operations act on pairs of propositions. Since each proposition has two possible truth values, there are four ways that truth can be assigned to two propositions. In defining the effect that a logical operation has on two propositions, the result must be specified for all four cases. The most convenient way of doing this is with a truth table, which we will illustrate by defining the word and.
Definition \(\PageIndex{2}\): Logical Conjunction
If \(p\) and \(q\) are propositions, their conjunction, \(p \textrm{ and } q\) (denoted \(p \land q\)), is defined by the truth table
\begin{equation*} \begin{array}{ccc} p & q & p\land q \\ \hline 0 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \\ 1 & 1 & 1 \\ \end{array} \end{equation*}
Note \(\PageIndex{1}\)
- To read this truth table, you must realize that any one line represents a case: one possible set of values for \(p\) and \(q\text{.}\)
- The numbers 0 and 1 are used to denote false and true, respectively. This is consistent with the way that many programming languages treat logical, or Boolean, variables since a single bit, 0 or 1, can represent a truth value.
- For each case, the symbol under \(p\) represents the truth value of \(p\text{.}\) The same is true for \(q\text{.}\) The symbol under \(p \land q\) represents its truth value for that case. For example, the second row of the truth table represents the case in which \(p\) is false, \(q\) is true, and the resulting truth value for \(p \land q\) is false. As in everyday speech, \(p \land q\) is true only when both propositions are true.
- Just as the letters \(x\text{,}\) \(y\) and \(z\) are frequently used in algebra to represent numeric variables, \(p\text{,}\) \(q\) and \(r\) seem to be the most commonly used symbols for logical variables. When we say that \(p\) is a logical variable, we mean that any proposition can take the place of \(p\text{.}\)
- One final comment: The order in which we list the cases in a truth table is standardized in this book. If the truth table involves two simple propositions, the numbers under the simple propositions can be interpreted as the two-digit binary integers in increasing order, 00, 01, 10, and 11, for 0, 1, 2, and 3, respectively.
Definition \(\PageIndex{3}\): Logical Disjunction
If \(p\) and \(q\) are propositions, their disjunction, \(p \textrm{ or } q\) (denoted \(p \lor q\)), is defined by the truth table
\begin{equation*} \begin{array}{ccc} p & q & p\lor q \\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 1 \\ \end{array} \end{equation*}
Definition \(\PageIndex{4}\): Logical Negation
If \(p\) is a proposition, its negation, \(\textrm{not } p\text{,}\) denoted \(\neg p\text{,}\) and is defined by the truth table
\begin{equation*} \begin{array}{cc} p & \neg p \\ \hline 0 & 1 \\ 1 & 0 \\ \end{array} \end{equation*}
Note \(\PageIndex{2}\)
Negation is the only standard operator that acts on a single proposition; hence only two cases are needed.
Consider the following propositions from everyday speech:
- I'm going to quit if I don't get a raise.
- If I pass the final, then I'll graduate.
- I'll be going to the movies provided that my car starts.
All three propositions are conditional, they can all be restated to fit into the form “If Condition, then Conclusion.” For example, the first statement can be rewritten as “If I don't get a raise, then I'm going to quit.”
A conditional statement is meant to be interpreted as a guarantee; if the condition is true, then the conclusion is expected to be true. It says no more and no less.
Definition \(\PageIndex{5}\): Conditional Statement
The conditional statement “If \(p\) then \(q\text{,}\)” denoted \(p \rightarrow q\text{,}\) is defined by the truth table
Table \(\PageIndex{1}\): Truth Table for \(p\rightarrow q\)
\(p\) | \(q\) | \(p\rightarrow q\) |
---|---|---|
\(0\) | \(0\) | \(1\) |
\(0\) | \(1\) | \(1\) |
\(1\) | \(0\) | \(0\) |
\(1\) | \(1\) | \(1\) |
Example \(\PageIndex{2}\): Analysis of a Conditional Proposition
Assume your instructor told you “If you receive a grade of 95 or better in the final examination, then you will receive an A in this course.” Your instructor has made a promise to you. If you fulfill his condition, you expect the conclusion (getting an A) to be forthcoming. Suppose your graded final has been returned to you. Has your instructor told the truth or is your instructor guilty of a falsehood?
Case I: Your final exam score was less than 95 (the condition is false) and you did not receive an A (the conclusion is false). The instructor told the truth.
Case II: Your final exam score was less than 95, yet you received an A for the course. The instructor told the truth. (Perhaps your overall course average was excellent.)
Case III: Your final exam score was greater than 95, but you did not receive an A. The instructor lied.
Case IV: Your final exam score was greater than 95, and you received an A. The instructor told the truth.
To sum up, the only case in which a conditional proposition is false is when the condition is true and the conclusion is false.
The order of the condition and conclusion in a conditional proposition is important. If the condition and conclusion are exchanged, a different proposition is produced.
Definition \(\PageIndex{6}\): Converse
The converse of the proposition \(p \rightarrow q\) is the proposition \(q \rightarrow p\text{.}\)
The converse of “If you receive a grade of 95 or better in the final exam, then you will receive an A in this course,” is “If you receive an A in this course, then you received a grade of 95 or better in the final exam.” It should be clear that these two statements say different things.
There is a proposition related to \(p \rightarrow q\) that does have the same logical meaning. This is the contrapositive.
Definition \(\PageIndex{7}\): Contrapositive
The contrapositive of the proposition \(p \rightarrow q\) is the proposition \(\neg q \rightarrow \neg p\text{.}\)
As we will see when we discuss logical proofs, we can prove a conditional proposition by proving its contrapositive, which may be somewhat easier.
Definition \(\PageIndex{8}\): Biconditional Proposition
If \(p\) and \(q\) are propositions, the biconditional statement “\(p\) if and only if \(q\text{,}\)” denoted \(p \leftrightarrow q\text{,}\) is defined by the truth table
\begin{equation*} \begin{array}{ccc} p & q & p\leftrightarrow q \\ \hline 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \\ 1 & 1 & 1 \\ \end{array} \end{equation*}
Note that \(p \leftrightarrow q\) is true when \(p\) and \(q\) have the same truth values. It is common to abbreviate “if and only if” to “iff.”
Although “if ... then...” and “...if and only if ...” are frequently used in everyday speech, there are several alternate forms that you should be aware of. They are summarized in the following lists.
All of the following are equivalent to “If \(p\) then \(q\)”:
- \(p\) implies \(q\text{.}\)
- \(q\) follows from \(p\text{.}\)
- \(p\text{,}\) only if \(q\text{.}\)
- \(q\text{,}\) if \(p\text{.}\)
- \(p\) is sufficient for \(q\text{.}\)
- \(q\) is necessary for \(p\text{.}\)
All of the following are equivalent to “\(p\) if and only if \(q\)”:
- \(p\) is necessary and sufficient for \(q\text{.}\)
- \(p\) is equivalent to \(q\text{.}\)
- If \(p\text{,}\) then \(q\text{,}\) and if \(q\text{,}\) then \(p\text{.}\)
- If \(p\text{,}\) then \(q\) and conversely.
Exercises
Exercise \(\PageIndex{1}\)
Let \(d\) = “I like discrete structures”, \(c\) = “I will pass this course” and \(s\) = “I will do my assignments.” Express each of the following propositions in symbolic form:
- I like discrete structures and I will pass this course.
- I will do my assignments or I will not pass this course.
- It is not true that I both like discrete structures, and will do my assignments.
- I will not do my assignment and I will not pass this course.
- Answer
-
- \(\displaystyle d\land c\)
- \(\displaystyle s\lor \neg c\)
- \(\displaystyle \neg (d\land s)\)
- \(\displaystyle \neg s\land \neg c\)
Exercise \(\PageIndex{2}\)
For each of the following propositions, identify simple propositions, express the compound proposition in symbolic form, and determine whether it is true or false:
- The world is flat or zero is an even integer.
- If 432,802 is a multiple of 4, then 432,802 is even.
- 5 is a prime number and 6 is not divisible by 4.
- \(3 \in \mathbb{Z}\) and \(3 \in \mathbb{Q}\text{.}\)
- \(2/3 \in \mathbb{Z}\) and \(2/3 \in \mathbb{Q}\text{.}\)
- The sum of two even integers is even and the sum of two odd integers is odd.
Exercise \(\PageIndex{3}\)
Let \(p =\)“\(2 \leq 5\)”, \(q\) = “8 is an even integer,” and \(r\) = “11 is a prime number.” Express the following as a statement in English and determine whether the statement is true or false:
- \(\displaystyle \neg p \land q\)
- \(\displaystyle p\rightarrow q\)
- \(\displaystyle (p \land q)\to r\)
- \(\displaystyle p \rightarrow (q \lor (\neg r))\)
- \(\displaystyle p \rightarrow ((\neg q)\lor (\neg r))\)
- \(\displaystyle (\neg q) \rightarrow (\neg p)\)
- Answer
-
- \(2>5\) and 8 is an even integer. False.
- If \(2\leqslant 5\) then 8 is an even integer. True.
- If \(2\leqslant 5\) and 8 is an even integer then 11 is a prime number. True.
- If \(2\leqslant 5\) then either 8 is an even integer or 11 is not a prime number. True.
- If \(2\leqslant 5\) then either 8 is an odd integer or 11 is not a prime number. False.
- If 8 is not an even integer then \(2>5\text{.}\) True.
Exercise \(\PageIndex{4}\)
Rewrite each of the following statements using the other conditional forms:
- If an integer is a multiple of 4, then it is even.
- The fact that a polygon is a square is a sufficient condition that it is a rectangle.
- If \(x = 5\text{,}\) then \(x^2=25\text{.}\)
- If \(x^2 - 5x + 6 = 0\text{,}\) then \(x = 2\) or \(x = 3\text{.}\)
- \(x^2=y^2\) is a necessary condition for \(x = y\text{.}\)
Exercise \(\PageIndex{5}\)
Write the converse of the propositions in Exercise \(\PageIndex{4}\). Compare the truth of each proposition and its converse.
- Answer
-
Only the converse of \(d\) is true.