Lecture 01
Lecture 01
Topics:
1. The notion of logic and proof
2. Meaning of a proposition
3. Logical Connectives
The Foundations: Logic and Proofs
The rules of logic specify the meaning of mathematical statements. For instance,
these rules help us understand and reason with statements such as “There exists
an integer that is not the sum of two squares” and “For every positive integer n,
the sum of the positive integers not exceeding n is n(n + 1) ∕ 2.” Logic is the basis
of all mathematical reasoning, and of all automated reasoning. It has practical
applications to the design of computing machines, to the specification of systems,
to artificial intelligence, to computer programming, to programming languages, and
to other areas of computer science, as well as to many other fields of study.
1.1 Propositional Logic
The rules of logic give precise meaning to mathematical statements. These rules are used to
distinguish between valid and invalid mathematical arguments. Because a major goal of this book
is to teach the reader how to understand and how to construct correct mathematical arguments,
we begin our study of discrete mathematics with an introduction to logic.
1.1.12 Propositions: A proposition is a declarative sentence (that is, a sentence that declares a
fact) that is either true or false, but not both.
3. x + 1 = 2.
4. x + y = z.
We use letters to denote propositional variables, that is, variables that represent
propositions, just as letters are used to denote numerical variables. The
conventional letters used for propositional variables are p, q, r, s
The truth value of a proposition is true, denoted by T, if it is a true proposition, and
the truth value of a proposition is false, denoted by F, if it is a false proposition.
Propositions that cannot be expressed in terms of simpler propositions are called
atomic propositions. The area of logic that deals with propositions is called the
propositional calculus or propositional logic. It was first developed
systematically by the Greek philosopher Aristotle more than 2300 years ago.
We now turn our attention to methods for producing new propositions from those
that we already have. These methods were discussed by the English
mathematician George Boole in 1854 in his book The Laws of Thought. Many
mathematical statements are constructed by combining one or more propositions.
New propositions, called compound propositions, are formed from existing
propositions using logical operators.
Negation
Other notations you might see are ∼p, −p, p′ , Np, and !p.
This negation can be more simply expressed as “Michael’s PC does not run
Linux.”
Negation
TABLE 1 The Truth Table for the Negation of a Proposition.
p ¬p
T F
F T
p q p∧q
T T T
T F F
F T F
F F F
Disjunction
TABLE 3 The Truth Table for the Disjunction of Two Propositions.
p q p∨q
T T T
T F T
F T T
F F F
The use of the connective or in a disjunction corresponds to one of the two ways
the word or is used in English, namely, as an inclusive or. A disjunction is true
when at least one of the two propositions is true. That is, p ∨ q is true when both p
and q are true or when exactly one of p and q is true.
EXAMPLE 6 Translate the statement “Students who have taken calculus or
introductory computer science can take this class” in a statement in propositional
logic using the propositions p: “A student who has taken calculus can take this
class” and q: “A student who has taken introductory computer science can take
this class.
Hence, this statement can be expressed as p ∨ q, the inclusive or, or disjunction,
of p and q.
Exclusive OR
Definition 4 Let p and q be propositions. The exclusive or of p and q, denoted by p
⊕ q (or p XOR q), is the proposition that is true when exactly one of p and q is true
and is false otherwise.
TABLE 4 The Truth Table for the Exclusive Or of Two Propositions.
p q p⊕q
T T F
T F T
F T T
F F F
EXAMPLE 8 Let p and q be the propositions that state “A student can have a
salad with dinner” and “A student can have soup with dinner,” respectively. What is
p ⊕ q, the exclusive or of p and q
The exclusive or of p and q is the statement that is true when exactly one of p and
q is true. That is, p ⊕ q is the statement “A student can have soup or salad, but
not both, with dinner.” Note that this is often stated as “A student can have soup or
a salad with dinner,” without explicitly stating that taking both is not permitted.