You are on page 1of 3

PL Syntax Inductive Definition 1 : Entailment : a Knowledge Base(KB) HEART Exercise :

1. All atomic sentences A i(i in


entails a formula iff 1.G is a consequence of {F , F
1 , ...,
2
k
{1,2,...}) are formulas - If KB is true in a world (under a F }
k iff (( F
i=1 i) G ) is a tautology.
2. For every formula F , F is also assignment A ) then must also 1.A) If G is a consequence of {F ,
1

be true under that assignment F , ..., F } then ((ki=1F i) G) is a


a formula 2 k

. tautology.
3. For all formulas F and G, (F v G) A
1.B) If ((ki=1F i) G) is a tautology,
is also a formula. - A (KB) A ()
then G is a consequence of {F , F
1 2,
Model : KB
..., F }.
k
A: {A , A , . A n} {true, Logical inference : entailment can
1 2
Proof 1.A :
false} be used to derive conclusions by
carrying out logical inference KB|i - if G is consequence of
A is a model of F: |=AF
- can be derived from KB by {F 1, F 2, ..., F }. then every
k
A is not a model of F: |= F
A
procedure i
model of F i also a model of G.
is
Satisfiable : iff it has at least one k
John Orders Pizza : John orders - A ( ( i=1F i )=true
model. A(F) = true. pizza whenever it is late or he - then A (G) = true
Validity (tautology): iff every is tired, and he has worked all day in - therefore A ((ki=1F i) G) is also
possible truth assignment is a the lab. He is always tired when he
true by definition of semantics.
model for it. gets up early or he has worked all
Proof 1.B :
day in the lab. He has actually

m
A formula is valid: |=F k
- A (( i=1F i) G) is a tautology

er as
A set is satisfiable : {F1, F2,...,Fn} worked all day in the lab.
a=John orders pizza - If A (ki=1F i) = true

co
iff all the formulae in the set are
b=It is late

eH w
- then A (G) = true
true.
c=John is tired - If A is a model of {F , F , ..., F }
Circuit : 1 2 k

o.
d=John has worked all day in the then A is also a model of G.
rs e lab
- So, G is a consequence of F .
i
ou urc
e=John gets up early
2. G is a consequence of {F 1 2 ...,
, F ,
Prolog Translation : k
F } iff (( F ) G) is unsatisfiable.
a :- (b ; c) , d. k i=1 i

c :- e ; d. Validity : connected to inference via


o

d. the Deduction Theorem (HEART).


KB| = iff (KB ) is valid.
aC s

?- a
Satisfiability : connected to
vi y re

Prove a by Resolution
o ((p q) (p q)) (pxorq) CNF forms: inference. KB| = iff (KB ) is
(A B D) (A C D) unsatisfiable.
a (r o)
b (p q) (E C) (D C)
Equivalence Rules
ed d

D
s ((o r) (o r)) Contraposition:
Step Formula
ar stu

c (a b) (F G) (G F)
1 (A v ~B v ~D) Given Implication elimination:
(F G) (F G)
2 (A v ~C v ~D) Given
Double Implication Elimination:
sh is

3 (~E v C) Given (F G) ((F G) (G F ))


Evaluation :
Given : -> Find
: 4 (~D v C) Given Idempotency:
Th


(F F ) (F F ) F
A (p)=true A
(pvq)=true 5 D Given Commutativity:
A (q)=false A
(q)=true
6 ~A Neg. (F G) (G F )
Satisfaction : (F G) (G F )
Given : -> Find
: 7 (A v ~C) 2, 5
Associativity:
A (pvq)=true A
(p)=true 8 C 4, 5 ((A B) C) (A (B C))
A (q)=true A
(q)=false 9 A 7,8 Absorption:
A formula is a consequence of a (A (A B)) A
10 6, 9
Knowledge Base(KB), where KB = Double Negation
{F 1, F 2, ..., F k} iff F F
-for every truth assignment A Therefore ((ki=1F i) G) is Tautology:
If A is a model for KB then Ais unsatisfiable and G is a consequence (1 G) 1, (1 G) G
of F. Unsatisfiable:
also a model for i

A (KB) A () (0 G) G, (0 G) 0
KB
https://www.coursehero.com/file/11401132/COT3541-Midterm-Review/
Substitution Theorem : Deductive Inference Rules
:
prove: ((A (B C)) (C A))
((B A) C). by ST
Conjuctive Normal Form(CNF) :
((A B C) (B D) A (B C))
Given KB, prove conclusion S.
((A B) (C D)) KB |= S.
1.Eliminate implications
((A B) (C D))
2.deMorgans law. Step Formula Derivation
((A B) (C D)) 1 R1 : P Q given
3.Distribute or over and
((A (C D)) (B (C D))) 2 R2 : P R given
4.We get final CNF. 3 R3 : (Q R) S given

Horn formulas : 4 P 1 and-eli


If every disjunction in F contains at 5 R 4,2 Mod-Po
most one positive literal.
F ((A B) (C A D) (A B) 6 Q 1 and-eli

m
D E) 7 QR 5,6 and-int

er as
can be rewritten as
8 S (conclusion) 7,3Mod-Po

co
F ((B A) ((C A) D) ((A B) 0)

eH w
(1 D) (E 0)).
Recursion example :

o.
Use binary predicate d_taller
and
Validity
Soundness : rs e translate the following:
ou urc
Nick is taller than Mike
if something is provable from KB it is
Mike is taller than Sam
entailed by KB.
Sam is taller than Eve
Completeness : if KB |= then
trace:
o

KB |-
?- taller(nick, Who)
if something is entailed by KB, it is
aC s

provable.
vi y re

who is nick taller than? it must print


Mike and Sam and Eve.
Entailment :A Knowledge Base(KB)
entails
a formula iff
Facts:
- If KB is true in a world
1.
d_taller (nick, mike).
ed d

(under a assignment A) then 2.


d_taller (mike,sam).
ar stu

must also be true under 3.


d_taller (sam,eve).
that assignment .
A Rules:
- A (KB) A () 4.taller(X, Y) :- d_taller(X, Y).
- KB 5.taller(X, Z) :- d_taller(X, Y),
sh is

taller(Y,Z).
Th

Logical Inference Soundness : an


inference algorithm that derives only
Logical inference and
entailed sentences is sound.
Entailment : entailment can be used
- i is sound if
to derive conclusions by carrying out
- whenever KB|i (i derives
logical inference KB|i
from KB) is true.
- can be derived from KB by
- then KB| = (KB entails ) is
procedurei

also true!

Logical Inference Completeness :


an algorithm that can derive any
sentence that is entailed.
- i is complete if
- whenever KB| =
- KB|i also true

https://www.coursehero.com/file/11401132/COT3541-Midterm-Review/
?-taller(nick, who).
4

X=Nick d_taller(nick, who).


5 Y = Who 1

who = Mike ;

X=Nick d_taller(nick, Y), taller(Y, who)


Y = Who

m
co
Y = Mike taller(mike, who).

o.
4

er
X=Mike

H
d_taller(mike, who)
Y = Who

se
2

ur
5
who = Sam ;

Co
X=Mike

a
d_taller(mike, Y), taller(Y, who)
Y = Who

vi
d
re Y = Sam taller(sam, who).
ha
4
s
X=Sam
as

d_taller(sam, who)
Y = Who
3
w
ce

who = Eve ;
ur
so

X=Sam d_taller(sam, Y), taller(Y, who)


Y = Who
re
dy

Y = Eve taller(eve, who).


tu

https://www.coursehero.com/file/11401132/COT3541-Midterm-Review/
ss

Powered by TCPDF (www.tcpdf.org)