2 Predicates and Predicated Logic
-
Upload
anonymous-jsfvtuvh65 -
Category
Documents
-
view
220 -
download
0
Transcript of 2 Predicates and Predicated Logic
-
7/25/2019 2 Predicates and Predicated Logic
1/41
PREDICATES AND
PREDICATED LOGICLecture by
Ms. Cherry Rose R.Estabillo
MATH102C C.
-
7/25/2019 2 Predicates and Predicated Logic
2/41
MATH102C C.
Predicate Logic is a e!tesioo" Pro#ositioal Logic.
It $as used to e!#ress the%eaig o" $ide rage o"state%ets i %athe%atics
ad co%#uter sciece i$ays that #er%it us toreaso ad e!#lore
relatioshi#s bet$ee
PREDICATE LOGIC
-
7/25/2019 2 Predicates and Predicated Logic
3/41
Consider the statement
! " #! $ % & 2
'Com()ter ! is )nder atta*+,% ha*+ers.-
MATH102C C.
neither true nor falsewhen the values of thevariables are not specied
-
7/25/2019 2 Predicates and Predicated Logic
4/41
To *om(onents
The 'ariable / s),e*t o the statementPredicate/ reers to a (ro(ert% that thes),e*t o the statement *an hae.
MATH102C C.
-
7/25/2019 2 Predicates and Predicated Logic
5/41
MATH102C C.
Consider3 '! " #-
aria,4e !
P is 5reater than #Pro#ositioal "uctio Pat !( P)!*
P678P618
-
7/25/2019 2 Predicates and Predicated Logic
6/41
MATH102C C.
Consider3 '!$%&2-
aria,4e !3 %
Predi*ate 9Pro#ositioal "uctio + at!,y( +)!,y*
9613:896;3#8
-
7/25/2019 2 Predicates and Predicated Logic
7/41
MATH102C C.
A statement can have
more than onevariable.A statement o the orm
P6!13!23
-
7/25/2019 2 Predicates and Predicated Logic
8/41
MATH102C C.
Exercise
1.8 Let P6!8 denote thestatement '!>?.- @hat arethe tr)th a4)es
a.* P)* b* P)/*c.* P)0*
2.8 Let P6!8 denote thestatement 'the ord !
*ontains the 4etter a.- @hatare the tr)th a4)esa.* P)orage* b*
-
7/25/2019 2 Predicates and Predicated Logic
9/41
MATH102C C.
Determine the tr)th a4)es o the .statements
618 P6!8 :! & # : P6283 P6?8
628 P6!3 %8 2! / :% $ ? P603 18 3 P63 18
6:8 P6!3 %3 F8 ! / % F P613 13183 P623=13 08
THE TRTH ALES
-
7/25/2019 2 Predicates and Predicated Logic
10/41
MATH102C C.
aria,4e !
is an inte5er
9 is a rationa4 n)m,er
Jine is not an inte5er.
Jine is an inte5er and Fero is a rationa4
n)m,er.I nine is an inte5er3 then Fero is arationa4 n)m,er.
These propositions can be negatedor conjoined
-
7/25/2019 2 Predicates and Predicated Logic
11/41
MATH102C C.
Let P)!* be a state%eti'ol'ig the 'ariable ! adlet D be a set. 1e call P aPROPOSITIONAL 23NCTION)$rt D* i" "or each ! i D, P)!*
is a PROPOSITION. 1e call Dthe DOMAIN O2 DISCO3RSE.
PROPOSITIOJAL KJCTIOJ
-
7/25/2019 2 Predicates and Predicated Logic
12/41
MATH102C C.
Let
P6!8 ! & 2!2is a rationa4n)m,er.
D set o rationa4 n)m,ers
P6!8 St)dent ! s*ored (ere*t
in the test.
D set o st)dents in ST
-
7/25/2019 2 Predicates and Predicated Logic
13/41
MATH102C C.
+3ANTI2ICATION
- used to create a#ro#ositio "ro% a#ro#ositioal "uctio. It
e!#resses the e!tet to$hich a #redicate is trueo'er a rage o" ele%ets.
T1O T4PES O2+3ANTI2ICATION
)5*3NI6ERSAL
-
7/25/2019 2 Predicates and Predicated Logic
14/41
MATH102C C.
T9E 3NI6ERSAL +3ANTI2IER
Let P6!8 ,e a (ro(osition )n*tion ithdomain o dis*o)rse D.
The statement for every x, !x" is said to ,e3NI6ERSAL +3ANTI2IED STATEMENT.
The s%m,o4 6universal quantifer8means 'or eer% or or A44-
The statement 'or a44 !3 P6!8- *an ,eritten as !P6!8.
-
7/25/2019 2 Predicates and Predicated Logic
15/41
MATH102C C.
T9E 3NI6ERSAL +3ANTI2IER
The statement or a44 !3 P6!8 is TR3E
i P6!8 is tr)e or eer% ! in D.
The statement or a44 !3 P6!8 is 2ALSE
i P6!8 is a4se or at 4east one ! in
D.
-
7/25/2019 2 Predicates and Predicated Logic
16/41
MATH102C C.
)5*Let P)!* be the state%et : ! ; 7 uati?catio F!P)!*, $here thedo%ai cosist o" all o-egati'eitegers
)7* 1hat is the truth 'alue o" F!P)!*,$here P)!* is the state%et :!7B =ad the do%ai cosists o" itegers
greater tha
E!am(4es
-
7/25/2019 2 Predicates and Predicated Logic
20/41
MATH102C C.
Let P)!* be the state%et :! has
'isited the Museu%= $here thedo%ai cosists o" the studets 3ST.E!#ress each o" these
>uati?catios i Eglish.)5*!P)!*
)7*!P)!*
)*@!P)!*)/*@! P)!*
E!er*ises
-
7/25/2019 2 Predicates and Predicated Logic
21/41
MATH102C C.
2or each state%et, ?d ado%ai "or $hich the state%et is true ad do%ai$here the "ollo$ig state%et
is "alse.
5.* E'eryoe s#eaHs Ilocao.
7.* There is so%eoe older tha75 years.
E!er*ises
-
7/25/2019 2 Predicates and Predicated Logic
22/41
MATH102C C.
Traslate these state%ets ito
Eglish, $here C)!* is :! is aco%edia= ad 2)!* is :! is "uy=ad the do%ai cosists o" all
#eo#le.)5*@!)C)!* 2)!**
)7*!)C)!* 2)!**
)*@!)C)!* 2)!**)/*!)C)!* 2)!**
E!er*ises
-
7/25/2019 2 Predicates and Predicated Logic
23/41
MATH102C C.
E!er*iseLet C6!8 ,e the statement '! has a *at-3 4et D6!8 ,e
the statement '! has a do5-3 and 4et H6!8 ,e thestatement '! has a hamster-. E!(ress ea*h o thesestatement in terms o C6!83 D6!83 H6!83 )antiers3 and4o5i*a4 *onne*ties. Let the domain *onsist o a44st)dents in %o)r *4ass.
1.8 A st)dent in %o)r *4ass has a *at3 a do5 and ahamster.
2.8 A44 st)dent in %o)r *4ass has a *at3 a do5 or ahamster.
:.8 Some st)dent in %o)r *4ass has a *at and ahamster3 ,)t not a do5.
-
7/25/2019 2 Predicates and Predicated Logic
24/41
MATH102C C.
3NI+3ENESS +3ANTI2IERThe statement 'There e!ists a
)ni)e ! s)*h that P6!8 is tr)e-
or 'there is e!a*t4% one- or'there is one and on4% one- is ane!am(4e o )anti*ation )sin5
3NI+3ENESS +3ANTI2IER.And this *an ,e ritten as J
!P)!*.
OT9ER +3ANTI2IERS
-
7/25/2019 2 Predicates and Predicated Logic
25/41
MATH102C C.
+uati?ers $ith RestrictedDo%ai
To restri*t a domain3 an a,,reiatednotation is oten )sed
E!am(4e 1 @!B )!K
-
7/25/2019 2 Predicates and Predicated Logic
26/41
MATH102C C.
E!am(4e 2 @y )y *
here the domain is a44rea4 n)m,ers
The cube o a nonzero real
number is nonzero.
@y)y y*
-
7/25/2019 2 Predicates and Predicated Logic
27/41
MATH102C C.
The >uati?ers ad @ ha'ehigher #recedece tha alllogical o#eratios.
E!a%#le.
The co&uctio o" !P)!* ad+)!* ( )!P)!**+)!* rather tha!)P)!*+)!**.
PRECEDEJCE 9AJTIKIER
-
7/25/2019 2 Predicates and Predicated Logic
28/41
MATH102C C.
The o**)rren*e o the aria,4e is said to ,eBOUND hen the )antier is )sed onthe aria,4e.
The o**)rren*e o the aria,4e that is not,o)nd ,% a )antier is said to ,e F!!.
The (art o a 4o5i*a4 e!(ression to hi*h a
)antier is a((4ied *a44ed the"#O$!o)antier.
BIJDIJG ARIABLES
-
7/25/2019 2 Predicates and Predicated Logic
29/41
MATH102C C.
)5*@!)/! ; /y B7*
oud( ! )by ui'ersal >uati?er*
2ree( y Q
)7* !)P)!*+)!**@!R)!*
oud( all 'ariables
2ree( DOES NOT E8IST
Sco#e o" !( P)!*+)!* Sco#e o" @!(R)!*
E!am(4e
-
7/25/2019 2 Predicates and Predicated Logic
30/41
MATH102C C.
JEGATIJG 9AJTIKIEDENPRESSIOJS
NEGATION E+3I6ALEN
TSTATEMENT
19EN IS
NEGATIONTR3E
19EN IS
NEGATION 2ALSE
!P)!* @!P)!* 2or e'ery
!, P)!* is"alse
There is a !
"or $hichP)!* is true.
@!P)!*
!P)!* There is a! "or $hich
P)!* is"alse.
P)!* is true"or e'ery !.
Note( The rules "or egatios "or>uati?ers are called DE MORGANS LA1S
2OR +3ANTI2IERS
-
7/25/2019 2 Predicates and Predicated Logic
31/41
MATH102C C.
1hat are the egatios o"
5.* @!)!K
7.* !)!KU*
Sho$ that @!)P)!* +)!**ad !)P)!*+)!** arelogically e>ui'alet.
E!a%#les
-
7/25/2019 2 Predicates and Predicated Logic
32/41
MATH102C C.
T@O=PLACE PREDICATES arereerred to as re4ationa4
(redi*ates3 the% e!(ress are4ation ,eteen to*om(onents.
Let P6!3%8 ! is easier than %!P6!3 %8 Some ! is easier than %.
%P6!3%8 ! is easier than eer% %.
T1O VPLACE PREDICATES
-
7/25/2019 2 Predicates and Predicated Logic
33/41
MATH102C C.
T@O=PLACE PREDICATES arereerred to as re4ationa4
(redi*ates3 the% e!(ress are4ation ,eteen to*om(onents.
Let P is easier thanP6!3%8 ! is easier than %
!P6!3 %8 Some ! is easier than %.
T1O VPLACE PREDICATES
-
7/25/2019 2 Predicates and Predicated Logic
34/41
MATH102C C.
To )antiers are JESTED i one)antier is ithin the s*o(e o the other)antier.
ENAMPLE
!%66!086%0886!% 08
Consider that the domain o dis*o)rse or,oth aria,4es are rea4 n)m,ers.
'Kor a44 rea4 n)m,er ! and or a44 rea4n)m,er %3 i ! is 4ess than 0 or % 4essthan 03 then !% is 4ess than 0.-
JESTED 9AJTIKIERS
-
7/25/2019 2 Predicates and Predicated Logic
35/41
E!er*iseLet P6!3%8 ,e the statement 'st)dent !has ta+en %-3 here domain o ! *onsistso a44 st)dents o IICS and % *onsists oa44 Math *o)rses. E!(ress ea*h o these
)anti*ations in En54ish senten*es.1.8 !%P6!3%8 ?.8 !%P6!3%8
2.8 %!P6!3%8 #.8 !%P6!3%8
:.8 !%P6!3%8 .8 %!P6!3%8
THE ORDER OK
-
7/25/2019 2 Predicates and Predicated Logic
36/41
MATH102C C.
It is im(ortant to note that theorder o the )antier3 )n4ess a44the )antiers are
)niersa46e!istentia48 )antiers.
THE ORDER OK9AJTIKIERS
THE ORDER OK
-
7/25/2019 2 Predicates and Predicated Logic
37/41
MATH102C C.
Let P6!3 %8 2!% $ :! & %@hat are the tr)th a4)es o
!%P6!3 %8 %!P6!3 %8
!%P6!3 %8 !%P6!3 %8
!%P6!3 %8 %!P6!3 %8
here the domain or a44 aria,4es*onsists o a44 rea4 n)m,ers
THE ORDER OK9AJTIKIERS
9AJTIKICATIOJ OK T@O
-
7/25/2019 2 Predicates and Predicated Logic
38/41
MATH102C C.
9AJTIKICATIOJ OK T@OARIABLES
STATEMENT
19EN TR3E 19EN 2ALSE
@!@yP)!,y*@y@!P)!,
y*
P)!, y* is true "ore'ery #air !, y.
There is a #air !, y "or$hich P)!, y* is "alse.
@!yP)!,y*
2or e'ery !, thereis a y "or $hichP)!, y* is true.
There is a ! suchthat P)!, y* is "alse"or e'ery y.
!@yP)!,y*
There is a ! "or$hich P)!, y* istrue "or e'ery y.
2or e'ery ! there is ay "or $hich P)!, y* is"alse.
!yP)!,
y*
There is #air !, y
"or $hich P)!, y*
P)!, y* is "alse "or
e'ery !, y.
-
7/25/2019 2 Predicates and Predicated Logic
39/41
MATH102C C.
Let P6!3 %8 2! & % $#@hat are the tr)th a4)es o
!%P6!3 %8 %!P6!3 %8
!%P6!3 %8 !%P6!3 %8
!%P6!3 %8 %!P6!3 %8
here the domain or a44 aria,4es*onsists o a44 inte5ers
E!er*ise
-
7/25/2019 2 Predicates and Predicated Logic
40/41
MATH102C C.
1.8Let P6!3 %8 !Q & 1 " % & 1@hat are the tr)th a4)es o
a.8!%P6!3 %8 *.8 !%P6!3 %8
,.8 !%P6!3 %8 d.8 !%P6!3 %8
here the domain or a44 aria,4es *onsists oa44 inte5ers
2.8 E!(ress the ne5ations o ea*h statements
so that ne5ation s%m,o4s immediate4%(re*edes (redi*ates.
a.8 !%6P6!3%896!3%88
,.8 !%P6!3%8!%96!3%8
E!er*ise
JEGATIJG JESTED
-
7/25/2019 2 Predicates and Predicated Logic
41/41
02C C
E!(ress the ne5ations o ea*hstatements so that ne5ations%m,o4s immediate4% (re*edes
(redi*ates.1.8 !%6P6!3%896!3%88
2.8 !%P6!3%8!%96!3%8
JEGATIJG JESTED9AJTIKIERS