Title: Announcements
1Announcements
- Reading Assignment
- Nilsson chapters 13-14
- Announcements
- LISP and Extra Credit Project Assigned
- Todays Handouts
- Outline for Class 33
- Web Site
- www.mil.ufl.edu/eel5840
- Software and Notes
2Todays Menu
- Informal Introduction to the Predicate Calculus
- The Propositional Calculus
- Expressing Constraints in Feature Values
- The Language
- Rules of Inference
- Proofs
- Semantics
- Interpretations
- Truth Tables
- Satisfiability and Models
- Validity
- Equivalence
- Entailment
3Informal Introduction to PC
- Predicate Calculus (PC)
- Plusses ()
- Concise rich notation. Universally understood
- A lot is known about its limitations
decidability, admissibility - We can place bounds on expected performance
- Minuses (-)
- May direct attention away from the problem
specification phase - Many problems do not map well to mathematical
analysis - Concepts
- Notation e.g., ?x ?y P(x)?Q(y)
- Proofs by Refutation
- Rules of Inference
- modus ponens
- modus tolens
- resolution
- Operators
- Alternatives for Proofs constraint propagation
and justification
4Informal Introduction to PC
- Predicate Calculus (PC)
- A mathematical language that allows us to specify
Rules of Inference as ways (algorithms) to
reason. - Example 1 It is a bird it it has feathers, or it
flies and lays eggs - Rule 1a If animal has feathers then animal is
bird - Rule 1b If animal flies and animal lays eggs
then - animal is bird
- In Robotics we need to capture the idea that
something has properties - Example 2 In the domain of birds these are true
predicates - Feathers(Robin)
- Bird(Robin)
5Informal Introduction to PC
- Predicate Calculus (PC)
- To say that Feathers(Julie) is true means that
Julie is constrained to what it stands for. Other
constraints are Flies(Julie)Lays-Eggs(Julie) - Expressions joined by or by ? are called
conjunctions - Expressions joined by or by ? are called
disjunctions - Logical Connectives are , (?), (?), and ?
(? ) - Example 3 Feathers(Sue)
- Sue is an object for which Feathers(Sue) is not
satisfiable
6Informal Introduction to PC
- PREDICATE CALCULUS (PC)
- Example 4 Feathers(Squicky) ? Bird(Squicky)
- also F ? G ? F ? G ? ?F ? G
- or better yet Feathers(X) ? Bird(X)
- X is an object in the domain of interest
constrained to satisfy the following definition
If Feathers(X) then Bird(X) else true - Example 4 is true if Feathers(X) is true and if
Bird(X) is true - However the definition allows Feathers(X) and
Bird(X) to be both false - and the definition allows Feathers(X) is false
and Bird(X) to be true - If Feathers(X) is true and Bird(X) is false then
Example 4 is false - A K-Map of E1 ? E2 demonstrates that it is
equivalent to ?E1 ? E2 - 0 1
- 0 1 0 E1 ? E2 ? ? E1 ? E2
- 1 1 1
E1
E2
7Informal Introduction to PC
- Predicate Calculus (PC)
- Precedence Rules Use parentheses ( ) to clarify
- has the highest precedence
- (?), (?) equal precedence and lower than
- ? (? ) lowest precedence
- Logical Connectors are commutative E1?E2?E2?E1
E1?E2?E2?E1 - Logical Connectors are distributive
- E1?(E2?E3)?(E1?E2)?(E1?E3)
- E1?(E2?E3)?(E1?E2)?(E1?E3)
- Logical Connectors are associative
- E1?(E2?E3)?(E1?E2)?E3
- E1?(E2?E3)?(E1?E2)?E3
- Identity Property E1 E1
- De Morgans Law (E1?E2)? E1? E2
(E1?E2)? E1 ? E2
8Informal Introduction to PC
- Predicate Calculus (PC)
- Quantifiers (?, ?) are used to determine when
things are true - Example 5 (?x)Feathers(x) ? Bird(x)
- Quantifier variable
- For all objects x in the domain of interest
(x?D) we get a true expression when we substitute
any object x inside the square brackets. Notice a
sort of domain independence, i. e., Anything
that has feathers is a bird (in the domain of
interest) - The expression surrounded by square brackets
associated with a quantifier is said to lie in
the scope of the quantifier. (In other words
Feathers(x) ? Bird(x) lies in the scope of
(?x) ) - ? is called the universal quantifier, it is true
for all objects - ? is called the existential quantifier, it is
true for some objects (at least 1 object).
It is pronounced there exists.
9Informal Introduction to PC
- Predicate Calculus (PC)
- (?x)Bird(x) ? there exists an x (at least one)
for which Bird(x) is true - Vocabulary of the PC
- Terms Domain Objects (A,B, Robin, etc.)
- Variables (x, y, z, w, ...) they range over
domain objects - Functions of objects that return objects, e.
g., f(x) - Arguments to functions, e.g., (x), (x,y),
(x,y,z), etc. - Arguments to predicates, e.g., (x), (h(x)),
(x,f(z)), etc. - Atomic Formulas (Atf) the atoms T or F
- Predicates with Arguments, e.g., P(x), Q(w,y)
- lttermgtlttermgt or lttermgt?lttermgt
- Literals Atf or Atf
- Well-Formed-Formula (wff) is any literal or
- ltwffgt (?), (?), ? (? ) ltwffgt
- (?vi)ltwffgt (?vi)ltwffgt
- ltwffgt
10Informal Introduction to PC
- Predicate Calculus (PC)
- Sentences are closed wffs ? a wff that has no
free variables - Example 6 6a (?x)Feathers(x) ? Bird(x)
- 6b Feathers(Oriole) ? Bird(Oriole)
- x in 6a is said to be bound, that is, it appears
within the scope of its corresponding quantifier.
Further, variables that are not bound are free.
Both 6a and 6b are sentences. - Example 7 (?x)Feathers(x) ? Feathers(y)
- This example is not a sentence. Can you explain
why? - If variables are allowed to represent only
objects the logic is 1st order. It is called the
First Order Predicate Calculus. - Second Order Predicate Calculus variables
allowed to represent predicates and object
functions. - ZOPC/Boolean Algebra/Propositional Calculus - No
variables
11Informal Introduction to PC
- Predicate Calculus (PC)
- Clause A wff consisting of a disjunction of
literals, e.g., (?x)F(x) ? B(x) (?P)P(x) ?
Q(x) (?f)P(x) ? H(x, f(x)) - Interpretations Tie logic symbols to words. The
goal is to say something about the world, e.g.,
ON(A,B). We do this by associating functions,
predicates and objects with tangible things.
Thus, objects in some domain D correspond to
object symbols in logic. - Example 9
- Logic Side Real World
- Symbolic Object A Block A
- Symbolic Object B Block B
- _
- ON(B,A) implies the relation that block B is
on block A - P(x,y) is read as x P y
P(A,B)
12Informal Introduction to PC
B
- Predicate Calculus (PC)
- Functions Bwhats_on(A)
- Bis_on(A) Is_whats_on(B,A)
- Def Interpretation A triple written as ID, Iv,
Ic which is a full accounting of the
correspondence between the logic world and the
real world. D is the domain of interest, Iv the
assignments to variables and Ic is the assignment
to constants. - Real World Logic
- objects ? object symbols
- relations ? predicates
- object functions? symbolic object functions
- BIG CONCEPT Proofs tie axioms to consequences
- Suppose we are given a set of wffs which are
assumed to be true, this set is called axioms (or
given/assumed) set.
A
13Informal Introduction to PC
- Predicate Calculus (PC)
- Example 9 9a Feathers(Julie)
- 9b (?x)Feathers(x) ? Bird(x)
- When we say these are axioms we are restricting
the interpretations to the objects, symbols,
predicates and functions for which the implied
imaginable world holds. These interpretations for
which the axiom set holds are said to models of
the wffs. - Suppose we are asked to show that all
interpretations that make the axioms true make
some other given wff true also. If we succeed, we
say we have proven that this extra wff is a
theorem with respect to the axioms. - We prove that a wff is a theorem when we show
that the theorem MUST be true give that the
axioms are true. - We prove that a wff is a theorem when every model
for the axioms is also a model for the wff. If
so, we say the wff logically follows from the
axioms or alternatively, the axioms logically
imply the wff.
?
14Informal Introduction to PC
- Predicate Calculus (PC)
- Given the set of axioms in Ex. 9 can we prove
Bird (Julie) is a theorem w.r.t. the axioms? Yes! - HOW?
- We need a procedure or algorithm to do it. A
proof is a procedure consisting of manipulations
based on equivalences which are called Sound
Rules of Inference which produce a new wff from
old ones guaranteeing that models which make the
old wffs true also make the new (derived) wffs
true. - A straightforward proof procedure applies sound
rules of inference to the axioms recursively
until the desired wff is produced. - Do you like this? Why or why not?
15Informal Introduction to PC
- Predicate Calculus (PC)
- Proving a theorem is not the same as showing that
a wff is valid. Why? A valid wff is true
independent of interpretation - Proving a theorem is not the same as showing that
a wff is satisfiable. Why? A satisfiable wff is
true for some interpretation - Modus Ponens the most straightforward sound
rule of inference when applied recursively or
successively. - Def Given the set ? E1 ? E2 E1 then E2
is a theorem w.r.t. ? thus, we can add E2
to the axioms if it was obtained by mp - Using mp prove Bird(Julie)
- Example 10 10a Feathers(Julie)
- 10b (?x)Feathers(x) ? Bird(x)
- Since ? is true for all x?D we can let xJulie
and obtain 10b Feathers(Julie) ? Bird(Julie) and
therefore Bird(Julie) m.p.
?
16Informal Introduction to PC
- Predicate Calculus (PC)
- We observe that this proof was merely a syntactic
(mechanical) procedure. We obtained Bird(Julie)
because it follows from the axioms logically. The
possibility exists that the given axioms or
derived theorem may clash with our sense of the
world. - Modus Tolens ? A sound rule of inference when
applied recursively or successively produces a
derived wff as follows - Def Given the set ? E1 ? E2 E2 then E1
is a theorem w.r.t. ? ? we can add E1 to
the axioms if it was obtained by mt - Example 11 11a Bird(Larry)
- 11b (?x)Feathers(x) ? Bird(x)
- Since ? is true for all x?D we can let xLarry
and obtain 11b Feathers(Larry) ? Bird(Larry) and
therefore Feathers(Larry) m.t.
17