























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order logic, a logic on quantified statements. First order logic is much more expressive than propositional logic. The topics on first order logic are: Quantifiers Negation Multiple quantifiers Arguments of quantified statements
Predicates are propositions (i.e. statements) with variables Example: P ( x,y ) ::= x + 2 = y Predicates x = 1 and y = 3: P (1,3) is true x = 1 and y = 4: P (1,4) is false P (1,4) is true The domain of a variable is the set of all values that may be substituted in place of the variable. When there is a variable, we need to specify what to put in the variables.
Set We have not defined formally what is a set, and will do so later in the course. For now, it is enough for our discussion to recall some well-known examples. Z: the set of all integers Z
: the set of all positive integers Z
The Existential Quantifier y There EXISTS some y x y x. y Domain Truth value positive integers
integers negative integers
e.g. The truth of a predicate depends on the domain. T F T y Z
P(y) means P(1) P(2) P(3) …
Translating Mathematical Theorem Fermat (1637): If an integer n is greater than 2, then the equation a n
Quantifiers Negation Multiple quantifiers Arguments of quantified statements
Negations of Quantified Statements Everyone likes football. What is the negation of this statement? (generalized) DeMorgan’s Law Not everyone likes football = There exists someone who doesn’t like football. Say the domain has only three values. The same idea can be used to prove it for any number of variables.
Quantifiers Negation Multiple quantifiers Arguments of quantified statements
Order of Quantifiers There is an anti-virus program killing every computer virus. How to interpret this sentence? For every computer virus, there is an anti-virus program that kills it.
Order of Quantifiers Let’s say we have an array A of size 6x6. 1 1 1 1 1 1 1 1 1 Then this table satisfies the statement.
Order of Quantifiers Let’s say we have an array A of size 6x6. 1 1 1 1 1 1 1 1 1 But if the order of the quantifiers are changes, then this table no longer satisfies the new statement.
Questions Are these statements equivalent? Are these statements equivalent? Yes, in general, you can change the order of two “foralls”, and you can change the order of two “exists”.
More Negations There is an anti-virus program killing every computer virus. What is the negation of the above sentence? For every program, there is some virus that it can not kill.