0% found this document useful (0 votes)
30 views

Week 7 Predicate Logic

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Week 7 Predicate Logic

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Predicates and Objects

→ In first order logic propositions are decomposed into


,

predicates that describe properties of objects or relations


between objects
e.
g
Bob studies Logic
object predicate
He can be rewritten as

studies Logie bob) or S ( Bob )

Alice is
friends with Bob
object predicate object
be
↓ can rewritten as

Friends ( alice bob) ,


or F ( alice bob) ,

variables and Quantifiers



we can use variables my ,z as
,
_ .

placeholders for
arbitrary / unearned objects or individuals
↳ All of Atiees friends study logic

if ✗ is a friend of Alice ,
N studies
logic
He
f- ( alice , a) → S (a)

→ statement above still


how
incomplete
it is
as we need to
quantify
over which or
many
se
talking about

→ We use
quantifiers for this

→ we can
quantify over
any
variable se
appearing in a

formula by wrapping the formula with one of the quantifiers

the In
Universal Quantifier and Existential duantifier
there exists an x
" "

for all a
" "

All of A tiles friends study logic



for all n , if x is a friend of Alice ,
N studies
logic

the ( Fl alice a) ,
→ son) )
Functions and Terms

→ We can use functions to name (unique ) objects by their


relation to other object or objects

e.
g
Alice 's mother is a dentist
object function predicate
*
Dentist ( mother of ( alice ) )
_

Equality
→ we can
identify two terms equal with the as =
symbol
that acts
special predicate symbol
as a

Connie is Alice's mother


object eq object function

( Connie = mother _

of ( alice))
Another e.
g
for all se if R is even and x > 2
,
then there exists
,

such that y and and A- ytz


y and prime
is
z is prime 2-

Vn ( Even Cx) An > 2 3- Fz ( Prime (g) A Prime G) An ytz) =

y

Signature
→ The
signature or
vocabulary of a first order language is
a
triple
0 =
( ,
9- ,
G)
Predicate symbols Function
symbols constant symbols
9$ =
{P ,
D R,, . .
.
-

,
9- =
{ f. g ,
h ,
- .
-

,
8 =

{ alice
a b
, ,
C
,
. . .

Friends ,
. . . .

}
mother _
of ,
- - - -

} ,
_ . . .

These three make of predicate logic



up 6 or
signature
Terms

→ The terms of predicate logic are defined recursively


Variables :
Every variable n c- Vars is a term
Constants :
Every lenstant
symbol of 6 is a term
Functions of terms :
if t, ,
. .
tn C- Tm • and f E F is an
.
.

n -

any function symbol then 1- Lt tn) is a term , ,


_ _
.

Tm • =

{ all possible terms over 6


}
Formulas
also defined

Wffs over o are
recursively
Equality : if
tz C- Tmg are terms then 4=4 is formula
t
,
,
a

Predicates if t :
tn C- Tms are terms and PED is an
,
,
- - -

n-ary symbol then PCE ,tn) is formula ,


.
.
_ .
a

Boolean Connectives if F and G are formulae then F. ( Fna)


,

: >
,

CFV G) (F ,
G) and f- → G) formulae are

Quantifiers if F is a formula and ✗ Evans then Zoe F and


:

the F are formulae

Fml

=

{ all possible wfts over o }


scope
→ The scope of a
quantifier die for a ,
c- { it -3 } is the set
,

of positions
e. 9
Y n ( P C se
, g) → D C n ) ) 7 z R ( se
,
2- )
0 I 2 3 4 5 67 8 9 10 11121314 15 16 17 I 8 19 2021 2223


scope of first quantifier the are the positions
scope ( Vn)
=
{ 2 , 3,4 ; - .
-

,
14 }

Bound
an occurrence of a variable n is bound if its position
appears in the scope of a
matching quantifier tu or 7m

↳ Free
an occurrence of a variable is free if it is not bound

→ Formulas without free variables are a sentence

semantics of Predicate
Logic
→ A first order model is a
pair
M ( D I)
comprising
=
,
of
Domain :
Any finite or infinite set of objects
Interpretation :
an interpretation that associates each
symbol from with 0
appropriate an

predicate/ function/ object over the domain I


PI ≤ Dn f ? → D c- D
take each
for each
n-ary predicate for each n-ary we

symbol P
,
takes a set of function f. our constant
symbol
n tuples from our Domain function associates from our Domain
as
arguments an
appropriate function
that
maps 19^6-91
so a function that maps
our
symbols in 8^5
some unique symbol in
D
Variable
Assignments
→ a
function mapping each variable to an
object from our model
domain I
V : Vars → I

variable C- Vars and


→ Given a
assignment V
,
a

the

notation
a

to
domain object a C- D
,
we use
% ↳a ]
denote the modified
assignment given by
% { a if a= y
=

a ] ✓ (g) if
y≠
n

Interpret Ting Terms

→ Given a model M ( D I ) and


= variable assignment
,
a
"
V : vars → D ,
we define the interpretation t c- D of term a

t C- Tmo recursively as follows

Variables i if t is a variable C- Vars then tᵗ= Vcu )


n

Constants : if t is a constant symbol c C- 6 then E- c


±
=

Functions of terms : if t is of the form f- ( ti ,


^ _ .

,
tn ) then

±
t ¥ f- ( t ? .
ᵗ¥
,
_
.
.
,
Defining satisfiability
→ we define the
satisfiability of a formula H in a model M
under
assignment V
recursively as follows :

Predicates : if
of the form Pct
H is En ) then

. ,
. _

,
:

M V F Pct tn ) iff Lt ? t F) C- P
,
,
- -
. -

,
. . .
.

,
, ,

Equality if His of the form E Ez then


:
,
= :

t}

M V F Ct til if f- t, ,
=

,
=

Boolean if It is of the farm 7 F. En G) Er G) F- G) then


:
,
or → :

M V f- F if f- M V # F
,
>
,

M V f- ( FA G) iff M V F F and M V f- G
, , ,

M , V f- ( Fv G) iff M V f- For M V FG , ,

on V f- ( F G) iff MN FF implies eh VFG


,

,

Quantifiers if It is of the form the For 7nF then


: :

M V t-V-nt-iff-M.V.ge a) FF for all a C- D


, ↳

M V K 7nF iff
Mike + ] F- F for at least one a C- D
, >a

satisfiability and validity



we say that a first order formula F is satisfiable if :

M ,
V FF for some model M and some
assignment V
→ We that first order formula F is valid or a tautology if
say a :

M , V f- F for all models on and all assignments v


Logical consequence
→ We
say
that G is a
logical consequence of formulas F ,
. -
-

, Fn
when :

Fi ,
- - <

, Fn f- G iff M ,V f- G whenever
M , V f- Fi for i = 1
,
- - r

,
n

You might also like