Logic and Discrete Math Lecture notes Predicate...
Transcript of Logic and Discrete Math Lecture notes Predicate...
![Page 1: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/1.jpg)
1
Weixiong ZhangWashington University in St. Louis
http://www.cse.wustl.edu/~zhang/teaching/cse240/Spring10/index.html
CSE 240Logic and Discrete Math
Lecture notes Predicate Logic
![Page 2: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/2.jpg)
2
Today
Chapter 2.1
All i
mag
es a
re c
opyr
ight
ed t
o th
eir
resp
ectiv
e co
pyrig
ht h
olde
rs a
nd r
epro
duce
d he
re fo
r ac
adem
ic p
urpo
ses
unde
r th
e co
nditi
on o
f “fa
ir us
ing”
.
![Page 3: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/3.jpg)
3
The Big Picture
Logic is being used to verify validity of arguments
An argument is valid iff its conclusion logically follows from the premises
Derivations are used to prove validity
Inference rules are used as part of derivations
![Page 4: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/4.jpg)
4
Summary
Logical implication/entailment:A entails/logically implies BB follows from AA∴B is a valid argumentA is a sufficient condition for BB is a necessary condition for AIf A holds then B holdsA may be “stronger than” BFormula X=(AB) is a tautology
![Page 5: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/5.jpg)
5
Summary
Equivalence:A ≡ BA holds iff B holdsA is a criterion for B, B is a criterion for AA B, B AA and B are “equivalently strong”Formula X=(AB) is a tautology
![Page 6: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/6.jpg)
6
Clarification #1
We have used the following expressions synonymously:
A entails BA logically implies B(A therefore B) is a valid argumentB logically follows from A
In reality there are some subtle differencesTechnically we mean:
“A logically implies B”Every model for A is also a model for B
![Page 7: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/7.jpg)
7
Clarification #2Can computers generate a derivation/proof given a conclusion and a set of premises?
Propositional logic is decidable:the tabular methodapplication of inference rules
Predicate logic is semi-decidableIf a proof exists then it can (theoretically) be found by machinesIf the proof doesn’t exist then the algorithm may not stop
![Page 8: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/8.jpg)
8
Clarification #3
Derivation of a statement: a sequence of statementsstart with the premiseseach statement logically follows from the previous statementsat some point the conclusion is arrived at
Derivations are annotated with the inference rules used
![Page 9: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/9.jpg)
9
Limitations of Propositional Logic
Let’s get back to Socrates“All people are mortal”“Socrates is a man”“Socrates is mortal”
Can we formalize this in propositional logic?Our previous attempt was:
“If Socrates is a man then Socrates is mortal”“Socrates is a man”“Socrates is mortal”
Clearly NOT the same!
![Page 10: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/10.jpg)
10
What is the matter?
The problem is:We operate with constant objects onlyWe have no domain context and no domain variablesWe cannot say “all”, “is a”, etc.
Solution?Predicate Logic
![Page 11: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/11.jpg)
11
Predicate LogicLogic objects (constants/variables):
P, Q, R, …true, false
Connectives:&, v, , …
Domain objects (constants/variables):Socrates, CSE240
Predicates:Mortal(Socrates)TaughtAtWashU(CSE240)Happened(snow,yesterday)
Quantifiers:For all, Exists
Statements/formulae:Atomic, conjunctive, etc.Quantified (universally / existentially)
![Page 12: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/12.jpg)
12
Translation Examples“Every man is mortal”
Define man(X), mortal(x)∀x [man(X) mortal(x)]
“Socrates is a man”man(Socrates)
“Socrates is mortal”mortal(Socrates)
The last statement logically follows from the premises (by universal elimination)Q: how about define man-mortal(x)?
Granularity of the representation unit of objects or concept to present
![Page 13: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/13.jpg)
13
More translations“Ducks fly”
Define duck(x), flies(x)∀x [duck(x) flies(x)]
“F-16s fly”Define F-16(x) ∀x [F-16(x) flies(x)]
“F-16s are ducks”∀x [F-16(x) duck(x)]
The last statement does not logically follow from the premisesWhat if we define duck-flies(x)?
![Page 14: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/14.jpg)
14
Translation Examples“Every person is a Knave or a Knight”
define person(x), Knave(x) and Knight(x)This can be translate to IF… THEN…∀x [person(x) [Knave(x) v Knight(x)]]
“Every person is a Knave or a Knight but not both”
∀x [person(x) [Knave(x) v Knight(x)] & ~[Knave(x) & Knight(x)]]
![Page 15: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/15.jpg)
15
Translation Examples“Nothing is better than God”
Define better-than(x,y)Different ways to say this …
∀x [~better-than(x,God)]~[∃x better-than(x,God)]
“A (any) sandwich is better than nothing”Define sandwich(x)∀x [sandwich(x) better-than(x,Nothing)]
“A sandwich is better than God”∀x [sandwich(x) better-than(x,God)]
The last statement does not logically follow from the premises
![Page 16: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/16.jpg)
16
Translation Examples“No man lives forever”
First define man(x) and lives-forever(x)Different ways to say this …
If a man (any), then will not live forever
∀x [man(x) ~lives-forever(x)]Different ways to say this …
It’s not true that …There is a man and the man lives forever
~[∃x [man(x) & lives-forever(x)]]
![Page 17: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/17.jpg)
17
Translation Examples
“Everyone likes CSE240”define WashU-student(x), likes(x,y)∀x [WashU-student(x) likes(x,CSE240)]
“Someone likes CSE240”∃x [WashU-student(x) likes(x,CSE240)]
Is this correct?
∃x [WashU-student(x) & likes(x,CSE240)]
![Page 18: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/18.jpg)
18
Translation Examples
“no even number is a prime except 2”define even(x), prime(x)∀x [even(x) ~prime(x)]What about except 2?
Equal(x,2)
∀x [even(x) & ~equal(x,2) ~prime(x) ]
![Page 19: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/19.jpg)
19
Predicate LogicLogic objects (constants/variables):
P, Q, R, …true, false
Connectives:&, v, , …
Domain objects (constants/variables):Socrates, CSE240
Predicates:Mortal(Socrates)TaughtAtWashU (CSE240)Happened(snow,yesterday)
Quantifiers:For all, Exists
Statements/formulae:Atomic, conjunctive, etc.Quantified (universally / existentially)
![Page 20: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/20.jpg)
20
Domain Objects
We can now have variables and constants of a non-Boolean nature:
Socrates is a constant (a specific member) in the set of all peopleX is a variable over the set of people
i.e., X can be any personWe can instantiate X=Socrates
Domain of a variable is the set of values it can take on
![Page 21: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/21.jpg)
21
PredicatesIn other words:
Predicates take domain objects and map them to true/false depending on the properties of the objects
Predicate = a property of an object we want testThus, a predicate with all its variables instantiated is a statement (i.e., true/false)
Example:BetterThan(v1,v2)BetterThan(Ferrari,nothing)=true
![Page 22: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/22.jpg)
22
Truth SetSuppose P(x) is “x is a factor of 8”So how about the following:
P(1)TrueP(2)TrueP(0)False
The set of all x such that P(x) holds is called the truth set of P(x)
Here it would be {1,2,4,8}The truth set of some predicate can be infinite
![Page 23: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/23.jpg)
23
Examples
Suppose P(x,y,r) is “x2+y2=r2”What is the truth set of P(x,y,5)?
Circle with the radius of 5 centered in the origin
Suppose P(n) is “n is an even three-digit prime number”What is the truth set of P(n)?
An empty set
![Page 24: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/24.jpg)
24
Propositional Logic?
But what about our dearly beloved propositional statements?
P v Q
Here P and Q are propositional/Boolean variables/statementsThey don’t take any domain objectsThey simply hold or don’t hold
How can we have them in the predicate logic?
![Page 25: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/25.jpg)
25
Fear Not!
A Boolean variable/constant (e.g., P=true) is simply a 0-arity predicate:
P()
So propositional logic is back!Example: propositional Modus Ponens:
P Q P() Q()P P()Thus, Q Thus, Q()
![Page 26: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/26.jpg)
26
Predicate Formulae
Everything from propositional logicBoolean variables become 0-arity predicates…
Additionally:Predicates, e.g.:
Mortal(x)Universally quantified formulae, e.g.:
∀x [man(x) mortal(x)]Existentially quantified formulae, e.g.:
∃x [man(x) & likes(x,240)]
![Page 27: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/27.jpg)
27
Recall: interpretation
In propositional logic interpretation is a mapping/assignment of all propositional variables to true/false
Example:Formula: A v BInterpretation: II(A)=trueI(B)=falseI(A v B)=true
![Page 28: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/28.jpg)
28
Extended InterpretationsIn predicate calculus to specify an interpretation we need to:
Select domain sets Assign all domain constantsAssign semantics to all predicates
Example:Predicate formula: D=(∀x [likes(x,c240)])A possible interpretation assigns:
Domain set for x : peopleDomain value for 2nd argument of likes(a,b) : thingsDomain value for constant c240 : class CSE240Semantics for predicate likes(a,b) : holds iff person a likes object b
![Page 29: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/29.jpg)
29
Evaluating formulaePredicate formula: D=(∀x [likes(x,cse240)])
A possible interpretation assigns:Domain set for x : peopleDomain value for 2nd argument of likes(a,b) : thingsDomain value for constant cse240 : class cse240Semantics for predicate likes(a,b) : holds iff person alikes object b
So what is the value of formula D given the interpretation? True/false?
How can we tell?
![Page 30: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/30.jpg)
30
Evaluating Formula0-arity predicate : P()
Interpretation directly
Predicate with variables : P(x)Use the assignment of x and the semantics of P()
Universally quantified formula : ∀x P(x)Evaluates to true iff P(x) holds on all possible values of x
Existentially quantified formulae : ∃x P(x)Evaluates to true iff P(x) holds on at least one possible value of x
![Page 31: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/31.jpg)
31
Today
Chapter 2.1
Chapter 2.2
Chapter 2.3
All i
mag
es a
re c
opyr
ight
ed t
o th
eir
resp
ectiv
e co
pyrig
ht h
olde
rs a
nd r
epro
duce
d he
re fo
r ac
adem
ic p
urpo
ses
unde
r th
e co
nditi
on o
f “fa
ir us
ing”
.
![Page 32: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/32.jpg)
32
The Plan
Up to date we have considered an informal introduction to predicate logic
We will introduce predicate logic formally today and dwell on subtle moments
![Page 33: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/33.jpg)
33
Predicate Logic (simplified)Boolean variables
P, Q, R, … can be T/FE.g., P=“5 is a prime number”
Connectives:&, v, , , ~
Domain variablesA,B,C,… draw values from a domain setsE.g., j is a variable over integer numbers
Predicates:P(X1,…,XN),… map from domain inputs to T/FE.g., P(j) = “j is a prime number”
Quantifiers:For all ∀, Exists ∃E.g., [∀j prime(j)] = “any number is a prime number”
Statements/formulae:Atomic, unit, negated, conjunctive, …, universally/existentially quantifiedE.g., [∀j [even(j) & ~equal(j,2) ~prime(j) ]] = “no even numbers are prime except 2”
![Page 34: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/34.jpg)
34
Note
Notice that we did away with 0-arity predicates such as P(), etc.
Any Boolean variable is a 0-arity predicate so we will just drop the parentheses…
![Page 35: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/35.jpg)
35
Def : Well-formed Formulae
A well-formed formula/sentence (wff) is a construction defined recursively:
Any Boolean variable is a wffAny predicate is a wffFor any wff X, ~(X) is a wffTwo wffs parenthesized and connected by v,&,, form a wff. For any wff X and a domain variable k:
∀k (X) is a wff∃k (X) is a wffHere X is within the scope of ∀k (or ∃k)
![Page 36: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/36.jpg)
36
Find wffs…
∀x [man(X) mortal(x)]∀x [sandwich(x) better-than(x,Nothing)]∀x [duck(x) flies(x)]~[∃x [man(x) & lives-forever(x)]]∀x [man(x) ~lives-forever(x)]∀x [person(x) [Knave(x) v Knight(x)]]∀x [person(x) [Knave(x) v Knight(x)]] & ~[Knave(x) & Knight(x)]
![Page 37: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/37.jpg)
37
Def : Interpretations
Interpretation for a wff Φ:Assigns T/F values to all Boolean variablesDefines a domain set for each domain variableDefines all predicates
Example: consider wff Φ = (∀j prime(j)) & PA possible interpretation:
Boolean variable P=TDomain variable j runs over integer numbersPredicate prime(x) holds iff x is a prime number
![Page 38: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/38.jpg)
38
Interpretation ExampleConsider wff:
∀x ∃y Likes(x,y)
Does it hold?Depends on the interpretation!
Interpretation: Domain set for x,y is {Angela,Belinda,Jean}Define predicate Likes(liker,liked) as:
Likes(Angela,Belinda)Likes(Belinda,Angela)Likes(Jean,Belinda)Likes(Jean,Angela)
Does it hold in this interpretation?Yes
![Page 39: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/39.jpg)
39
Model / Countermodel
Formula Φ holds given an interpretation I:Φ is satisfied by IThen Φ is satisfiableThen I is a model for Φ
Formula Φ doesn’t hold given I: Φ is not satisfied (or falsified) by IThen I is a countermodel for Φ
![Page 40: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/40.jpg)
40
Tautologies & Contradictions
Formula Φ holds under any interpretation IΦ is valid
Φ is a tautology
Formula Φ doesn’t hold under any IΦ is a contradiction
Φ is unsatisfiable
![Page 41: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/41.jpg)
41
Example
Define Predicate P(X) as “person X drinks beer”
Consider∃x∀y [P(x) P(y)]“There exists a person such that if he/she drinks beer then everyone drinks beer”
True or false?
![Page 42: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/42.jpg)
42
Contingencies
Φ holds under any interpretation tautologyΦ does NOT hold under any interpretation contradictionWhat if Φ holds under some interpretations but not other?
Then Φ is a contingency
![Page 43: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/43.jpg)
43
Classify…
P & ~PP v ~PP & Q∀x P(x)∀x ((P(x) Q(x)) & P(x)) Q(x)∀x (P(x) v ~P(x)) (P(x) & ~P(x))
![Page 44: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/44.jpg)
44
Bindings & ScopeA variable can be free:
Sharp(X)
…or bound to a quantifier∀x P(x)
If variable X is bound to a quantifier then there is a binding between themThen X is said to be in the quantifier’s scopeHow about:
∀x ∀y (equal(x,y) v P(z) & (∃y B(x,y)))∀x ∃y P(x) & Q(x,y) v R(y)
CSE240 is case-sensitive! X is not the same as x
![Page 45: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/45.jpg)
45
Free variables Given an interpretation we can evaluate a formula, e.g.:
∀x ∃y Likes(x,y)
Consider the following formula:∃y Likes(x,y)
Suppose you are given the interpretation I:Domain set for x,y is {Angela,Belinda,Jean}Define predicate Likes(liker,liked) as:
Likes(Angela,Belinda)Likes(Jean,Belinda)Likes(Jean,Angela)
Is ∃y Likes(x,y) satisfied by I ?Cannot tell – x is a free variable…
![Page 46: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/46.jpg)
46
Substitutions
A wff that can be evaluated to T/F given an interpretation is called a statementFormulae with free variables may not be statements
That is so because an interpretation doesn’t touch free domain variables
A substitution “complements” an interpretation by assigning (substituting) all free domain variables
![Page 47: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/47.jpg)
47
Example Revisit the formula:
∃y Likes(x,y)Suppose you are given the interpretation I:
Domain set for x,y is {Angela,Belinda,Jean}Define predicate Likes(liker,liked) as:
Likes(Angela,Belinda)Likes(Jean,Belinda)Likes(Jean,Angela)
Additionally you have a substitution S:Free domain variable x is set to Angela
Is ∃y Likes(x,y) satisfied by I and S?Yes…
![Page 48: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/48.jpg)
48
Updated Definition
Formula Φ holds given an interpretation I and a substitution S:
Φ is satisfied by I and SThen Φ is satisfiableThen I and S form a model for Φ
Formula Φ doesn’t hold given I and S : Φ is not satisfied (or falsified) by I and SThen I and S form a countermodel for Φ
![Page 49: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/49.jpg)
49
Updated Definition
Formula Φ holds under every interpretation I and substitution S
Φ is valid
Φ is a tautology
Formula Φ doesn’t hold under any I andsubstitution S
Φ is a contradiction
Φ is unsatisfiable
![Page 50: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/50.jpg)
50
Updated Definition
Φ holds under some interpretations and substitutions but not others?
Then Φ is a contingency
![Page 51: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/51.jpg)
51
Note 1
Many formulae with free variables cannot be tautologies or contradictions
Their value depends on the substitution
However, some can:Likes(x,y) v ~Likes(x,y)… is a tautology despite two free variables
![Page 52: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/52.jpg)
52
Implicit Quantifiers
If x > 2 then x2 > 4
Textbook:∀ real numbers x, if x>2 then x2 > 4
More formally:∀x [x>2 ∃y square(x,y) & y>4]where predicates square(a,b) and c>d are defined over the set of real numbers
Implicit quantifiers
Implicit quantifiers
![Page 53: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/53.jpg)
53
Domain FunctionsConsider the last statement again:∀ real numbers x, if x>2 then x2 > 4Is it a wff? No! Why?
Well x2 is not a predicate and is not a variableIt is a domain function (square)!
We have not formally introduce domain functions
But we will use them anyway for the sake of:SimplicityConsistency with the text book
![Page 54: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/54.jpg)
54
Conversion to Predicates
The use of domain functions is justified:Because they can be expressed through domain predicates
Example:let function f map numbers to numbers:
f(n)=m
Then whenever we see f(x) in our wffWe will change it (with some care) to:
∃y Pf(x,y)Where Pf(n,m) holds iff f(n)=m
![Page 55: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/55.jpg)
55
Evaluating FormulaeBoolean variables
Interpretation directly
Predicate with variables : Likes(x)Use the assignment of x and the semantics of Likes()
Universally quantified formula : ∀x P(x)Evaluates to true iff P(x) holds on all possible values of x
Existentially quantified formulae : ∃x P(x)Evaluates to true iff P(x) holds on at least one possible value of x
![Page 56: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/56.jpg)
56
ExamplesConsider formula D:
∃x (x2 > x)Assume the standard algebraic interpretation
Suppose the domain set for variable x is {2,3,4}Does D hold or not?
Yes : 4>2
Suppose the domain set for variable x is the segment [0,1]Does S hold or not?
No : all numbers between 0 and 1 have their squares not greater than the number itself
![Page 57: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/57.jpg)
57
SummaryGIVEN a particular interpretation
To show that a ∀-quantified formula holds:Exhaust all possibilities – show that all examples satisfy the formula
To show that a ∀-quantified formula does NOT hold:Find a falsifying example
To show that a ∃-quantified formula holds:Find a satisfying example
To show that a ∃-quantified formula does NOT hold:Exhaust all possibilities and show that all examples falsify the formula
![Page 58: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/58.jpg)
58
Summary
How about classifying a formula:Tautology / Contradiction / Contingency
Contingencies are, perhaps, the easiest:Need to find a model and a counter-model
Tautologies / contradictions:Need to show that all possible interpretations satisfy/falsify the formulaMore difficult
![Page 59: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/59.jpg)
59
Restricted ∀-QuantifiersInformal:
Any number greater than 2 is positiveFormal:
∀x [x>2 x>0]Formal shorthand (“syntactic sugar”):
∀x>2 [x>0]Common mistake:
Use of & instead of ∀x [x>2 & x>0]“Any number is greater than 2 and greater 0”How about 1?
![Page 60: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/60.jpg)
60
Restricted ∃-QuantifiersInformal:
There is a positive solution to x2=1
Formal: ∃x [x>0 & x2=1]
Formal shorthand (“syntactic sugar”): ∃x>0 [x2=1]
Common mistake:Use of instead of &∃x [x>0 x2=1]“There exists a number such that if it is positive then it is a solution to x2=1”This formula is satisfied by any interpretation that contains 0among the numbers
![Page 61: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/61.jpg)
61
Restricted ∃-QuantifiersAnother example of…Common mistake: use of instead of &
“There exists an immortal man”
Correct:∃x [man(x) & ~mortal(x)]
Incorrect:∃x [man(x) ~mortal(x)]“There exists something such that if it is a man then it is immortal”
The latter formula is satisfied by any interpretation that allows x to run over non-man objects
E.g., x can be a duck satisfying the formula
![Page 62: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/62.jpg)
62
Limitations
It is Ok to use the shorthand with:Algebraic predicates: e.g., x>0Set membership: e.g., x∈D
Why?Because it is clear that your quantifiers is applied to the variable which follows it immediately:
∃x>0 [x2=1]
It is not Ok to use such shorthands with other predicates:
E.g., ∃P(x) [x2=1]
![Page 63: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/63.jpg)
63
Special cases : finite domains
Suppose you have a formula over a single variable x
If the domain of variable x is finite:{x1,…,xN}
Then ∀x P(x) is equivalent to:P(x1) & … & P(xN)
And ∃x P(x) is equivalent to:P(x1) v … v P(xN)
![Page 64: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/64.jpg)
64
Satisfying ∀/∃ statements
To show that ∀x P(x) we need to:Prove that every x satisfies P(x)
To show that ∃x P(x) we need to:Prove that there exists at least one x that satisfies P(x)
![Page 65: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/65.jpg)
65
De Morgan again…
To show that ~(∀x P(x)) we need to:Prove that not every x satisfies P(x)In other words, we need to find at least one x that does not satisfy P(X)But that is the same as proving that ∃x ~P(x)
Therefore:~(∀x P(x)) ∃x (~P(x))
are logically equivalentDe Morgan’s law for quantifiers
![Page 66: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/66.jpg)
66
And again…To show that ~(∃x P(x)) we need to:
Prove that there does not exists a single x satisfiesP(x)In other words, we need to show that all x do notsatisfy P(X)But that is the same as proving that ∀x ~P(x)
Therefore:~(∃x P(x)) ∀x (~P(x))
are logically equivalentDe Morgan’s law for quantifiers
![Page 67: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/67.jpg)
67
Examples
Statement:“Everyone snoozes in CSE240”
Negation:“Not every one snoozes in CSE240”“There is someone who doesn’t snooze in CSE240”
A common mistake:“Everyone does NOT snooze in CSE240”
![Page 68: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/68.jpg)
68
Examples
Statement:“Professors don’t make much money”
Negation:“There is a professor who makes a lot of money”
A common mistake:“Professors make much money”
![Page 69: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/69.jpg)
69
ExamplesStatement:
There is a secret agent who appeals to all women
Negation:For every secret agent there is a woman that the agent doesn’t appeal to
A common mistake:There is a secret agent who doesn’t appeal to all women
![Page 70: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/70.jpg)
70
In the nutshell…
When negating a quantified formula:Quantifier1 x1… QuantifierN xN P(x1,..,xN)
Do this:Change all ∃ to ∀Change all ∀ to ∃Negate the innermost formula P(…)
Be careful with scoping and connectives!
![Page 71: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/71.jpg)
71
Vacuous Truth of UQs
Suppose I say:“Presently, all men on the moon are happy”
Is it true or false?Think of it this way:
∀x [OnTheMoon(x) Happy(x)]
So, is it true or false?The internal implication is always vacuously true for there is presently no man on the MoonThus, the entire statement holds for any x
The entire statement holds
![Page 72: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/72.jpg)
72
Logical Implication
In propositional logic formula A logically implies formula B iff:
Every interpretation that satisfies A also satisfies B
In predicate logic?The same!
![Page 73: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/73.jpg)
73
Validity of Arguments
Hence validity of arguments is defined in the same way
The difference is: in predicate logic it is not always possible to go through all interpretations to prove that A logically implies B
Why?The number of interpretations can be infinite
![Page 74: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/74.jpg)
74
Inference Rules
Thus, proving arguments with inference rules becomes the (only) method of choice
We can also derive new inference rules for our toolbox
![Page 75: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/75.jpg)
75
Universal Instantiation
Consider a universally quantified statement:∀x∈D [P(x)]
Suppose you have a particular x0∈DWhat can you say about P(x0)?
It holds!
Why? Because predicate P(…) holds for all members of set DExample: “mortal Socrates” argument
![Page 76: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/76.jpg)
76
Universal Modus Ponens
Propositional modus ponens PQPThus, Q
Universal modus ponens∀x [P(x)Q(x)]P(a)Thus, Q(a)
![Page 77: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/77.jpg)
77
Diagrams for Validity
Diagrams can sometimes be used to:support a validity of an argumentor, show that an argument is invalid
Diagrams are not a formal proof!Use them to illustrate your reasoning ONLYExamples:
Valid : Modus PonensInvalid : abduction
mortal
human
Socrates pneumonia
fever
patient
![Page 78: Logic and Discrete Math Lecture notes Predicate Logiczhang/teaching/cse240/Spring10/PredLogic.pdf · follows from the premises ... A Boolean variable/constant (e.g., P=true) ... The](https://reader034.fdocuments.net/reader034/viewer/2022051407/5ad9d6207f8b9a53618bc7d0/html5/thumbnails/78.jpg)
78
Summary predicate logicEverything from propositional logicDomain variables, objectsUniversal/existential quantifiersWFF – grammar to write sentencesScope of a quantiferRepresentation
Every student takes CSE240Someone takes CSE240
De morgan’s law on negation with quantifiers