DOC PREVIEW
UNL CSCE 235 - Predicate Logic and Quantifiers

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PredicateLogic andQuantifiersCSE235Predicate Logic and QuantifiersSlides by Christopher M. BourkeInstructor: Berthe Y. ChoueiryFall 2007Computer Science & Engineering 235Introduction to Discrete MathematicsSections 1.3–1.4 of [email protected] / 1PredicateLogic andQuantifiersCSE235IntroductionConsider the following statements:x > 3, x = y + 3, x + y = zThe truth value of these statements has no meaning withoutspecifying the values of x, y, z.However, we can make propositions out of such statements.A predicate is a property that is affirmed or denied about thesubject (in logic, we s ay “variable” or “argument”) of astatement.“ x|{z}subjectis greater than 3”|{z }predicateTerminology: affirmed = holds = is true; denied = does nothold = is not true.2 / 1PredicateLogic andQuantifiersCSE235Propositional FunctionsTo write in predicate logic:“ x|{z}subjectis greater than 3”| {z }predicateWe introduce a (functional) symbol for the predicate, and putthe subject as an argument (to the functional symbol): P (x)Examples:Father(x): unary predicateBrother(x,y): binary predicateSum(x,y,z): ternary predicateP(x,y,z,t): n-ary predicate3 / 1PredicateLogic andQuantifiersCSE235Propositional FunctionsDefinitionA statement of the form P(x1, x2, . . . , xn) is the value of thepropositional function P . Here, (x1, x2, . . . , xn) is an n-tupleand P is a predicate.You can think of a propositional function as a function thatEvaluates to true or false.Takes one or more arguments.Expresses a predicate involving the argument(s).Becomes a proposition when values are assigned t o thearguments.4 / 1PredicateLogic andQuantifiersCSE235Propositional FunctionsExampleExampleLet Q(x, y, z) denote the statement “x2+ y2= z2”. What isthe truth value of Q(3, 4, 5)? What is the truth value ofQ(2, 2, 3)? How many values of (x, y, z) make the predicatetrue?Since 32+ 42= 25 = 52, Q(3, 4, 5) is true.Since 22+ 22= 8 6= 32= 9, Q(2, 2, 3) is false.There are infinitely many values for (x, y, z) that make thispropositional function true—how many right triangles arethere?5 / 1PredicateLogic andQuantifiersCSE235Propositional FunctionsExampleExampleLet Q(x, y, z) denote the statement “x2+ y2= z2”. What isthe truth value of Q(3, 4, 5)? What is the truth value ofQ(2, 2, 3)? How many values of (x, y, z) make the predicatetrue?Since 32+ 42= 25 = 52, Q(3, 4, 5) is true.Since 22+ 22= 8 6= 32= 9, Q(2, 2, 3) is false.There are infinitely many values for (x, y, z) that make thispropositional function true—how many right triangles arethere?5 / 1PredicateLogic andQuantifiersCSE235Universe of DiscourseConsider the previous example. Does it make sense to assign tox the value “blue”?Intuitively, the universe of discourse is the set of all things wewish to talk about; that is, the set of all objects that we cansensibly assign to a variable in a propositional function.What would be the universe of discourse for the propositionalfunction P (x) = “The test will be on x the 23rd” be?6 / 1PredicateLogic andQuantifiersCSE235Universe of DiscourseMultivariate FunctionsMoreover, each variable in an n-tuple may have a differe ntuniverse of discourse.Let P (r, g, b, c) = “The rgb-value of the color c is (r, g, b)”.For example, P (255, 0, 0, red) is true, while P (0, 0, 255, green)is false.What are the universes of discourse for (r, g, b, c)?7 / 1PredicateLogic andQuantifiersCSE235QuantifiersIntroductionA predicate becomes a proposition when we assign it fixedvalues. However, another way to make a predicate into aproposition is to quantify it. That is, the predicate is true (orfalse) for all possible values in the universe of discourse or forsome value(s) in the universe of discourse.Such quantification can be done with two quantifiers: theuniversal quantifier and the existential quantifier.8 / 1PredicateLogic andQuantifiersCSE235Universal QuantifierDefinitionDefinitionThe universal quantification of a predicate P (x) is theproposition “P (x) is true for all values of x in the universe ofdiscourse” We use the notation∀xP (x)which can be read “for all x”If the universe of discourse is finite, say {n1, n2, . . . , nk}, thenthe universal quantifier is simply the conjunction of allelements:∀xP (x) ⇐⇒ P (n1) ∧ P (n2) ∧ · · · ∧ P (nk)9 / 1PredicateLogic andQuantifiersCSE235Universal QuantifierExample ILet P (x) be the predicate “x must take a discretemathematics course” and let Q(x) be the predicate “x is acomputer science student”.The universe of discourse for both P (x) and Q(x) is allUNL students.Express the statem ent “E very c omputer sc ience studentmust take a discrete mathematics course”.∀x(Q(x) → P (x))Express the statem ent “E verybody must take a discretemathematics course or be a computer science student”.∀x(Q(x) ∨ P (x))Are hetse statements true or false?10 / 1PredicateLogic andQuantifiersCSE235Universal QuantifierExample ILet P (x) be the predicate “x must take a discretemathematics course” and let Q(x) be the predicate “x is acomputer science student”.The universe of discourse for both P (x) and Q(x) is allUNL students.Express the statem ent “E very c omputer sc ience studentmust take a discrete mathematics course”.∀x(Q(x) → P (x))Express the statem ent “E verybody must take a discretemathematics course or be a computer science student”.∀x(Q(x) ∨ P (x))Are hetse statements true or false?10 / 1PredicateLogic andQuantifiersCSE235Universal QuantifierExample ILet P (x) be the predicate “x must take a discretemathematics course” and let Q(x) be the predicate “x is acomputer science student”.The universe of discourse for both P (x) and Q(x) is allUNL students.Express the statem ent “E very c omputer sc ience studentmust take a discrete mathematics course”.∀x(Q(x) → P (x))Express the statem ent “E verybody must take a discretemathematics course or be a computer science student”.∀x(Q(x) ∨ P (x))Are hetse statements true or false?10 / 1PredicateLogic andQuantifiersCSE235Universal QuantifierExample ILet P (x) be the predicate “x must take a discretemathematics course” and let Q(x) be the predicate “x is acomputer science student”.The universe of discourse for both P (x) and Q(x) is allUNL students.Express the statem ent “E very c omputer sc ience studentmust take a discrete mathematics course”.∀x(Q(x) → P (x))Express the statem ent “E verybody must take a discretemathematics course or be a computer


View Full Document

UNL CSCE 235 - Predicate Logic and Quantifiers

Documents in this Course
Logic

Logic

77 pages

Proofs

Proofs

82 pages

Induction

Induction

85 pages

Proofs

Proofs

52 pages

Sets

Sets

8 pages

Recursion

Recursion

16 pages

Proofs

Proofs

82 pages

Functions

Functions

71 pages

Recursion

Recursion

50 pages

Functions

Functions

54 pages

Graphs

Graphs

56 pages

Induction

Induction

32 pages

Relations

Relations

60 pages

Graphs

Graphs

10 pages

Recursion

Recursion

80 pages

Recursion

Recursion

81 pages

Functions

Functions

16 pages

Recursion

Recursion

16 pages

Sets

Sets

52 pages

Relations

Relations

60 pages

Load more
Download Predicate Logic and Quantifiers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Predicate Logic and Quantifiers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Predicate Logic and Quantifiers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?