0% found this document useful (0 votes)
59 views16 pages

Applications of Discrete Structures: Slides For A Course Based On The Text (5 Edition) by Kenneth H. Rosen

This document is a slide presentation on predicate logic from a course on discrete structures. It introduces predicate logic as an extension of propositional logic that allows reasoning about classes of entities. It covers subjects and predicates, propositional functions, quantifiers, bound and free variables, and provides examples of predicate logic expressions and their English translations.

Uploaded by

Ahmad Dogar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views16 pages

Applications of Discrete Structures: Slides For A Course Based On The Text (5 Edition) by Kenneth H. Rosen

This document is a slide presentation on predicate logic from a course on discrete structures. It introduces predicate logic as an extension of propositional logic that allows reasoning about classes of entities. It covers subjects and predicates, propositional functions, quantifiers, bound and free variables, and provides examples of predicate logic expressions and their English translations.

Uploaded by

Ahmad Dogar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

Module #1 - Logic

University of Florida
Dept. of Computer & Information Science & Engineering

COT 3100
Applications of Discrete Structures
Dr. Michael P. Frank

Slides for a Course Based on the Text


Discrete Mathematics & Its Applications
(5th Edition)
by Kenneth H. Rosen

03/27/21 (c)2001-2004, Michael P. Frank 1


Module #1 - Logic Topic #1 – Propositional Logic

Review: Propositional Logic


(§§1.1-1.2)
• Atomic propositions: p, q, r, …
• Boolean operators:      
• Compound propositions: s : (p  q)  r
• Equivalences: pq  (p  q)
• Proving equivalences using:
– Truth tables.
– Symbolic derivations. p  q  r …

03/27/21 (c)2001-2004, Michael P. Frank 2


Module #1 - Logic Topic #3 – Predicate Logic

Predicate Logic (§1.3)


• Predicate logic is an extension of
propositional logic that permits concisely
reasoning about whole classes of entities.
• Propositional logic (recall) treats simple
propositions (sentences) as atomic entities.
• In contrast, predicate logic distinguishes the
subject of a sentence from its predicate.
– Remember these English grammar terms?
03/27/21 (c)2001-2004, Michael P. Frank 3
Module #1 - Logic Topic #3 – Predicate Logic

Subjects and Predicates


• In the sentence “The dog is sleeping”:
– The phrase “the dog” denotes the subject -
the object or entity that the sentence is about.
– The phrase “is sleeping” denotes the predicate-
a property that is true of the subject.
• In predicate logic, a predicate is modeled as
a function P(·) from objects to propositions.
– P(x) = “x is sleeping” (where x is any object).

03/27/21 (c)2001-2004, Michael P. Frank 4


Module #1 - Logic Topic #3 – Predicate Logic

More About Predicates


• Convention: Lowercase variables x, y, z... denote
objects/entities; uppercase variables P, Q, R…
denote propositional functions (predicates).
• Keep in mind that the result of applying a
predicate P to an object x is the proposition P(x).
But the predicate P itself (e.g. P=“is sleeping”) is
not a proposition (not a complete sentence).
– E.g. if P(x) = “x is a prime number”,
P(3) is the proposition “3 is a prime number.”

03/27/21 (c)2001-2004, Michael P. Frank 5


Module #1 - Logic Topic #3 – Predicate Logic

Propositional Functions
• Predicate logic generalizes the grammatical
notion of a predicate to also include
propositional functions of any number of
arguments, each of which may take any
grammatical role that a noun can take.
– E.g. let P(x,y,z) = “x gave y the grade z”, then if
x=“Mike”, y=“Mary”, z=“A”, then P(x,y,z) =
“Mike gave Mary the grade A.”

03/27/21 (c)2001-2004, Michael P. Frank 6


Module #1 - Logic Topic #3 – Predicate Logic

Universes of Discourse (U.D.s)


• The power of distinguishing objects from
predicates is that it lets you state things
about many objects at once.
• E.g., let P(x)=“x+1>x”. We can then say,
“For any number x, P(x) is true” instead of
(0+1>0)  (1+1>1)  (2+1>2)  ...
• The collection of values that a variable x
can take is called x’s universe of discourse.
03/27/21 (c)2001-2004, Michael P. Frank 7
Module #1 - Logic Topic #3 – Predicate Logic

Quantifier Expressions
• Quantifiers provide a notation that allows
us to quantify (count) how many objects in
the univ. of disc. satisfy a given predicate.
• “” is the FORLL or universal quantifier.
x P(x) means for all x in the u.d., P holds.
• “” is the XISTS or existential quantifier.
x P(x) means there exists an x in the u.d.
(that is, 1 or more) such that P(x) is true.
03/27/21 (c)2001-2004, Michael P. Frank 8
Module #1 - Logic Topic #3 – Predicate Logic

The Universal Quantifier 


• Example:
Let the u.d. of x be parking spaces at UF.
Let P(x) be the predicate “x is full.”
Then the universal quantification of P(x),
x P(x), is the proposition:
– “All parking spaces at UF are full.”
– i.e., “Every parking space at UF is full.”
– i.e., “For each parking space at UF, that space is full.”

03/27/21 (c)2001-2004, Michael P. Frank 9


Module #1 - Logic Topic #3 – Predicate Logic

The Existential Quantifier 


• Example:
Let the u.d. of x be parking spaces at UF.
Let P(x) be the predicate “x is full.”
Then the existential quantification of P(x),
x P(x), is the proposition:
– “Some parking space at UF is full.”
– “There is a parking space at UF that is full.”
– “At least one parking space at UF is full.”

03/27/21 (c)2001-2004, Michael P. Frank 10


Module #1 - Logic Topic #3 – Predicate Logic

Free and Bound Variables


• An expression like P(x) is said to have a
free variable x (meaning, x is undefined).
• A quantifier (either  or ) operates on an
expression having one or more free
variables, and binds one or more of those
variables, to produce an expression having
one or more bound variables.

03/27/21 (c)2001-2004, Michael P. Frank 11


Module #1 - Logic Topic #3 – Predicate Logic

Example of Binding
• P(x,y) has 2 free variables, x and y.
 x P(x,y) has 1 free variable, and one bound
variable. [Which is which?]
• “P(x), where x=3” is another way to bind x.
• An expression with zero free variables is a bona-
fide (actual) proposition.
• An expression with one or more free variables is
still only a predicate: e.g. let Q(y) = x P(x,y)

03/27/21 (c)2001-2004, Michael P. Frank 12


Module #1 - Logic Topic #3 – Predicate Logic

Nesting of Quantifiers
Example: Let the u.d. of x & y be people.
Let L(x,y)=“x likes y” (a predicate w. 2 f.v.’s)
Then y L(x,y) = “There is someone whom x
likes.” (A predicate w. 1 free variable, x)
Then x (y L(x,y)) =
“Everyone has someone whom they like.”
(A __________ with ___ free variables.)

03/27/21 (c)2001-2004, Michael P. Frank 13


Module #1 - Logic

Review: Predicate Logic (§1.3)


• Objects x, y, z, …
• Predicates P, Q, R, … are functions mapping
objects x to propositions P(x).
• Multi-argument predicates P(x, y).
• Quantifiers: [x P(x)] :≡ “For all x’s, P(x).”
[x P(x)] :≡ “There is an x such that P(x).”
• Universes of discourse, bound & free vars.

03/27/21 (c)2001-2004, Michael P. Frank 14


Module #1 - Logic Topic #3 – Predicate Logic

Quantifier Exercise
If R(x,y)=“x relies upon y,” express the
following in unambiguous English:
Everyone has someone to rely on.
x(y R(x,y))=
There’s a poor overburdened soul whom
y(x R(x,y))= everyone relies upon (including himself)!
x(y R(x,y))= There’s some needy person who relies
upon everybody (including himself).
y(x R(x,y))=Everyone has someone who relies upon them.
x(y R(x,y))= Everyone relies upon everybody,
(including themselves)!
03/27/21 (c)2001-2004, Michael P. Frank 15
Module #1 - Logic Topic #3 – Predicate Logic

End of §1.3-1.4, Predicate Logic


• From these sections you should have learned:
– Predicate logic notation & conventions
– Conversions: predicate logic  clear English
– Meaning of quantifiers, equivalences
– Simple reasoning with quantifiers
• Upcoming topics:
– Introduction to proof-writing.
– Then: Set theory –
• a language for talking about collections of objects.

03/27/21 (c)2001-2004, Michael P. Frank 16

You might also like