Download Nonmonotonic Logic - Default Logic

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Quantum logic wikipedia , lookup

Axiom of reducibility wikipedia , lookup

Laws of Form wikipedia , lookup

Natural deduction wikipedia , lookup

Truth-bearer wikipedia , lookup

Inquiry wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Set theory wikipedia , lookup

Mathematical logic wikipedia , lookup

Model theory wikipedia , lookup

List of first-order theories wikipedia , lookup

Principia Mathematica wikipedia , lookup

Theory wikipedia , lookup

Naive set theory wikipedia , lookup

Transcript
Nonmonotonic Logic
Default Logic
Sergio Tessaris
Default Rules
I
In default logic, nonmonotonic conclusions are represented in
terms of special inference rules.
I
Let A(x), B1 (x), . . . , Bn (x), C (x) be first-order formulas,
whose free variables are among x = x1 , . . . , xk . A default is an
expression of form
A(x) : B1 (x), . . . , Bn (x)
C (x)
I
Intuitive meaning:
I
I
for all objects x = x1 , . . . , xk , if A(x) is known and
B1 (x), . . . , Bn (x) can be consistently assumed, then infer
C (x).
Notation:
I
I
I
A(x) is the prerequisite ,
B1 (x), . . . , Bn (x) are the justifications, and
C (x) is the consequent
Examples
I
Prototypical reasoning:
Bird(x) : Flies(x)
Flies(x)
I
I
Typically, birds fly.
No-risk reasoning:
Accused(x) : Innocent(x)
Innocent(x)
I
The accused is innocent unless proven otherwise.
Examples (contd.)
I
Best-guess reasoning:
CurrentSolution(x) : BestSolution(x)
BestSolution(x)
I
I
In the absence of evidence to the contrary, assume that the
best solution found so far is the best one.
Subjective autoepistemic reasoning:
true : ¬HaveElderBrother
¬HaveElderBrother
I
I
In the absence of evidence to the contrary, assume that you
have no elder brother.
Models CWA as well
Special Cases
ϕ : ψ1 , . . . ψn
χ
I
Prerequisite-free if ϕ = true
: ψ1 , . . . ψn
χ
I
Justification-free if n = 0
I
Normal default if n = 1 and ψ1 = χ
ϕ:χ
χ
Default Theories
I
A default theory is a pair hW , Di where
I
I
I
I
W is a set of closed first-order formulas
D is a set of defaults
Elements of W represent certain, but incomplete, information
about the world (facts or axioms)
Elements of D enable the derivation of plausible conclusions
I
they hold typically, but they are not necessarily true
Semantics of Default Theories
I
Given the default
ϕ : ψ1 , . . . ψn
χ
the intended meaning is
If ϕ is known, and it is consistent to assume ψ1 , . . . ψn , then
assume χ.
I
In which context is ϕ known?
I
With what ψ1 , . . . ψn should be consistent?
I
With only the set of facts in W ?
Open and Closed Defaults
I
Given the default
A(x) : B1 (x), . . . , Bn (x)
C (x)
we consider two cases
closed no free variables
open with free variables
I
I
Original semantics: the set of all ground instances
I
I
alternative semantics in this case
free variables as “meta-variables” for ground terms
Semantics for Default theories is given for closed theories
Default Schema Example
I
Given the default schema
Bird(x) : Flies(x)
Flies(x)
I
and facts
Bird(Tweety ), Bird(Jonathan)
I
Theory corresponds to
Bird(Tweety ) : Flies(Tweety )
Flies(Tweety )
Bird(Jonathan) : Flies(Jonathan)
Flies(Jonathan)
Example: friend of a friend
I
Usually, the friend of my friend is my friend.
Friend(x, y ) ∧ Friend(y , z) : Friend(x, z)
Friend(x, z)
I
Let’s consider the following facts
Friend(Tom, Bob), Friend(Bob, Sally ), Friend(Sally , Tina)
I
Using facts and default we can derive the following:
Friend(Tom, Sally ), Friend(Bob, Tina)
I
But we cannot directly derive Friend(Tom, Tina)
I
This suggests an iterative approach
Example: Nixon Diamond
I
Let’s consider the defaults
Republican(x) : ¬Pacifist(x)
¬Pacifist(x)
Quaker (x) : Pacifist(x)
Pacifist(x)
I
With the facts
Republican(Nixon), Quaker (Nixon)
I
Using both the defaults we would conclude
Pacifist(Nixon) ∧ ¬Pacifist(Nixon)
I
“Applying” one of the rules should inhibit the other
Extensions
I
Consider a deductively closed set of closed FOL formulae E
Definition
A (closed) default
ϕ : ψ1 , . . . ψn
χ
is applicable to E iff ϕ ∈ E and ¬ψ1 6∈ E , . . . ¬ψn 6∈ E
I
An extension represents a possible world view (Beliefs)
I
When a default is applicable, then we can use it to draw
conclusions
How do we select E ?
I
I
I
Fixed point definition: pick E and check whether is fine
(original)
Operational definition
Extensions Desiderata
An extension E for a closed default theory hW , Di should
I
I
include the facts W
be deductively closed
I
I
I
be closed under the application of defaults; i.e. if
applicable, then χ ∈ E
I
I
I
do not stop unless forced to
extension are maximal sets w.r.t. defaults
minimal w.r.t. the above properties
I
I
to draw more conclusions, classical reasoning should not be
prevented
i.e. Th(E ) ⊆ E
i.e. how to stop
exclude “unfounded” formulae
Unfounded Extensions
I
Consider the theory
W = {Mollusc}
Mollusc : ShellBearer
}
D={
ShellBearer
I
The set
{Mollusc, ¬ShellBearer }
I
satisfies, the first 4 properties
What about ¬ShellBearer ?
I
we don’t want arbitrary unsupported facts
ϕ:ψ1 ,...ψn
χ
is
Example: Tweety
I
Consider the theory T = hW , Di:
W = {Bird(Tweety )}
Bird(Tweety ) : Flies(Tweety )
D=
Flies(Tweety )
I
Extension of T contains Bird(Tweety ) and Flies(Tweety )
Example: Tweety (contd.)
I
Consider the theory T 0 = hW 0 , Di where:
W 0 = W ∪ {Penguin(Tweety )
∀x(Penguin(x) → ¬Flies(x))}
I
Extension E 0 of T 0 must include W 0 and its deductive closure,
so ¬Flies(Tweety ) as well
I
Flies(Tweety ) cannot be consistently assumed any more
I
Then E 0 = Th(W 0 )
Example: Nixon Diamond
I
Consider the theory T = hW , Di:
W = {Republican(Nixon), Quaker (Nixon)}
Republican(x) : ¬Pacifist(x)
D = {δ1 =
¬Pacifist(x)
Quaker (x) : Pacifist(x)
δ2 =
}
Pacifist(x)
I
Defaults δ1 and δ2 are mutually conflicting
I
Two alternative extensions:
E1 = {Republican(Nixon), Quaker (Nixon), ¬Pacifist(Nixon)}
E2 = {Republican(Nixon), Quaker (Nixon), Pacifist(Nixon)}
Definition of Extensions
Given a closed default theory T = hW , Di, its semantics is defined
by means of a set of closed formulae (extension) E .
I given a set of formulae E , the closure operator ΓT (E ) is the
smallest set S s.t.
I
I
I
W ⊆S
Th(S) = S
for all rules
ϕ : ψ1 , . . . ψn
χ
in D, if ϕ ∈ S, and ¬ψ1 6∈ E , . . . ¬ψn 6∈ E ; then χ ∈ S
I
E is the “context” for testing the applicability of defaults
Definition of Extensions (contd.)
I
E is an Extension of T iff E = ΓT (E ) (fixpoint of ΓT (·))
I
ΓT (E ) exists for any E
What about the fixpoint?
I
I
I
ΓT is monotonic in hW , Di
but anti-monotonic in its argument;i.e.
S1 ⊆ S2 implies ΓT (S2 ) ⊆ ΓT (S1 )
I
I
there can be multiple fixpoints
fixpoint existence is not guaranteed!
Operator ΓT
I
remember justification free rules:
ϕ:
χ
they can be seen as classical rules χ ← ϕ
I
reduct of D relative to S DS
ϕ : ϕ : ψ1 , . . . ψn
DS =
|
∈ D, ¬ψ1 6∈ S, . . . ¬ψn 6∈ S
χ
χ
I
Let `DS be the classical inference ` with the addition of rules
in DS
ThDS (W ) = {ϕ | ϕ is closed , W `DS ϕ}
I
ΓT can be defined as
ΓT (S) = ThDS (W )
Bounding Principle
I
The set ThDS (W ) can be defined in terms of Th(·)
I
ThDS (W ) = Th(W
S
i≥0
Ei )
ϕ:
E0 = χ |
∈ DS , W ` ϕ
χ
ϕ:
Ei = χ |
∈ DS , W ∪ Ei−1 ` ϕ
χ
I
This restricts the kind of derivations we can get, i.e.
E = Th(W ∪ G )
n
o
ϕ:ψ1 ,...ψn
where G ⊆ χ |
∈D
χ
I
This provides a way to select candidates for extensions
Example: Nixon Diamond
I
Propositional version of the example, T is
W ={q, r }
q : p r : ¬p
D=
,
p
¬p
I
meaning:
I
I
I
q Nixon is a Quaker
r Nixon is a Republican
p Nixon is a pacifist
Example (contd.)
I
Four candidate extensions
E1 =Th({q, r })
E2 =Th({q, r , p})
E3 =Th({q, r , ¬p})
E4 =Th({q, r , p, ¬p})
I
I
Construction of ΓT (Ei ):
q: r:
DE1 =
,
p ¬p
q:
DE2 =
p
r:
DE3 =
¬p
DE4 =∅
ΓT (E1 ) = Th({q, r , p, ¬p})
ΓT (E2 ) = Th({q, r , p})
ΓT (E3 ) = Th({q, r , ¬p})
ΓT (E4 ) = Th({q, r })
Extensions of T : E2 , E3
Example (contd.)
I
Extend W with additional knowledge:
W 0 = W ∪ {s, ¬p ← s} = {q, r , s, ¬p ← s}
I
I
Still 4 candidate extensions
I
I
I
Note that ¬p ∈ Th(W 0 )
E1 =Th(W 0 )
E3 =
Th(W 0 ∪ {¬p})
E2 =Th(W 0 ∪ {p})
E4 =
Th(W 0 ∪ {p, ¬p})
Note that E1 = E3 and E2 = E4
Construction of ΓT (Ei ):
r:
DE1 =
¬p
DE2 =∅
E1 is the only extension
ΓT (E1 ) = Th(W 0 )
ΓT (E2 ) = Th(W 0 )
Example: Non-Existence of Extensions
I
Consider the theory
W ={p}
p : ¬q
D=
q
I
Two candidate extensions
E1 =Th({p})
E2 =Th({p, q})
I
I
Construction of ΓT (Ei ):
p:
DE1 =
q
DE2 =∅
ΓT (E1 ) = {p, q}
ΓT (E2 ) = {p}
There are no extensions for the given theory
Example: Join Consistency of Justifications
I
Consider a theory with the defaults
: p : ¬p
,
D=
q
r
I
This theory has the single extension Th({q, r })
I
justifications doesn’t need to be consistent
Example: Join Consistency of Justifications (contd.)
I
Consider two cars c1 and c2 , and you know that one of them
is broken (but not which one); i.e.
W = {broken(c1 ) ∨ broken(c2 )}
I
By default you assume that you can use your car, unless you
know is broken
: usable(c1 ) ∧ ¬broken(c1 ) : usable(c2 ) ∧ ¬broken(c2 )
,
D=
usable(c1 )
usable(c2 )
I
Both defaults are applicable, and you get the extension
Th(W ∪ {usable(c1 ), usable(c2 )})
Note on Joint Consistent Justification
I
Note that
ϕ : ψ1 , . . . , ψn
χ
is not equivalent to
ϕ : ψ1 ∧ . . . ∧ ψn
χ
I
E.g. the sentence
I
If I don’t know p I assume q
corresponds to
I
: p, ¬p
q
Which is different from
: p ∧ ¬p
q
Semi-Recursive Characterisation of Extensions
I
Given a default theory T = hW , Di and set of closed formulae
E , the sequence Ei , i ≥ 0 is
E0 = W
Ei+1
I
n ϕ : ψ ,...ψ
1
n
∈ D, Ei ` ϕ,
= Th(Ei ) ∪ χ |
χ
o
¬ψ1 6∈ E , . . . ¬ψn 6∈ E
Definition E has a quasiinductive definition in T iff
[
E=
Ei
i≥0
I
Theorem: E is an extension of T iff it has a quasiinductive
definition in T
Semi-Recursive Characterisation of Extensions (contd.)
I
This definition replaces the ΓT (·) operator
I
Given a context E this definition is more intuitive
However, it doesn’t provide an effective procedure
I
I
The set E needs to be guessed anyway
I
Nevertheless it’s an useful tool to analyse properties of the
framework
I
There is an alternative Operational definition due to G.
Antoniou
Maximality of Extensions
I
I
Theorem: Let T = hW , Di be a closed theory and E , E 0
extensions of T . If E ⊆ E 0 , the E = E 0 .
Proof
I
I
S
S
E = i≥0 Ei and E 0 = i≥0 Ei0
by induction: Ei0 ⊆ Ei . Trivial for i = 0; assume Ei0 ⊆ Ei
0
Ei+1
Ei+1
I
therefore
S
n ϕ : ψ ,...ψ
1
n
=
∪ χ|
∈ D, Ei0 ` ϕ,
χ
o
0
0
¬ψ1 6∈ E , . . . ¬ψn 6∈ E
n ϕ : ψ ,...ψ
1
n
= Th(Ei ) ∪ χ |
∈ D, Ei ` ϕ,
χ
o
¬ψ1 6∈ E , . . . ¬ψn 6∈ E
Th(Ei0 )
i≥0
Ei0 ⊆
S
i≥0
Ei
Extensions and Consistency
In the following we consider closed theories without
justification-free defaults, and Ei defined as before given an E .
S
I Theorem Let E =
i≥0 Ei , then E is consistent iff W is
consistent.
I T has an inconsistent extension iff W is inconsistent.
I
I
I
If W is inconsistent, then Th(W ) is an extension of T
If E is an inconsistent extension, then by the previous theorem
W is inconsistent as well
If T has an inconsistent extension, then it is the only
extension of T .
I
I
I
let E an inconsistent extension of T , then W is inconsistent
too
an arbitrary extension E 0 must be inconsistent, since W ⊆ E 0
Th(E ) = Th(E 0 ) = the set of all formulae, so E = E 0
(extensions include their deductive closure)
Proof of the Theorem
⇒ W = E0 ⊆ E , since E =
S
i≥0 Ei .
⇐ Assume E inconsistent, we know that E = Th(E ); therefore
for every ϕ closed formula, ϕ ∈ E .
I
take Ei+1 = Th(Ei ) ∪ ∆i , where
n
o
ϕ : ψ1 , . . . ψn
∆i = χ |
∈ D, Ei ` ϕ, ¬ψ1 6∈ E , . . . ¬ψn 6∈ E
χ
I
I
I
∆i = ∅, because D doesn’t contain any justification-free
default
S
E = i≥0 Ei = Th(E0 ) = Th(W )
since E is inconsistent, then W must be inconsistent as well.
Normal Default Theories
I
Normal defaults have the form
ϕ:χ
χ
I
A default theory T = hW , Di is normal iff all defaults in D
are normal.
I
Normal theories enjoy stronger properties
I
They’re strictly less expressive than arbitrary theories
Properties of Normal Default Theories
I
I
Each closed normal default theory has an extension
If a closed normal default theory T = hW , Di has two distinct
extensions E , E 0 , then E ∪ E 0 is inconsistent.
I
I
both extensions cannot be simultaneously accepted
Semi-Monotonicity Let D, D 0 be sets of closed normal defaults
s.t. D ⊆ D 0 , and let E be an extension of T = hW , Di.
Then, T 0 = hW , D 0 i has an extension E 0 s.t. E ⊆ E 0 .
Reasoning Tasks: Propositional Theories
Given a default theory T = hW , Di, we consider the following
reasoning tasks.
I Existence does T have an extension?
I
I
Brave reasoning a formula ϕ is a brave consequence of a
default theory T iff there is an extension of T containing ϕ.
I
I
problem is ΣP2 -complete
Skeptical reasoning a formula ϕ is a skeptical consequence of
a default theory T iff ϕ is in all extensions of T .
I
I
problem is ΣP2 -complete (i.e. solvable by a Turing machine in
class NP using an NP oracle)
problem is ΠP2 -complete (i.e. solvable by a Turing machine in
class coNP using an NP oracle)
These results hold for propositional theories
Complexity in FOL Default Theories
I
I
Decidability for brave reasoning is guaranteed for closed
normal theories on top of a decidable FOL fragment
Decidability of the FOL fragment used don’t guarantee
decidability in the case of open theories
I
I
open default represent an (possibly) infinite set of closed
defaults where variables are substituted with term of the
Herbrand universe.
Other results are based on related formalisms (e.g. Logic
Programs with negation)
References
1. Reiter, R. 1980. A logic for default reasoning. Artificial
Intelligence 13, 81-132.
2. Antoniou, G. 1999. A tutorial on default logics. ACM
Computing Surveys 31, 4 (Dec. 1999), 337-359.
http://doi.acm.org/10.1145/344588.344602
3. W. Marek, A. Nerode, Nonmonotonic Reasoning,
Encyclopedia of Computer Science and Technology. vol. 34,
pages 281–289, Marcel Dekker, 1994. http://cs.engr.uky.
edu/~marek/papers.dir/94.dir/encyclopaedia.pdf
4. M. Cadoli and M. Schaerf. A survey of complexity results for
nonmonotonic logics. Journal of Logic Programming, 17,
127–160, 1993.
http://citeseer.ist.psu.edu/cadoli93survey.html
5. V. Lifschitz, On open defaults. Computational Logic:
Symposium Proceedings, pp. 80-95, 1990. http:
//www.cs.utexas.edu/users/vl/mypapers/open.ps