Default logic: Difference between revisions
weak extensions |
corrected many minor mistakes + specified what happens when defaults contain free variables |
||
Line 1: | Line 1: | ||
[[Category:Logic]] |
[[Category:Logic]] |
||
'''Default logic''' is a [[non-monotonic logic]] proposed by [[Ray Reiter]] to formalize |
'''Default logic''' is a [[non-monotonic logic]] proposed by [[Ray Reiter]] to formalize reasoning with default assumptions. |
||
Default logic can express facts like “by default, something is true”; by contrast, standard logic can only express that something is true or that something is false. This is a problem because |
Default logic can express facts like “by default, something is true”; by contrast, standard logic can only express that something is true or that something is false. This is a problem because reasoning often involves facts that are true in the majority of cases but not always. A classical example is: “birds typically fly”. This rule can be expressed in standard logic either by “all birds fly”, which is inconsistent with the fact that penguins do not fly, or by “all birds that are not penguins and not ostriches and ... fly”, which requires all exceptions to the rule to be specified. Default logic aims at formalizing inference rules like this one without explicitely mention all their exceptions. |
||
==Syntax of Default Logic== |
==Syntax of Default Logic== |
||
A default theory is a pair <math>\langle D, W \rangle</math>. <math>W</math> is a set of logical formulae, called ''the background theory'', that formalize the facts that are known for sure. <math>D</math> is a set of |
A default theory is a pair <math>\langle D, W \rangle</math>. <math>W</math> is a set of logical formulae, called ''the background theory'', that formalize the facts that are known for sure. <math>D</math> is a set of ''default rules'', each one being of the form: |
||
: <math>\frac{Prerequisite : Justification_1, ..., Justification_n}{Conclusion}</math> |
: <math>\frac{Prerequisite : Justification_1, ..., Justification_n}{Conclusion}</math> |
||
According to this default, if we believe that <math>Prerequisite</math> is true, and each of <math>Justification_i</math> is consistent with our current beliefs, we are lead to believe that <math>Conclusion</math> is true. |
|||
The logical formulae in <math>W</math> |
The logical formulae in <math>W</math> and all formulae in a default were originally assumed to be [[first-order logic]] formulae, but they can potentially be formulae in an arbitrary formal logic. The case in which they are formulae in [[propositional logic]] is one of the most studied. |
||
===Examples=== |
===Examples=== |
||
The default rule “birds typically fly” is formalized by the following |
The default rule “birds typically fly” is formalized by the following default: |
||
:<math>D = \left\{ \frac{Bird(X) : Flies(X)}{Flies(X)} \right\}</math> |
:<math>D = \left\{ \frac{Bird(X) : Flies(X)}{Flies(X)} \right\}</math> |
||
Line 20: | Line 20: | ||
This rule means that, if <math>X</math> is a bird, and it can be assumed that it flies, then we can conclude that it flies. A background theory containing some facts about birds is the following one: |
This rule means that, if <math>X</math> is a bird, and it can be assumed that it flies, then we can conclude that it flies. A background theory containing some facts about birds is the following one: |
||
:<math>W = \{ Bird(Condor), Bird(Penguin), \neg Flies(Penguin), Flies(Eagle |
:<math>W = \{ Bird(Condor), Bird(Penguin), \neg Flies(Penguin), Flies(Eagle) \}</math>. |
||
According to this default rule, a condor flies because the precondition <math>Bird(Condor)</math> is true and the justification <math>Flies(Condor)</math> is not inconsistent with what is currently known. On the contrary, <math>Bird(Penguin)</math> does not allow concluding <math>Flies(Penguin)</math>: even if the precondition of the default <math>Bird(Penguin)</math> is true, the justification <math>Flies(Penguin)</math> is inconsistent with what is known. |
|||
On the contrary, <math>Bird(Penguin)</math> does not allow concluding <math>Flies(Penguin)</math>. Indeed, even if the precondition of the default <math>Bird(Penguin)</math> is true, the default rule cannot be applied because its justification <math>Flies(Penguin)</math> is inconsistent with what is known. |
|||
From this background theory and this default, <math>Bird(Eagle)</math> cannot be concluded because the default rule only allows deriving |
From this background theory and this default, <math>Bird(Eagle)</math> cannot be concluded because the default rule only allows deriving |
||
<math>Flies(X)</math> from <math>Bird(X)</math>, but not vice versa. Deriving the antecedents from the consequences is a form of explanation of the consequences, and is the aim of [[ |
<math>Flies(X)</math> from <math>Bird(X)</math>, but not vice versa. Deriving the antecedents of an inference rule from the consequences is a form of explanation of the consequences, and is the aim of [[abductive reasoning]]. |
||
A common default |
A common default assumption is that what is not known to be true is believed to be false. This is known as the [[Closed World Assumption]], and is formalized in default logic using a default like the following one for every fact <math>F</math>. |
||
: <math>\frac{:{\neg} |
: <math>\frac{:{\neg}F}{{\neg}F}</math> |
||
For example, the computer language [[Prolog]] uses a sort of default assumption when leading with negatation: if a negative atom cannot be proved to be true, then it is assumed to be false. |
For example, the computer language [[Prolog]] uses a sort of default assumption when leading with negatation: if a negative atom cannot be proved to be true, then it is assumed to be false. |
||
Note, however, that [[Prolog]] uses the so-called [[negation as failure]]: when the interpreter has to evaluate the atom <math>\neg |
Note, however, that [[Prolog]] uses the so-called [[negation as failure]]: when the interpreter has to evaluate the atom <math>\neg F</math>, it tries to prove that <math>F</math> is true, and conclude that <math>\neg F</math> is true if it fails. In default logic, instead, a default having <math>\neg F</math> as a justification can only be applied if <math>\neg F</math> is consistent with the current knowledge. |
||
===Restrictions=== |
===Restrictions=== |
||
A default |
A default is categorical or prerequisite-free if it has no prerequisite (or, equivalently, its prerequisite is tautological). A default is normal if it has a single justification that is equivalent to its conclusion. A default is seminormal if it is both categorical and normal. A default is seminormal if all its justifications entail its conclusion. A default theory is called categorical, normal, supenormal, or seminormal if all defaults it contains are categorical, normal, supernormal, or seminormal, respectively. |
||
categorical, normal, or seminormal, respectively. |
|||
==Semantic of Default Logic== |
==Semantic of Default Logic== |
||
A default rule can be applied to a |
A default rule can be applied to a theory if its precondition is entailed by the theory and its justifications are all consistent with the theory. The application of a default rule lead to the addition of its consequence to the theory. Other default rules may then be applied to the resulting theory. When the theory is such that no other default can be applied, the theory is called an extension of the default theory. The default rules may be applied in different order, and this may lead to different extensions. The [[Nixon diamond]] example is a default theory with two extensions: |
||
The default rules may be applied in different order, and this may lead to different extensions. The [[Nixon diamond]] example is a default theory with two extensions: |
|||
:<math> |
:<math> |
||
Line 57: | Line 54: | ||
in which <math>Pacifist(Nixon)</math> is false. |
in which <math>Pacifist(Nixon)</math> is false. |
||
The original semantics of default logic was based on the [[Fixed point (mathematics)|fixed point]] of a function. The following is an equivalent definition. A default <math>\frac{\alpha:\beta_1,\ldots,\beta_n}{\gamma}</math> is applicable to a propositional theory <math>T</math> if <math>T \models \alpha</math> and |
The original semantics of default logic was based on the [[Fixed point (mathematics)|fixed point]] of a function. The following is an equivalent algorithmic definition. If a default contain formulae with free variables, it is considered to represent the set of all defaults obtained by giving a value to all these variables. A default <math>\frac{\alpha:\beta_1,\ldots,\beta_n}{\gamma}</math> is applicable to a propositional theory <math>T</math> if <math>T \models \alpha</math> and |
||
all theories <math>T \cup \{\beta_i\}</math> are consistent. The application of this default to <math>T</math> leads to the theory <math>T \cup \{\gamma\}</math>. An extension can be generated by applying the following algorithm: |
all theories <math>T \cup \{\beta_i\}</math> are consistent. The application of this default to <math>T</math> leads to the theory <math>T \cup \{\gamma\}</math>. An extension can be generated by applying the following algorithm: |
||
T=W /* current theory */ |
|||
T=W |
|||
A=0 /* set of defaults applied so far */ |
|||
A=0 |
|||
|
|||
/* apply a sequence of defaults */ |
|||
while there is a default d that is not in A and is applicable to T |
while there is a default d that is not in A and is applicable to T |
||
add the consequence of d to T |
add the consequence of d to T |
||
add d to A |
add d to A |
||
|
|||
/* final consistency check */ |
|||
if |
if |
||
for every default d in A |
for every default d in A |
||
Line 71: | Line 72: | ||
output T |
output T |
||
This algorithm is [[non-deterministic]], as several defaults can be |
This algorithm is [[non-deterministic]], as several defaults can alternatively be applied to a given theory <math>T</math>. In the Nixon diamond example, the application of the first default leads to a theory to which the second default cannot be applied and vice versa. As a result, two extensions are generated: one in which Nixon is a pacifist and one in which Nixon is not a pacifist. |
||
The final check of consistency of the justifications of all defaults that have been applied makes some theories not having any extension. In particular, this happens whenever this check fails for every possible sequence of applicable defaults. The following default theory has no extension: |
The final check of consistency of the justifications of all defaults that have been applied makes some theories not having any extension. In particular, this happens whenever this check fails for every possible sequence of applicable defaults. The following default theory has no extension: |
||
Line 84: | Line 85: | ||
</math> |
</math> |
||
Since <math>A(b)</math> is consistent with the background theory, the default can be applied, thus leading to the conclusion that <math>A(b)</math> is false. This result undermines the assumption that |
Since <math>A(b)</math> is consistent with the background theory, the default can be applied, thus leading to the conclusion that <math>A(b)</math> is false. This result however undermines the assumption that has been made for applying the first default. Consequently, this theory has no extensions. |
||
has been made for applying the first default. According to the original semantic of default logic, this theory has no extensions. |
|||
A normal default theory is guaranteed to have at least one extensions. Furthermore, the extensions of a normal default theory are mutually inconsistent, i.e., inconsistent with each other. |
A normal default theory is guaranteed to have at least one extensions. Furthermore, the extensions of a normal default theory are mutually inconsistent, i.e., inconsistent with each other. |
||
Line 97: | Line 97: | ||
; Credulous : a formula is entailed by a default theory if it is entailed by at least one of its extensions. |
; Credulous : a formula is entailed by a default theory if it is entailed by at least one of its extensions. |
||
For example, the Nixon diamond example theory has two extensions, one in which Nixon is a pacifist and one in which he is not a pacifist. Consequently, neither <math>Pacifist(Nixon)</math> nor <math>\neg Pacifist(Nixon)</math> are skeptically entailed, |
For example, the Nixon diamond example theory has two extensions, one in which Nixon is a pacifist and one in which he is not a pacifist. Consequently, neither <math>Pacifist(Nixon)</math> nor <math>\neg Pacifist(Nixon)</math> are skeptically entailed, while both of them are credulously entailed. As this example shows, the credulous consequences of a default theory may be inconsistent with each other. |
||
===Alternative Semantics=== |
===Alternative Semantics=== |
||
<!-- these are the alternative semantics that are based on the same original syntax of default logic --> |
|||
The following alternative semantics of default logic are all based on the same syntax of the original one. |
The following alternative semantics of default logic are all based on the same syntax of the original one. |
||
; Justified : differs from the original one in that a default |
; Justified : differs from the original one in that a default is not applied if that makes the set <math>T</math> being inconsistent with a justification of an applied default; |
||
; Concise : a default |
; Concise : a default is applied only if its consequence is not already entailed by <math>T</math> (the exact definition is more complicated than this one; this is only the main idea behind it); |
||
; Constrained : a default |
; Constrained : a default is applied only if the set composed of the background theory and the justifications and the consequences of all applied defaults (including this one) is consistent; |
||
; Rational : similar to constrained default logic, but the consequence of the default to add is not considered in the consistency check. |
; Rational : similar to constrained default logic, but the consequence of the default to add is not considered in the consistency check. |
||
Line 115: | Line 117: | ||
==Variants of Default Logic== |
==Variants of Default Logic== |
||
<!-- these are the variants of default logic that differ from the original one both in syntax and semantics --> |
|||
The following variants of default logic differ from the original one on both syntax and semantics. |
|||
⚫ | ; Assertional variants : An assertion is a pair <math>\langle p: \{r_1,\ldots,r_n\} \rangle</math> composed of a formula and a set of formulae. Such a |
||
⚫ | ; Assertional variants : An assertion is a pair <math>\langle p: \{r_1,\ldots,r_n\} \rangle</math> composed of a formula and a set of formulae. Such a pair indicates that <math>p</math> is true while the formulae <math>r_1,\ldots,r_n</math> have been assumed consistent to prove that <math>p</math> is true. An assertional default theory is composed of an assertional theory (a set of assertional formulae) called the background theory and a set of defaults defined as in the original syntax. Whenever a default is applied to an assertional theory, the pair composed of its consequence and its set of justifications is added to the theory. The following semantics use assertional theories: |
||
*Cumulative default logic |
*Cumulative default logic |
||
Line 123: | Line 127: | ||
*Quasi-default logic |
*Quasi-default logic |
||
; Weak extensions : rather than checking whether the preconditions are valid in the theory composed of the background theory and the consequences of the defaults |
; Weak extensions : rather than checking whether the preconditions are valid in the theory composed of the background theory and the consequences of the applied defaults, the preconditions are checked for validity in the extension that will be generated; in other words, the algorithm for generating extensions starts by guessing a theory and using it in place of the background theory; what results from the process of extension generation is actually an extension only it is equivalent to the theory guessed at the beginning. This variant of default logic is related in principles to [[autoepistemic logic]], where a theory <math>\Box x \rightarrow x</math> has the model in which <math>x</math> is true just because, assuming <math>\Box x</math> true, the formula <math>\Box x \rightarrow x</math> supports the initial assumption. |
||
; Disjunctive default logic : the consequence of a default |
; Disjunctive default logic : the consequence of a default is a set of formulae instead of a single formula. Whenever the default is applied, at least one of its consequences is nondeterministically chosen and made true. |
||
; Priorities on defaults : the relative priority of defaults can be explicitely specified; among the defaults that are applicable to a theory, only one of the most preferred ones can be applied. Some semantics of default logic do not require priorities to be explicitely specified; rather, more specific defaults (those that are applicable in fewer cases) are preferred over less specific ones. |
; Priorities on defaults : the relative priority of defaults can be explicitely specified; among the defaults that are applicable to a theory, only one of the most preferred ones can be applied. Some semantics of default logic do not require priorities to be explicitely specified; rather, more specific defaults (those that are applicable in fewer cases) are preferred over less specific ones. |
||
; Statistical variant : a statistical default is a default with an attached upper bound on its frequency of error; in other words, the default is assumed to be an incorrect inference rule |
; Statistical variant : a statistical default is a default with an attached upper bound on its frequency of error; in other words, the default is assumed to be an incorrect inference rule in at most that fraction of times it is applied. |
||
<!-- variants of default logic: these are the semantics which are based on a syntax that is different from the original one --> |
|||
==Complexity== |
==Complexity== |
Revision as of 13:26, 10 August 2005
Default logic is a non-monotonic logic proposed by Ray Reiter to formalize reasoning with default assumptions.
Default logic can express facts like “by default, something is true”; by contrast, standard logic can only express that something is true or that something is false. This is a problem because reasoning often involves facts that are true in the majority of cases but not always. A classical example is: “birds typically fly”. This rule can be expressed in standard logic either by “all birds fly”, which is inconsistent with the fact that penguins do not fly, or by “all birds that are not penguins and not ostriches and ... fly”, which requires all exceptions to the rule to be specified. Default logic aims at formalizing inference rules like this one without explicitely mention all their exceptions.
Syntax of Default Logic
A default theory is a pair . is a set of logical formulae, called the background theory, that formalize the facts that are known for sure. is a set of default rules, each one being of the form:
According to this default, if we believe that is true, and each of is consistent with our current beliefs, we are lead to believe that is true.
The logical formulae in and all formulae in a default were originally assumed to be first-order logic formulae, but they can potentially be formulae in an arbitrary formal logic. The case in which they are formulae in propositional logic is one of the most studied.
Examples
The default rule “birds typically fly” is formalized by the following default:
This rule means that, if is a bird, and it can be assumed that it flies, then we can conclude that it flies. A background theory containing some facts about birds is the following one:
- .
According to this default rule, a condor flies because the precondition is true and the justification is not inconsistent with what is currently known. On the contrary, does not allow concluding : even if the precondition of the default is true, the justification is inconsistent with what is known. From this background theory and this default, cannot be concluded because the default rule only allows deriving from , but not vice versa. Deriving the antecedents of an inference rule from the consequences is a form of explanation of the consequences, and is the aim of abductive reasoning.
A common default assumption is that what is not known to be true is believed to be false. This is known as the Closed World Assumption, and is formalized in default logic using a default like the following one for every fact .
For example, the computer language Prolog uses a sort of default assumption when leading with negatation: if a negative atom cannot be proved to be true, then it is assumed to be false. Note, however, that Prolog uses the so-called negation as failure: when the interpreter has to evaluate the atom , it tries to prove that is true, and conclude that is true if it fails. In default logic, instead, a default having as a justification can only be applied if is consistent with the current knowledge.
Restrictions
A default is categorical or prerequisite-free if it has no prerequisite (or, equivalently, its prerequisite is tautological). A default is normal if it has a single justification that is equivalent to its conclusion. A default is seminormal if it is both categorical and normal. A default is seminormal if all its justifications entail its conclusion. A default theory is called categorical, normal, supenormal, or seminormal if all defaults it contains are categorical, normal, supernormal, or seminormal, respectively.
Semantic of Default Logic
A default rule can be applied to a theory if its precondition is entailed by the theory and its justifications are all consistent with the theory. The application of a default rule lead to the addition of its consequence to the theory. Other default rules may then be applied to the resulting theory. When the theory is such that no other default can be applied, the theory is called an extension of the default theory. The default rules may be applied in different order, and this may lead to different extensions. The Nixon diamond example is a default theory with two extensions:
Since Nixon is both a Republican and a Quaker, both defaults can be applied. However, applying the first default leads to the conclusion that Nixon is not a pacifist, which makes the second default not applicable. In the same way, applying the second default we obtain that Nixon is a pacifist, thus making the first default not applicable. This particular default theory has therefore two extensions, one in which is true, and one in which is false.
The original semantics of default logic was based on the fixed point of a function. The following is an equivalent algorithmic definition. If a default contain formulae with free variables, it is considered to represent the set of all defaults obtained by giving a value to all these variables. A default is applicable to a propositional theory if and all theories are consistent. The application of this default to leads to the theory . An extension can be generated by applying the following algorithm:
T=W /* current theory */ A=0 /* set of defaults applied so far */ /* apply a sequence of defaults */ while there is a default d that is not in A and is applicable to T add the consequence of d to T add d to A /* final consistency check */ if for every default d in A T is consistent with all justifications of d then output T
This algorithm is non-deterministic, as several defaults can alternatively be applied to a given theory . In the Nixon diamond example, the application of the first default leads to a theory to which the second default cannot be applied and vice versa. As a result, two extensions are generated: one in which Nixon is a pacifist and one in which Nixon is not a pacifist.
The final check of consistency of the justifications of all defaults that have been applied makes some theories not having any extension. In particular, this happens whenever this check fails for every possible sequence of applicable defaults. The following default theory has no extension:
Since is consistent with the background theory, the default can be applied, thus leading to the conclusion that is false. This result however undermines the assumption that has been made for applying the first default. Consequently, this theory has no extensions.
A normal default theory is guaranteed to have at least one extensions. Furthermore, the extensions of a normal default theory are mutually inconsistent, i.e., inconsistent with each other.
Entailment
A default theory can have zero, one, or more extensions. Entailment of a formula from a default theory can be defined in two ways:
- Skeptical
- a formula is entailed by a default theory if it is entailed by all its extensions;
- Credulous
- a formula is entailed by a default theory if it is entailed by at least one of its extensions.
For example, the Nixon diamond example theory has two extensions, one in which Nixon is a pacifist and one in which he is not a pacifist. Consequently, neither nor are skeptically entailed, while both of them are credulously entailed. As this example shows, the credulous consequences of a default theory may be inconsistent with each other.
Alternative Semantics
The following alternative semantics of default logic are all based on the same syntax of the original one.
- Justified
- differs from the original one in that a default is not applied if that makes the set being inconsistent with a justification of an applied default;
- Concise
- a default is applied only if its consequence is not already entailed by (the exact definition is more complicated than this one; this is only the main idea behind it);
- Constrained
- a default is applied only if the set composed of the background theory and the justifications and the consequences of all applied defaults (including this one) is consistent;
- Rational
- similar to constrained default logic, but the consequence of the default to add is not considered in the consistency check.
The justified and constrained semantics assign at least an extension to every default theory.
Variants of Default Logic
The following variants of default logic differ from the original one on both syntax and semantics.
- Assertional variants
- An assertion is a pair composed of a formula and a set of formulae. Such a pair indicates that is true while the formulae have been assumed consistent to prove that is true. An assertional default theory is composed of an assertional theory (a set of assertional formulae) called the background theory and a set of defaults defined as in the original syntax. Whenever a default is applied to an assertional theory, the pair composed of its consequence and its set of justifications is added to the theory. The following semantics use assertional theories:
- Cumulative default logic
- Committment to assumptions default logic
- Quasi-default logic
- Weak extensions
- rather than checking whether the preconditions are valid in the theory composed of the background theory and the consequences of the applied defaults, the preconditions are checked for validity in the extension that will be generated; in other words, the algorithm for generating extensions starts by guessing a theory and using it in place of the background theory; what results from the process of extension generation is actually an extension only it is equivalent to the theory guessed at the beginning. This variant of default logic is related in principles to autoepistemic logic, where a theory has the model in which is true just because, assuming true, the formula supports the initial assumption.
- Disjunctive default logic
- the consequence of a default is a set of formulae instead of a single formula. Whenever the default is applied, at least one of its consequences is nondeterministically chosen and made true.
- Priorities on defaults
- the relative priority of defaults can be explicitely specified; among the defaults that are applicable to a theory, only one of the most preferred ones can be applied. Some semantics of default logic do not require priorities to be explicitely specified; rather, more specific defaults (those that are applicable in fewer cases) are preferred over less specific ones.
- Statistical variant
- a statistical default is a default with an attached upper bound on its frequency of error; in other words, the default is assumed to be an incorrect inference rule in at most that fraction of times it is applied.
Complexity
The computational complexity of the following problems about default logic is known:
- Existence of extensions
- deciding whether a propositional default theory has at least one extension is -complete;
- Skeptical entailment
- deciding whether a propositional default theory skeptically entails a propositional formula is -complete;
- Credulous entailment
- deciding whether a propositional default theory credulously entails a propositional formula is -complete;
- Extension checking
- deciding whether a propositional formula is equivalent to an extension of a propositional default theory is -complete;
- Model checking
- deciding whether a propositional interpretation is a model of an extension of a propositional default theory is -complete.
References
G. Antoniou. A tutorial on default logics. ACM Computing Surveys, 31(4):337-359, 1999.
J. P. Delgrande, T. Schaub, and W. K. Jackson. Alternative approaches to default logic. Artificial Intelligence, 70(1-2):167-237, 1994.
G. Gottlob. Complexity results for nonmonotonic logics. Journal of Logic and Computation 2(3): 397-425. 1992
W. Lukaszewicz. Considerations on default logic: an alternative approach. Computational Intelligence, 4(1):1-16, 1988.
W. Marek and M. Truszczynski. Nonmonotonic Logics: Context-Dependent Reasoning. Springer, 1993.
A. Mikitiuk and M. Truszczynski. Constrained and rational default logics. In Proceedings of IJCAI'95, pages 1509-1517, 1995.
R. Reiter. A logic for default reasoning. Artificial Intelligence 13(1-2):81-132, 1980.
External Links
- Schmidt, Charles F. Default Logic. Retrieved August 10th. 2004.
- Ramsay, Allan (1999). Default Logic. Retrieved August 10th. 2004.