Consistent Sets of Formulas
c University of Waterloo
Page 1 of 22
Consistent Sets of Formulas
Definition
We say that a set of propositional formulas is consistent if there is no formula
such that both ` and ` .
If is not consistent, we say it is inconsis

First Order Logic: Language and Terms
c University of Waterloo
Page 1 of 35
First Order Logic
In propositional logic, the most basic building blocks are the propositional variables,
which can either be true or false. Propositional logic is easy to work wi

The Language of Propositional Logic
c University of Waterloo
Page 1 of 39
Introduction
Consider the following argument:
Whenever it rains, the grass gets wet.
The grass is dry.
Hence, it is not raining.
If we let
R denote It is raining,
W denote The gra

Translating between English and First Order Logic
c University of Waterloo
Page 1 of 18
Translating between English and First Order Logic
First order logic is powerful enough to express many interesting mathematical
statements.
For example, for t a natura

Quantifier-Free Formulas and Prenex Normal Form
c University of Waterloo
Page 1 of 28
Quantifier-Free Formulas
Recall that the connective symbols that belong to every first order symbol set are
and , and the quantifier symbol belongs to every symbol set.

Proof System for First Order Logic
c University of Waterloo
Page 1 of 19
Proof System for First Order Logic
We now introduce a proof system for first order logic. It will be similar to our proof
system from propositional logic, but we will need more types

Adequate Sets of Connectives
c University of Waterloo
Page 1 of 35
Adequate Sets of Connectives
Consider the connectives , , , , and .
We have seen that , , and can all be expressed in terms of and , so we only
use and in our official definition of formul

Satisfiability
c University of Waterloo
Page 1 of 27
Satisfiability
Definition
Let be a set of formulas. We say that is satisfiable if there is some truth
assignment e such that e() = T for all .
Example
cfw_(P Q), (P Q) is satisfiable.
If e(P ) = T and e

Horn Clauses and Horn Formulas
c University of Waterloo
Page 1 of 26
Horn Clauses and Horn Formulas
We now define a class of clauses (formulas) for which there is an efficient algorithm
for deciding satisfiability for sets of clauses (formulas) from the c

PMATH 330 - Assignment 1
Due Thursday, May 15th
Please hand in the following problems:
1. For each of the following strings, determine whether or not it is a formula. If so, provide a
derivation of the formula, indicating which rule is used at each step.

.
LOGIC FOR THE
MATHEMATICAL
Course Notes for PMATH 330Spring/2006
PETER HOFFMAN
Peter Homan c 2006
CONTENTS
INTRODUCTION
5
1. THE LANGUAGE OF PROPOSITIONAL LOGIC
9
1.1 The Language.
1.2 Abbreviations.
11
16
2. RELATIVE TRUTH
23
2.1 Truth assignments and

PMATH 330 - Assignment 5
Due Thursday, June 12th
Please hand in the following problems:
1. Exercise 3.14 (on p. 81-82)
2. Exercise 3.16 (on p. 83)
3. Exercise 3.17 (on p. 83)
4. Exercise 4.1 (on p. 98)

PMATH 330 - Assignment 8
Due Thursday, July 10th
Please hand in the following problems:
For 1 and 2, assume we are working in the language of number theory and that the variables are
interpreted as natural numbers cfw_0, 1, 2, . . . and the symbols 0, 1,

PMATH 330 Logic, Assignment 2
Due Fri May 31
1. Let F = (P (QR)(P R) and G = R(P Q). Determine whether F treq G.
2. Let F = P (QR), G = (P Q)(P R) and H = (QR). Determine whether
cfw_F, G, H is satisable.
3. Let F = (P R)Q, G = (P R) (QR) and H = RQ. Det

PMATH 330 Logic, Assignment 1
Due date TBA
1. For each of the following strings, determine (with justication) whether it is a formula
and, if so, then write out a derivation indicating which rule was applied at each step.
(a) (P (QR) P )
(b) (P Q) (RP )
(

Assignment 3
Page 1 of 13
Due: May 24, 11:59pm
1. (a) Show that fP; Q; :(P ^ Q)g is an unsatisfiable 3-element set, each
of whose 2-element subsets is satisfiable.
Assignment 3
Page 2 of 13
Due: May 24, 11:59pm
(b) For every n
3, find an example of an uns

Other Connectives and the Language of Arithmetic
c University of Waterloo
Page 1 of 23
Other Connectives
Just as we did for propositional logic, we will introduce additional connectives to first
order logic that will not officially be part of the symbol s

Proof System for Propositional Logic
c University of Waterloo
Page 1 of 22
Proofs
In mathematics, we like to prove things. In a mathematical proof, we generally begin
with some facts that we take as given. We then provide a sequence of reasoning,
ultimate

MATH 330
Assignment 3
Fall 2014
Due: October 1, 2014
1. Prove the following:
(a) If G is a tautology, then (Q G)treq Q and G Q is a tautology.
(b) If
A and
B, then
A B.
(c) If A is an unsatisable formula, then (A P )treq P and A B is unsatisable.
2. 2.23

MATH 330
Assignment 2
Fall 2014
Due: September 24, 2014
1. Prove the following
(a) Associativity of ; that is, (P Q) Rtreq P (Q R).
(b) Associativity of ; that is, (P Q) Rtreq P (Q R).
2. Is (A B) A) A) a tautology (Hint: What truth assignment makes an im

MATH 330
Assignment 1
Fall 2014
Due: September 17, 2014
1. 1.5 (i), (iii), (v) pg.18
2. Find the well-formed formula whose abbreviation is (A B) E) A. As in class, using
a tree or sequence of generating rules, show that it is indeed well-formed.
3. Change

Assignment 0 Page 1 of 4 Due: May 7, 11:59pm
6cm Hongdi Hmcwx
1. Go to the Piazza page for the cou , and nd the folder called as-
signmentO. Contrary to the usual numerical order, this folder will be
last. Repeat the solution to this question, as posted b

Assignment 1
G's-aw;
Page 1 of 13 Due: May 10, 11:59pm
'. Hml
1. Let P, Q, an R denote propositional variables. Which of the following
are formulas? For those that are, Show how they are built up from the
propositional variables.
Q 13 0\ 0FMg&Q 01A Pl \3

Assignment, 1 Page 1 of 13
Due: May 10, 11159131
W
1- L P, Q, and R denote propositional variables. Which of the followig
are formulas? For those that are, show how they are built up from t e
propositional variables.
(Pea) is a cfw_m 13(3)
709(2) is a for

Assignment 4
Page 1 of 12
Due: May 31, 11:59pm
1. Use the algorithm described on page 9 of the Week 4 Slides to decide
whether each of the following sets of Horn formulas are satisfiable.
(a) cfw_P, (S Q), (P R) S), (Q R) P ), (P R).
Assignment 4
Page 2 o

Assignment 2
Page 1 of 18
Due: May 17, 11:59pm
1. (a) Show that cfw_, is an adequate set of connectives.
Assignment 2
Page 2 of 18
Due: May 17, 11:59pm
(b) Show that cfw_ is not an adequate set of connectives.
Assignment 2
Page 3 of 18
Due: May 17, 11:59