EECS70 Note 1
EECS70 Note 1
1 Propositions
Mathematics is a search for truth. Unlike other disciplines, wherein a lack of precise truth is where they find
their beauty and joy, we have precise truths in mathematics. To this end, we’ll start by establishing exactly
what kinds of things we’ll be studying in our study of mathematics: statements that are true or false. We
will slowly build our way up to proving such statements.
A statement which is either true or false is called a proposition. The following are examples of propositions:
√
• “ 3 is irrational”;
• “1 + 1 = 5”; and
• “Julius Caesar had two eggs for breakfast on his 10th birthday.”
Each of the above statements is either true or false. At the present moment, we don’t know whether the
first statement is true or false, but it has to be one or the other. The second statement that 1 + 1 = 5 is
false. And the final statement about Julius Caesar is again either true or false—although it’s doubtful we’ll
ever know the answer to that one, through mathematics or not.
Here are some non-examples of propositions:
• “2 + 2”;
• “x2 + 3x = 0”;
• “Cats are awesome”;
• “Henry VIII was unpopular.”
The first statement has no truth value. Something like “2 + 2 = 4” would indeed be a proposition, but
“2 + 2” alone is not. Similarly, “x2 + 3x = 0” is not a proposition as we don’t know what x is. The statement
is true when x = 0, but it’s false when false x = 1. We’ll revisit such kinds of statements later, but they are
not propositions. The last two are not propositions because they use vague or subjective terms. The third
statement is more an opinion, unless “awesome” is explicitly defined to be a set of characteristics which cats
share. The same is true of the fifth statement: “unpopular” is ill-defined.
Propositions form the domain of interest for mathematics. They are the statements that are true or false,
and we will work towards proving or disproving the truth of such statements. Thus we have defined the
domain of interest for our search for truth in mathematics.
2 Propositional Logic
Now that we have looked at what kinds of things “have truth,” our next order of business is to think about
how truth behaves. In particular, how can we combine different truth values, and what rules govern such
combinations? This line of thinking brings us to propositional logic (sometimes abbreviated PL), which
is the study of how truth behaves under different functions which combine propositions.
Concept Check 1. Reason whether each of the following propositional formulas is a tautology, a
contradiction, or neither.
• ¬(P ∨ ¬P ).
• P ∧ Q.
• ¬(P ∧ ¬P ).
• P.
P Q P ∧Q P Q P ∨Q
T T T T T T P ¬P
T F F T F T T F
F T F F T T F T
F F F F F F
Let’s use these truth tables to determine the truth tables for P ∨ ¬P . We’ll fill out the truth table one
connective at a time.
We can start by filling in the truth values of P , since those are given as the truth table inputs.
P P ∨ ¬P
T T ? ?
F F ? ?
Next, we’ll fill in the truth values of ¬P , which we can find using the negation truth table.
P P ∨ ¬P
T T ? F
F F ? T
Finally, we can find the truth value of the entire expression P ∨ ¬P using the disjunction truth table. The
truth values we found for P and ¬P are the inputs to the disjunction. We highlight the column in green
to indicate that it corresponds to the truth value of the entire propositional formula. The other columns
correspond to the truth values of the atoms of the propositional formula.
P P ∨ ¬P
T T T F
F F T T
Thus we have shown that no matter what the truth value of P is, the propositional formula P ∨ ¬P is always
true. Hence it is tautologically true.
Concept Check 2. Use a truth table to prove that the propositional formula P ∧¬P is tautologically
false.
P Q P →Q
T T T
T F F
F T T
F F T
Now consider the propositional formula ¬P ∨ Q. The truth table is worked out below.
P Q ¬P ∨ Q
T T F T T
T F F F F
F T T T T
F F T T F
Note that the propositional formulas P → Q and ¬P ∨ Q have the same truth table. We say that two
propositional formulas P and Q are tautologically equivalent if they have the same truth table, and we
write P ≡ Q. We have just proved that P → Q and ¬P ∨ Q are tautologically equivalent. Two propositional
formulas are tautologically equivalent when they are saying the same thing. In particular, they combine truth
values in precisely the same way as one another. This fact will be useful for us to prove certain statements
by transforming them into tautologically equivalent statements which are easier to prove.
The propositional formula P → Q can be said many ways in English.
• “if P , then Q”
• “Q if P ”
• “P only if Q”
• “P is sufficient for Q”
• “Q is necessary for P ”
• “Q unless not P ”
Concept Check 3. Explain, in English, why each of the above statements is the same as P → Q.
P Q P ↔Q
T T T
T F F
F T F
F F T
Note that in the truth table, P ↔ Q is true only when P and Q have the same truth values. This means
that two propositional formulas are tautologically equivalent if and only if their material implication is
tautologically true!
Why do we care about tautological equivalence? Because it allows us to transform more difficult propositional
formulas into equivalent ones which may be easier to work with.
For any two propositions P and Q, consider the propositional formulas P → Q, ¬Q → ¬P , and Q → P .
The propositional formula ¬Q → ¬P is called the contrapositive of P → Q, and the propositional formula
Q → P is called the converse of P → Q. How are these propositional formula related to the original
implication P → Q?
Their truth tables are given below.
P Q P →Q ¬Q → ¬P Q→P
T T T T T
T F F F T
F T T T F
F F T T T
Concept Check 6. Confirm that the above truth tables are correct.
In particular, observe that these truth tables prove that P → Q ≡ ¬Q → ¬P ; they are tautologically
equivalent. If we ever wanted to prove that P implies Q, we could instead prove it by proving that ¬Q
implies ¬P .
As an example, consider the implication “if you stand in the rain, you’ll get wet” from earlier. Its contra-
positive is “if you didn’t get wet, then you didn’t stand in the rain” and its converse is “if you get wet, then
you stood in the rain.”
Concept Check 7. Write down the contrapositive and the converse of the implication “if you eat
your dinner, then you can have dessert.”
¬(P ∧ Q) ≡ ¬P ∨ ¬Q
¬(P ∨ Q) ≡ ¬P ∧ ¬Q.
Proof. We prove that ¬(P ∧ Q) ≡ ¬P ∨ ¬Q. The truth tables of ¬(P ∧ Q) and ¬P ∨ ¬Q are given
below.
P Q ¬ (P ∧ Q) ¬P ∨ ¬Q
T T F T T T F F F
T F T T F F F T T
F T T F F T T T F
F F T F F F T T F
Since the truth values of ¬(P ∧ Q) and ¬P ∨ ¬Q are the same, the two are tautologically equivalent.
Concept Check 8. Prove the second tautological equivalence from De Morgan’s laws.
2.5 Summary
Propositional logic studies the truth of propositional formulas, which are created by combining propositions
together with connectives like ∧, ∨, ¬, →, and ↔. In propositional logic, we were able to define tautological
truth and tautological equivalence. A propositional formula is tautologically true if it is always true regardless
of the truth values of its propositions. Two propositional formulas are tautologically equivalent if they always
share the same truth values. To prove tautological truth or equivalence, we must use truth tables.
3 First-Order Logic
While it’s nice to prove that certain propositional forms are always true or equivalent to one another, the
theory above is somewhat boring. Everything can be decided by comparing truth tables, and the theory
provides us nothing to actually prove the propositions themselves. For example, we saw above that we
could prove P → Q by instead proving ¬Q → ¬P , but we still have no idea how we would to prove either
statement.
As we saw in the examples at the beginning of this section, we’re able to transform a predicate into a
proposition by quantifying the inputs to the predicate which return true propositions. We’ll use a very
coarse degree of quantification: either saying that there is at least one input which returns a true proposition,
or that every possible inputs returns true propositions. By quantifying a predicate, we’re able to create a
first-order sentence. A first-order sentences is just a proposition which uses quantifiers, like “there is a
real number x such that x2 + 3x = 0” or the other examples from the beginning of this section. The study
of the truth of these kinds of propositions is known as first-order logic, sometimes abbreviated as FOL.
As with propositions, we will typically let capital letter variables represent predicates. For example, we could
let P (x) be the predicate “x is odd.” We call a variable representing an arbitrary predicate a predicate
variable.
We quantify over predicate variables in two ways. The two quantifiers of first-order logic are the existential
and universal quantifiers. Let P (x) be any predicate.
• Existence. ∃xP (x), said in English as “there exists an x such that P (x).” An existential statement
is true only when there is an object satisfying the predicate.
• Universal. ∀xP (x), said in English as “for all x, P (x).” A universal statement is true only when every
object satisfies the predicate.
There are rules to how these quantifiers can be applied. A variable x, y, z, etc. can only be quantified over
if it is not already bound by a quantifier. For example, consider the binary predicate “x < y.” If I create a
new unary predicate “∃y(x < y)”, the variable y is bound by the existential quantifier and we can no longer
Concept Check 10. Classify each of the following as either a predicate, a first-order formula, or
neither.
• ∃x∃xP (x).
• ∃y∃xP (x, y).
• ∀xP (y).
• ∀x∀yP (y).
• ∃x∀yP (x, y).
Unlike a propositional formula, we aren’t able to determine the truth of a first-order formula by checking
the truth values of its input, since the predicate variables could represent any predicate. Instead we will
consider all possible predicates.
For any set of first-order formulas, a model consists of the following two pieces.
(1) A nonempty set of objects D ̸= ∅, typically referred to as the domain, along with the rules that
govern them.
(2) An interpretation for each of the predicates which appear in the first-order formulas.
Consider the first-order formula ∃∀xP (x). Here are some possible models for this formula.
• The real numbers (D = R) with their usual arithmetic (addition, multiplication, subtraction, and
division) with an interpretation P (x): “x is rational.”
In this model, the formula is false, since x = π is not rational.
• The natural numbers (D = N) with their usual arithmetic (addition and multiplication) with an
interpretation P (x): “x ≥ 0.”
In this model, the formula is true, since all natural numbers greater than or equal to 0.
• A group of people D = {Akemi, Benoit, Chidi} where Akemi is a data science major, Benoit is a
computer science major, and Chidi is a computer science and data science double major, with an
interpretation P (x): “x is a data science major.”
In this model, the formula is false, since Benoit is not a data science major.
Concept Check 11. Come up with another model for the first-order formula ∀xP (x).
We can quickly see that there are infinitely many models for any first-order formula.
In a model with a finite domain, we can express quantified propositions using just conjunctions and disjunc-
tions. For example, if we have a model with the domain D = {1, 2, 3, 4} and some predicate P , then
∀xS(x) ≡ S(1) ∧ S(2) ∧ S(3) ∧ S(4) and ∃xS(x) ≡ S(1) ∨ S(2) ∨ S(3) ∨ S(4).
If our domain D = {a1 , a2 , . . .} has infinitely many elements, we can think of these like infinite conjunctions
and infinite disjunctions:
∞
^ ∞
_
∀xP (x) is like P (ai ) and ∃xP (x) is like P (ai ).
i=1 i=1
However, first-order logic does not permit infinitely long propositions, so this interpretation is not strictly
true. However, the intuition provided by thinking about our quantifiers this way is quite precise, and can
help in thinking about how these things work.
Concept Check 12. Determine which of the following are logically true.
• ∀x(x = x).
• ∃x(x = x).
• ∃x(x ̸= x).
• ∀x∀y(x = y → y = x).
We say that two first-order formulas are logically equivalent if every model which makes one formula true
makes the other formula true. Again, this is similar to the idea of tautological equivalence, except we now
must consider everything in an infinite class of models rather than a finite set of truth assignments. For
example, the statements ∀xP (x) and ∀yP (y) are logically equivalent. Any model of ∀xP (x) must satisfy the
predicate P for all elements in its domain; the same is true for any model of ∀yP (y).
Finally, we return to the idea of implication. We earlier discussed the material implication →, and talked
about its truth table. We saw that it behaves a little differently from the way we typically think about
implication, since it depends only on the truth values of its two arguments rather than any notion of the
hypothesis implying the conclusion. For first-order logic we introduce a new operation, =⇒ , which we call
the logical implication. For φ and ψ two first-order formulas, we say that the implication φ =⇒ ψ is
true if it’s the case that any model which makes φ true also makes ψ true. We use the same terminology: φ
is known as the hypothesis, and ψ is known as the conclusion. Note that in this class, we will use the logical
implication =⇒ in place of the material implication → without concern.
This is the most natural extension of the idea of implication to the much more expressive world of first-order
logic, and it aligns nicely with our own intuitions about how implication works. When we say an if/then
statement like “if you stand under the rain, then you’ll get wet,” we’re not saying anything about how the
sentence behaves under an assignment of truth values to the propositions “you stand under the rain” and
“you’ll get wet.” Rather, we’re saying that any world where you’re standing under the rain is also a world
where you’ll get wet.
By comparing the definitions of logical truth and logical equivalence, we can see that two first-order formulas
φ and ψ are logically equivalent by showing that they logically imply one another: φ =⇒ ψ and ψ =⇒ φ.
If two first-order formulas φ and ψ are equivalent, we write φ ⇐⇒ ψ.
Concept Check 13. Show that the implication ∀x∃yR(x, y) =⇒ ∃x∃yR(x, y) is logically true.
a b
d c
a b
d c
The second condition ∃y∀xR(x, y) requires that there is some dot which every dot points to. Let’s have that
be dot d. We add arrows so that every dot (including d) points to d.
a b
d c
This model makes the first-order formula ∀x∃yR(x, y) ∧ ∃y∀xR(x, y) true. We check if it makes each of
∃yR(y, y) and ∀x∀yR(x, y) true.
Our model indeed makes ∃yR(y, y) true, since it makes R(d, d) true. This doesn’t prove that ∀x∃yR(x, y) ∧
∃y∀xR(x, y) =⇒ ∃yR(y, y) is true, since we would need to show that it’s true for any model, and not just
the one specific model that we constructed above.
Our model makes ∀x∀yR(x, y) false. For example, it is not the case that R(a, c) in our model. This suffices
to disprove the implication, because we’ve found at least one model which makes ∀x∃yR(x, y) ∧ ∃y∀xR(x, y)
true but makes ∀x∀yR(x, y) false.
Let’s return to ∃yR(y, y). We saw that it might be true. Let’s think about why it’s true in our model. The
second condition required that there were some dot such that every dot pointed to it, including that dot
itself. We chose to use d to make that existential claim true, which is why we had R(d, d). But it seems like
this should indeed hold in general. Let’s prove it.
Consider any model which makes ∀x∃yR(x, y) ∧ ∃y∀xR(x, y) true.
By existential instantiation on the second condition, there is some object u in the domain such that
∀xR(x, u).
By universal instantiation on ∀xR(x, u), this must also be true for our object u: R(u, u).
By existential generalization on R(u, u), we have that ∃yR(y, y).
We have shown that any model which makes ∀x∃yR(x, y) ∧ ∃y∀xR(x, y) true must also make ∃yR(y, y)
true.
Note that we used a name u other than a, b, c, or d in our existential instantiation, since we have to use a
new name.
Concept Check 14. Prove or disprove whether each of the following are implied by ∀x∃yR(x, y) ∧
∃y∀xR(x, y).
• ∃x∃yR(x, y).
• ∃t∀sR(s, t).
• ∀x∀y(R(x, y) ∨ R(y, x)).
is truly limited to the familiar structure of the natural numbers and the rules they obey.
Of course, it can be a little annoying to have to explicitly write out every predicate we wish to use in first-
order logic. We will usually simply explain what the predicates we are working with are in English, and
assume that there is an appropriate first-order logic translation.
Let’s consider our earlier statement “there is some x such that x2 + 3x = 0.” Again, we can’t simply write
this as
∃x(x2 + 3x = 0)
since the discussion of its logical truth would have to include any possible model—but we’re interested
specifically if this is true of the real numbers. A tempting option is to mimic what we did in the universal
quantification case and use
∃x(x ∈ R =⇒ x2 + 3x = 0).
Note that we would read this in English as “there is some element x such that if it is a real number, then
x2 + 3x = 0” Something like this won’t work—statements of the form ∃x(P (x) =⇒ Q(x)) are quite strange.
Note that such a claim is true in any model containing any object which does not satisfy P . Call such an
object b. Then P (b) =⇒ Q(b) is vacuously true, since P (b) is not true. Thus ∃x(P (x) =⇒ Q(x)).
Instead, for restricting existential quantifiers, we instead write
∃x(x ∈ R ∧ x2 + 3x = 0).
This says that there is some object x which is a real number and satisfies x2 + 3x = 0. That’s what we were
intending to say.
It can be notationally bulky to carry around these additional terms inside our quantified expressions. Instead,
we will commonly use the following notational shorthand: for a set A, we will use
(∀x ∈ A)P (x) to mean ∀x(x ∈ A =⇒ P (x))
(∃x ∈ A)P (x) to mean ∃x(x ∈ A ∧ P (x)).
Proof. We are not currently equipped to prove these statements. Instead we will reason that they are
true informally. Consider the first logical equivalence ¬∀xP (x) ⇐⇒ ∃x¬P (x).
Consider any model which makes ¬∀xP (x) true. If it is not the case that every single object satisfies
P , there has to be at least one which doesn’t. So ∃x¬P (x). Therefore ¬∀xP (x) =⇒ ∃x¬P (x).
Now consider a model which makes ∃x¬P (x) true. If there is some object which does not satisfy P ,
it cannot be that every object satisfies P . So ¬∀xP (x). Therefore ∃x¬P (x) =⇒ ¬∀xP (x).
Concept Check 15. Provide an informal proof of the second logical equivalence in De Morgan’s
laws.
Another way to informally justify these is as an extension of De Morgan’s laws for the disjunction and
conjunction connectives. In particular, for some domain D, we have that
_ ^
¬∃xP (x) is like ¬ P (d) is like ¬P (d) is like ∀x¬P (x).
d∈D d∈D
Again, such arguments are informal since we may not have infinitely long conjunctions and disjunctions in
first-order logic.
Thus we are able to write “there are exactly two objects satisfying P ” as
∃x∃y x ̸= y ∧ P (x) ∧ P (y) ∧ ∀z(P (z) =⇒ z = x ∨ z = y) .
Concept Check 16 Translate the following two sentences into first-order logic.
• There exists exactly one object.
• There exist exactly three objects.