Human Conditional Reasoning in Answer Set Programming

Given a conditional sentence"P=>Q"(if P then Q) and respective facts, four different types of inferences are observed in human reasoning. Affirming the antecedent (AA) (or modus ponens) reasons Q from P; affirming the consequent (AC) reasons P from Q; denying the antecedent (DA) reasons -Q from -P; and denying the consequent (DC) (or modus tollens) reasons -P from -Q. Among them, AA and DC are logically valid, while AC and DA are logically invalid and often called logical fallacies. Nevertheless, humans often perform AC or DA as pragmatic inference in daily life. In this paper, we realize AC, DA and DC inferences in answer set programming. Eight different types of completion are introduced and their semantics are given by answer sets. We investigate formal properties and characterize human reasoning tasks in cognitive psychology. Those completions are also applied to commonsense reasoning in AI.


Introduction
People use conditional sentences and reason with them in everyday life.From an early stage of artificial intelligence (AI), researchers represent conditional sentences as if-then rules and perform deductive inference using them.Production systems or logic programming are examples of this type of systems.However, human conditional reasoning is not always logically valid.In psychology and cognitive science, it is well known that humans are more likely to perform logically invalid but pragmatic inference.For instance, consider the following three sentences: Given the conditional sentence S and the premise P , affirming the antecedent (AA) (or modus ponens) concludes the consequence C. Given S and the negation of the consequence ¬ C, denying the consequent (DC) (or modus tollens) concludes the negation of the premise ¬ P .AA and DC are logically valid.On the other hand, people often infer P from S and C or infer ¬ C from S and ¬ P .The former is called affirming the consequent (AC) and the latter is called denying the antecedent (DA).Both AC and DA are logically invalid and often called logical fallacies.
In the pragmatics of conditional reasoning, it is assumed that a conditional sentence is often interpreted as bi-conditional, that is, 'if ' is interpreted as 'if and only if ', and such conditional perfection produces AC or DA as invited inference (Geis and Zwicky (1971); Horn (2000)).Psychological studies empirically show that a conditional sentence "p if q" is rephrased into the form "p only if q" with greater frequency for permission/obligation statements (Cheng and Holyoak (1985); Byrne (2005)).For instance, the sentence "a customer can drink an alcoholic beverage if he is over 18" is rephrased into "a customer can drink an alcoholic beverage only if he is over 18".It is also reported that AA is easier than DC when a conditional is given as "if p then q".When a conditional is given as "p only if q", on the other hand, it is rephrased as "if not q then not p" and this paraphrase yields a directionality opposite which makes DC easier than AA (Braine (1978)).The fact that people do not necessarily make inferences as in standard logic brings several proposals of new interpretation of conditional sentences in cognitive psychology.Mental logic (Braine and O'Brien (1998)) interprets 'if ' as conveying supposition and introduces a set of pragmatic inference schemas for if-conditionals.Mental model theory (Johnson-Laird (1983)), on the other hand, considers that the meanings of conditionals are not truth-functional, and represents the meaning of a conditional sentence by models of the possibilities compatible with the sentence.A probabilistic approach interprets a conditional sentence "p ⇒ q" in terms of conditional probability P (q | p), then the acceptance rates of four conditional inferences are represented by their respective conditional probabilities (Oaksford and Chater (2001)).Eichhorn et al. (2018) use conditional logic and define inference patterns as combination of four inference rules (AA, DC, AC, DA).Given a conditional sentence "if p then q", four possible worlds (combination of truth values of p and q) are considered.An inference in each pattern is then defined by imposing corresponding constraints on the plausibility relation over the worlds.
In this way, the need of considering the pragmatics of conditional reasoning has been widely recognized in psychology and cognitive science.On the other hand, relatively little attention has been paid for realizing such pragmatic inference in computational logic or logic programming (Stenning and Lambalgen (2008); Kowalski (2011)).From a practical perspective, however, people would expect AI to reason like humans, that is, one would expect AI to conclude P from S and C, or ¬ C from S and ¬ P in the introductory example, rather than conclude unknown.Logic programming is a context-independent language and has a general-purpose inference mechanism by its nature.By contrast, pragmatic inference is governed by context-sensitive mechanisms, rather than context-free and general-purpose mechanisms (Cheng and Holyoak (1985); Cosmides and Tooby (1992)).As argued by Dietz et al. (2012), computational approaches to explain human reasoning should be cognitively adequate, that is, they appropriately represent human knowledge (conceptually adequate) and computations behave similarly to human reasoning (inferentially adequate).Then if we use logic programming for representing knowledge in daily life, it is useful to have a mechanism of automatic transformation of a knowledge base to simulate human reasoning depending on the context in which conditional sentences are used.That is, transform a program to a conceptually adequate form in order to make computation in the program inferentially adequate.
In this paper, we realize human conditional reasoning in answer set programming (ASP) (Gelfond and Lifschitz (1991)).ASP is one of the most popular frameworks that realize declarative knowledge representation and commonsense reasoning.ASP is a language of logic programming and conditional sentences are represented by rules in a program.Inference in ASP is deduction based on default logic (Reiter (1980)), while modus tollens or DC is not considered in ASP.AC and DA are partly realized by abductive logic programming (Kakas et al. (1992)) and program completion (Clark (1978)), respectively.As will be argued in this paper, however, AC and DA produce different results from them in general.We realize pragmatic AC and DA infer-ences as well as DC inference in ASP in a uniform and modular way.We introduce the notions of AC completion, DC completion, DA completion and their variants.We investigate formal properties of those completions and characterize human reasoning tasks in cognitive psychology.We also address applications to commonsense reasoning in AI.The rest of this paper is organized as follows.Section 2 reviews basic notions of ASP programs considered in this paper.Section 3 introduces different types of completions for human conditional reasoning, and Section 4 presents their variants as default reasoning.Section 5 characterizes human reasoning tasks in the literature, and Section 6 addresses applications to commonsense reasoning.Section 7 discusses related works and Section 8 summarizes the paper.

Preliminaries
In this paper, we consider logic programs with disjunction, default negation, and explicit negation.A general extended disjunctive program (GEDP) (Lifschitz and Woo (1992); Inoue and Sakama (1998)) Π is a set of rules of the form: where A GEDP Π coincides with an extended disjunctive program (EDP) of (Gelfond and Lifschitz (1991) In this paper, we consider ground programs containing no variable and a program means a (ground) GEDP unless stated otherwise.
Let Lit be the set of all ground literals in the language of a program.A set of ground literals S ⊆ Lit satisfies a ground rule r of the form (1) iff body + (r) ⊆ S and body − (r) ∩ S = ∅ imply either head + (r) ∩ S = ∅ or head − (r) ⊆ S. In particular, when head + (r) = head − (r) = ∅, S ⊆ Lit satisfies a constraint r iff body + (r) ⊆ S or body − (r) ∩ S = ∅.The answer sets of a GEDP are defined by the following two steps.First, let Π be a not-free GEDP and S ⊆ Lit.Then, S is an answer set of Π iff S is a minimal set satisfying the conditions: (i) S satisfies every rule from Π, that is, for each ground rule: If S contains a pair of complementary literals L and ¬L, then S = Lit.1 Second, let Π be any GEDP and S ⊆ Lit.The reduct Π S of Π by S is a not-free EDP obtained as follows: a rule r S of the form (2) is in Π S iff there is a ground rule r of the form (1) from Π such that head − (r) ⊆ S and body − (r) ∩ S = ∅.For programs of the form Π S , their answer sets have already been defined.Then, S is an answer set of Π iff S is an answer set of Π S .
When a program Π is an EDP, the above definition of answer sets coincides with that given in (Gelfond and Lifschitz (1991)).It is shown that every answer set of a GEDP Π satisfies every rule from Π (Inoue and Sakama (1998)).An answer set is consistent if it is not Lit.A program Π is consistent if it has a consistent answer set; otherwise, Π is inconsistent.When a program Π is inconsistent, there are two different cases.If Π has the single answer set Lit, Π is called contradictory; else if Π has no answer set, Π is called incoherent.The difference of two cases is illustrated by the following example.
We write Π |= c L (resp.Π |= s L ) if a literal L is included in some (resp.every) consistent answer set of Π.2 Two programs Π 1 and Π 2 are equivalent if they have the same set of answer sets.Two programs Π 1 and Π 2 are strongly equivalent if Π 1 ∪ Π and Π 2 ∪ Π are equivalent for any program Π (Lifschitz et al. (2001)).In particular, two rules r 1 and r 2 are strongly equivalent if Π ∪ {r 1 } and Π ∪ {r 2 } are equivalent for any program Π.
An answer set of a GEDP is not always minimal, i.e., a program Π may have two answer sets S and T such that S ⊂ T .This is in contrast with the case of EDPs where every answer set is minimal.

Example 2.2
Let Π be the program: p ; not q ←, q ; not p ← .
Then Π has two answer sets ∅ and {p, q}.
By definition, a contradictory GEDP has exactly one answer set Lit, while a consistent GEDP may have the answer set Lit.

Example 2.3
Let Π be the program: Then Π has two answer sets ∅ and Lit.
In EDPs, on the other hand, no consistent program has the answer set Lit, and every contradictory program has exactly one answer set Lit (Gelfond and Lifschitz (1991)).
Proposition 2.1 (Inoue and Sakama (1998)) Let Π be a program and Then Π and Π ′ have the same answer sets.
Proposition 2.2 Let Π be a program and Then, Π and Π \ Ψ have the same answer sets.

Example 2.4
For any program Π, Π ∪ { not p ← q, not p } is equivalent to the following program (Proposition 2.1): which is further simplified to Π (Proposition 2.2).

Proposition 2.3
Let Π be a not-free GEDP.If there is a constraint in Π, then Π is not contradictory.

Proof
If there is a constraint "← L 1 , . . ., L m " in Π, it is included in Π Lit .Since Lit does not satisfy the constraint, it does not become the answer set of Π Lit .Hence, Π is not contradictory.

Human Conditional Reasoning in ASP
ASP computes answer sets by deduction that is reasoning by AA.In this section, we present methods for reasoning by AC, DC, and DA in ASP.

AC Completion
We first introduce a framework for reasoning by affirming the consequent (AC) in ASP.

Define
where each Σ i (1 ≤ i ≤ p) is a conjunction of literals and NAF-literals, and ℓ j is either a literal L j (1 ≤ j ≤ k) or an NAF-literal not L j (k + 1 ≤ j ≤ l).
3. The AC completion of Π is defined as: (5) and (6) in conv(r) represent converse implications from the disjunction in the head of r to the conjunction in the body of r. ac(Π) collects rules "Σ i ← ℓ j " (1 ≤ i ≤ p) having the same (NAF-)literal ℓ j on the right of "←", and constructs "Σ 1 ; • • • ; Σ p ← ℓ j ", which we call an extended rule.Introducing ac(Π) to Π realizes reasoning by AC in Π.
The set ac(Π) contains an extended rule having a disjunction of conjunctions in its head, while it is transformed to rules of a GEDP.That is, the extended rule: rules of the form: By this fact, AC(Π) is viewed as a GEDP and we do not distinguish extended rules and rules of a GEDP hereafter.The semantics of AC(Π) is defined by its answer sets.
Example 3.1 Let Π be the program: p ; not q ← r, not s, p ← q.
Then ac(Π) becomes (r, not s) ; q ← p, r, not s ← not q where the first rule "(r, not s) ; q ← p" is identified with r ; q ← p, not s ; q ← p, and the second rule "r, not s ← not q" is identified with r ← not q, not s ← not q.
By definition, if there is more than one rule in Π having the same (NAF-)literal in the heads, they are collected to produce a single converse rule in ac(Π).For instance, Π = { p ← q, p ← r } produces ac(Π) = { q ; r ← p } but not Λ = { q ← p, r ← p }.Then, AC(Π) ∪ {p ←} has two answer sets {p, q} and {p, r}.Suppose that the new fact "¬ q ←" is added to Π. Put Π ′ = Π∪{ ¬ q ← }.Then AC(Π ′ )∪{p ←} has the answer set {p, r}, which represents the result of AC reasoning in Π ′ .If Λ is used instead of ac(Π), however, Π ′ ∪ Λ ∪ {p ←} has the answer set Lit.The result is too strong because r is consistently inferred from Π ′ ∪{p ←} by AC reasoning.As a concrete example, put p = wet-grass, q = rain, and r = sprinkler-on.Then AC(Π ′ )∪{ wet-grass ← } has the answer set { wet-grass, ¬ rain, sprinkler-on }, while Π ′ ∪ Λ ∪ { wet-grass ← } has the answer set Lit. AC completion derives an antecedent from a consequent, but it does not derive negation of antecedent by its nature.For instance, given Note that in Definition 3.1 the converse of constraints and facts are not produced.When head + (r) = head − (r) = ∅, r is considered a rule with false in the head, then (5) and (6) become L l+1 , . . ., L m , not L m+1 , . . ., not L n ← false which has no effect as a rule.On the other hand, when body + (r) = body − (r) = ∅, r is considered a rule with true in the body, then (5) and (6) respectively become true ← L j (1 ≤ j ≤ k) and true ← not L j (k + 1 ≤ j ≤ l).
We do not include this type of rules for constructing ac(Π) because it would disable AC reasoning.For instance, transform Π = { p ← q, p ← } to Π ′ = Π ∪ {q ; true ← p}.Then {p} is the minimal set satisfying Π ′ , and q is not included in the answer set of Π ′ .With this reason, constraints and facts are not completed at the first step of Definition 3.1.
The result of AC completion is syntax-dependent in general.That is, two (strongly) equivalent programs may produce different AC completions.
In the above example, "not p ← q" is a conditional sentence which is subject to AC inference, while "← p, q" is a constraint which is not subject to AC inference by definition.For instance, given the conditional sentence "if it is sunny, the grass is not wet" and the fact "the grass is not wet", people would infer "it is sunny" by AC inference.On the other hand, given the constraint "it does not happen that wet-grass and sunny-weather at the same time" and the fact "the grass is not wet", the number of people who infer "it is sunny" by AC would be smaller because the cause-effect relation between "sunny" and "not wet" is not explicitly expressed in the constraint.
Reasoning by AC is nonmonotonic in the sense that
In Example 3.3, reasoning by AC produces q which blocks deriving p using the first rule in Π.As a concrete example, an online-meeting is held on time if no network trouble arises.However, it turns that the web browser is unconnected and one suspects that there is some trouble on the network.Put p="online-meeting is held on time", q="network trouble", r="the web browser is unconnected".In this case, one may withdraw the conclusion p after knowing r.As such, additional rules ac(Π) may change the results of Π.One can see the effect of AC reasoning in a program Π by comparing answer sets of Π and AC(Π).
A consistent program Π may produce an inconsistent AC(Π).In converse, an inconsistent Π may produce a consistent AC(Π).
there is an answer set T of AC(Π) such that S ⊆ T .Proof A PDP Π contains no NAF-literal and every literal in Π is a positive literal (or an atom).Then ac(Π) is the set of rules (Σ 1 ; • • • ; Σ p ← A j ) where A j is an atom and Σ i is a conjunction of atoms.When Π contains no constraint, the additional rules in ac(Π) do not cause inconsistency in AC(Π) = Π ∪ ac(Π).Suppose that S is an answer set (or a minimal model) of Π.Then S is a minimal set satisfying all rules in Π.Let U = { A | A ∈ head + (r) for any rule r ∈ ac(Π) such that body + (r) ⊆ S }.Then there is an answer set T of AC(Π) such that T = S ∪ V where V ⊆ U .Hence the result holds.

Proof
If Π has the answer set Lit, the reduct Π Lit has the answer set Lit.By definition, AC(Π) Lit = Π Lit ∪ ac(Π) Lit where ac(Π) Lit is the reduct of ac(Π) by Lit.Introducing not-free rules in ac(Π) Lit does not change the answer set Lit of Π Lit .Then, Lit is the answer set of AC(Π) Lit and the result follows.

DC Completion
We next introduce a framework for reasoning by denying the consequent (DC) in ASP.There are two ways for negating a literal -one is using explicit negation and the other is using default negation.Accordingly, there are two ways of completing a program for the purpose of reasoning by DC.

Definition 3.2 (DC completion)
Let Π be a program.For each rule r ∈ Π of the form: and define sdc(r) as the rule: In particular, ( 7) or ( 8) becomes a fact if head + (r) = head − (r) = ∅; and it becomes a constraint if body + (r) = body − (r) = ∅.The weak DC completion and the strong DC completion of Π are respectively defined as: By definition, W DC(Π) and SDC(Π) introduce contrapositive rules in two different ways.In (7), literals and SDC(Π) are GEDPs and their semantics are defined by their answer sets.In particular, SDC(Π) becomes an EDP if Π is an EDP.
Note that contraposition of facts or constraints is produced in WDC/SDC.For instance, the fact "p ←" produces the constraint "← not p" by WDC and "← ¬p" by SDC.The fact "not p ←" produces the constraint "← p" by WDC and SDC.On the other side, the constraint "← p" produces the fact "not p ←" by WDC and "¬p ←" by SDC.The constraint "← not p" produces the fact "p ←" by WDC and SDC.
The WDC and SDC produce different results in general.
Example 3.5 Then W DC(Π) has two answer sets {p} and {q}, while SDC(Π) has the single answer set {p}.
Example 3.5 shows that WDC is nonmonotonic as Π |= s p but W DC(Π) |= s p. SDC is also nonmonotonic (see Example 3.8).The result of DC completion is syntax-dependent in general.
WDC preserves the consistency of the original program.

Proof
Suppose a consistent answer set S of Π.Then, for any rule (L In each case, the rule ( 7) is eliminated in Π S .Then, S is an answer set of W DC(Π) S , hence the result holds.
The converse of Proposition 3.3 does not hold in general.

Example 3.7
The program Π = { ← not p } has no answer set, while W DC(Π) = { ← not p, p ← } has the answer set {p}.
For SDC(Π), the next result holds.

Proposition 3.4
Let Π be a consistent program such that every constraint in Π is not-free (i.e., head + (r) = head − (r) = ∅ implies body − (r) = ∅ for any r ∈ Π).Then SDC(Π) does not have the answer set Lit.
by the assumption.Then r ∈ Π Lit and SDC(Π) Lit does not have the answer set Lit (Proposition 2.3).(b) Else if there is no constraint in Π, then { sdc(r) | r ∈ Π } contains no fact by Def.3.2.Consider two cases.(i) When there is a fact r ∈ Π, sdc(r) becomes a not-free constraint by Def.3.2.As SDC(Π) Lit contains this constraint, it does not have the answer set Lit (Proposition 2.3).(ii) When there is no fact in Π, both Π Lit and { sdc(r) | r ∈ Π } contain no fact, so SDC(Π) Lit contains no fact.In this case, no literal is deduced in SDC(Π) Lit and it does not have the answer set Lit.By (a) and (b), SDC(Π) Lit does not have the answer set Lit. Hence, the result follows.
A program Π satisfying the condition of Proposition 3.4 may produce an incoherent SDC(Π).

Example 3.8
The program Π = { p ← q, p ← ¬q, ¬ p ← } has the answer set {¬ p}, but Proposition 3.5 If a program Π has the answer set Lit, then both W DC(Π) and SDC(Π) have the answer set Lit.In particular, if Π is a contradictory EDP, then SDC(Π) is contradictory.

Proof
The proof is similar to Proposition 3.2.In particular, if Π is an EDP, then SDC(Π) is an EDP and the result holds.
Note that in GEDPs contraposition of a rule does not hold in general.Thus, the program Π = { p ← q, ¬ p ← } does not deduce ¬ q.SDC completes the program as SDC(Π) = Π ∪ { ¬ q ← ¬ p, ← p } and makes ¬ q deducible.In this sense, SDC has the effect of making explicit negation closer to classical negation in GEDP.

DA Completion
As a third extension, we introduce a framework for reasoning by denying the antecedent (DA) in ASP.As in the case of DC completion, two different ways of completion are considered depending on the choice of negation.

Define
, and each Γ j (1 ≤ j ≤ p) is a disjunction of literals and NAF-literals.
3. The weak DA completion of Π is defined as: (9) and (10) in winv(r) represent inverse implication from the (default) negation of the conjunction in the body of r to the (default) negation of the disjunction in the head of r. wda(Π) collects rules "ℓ i ← Γ j " (1 ≤ j ≤ p) having the same (NAF-)literal ℓ i on the left of "←", and constructs "ℓ i ← Γ 1 , . . ., Γ p ", which we call an extended rule.Introducing wda(Π) to Π realizes reasoning by weak DA.An extended rule has a conjunction of disjunctions in its body, while it is transformed to rules of a GEDP as the case of AC completion.That is, the extended rule: By this fact, W DA(Π) is viewed as a GEDP and we do not distinguish extended rules and rules of a GEDP hereafter.The semantics of W DA(Π) is defined by its answer sets.
Example 3.9 Let Π be the program: Then wda(Π) becomes not p ← not r ; s, not q ← (not r ; s), not t, r ← not t where the first rule "not p ← not r ; s" is identified with and the second rule "not q ← (not r ; s), not t" is identified with not q ← not r, not t, not q ← s, not t.
Then, W DA(Π) has the answer set {s, r}.
As in the case of AC completion, if there is more than one rule having the same (NAF-)literal in the heads, they are collected to produce a single inverse rule.For instance, Π = { p ← q, p ← r } produces wda(Π) = { not p ← not q, not r } but not Λ = { not p ← not q, not p ← not r }.Suppose that the new fact "r ←" is added to Π. Put Π ′ = Π ∪ {r ←}.Then W DA(Π ′ ) has the answer set {p, r}.If Λ is used instead of wda(Π), however, Π ′ ∪ Λ is incoherent because the first rule of Λ is not satisfied.The result is too strong because p is deduced by "p ← r" and "r ←", and it has no direct connection to DA inference in the first rule of Λ.Hence, we conclude not p if both q and r are negated in wda(Π).
The strong DA completion is defined in a similar manner.

Definition 3.4 (strong DA completion)
Let Π be a program and r ∈ Π a rule of the form: 1.For each disjunct in head + (r) and head − (r), inverse the implication: As in the case of WDA, the produced (11) (resp.( 12)) is considered an abbreviation of the collection of (n − l) rules: , hence we call ( 11) or (12) a rule.In particular, ( 11) The set of rules ( 11)-( 12) is denoted as sinv(r).

Define
3. The strong DA completion of Π is defined as: As in the case of WDA, extended rules in sda(Π) are transformed to rules of a GEDP.Then SDA(Π) is viewed as a GEDP and its semantics is defined by its answer sets.In particular, SDA(Π) becomes an EDP if Π is an EDP.
The result of DA completion is syntax-dependent in general.
Both WDA and SDA are nonmonotonic in general.
Example 3.11 When a program is a consistent EDP, the WDA does not introduce a new answer set.
Proposition 3.6 Let Π be an EDP.If S is a consistent answer set of W DA(Π), then S is an answer set of Π.

Proof
When Π is an EDP, the rules (10) are not included in winv(r).By the rules (9) in winv(r), rules of the form (not L i ← Γ 1 , . . ., Γ p ) are produced in wda(Π), which are identified with the collection of rules (not L i ← ℓ 1 j1 , . . .ℓ p jp ) where ℓ p j k (1 ≤ k ≤ p) is an (NAF-)literal.These rules are converted into the strongly equivalent constraint (← L i , ℓ 1 j1 , . . ., ℓ p jp ) (Proposition 2.1).The additional constraints may eliminate answer sets of Π, but do not introduce new answer sets.Thus, a consistent answer set S of W DA(Π) is also a consistent answer set of Π.
Proposition 3.7 If a program Π has the answer set Lit, then both W DA(Π) and SDA(Π) have the answer set Lit.In particular, if Π is a contradictory EDP, then SDA(Π) is contradictory.

Proof
The proof is similar to Proposition 3.2.In particular, if Π is an EDP, then SDA(Π) is an EDP and the result holds.
As in the case of AC, a consistent program Π may produce an inconsistent W DA(Π) or SDA(Π).In converse, an incoherent Π may produce a consistent W DA(Π) or SDA(Π).

AC and DA as Default Reasoning
AC and DA are logically invalid and additional rules for AC and DA often make a program inconsistent.In this section, we relax the effects of the AC or DA completion by introducing additional rules as default rules in the sense of Reiter (1980).More precisely, we capture AC and DA as the following default inference rules: The default AC rule says: given the conditional "ϕ ⇒ ψ" and the fact ψ, conclude ϕ as a default consequence.Likewise, the default DA rule says: given the conditional "ϕ ⇒ ψ" and the fact ¬ϕ, conclude ¬ψ as a default consequence.We encode these rules in ASP.

Default AC completion
The AC completion is modified for default AC reasoning.
Definition 4.1 (default AC completion) Let Π be a program.For each rule r ∈ Π of the form: define dac(r) as the set of rules: where ∆ = not ¬ L l+1 , . . ., not ¬ L m , not L m+1 , . . ., not L n .As before, ( 13) is not produced if head + (r) = ∅ or body + (r) = body − (r) = ∅; and ( 14) is not produced if head − (r) = ∅ or body + (r) = body − (r) = ∅.The default AC completion of Π is defined as: in which where each Σ i (1 ≤ i ≤ p) is a conjunction of literals and NAF-literals, and ℓ j is either a literal Like AC(Π), rules in dac(Π) are converted into the form of a GEDP, then DAC(Π) is viewed as a GEDP.Compared with the AC completion, the DAC completion introduces the conjunction ∆ of NAF-literals to the body of each rule.Then the rules "Σ 1 ; • • • ; Σ p ← ℓ j , ∆ i " having the same head with different bodies are constructed for i = 1, . . ., p.
As a result, DAC(Π) has the answer set {p, q, ¬r}.
When AC(Π) has a consistent answer set, DAC(Π) does not change it.
Proposition 4.1 Let Π be a program.If AC(Π) has a consistent answer set S, then S is an answer set of DAC(Π).

Proof
Suppose that AC(Π) has a consistent answer set S. For each rule (Σ In this case, S satisfies ∆ i and L j ∈ S implies that S satisfies Σ i for each rule (Σ 1 ; In this case, S satisfies ∆ i and L j ∈ S implies that S satisfies Σ i for each rule (Σ 1 ; Then AC(Π) S = DAC(Π) S and the result follows.
DAC does not introduce the contradictory answer set Lit unless the original program has Lit as an answer set.

Default DA completion
The DA completion is modified for default DA reasoning.

Definition 4.2 (default DA completion)
Let Π be a program.Define where ℓ i , Γ j , winv(r), and sinv(r) are the same as those in Defs.3.3 and 3.4.In addition, The weak default DA completion and the strong default DA completion of Π are respectively defined as: Rules in wdda(Π) and sdda(Π) are converted into the form of a GEDP, so W DDA(Π) and SDDA(Π) are viewed as GEDPs.Like the DAC completion, both WDDA and SDDA introduce an additional NAF-literal to each rule.

Proof
Suppose that W DA(Π) has a consistent answer set S. If L i ∈ S then ¬ L i ∈ S and δ w i = not ¬ L i is eliminated in W DDA(Π) S .Else if L i ∈ S and ¬ L i ∈ S, there is another rule (ℓ i ← Γ 1 , . . ., Γ p , δ w i ) in wdda(Π) such that ℓ i = ¬ L i and δ w i = not L i .Then, δ w i = not L i is eliminated in W DDA(Π) S .Thus, W DA(Π) S = W DDA(Π) S .Similarly, SDA(Π) S = SDDA(Π) S .Hence, the result follows.
WDDA or SDDA does not introduce the contradictory answer set Lit unless the original program has Lit as an answer set.
5 Characterizing Human Reasoning Tasks 5.1 Suppression Task Byrne (1989) provides an empirical study which shows that human conditional reasoning can be nonmonotonic in the so-called suppression tasks.She verifies the effects in different types of conditional reasoning by experimental testing on college students.Students are divided into three groups: the first group receives simple conditional arguments; the second group receives conditional arguments accompanied by another conditional sentence with an alternative antecedent; and the third group receives conditional arguments accompanied by another conditional sentence with an additional antecedent.More precisely, suppose the following three conditional sentences: S1: If she has an essay to write then she will study late in the library.S2: If she has some textbooks to read then she will study late in the library.S3: If the library stays open then she will study late in the library.
Given the conditional sentence S 1 , S 2 represents a sentence with an alternative antecedent, while S 3 represents a sentence with an additional antecedent.The antecedent of S 2 is considered an alternative sufficient condition for studying late in the library.By contrast, the antecedent of S 3 Table 1.The percentages of inferences in experiments (Byrne (1989) is considered an additional sufficient condition for studying late in the library.Table 1 presents the percentages of inferences made by subjects from the three kinds of arguments.By the table, given the sentence S 1 and the fact: "she will study late in the library", the 71% of the first group concludes: "she has an essay to write" by AC.When S 1 is accompanied by a conditional S 2 containing an alternative antecedent, on the other hand, the percentage of subjects who perform AC inference reduces to 13%.The reason is that people know that the alternative: "She has some textbooks to read", could be the case instead.Similar reduction is observed for DA.Byrne argues that those fallacious inferences are suppressed when a conditional is accompanied by an alternative antecedent.She also observes that the inference patterns change when S 1 is accompanied by a conditional S 3 containing an additional antecedent.In Table 1 the number of subjects who conclude: "She will study late in the library" by AA reduces to 38%, and the number of subjects who conclude: "She does not have an essay to write" by DC reduces to 33%.By contrast, the suppression of AC and DA are relaxed, 54% of subjects make AC and 63% of subjects make DA.Byrne then argues that "valid inferences are suppressed in the same way as fallacious inferences".
The suppression task is characterized in our framework as follows.First, the sentence S 1 is represented as the rule: "library ← essay".Then, four conditional inferences (AA, DC, AC, DA) in simple arguments are respectively represented by the following programs: (AA) Π 0 = { library ← essay, essay ← }, Then Π 0 has the answer set { library, essay } in which AA inference is done.By contrast, DC, AC, and DA inferences are not performed in Π 1 , Π 2 , and Π 3 , respectively.To realize those inferences, consider completions such that where SDC(Π 1 ) has the answer set { ¬ library, ¬ essay }, AC(Π 2 ) has the answer set { library, essay }, and SDA(Π 3 ) has the answer set { ¬ library, ¬ essay }.As a result, DC, AC, and DA inferences are performed in SDC(Π 1 ), AC(Π 2 ), and SDA(Π 3 ), respectively.Next, consider the alternative arguments S 1 and S 2 .They are represented by the programs: ) |= s ¬ library, which indicate that AC and DA inferences are suppressed while DC is not suppressed.In this way, the completion successfully represents the effect of suppression of AC/DA inference in alternative arguments.
In additional arguments, on the other hand, Byrne (1989) observes that AA/DC inference is also suppressed.Our completion method does not characterize the suppression of AA inference because we enable fallacious inferences by AC/DA completion while still keep the valid AA inference.Byrne (1989) says "people may consider that certain other conditions are necessary for this conclusion to hold, for example, the library must remain open.Thus, conditionals are frequently elliptical in that information that can be taken for granted is omitted from them".In the above example, the availability of the library is necessary for studying in it but it is just omitted in the initial premises.Then it is considered that the rule: "library ← essay" in mind is overwritten by the rule: "library ← essay, open" when the additional antecedent is given.Let ) |= s ¬ library.This indicates that DC is suppressed but AC and DA are not suppressed, which explains the results of Byrne (1989).
The results of inferences using completion are summarized in Table 2.By the table, the suppression of AC and DA in face of an alternative antecedent is realized in our framework.The suppression of AA and DC in face of an additional antecedent is also realized if the additional condition is written in the antecedent of the original conditional sentence. ))) • means that inference succeeds; × means that inference is suppressed.

Wason Selection Task
Wason (1968) introduces the selection task for examining human conditional reasoning.The task is described as follows.There are four cards on a table, each of which has a letter on one side and a number on the other.Suppose that those cards are showing respectively D, K, 3, 7.
Given the sentence: "Every card which has the letter D on one side has the number 3 on the other side", then which cards are to be turned over in order to verify the truth of the sentence?Testing on college students, it turns out that a relatively small number of students select the logically correct answer 'D and 7' (4%), while others select 'D and 3' (46%) or D alone (33%) (Wason and Shapiro (1971)).The result shows that people are likely to perform AC inference but less likely to perform logically correct DC inference in this task.The situation is characterized in our framework as follows.
The sentence: "Every card which has the letter D on one side has the number 3 on the other side" is rephrased as "If a card has the letter D on one side, then it has the number 3 on the other side".Then it is represented by the program: where n 3 means the number 3 and ℓ D means the letter D. Four cards on the desk are represented by the facts: Then each card is checked one by one.
• Π W ∪ {ℓ D ←} has the answer set {ℓ D , n 3 }.If the other side of ℓ D is not the number 3, however, {ℓ D , n 3 }∪{¬n 3 } is contradictory.To verify the consistency, one has to turn over the card of D. • Π W ∪ {ℓ K ←} has the answer set {ℓ K }.Since both {ℓ K } ∪ {n 3 } and {ℓ K } ∪ {¬n 3 } are consistent, there is no need to turn over the card of K. • Π W ∪ {n 3 ←} has the answer set {n 3 }.Since both {n 3 } ∪ {ℓ D } and {n 3 } ∪ {¬ℓ D } are consistent, there is no need to turn over the card of 3. • Π W ∪ {n 7 ←} has the answer set {n 7 }.Since both {n 7 } ∪ {ℓ D } and {n 7 } ∪ {¬ℓ D } are consistent, there is no need to turn over the card of D.
As the standard ASP does not realize DC inference, it characterizes reasoners who select only D as shown above.By contrast, people who choose D and 3 are likely to perform AC inference using the conditional sentence.In this case, the situation is represented as Now AC(Π W ) ∪ {n 3 ←} has the answer set {n 3 , ℓ D }.If the other side of n 3 is not the letter D, however, {n 3 , ℓ D } ∪ {¬ℓ D } is contradictory.To verify the consistency, they opt to turn over the card of 3 as well as the card of D.
Finally, those who choose D and 7 perform weak DC inference as4 The program WDC (Π W ) ∪ {n 7 ←} has the answer set {n 7 }.However, if the other side of n 7 is the letter D, WDC (Π W ) ∪ {n 7 ←} ∪ {ℓ D ←} ∪ {← n 3 , n 7 } is incoherent, where the constraint "← n 3 , n 7 " represents that one card cannot have two numbers.To verify the consistency, they need to turn over the card of 7 as well as the card of D. 5It is known that the Wason selection task is context dependent and the results change when, for instance, it is presented with a deontic rule.Griggs and Cox (1982) use the rule: "If a person is drinking beer, then the person must be over 19 year of age".There are four cards on a table as before, but this time a person's age is on one side of a card and on the other side is what the person is drinking.Four cards show, 'beer', 'coke', '16', and '22', respectively.Then select the card(s) needed to turn over to determine whether or not no person is violating the rule.In this drinking-age problem, almost 75% of participants select logically correct answers 'beer' and '16'.To characterize the situation, (W)DC completion is used for representing selection tasks in deontic contexts.

Applications to Commonsense Reasoning
The AC, DC, DA completions realize human conditional reasoning in ASP.In addition, they are used for computing commonsense reasoning in AI.

Abduction and Prediction
Abduction reasons from an observation to explanations.An abductive logic program (Kakas et al. (1992)) is defined as a pair Π, Γ where Π is a program and Γ (⊆ Lit) is a set of literals called abducibles. 6It is assumed that abducibles appear in the head of no rule in Π.Given an observation O as a ground literal, the abduction problem is to find an explanation E (⊆ Γ) satisfying (i) Π ∪ E |= x O and (ii) Π ∪ E is consistent, where |= x is either |= c or |= s depending on the problem.Here we consider |= c that realizes credulous abduction.In GEDP, the abduction problem is characterized as follows.Let us define Since abduction reasons backward from an observation, it is characterized using AC inference as follows.
Proposition 6.2 Let Π, Γ be an abductive program and O an observation.
(ii) If a set E ⊆ Γ is an explanation of O, then there is Π ′ ⊆ Π such that AC(Π ′ ) ∪ {O} has a consistent answer set S such that S ∩ Γ = E. Proof (i) Suppose that O ∈ head + (r) for some r ∈ Π and AC(Π) ∪ {O} has a consistent answer set S such that S ∩ Γ = E.By the definition of AC(Π), there is a path from O to literals in E in the dependency graph7 of the program AC(Π) S ∪ {O} where AC(Π) S is the reduct of AC(Π) by S. In this case, O is reached by reasoning forward from E in Π S , and S is an answer set of Π S ∪ E such that O ∈ S.This implies that Π ∪ E ∪ {← not O} has a consistent answer set S such that abd(Γ) S = E, and the result holds by Proposition 6.1 (ii) If E ⊆ Γ is an explanation of O, there is Π ′ ⊆ Π such that Π ′ ∪ abd(Γ) ∪ {← not O} has a consistent answer set S satisfying S ∩ Γ = E (Proposition 6.1).Select a minimal set Π ′ of rules such that there is no Π ′′ ⊂ Π ′ satisfying the above condition.In this case, abd(Γ) S = E is obtained by reasoning backward from O in (Π ′ ) S , and S is a minimal set satisfying (Π ′ ) S ∪ ac(Π ′ ) S ∪ {O}.Then AC(Π ′ ) ∪ {O} has a consistent answer set S such that S ∩ Γ = E.
In Example 6.1, AC(Π 1 ) ∪ {O} becomes Note that AC(Π) introduces converse of every rule, while explanations are computed using the AC completion of a subset Π ′ ⊆ Π in general (Proposition 6.2(ii)).
Example 6.2 Let Π = { p ← a, q ← ¬a, q ← } and Γ = {a, ¬a}.Then O = p has the explanation As illustrated in Example 6.2, abduction and AC completion produce different results in general.
Abductive logic programs of (Kakas et al. (1992)) cannot compute explanations when contrary to the consequent is observed.For instance, consider Π 2 , Γ 2 such that Π 2 : arrive on time ← not accident.
Given the observation O = ¬ arrive on time, no explanation is obtained from Π 2 , Γ 2 .Generally, a program Π does not necessarily contain a pair of rules r and r ′ that define L and ¬L, respectively.When there is a rule defining L but no rule defining ¬L, abduction computes no explanation for the observation O = ¬L.The problem is resolved by reasoning by DC.For the rule r in Π 2 , sdc(r) becomes accident ← ¬ arrive on time.
In contrast to SDC, W DC is used for abduction from negative observations.A negative observation represents that some evidence G is not observed and it is represented as O = not G, which should be distinguished from the (positive) observation O = ¬ G meaning that ¬ G is observed.In the abductive program Π 2 , Γ 2 , the negative observation O = not arrive on time is explained using wdc(r): accident ← not arrive on time.
In this way, both AC and DC are used for computing explanations deductively, and DC is used for computing explanations that are not obtained using the framework of (Kakas et al. (1992)).Moreover, AC and DC realize prediction by combining abduction and deduction.Γ 3 : accident.
The third rule in Π 3 says: if there is an accident, a newspaper will report it.Given the observation O = ¬ arrive on time, AC(Π 3 ) ∪ {O} |= s newspaper.
As such, AC or DC combines abduction and deduction to realize prediction.

Counterfactual Reasoning
A counterfactual is a conditional statement representing what would be the case if its premise were true (although it is not true in fact).Lewis (1973) introduces two different types of counterfactual sentences.Given two different events ϕ and ψ, two counterfactual sentences are considered: "if it were the case that ϕ, then it would be the case that ψ" (written ϕ ✷→ ψ) and "if it were the case that ϕ, then it might be the case that ψ" (written ϕ ✸→ ψ).Here (ϕ ✷→ ψ) implies (ϕ ✸→ ψ).We consider counterfactual reasoning such that what would be the case if some facts were not true.We then realize Lewis's two types of counterfactual reasoning using DA inference in ASP.
Definition 6.1 (counterfact) Let ϕ be a fact of the form: Then the counterfact ϕ is the set of facts such that Given a set Σ of facts, define We say that Σ satisfies the conjunction "L l+1 , . . ., L m , not L m+1 , . . ., not L n " if

Definition 6.2 (counterfactual program)
Let Π be a program and Σ a set of facts in Π.Then, a counterfactual program Ω is defined as By definition, Ω is obtained from Π by removing a set Σ of facts, and instead introducing a set Σ of counterfacts as well as strong DA rules sda(Π).Σ ✷→ λ (resp.Σ ✸→ λ) means that if the counterfacts Σ were the case, then λ is included in every (resp.some) answer set of Ω.
Example 6.4 Consider the program Π: An event is scheduled to take place in either London or Paris if it is not virtual.The pandemic turns the event into virtual, however.Suppose a counterfactual sentence: "if there were no pandemic, the event would not be virtual".Putting Σ = { pandemic }, Ω becomes: Then, Ω has two answer sets: As a result, it holds that {¬ pandemic} ✷→ ¬ virtual and {¬ pandemic} ✸→ London.
Given a consistent program Π, it might be the case that the program Ω is inconsistent.To eliminate contradictory Ω, default DA completion is used instead of DA completion.Define Ω D that is obtained by replacing sda(Π) by its default version sdda(Π) in Definition 6.2.The next result holds by Proposition 4.4.Proposition 6.3 Let Π be an EDP and Σ a set of facts in Π.
) has the answer set Lit. Then Π ′ has the answer set Lit (Proposition 4.4).Since Π ′ is an EDP, Π ′ is inconsistent, which contradicts the assumption that Π ′ is consistent.Hence, the result holds.

Neighborhood Inference
Cooperative query answering analyzes the intent of a query and provides associated information relevant to the query (Chu et al. (1990)).Neighborhood inference (Gaasterland et al. (1992)) is a technique used for such a purpose and reasons up/down in a taxonomy of atoms to reach neighboring solutions.has two answer sets {p} and {q}.When Π 3 = { p ← not q, p ← q, q ← p }, Comp(Π 3 ) = { p ↔ q ∨ ¬q, q ↔ p } has the supported model {p, q}.In contrast, W DA(Π 3 ) = Π 3 ∪ { not p ← q, not q, not q ← not p } has no answer set.As such, completion semantics introduced in this paper is generally different from Clark completion in NLPs.

Human Conditional Reasoning
Stenning and Lambalgen (2008) formulate human conditional reasoning using Clark's program completion under the three-valued logic of (Fitting (1985)).They represent a conditional sentence "if p then q" as a logic programming rule: 8 q ← p ∧ ¬ab where ab represents an abnormal atom.In this setting, DA is represented as The rule "A ← ⊥" means that A is a proposition to which the closed world assumption (Reiter (1978)) is applied.If a program does not contain "A ← ⊥", nor any other rule in which A occurs in its head, then A is interpreted unknown.Then its completion Comp(Π 1 ) = { p ↔ ⊥, q ↔ p ∧ ¬ab, ab ↔ ⊥ } derives "q ↔ ⊥".On the other hand, completion does not realize AC or DC inference by itself.In their framework, AC is represented as does not derive p.Likewise, DC is represented as 8 They write it "p ∧ ¬ab → q" but we use the standard writing in LP.
Stenning and Lambalgen (2008) characterize the suppression task in their formulation.The sentence "If she has an essay to write then she will study late in the library" is represented as: library ← essay ∧ ¬ab 1 .
Given the negation of antecedent ¬essay (or equivalently, the CWA rule "essay ← ⊥"), the completed program: derives "library ↔ ⊥".Next, suppose that the conditional with an alternative antecedent: "If she has some textbooks to read then she will study late in the library" is given.The program becomes library ← essay ∧ ¬ab 1 , library ← text ∧ ¬ab 2 .
Given the fact ¬essay (or equivalently, the CWA rule "essay ← ⊥"), the completed program: library ↔ (essay ∧ ¬ab 1 ) ∨ (text ∧ ¬ab 2 ), Then, essay alone does not deduce library, so the AA inference is suppressed.Stenning and Lambalgen (2008) argue that most people represent the effect of an additional premise formally as "p ← q ∧ r" and that of an alternative premise formally as "p ← q ∨ r".This argument coincides with our view addressed in Section 5.1.Dietz et al. (2012) point out a technical flaw in the formulation by (Stenning and Lambalgen (2008)).In the above example, open and library are unknown (U) under the 3-valued logic, then the rule "library ← open ∧ ¬ab 3 " becomes "U ← U".Under the Fitting semantics, however, the truth value of the rule "U ← U" is U, then it does not represent the truth of the rule "library ← open ∧ ¬ab 3 ".To remedy the problem, they employ Łukasiewicz's 3-valued logic which maps "U ← U" to ⊤. Dietz et al. (2012) also characterize the suppression effects in AC or DC using an abductive logic program Π, Γ with abducibles The observation O = (library ↔ ⊤) derives "essay ↔ ⊤", then "essay ← ⊤" is the skeptical explanation of O.When the additional rules and abducibles The observation O = (library ↔ ⊤) derives "essay ∨ text ↔ ⊤", and there are two credulous explanations "essay ← ⊤" and "text ← ⊤" in Γ 1 ∪ Γ 2 .In this case, "essay ← ⊤" is not concluded under skeptical reasoning, which represents the suppression of AC.Comparing the above mentioned two studies with our approach, there are several differences.First, they translate a conditional sentence "if p then q" into the rule "q ← p ∧ ¬ ab".However, it is unlikely that people who commit logical fallacies, especially younger children (Rumain et al. (1983)), translate the conditional sentence into the rule of the above complex form in their mind.We represent the conditional sentence directly as "q ← p", and assume that people would interpret it as bi-conditional depending on the context in which it is used.Second, in order to characterize AC or DC reasoning, Stenning and Lambalgen (2008) interpret a conditional sentence as an integrity constraint, while (Dietz et al. (2012)) uses abductive logic programs.Our frame-work does not need a specific interpretation of rules (such as integrity constraints) nor need an extra mechanism of abductive logic programs.Third, they use a single (weak) completion for all AC/DA/DC reasoning, while we introduce different types of completions for each inference.By separating respective completions, individual inferences are realized in a modular way and freely combined depending on their application context.For instance, we use AC and (S)DA completion to characterize the suppression task (Section 5.1), while use AC and (W)DC completion to characterize Wason selection task (Section 5.2).Fourth, they handle normal logic programs, while our framework can handle a more general class of logic programs containing disjunction and two different types of negation.For instance, consider the rule: "buy car ; buy house ← win lottery" (if she wins the lottery, she buys a car or a house).When it is known that buy car is true, one may infer win lottery by AC inference.The AC completion realizes such an inference by introducing rules: "win lottery ← buy car" and "win lottery ← buy house".Cramer et al. (2021) represent conditionals as in (Stenning and Lambalgen (2008)) and use the weak completion and abductive logic programs as in (Dietz et al. (2012)).They formulate different types of conditionals based on their contexts and argue in which case AC or DC is more likely to happen.More precisely, a conditional sentence whose consequent appears to be obligatory given the antecedent is called an obligation conditional.An example of an obligation conditional is that "if Paul rides a motorbike, then he must wear a helmet".If the consequence of a conditional is not obligatory, then it is called a factual conditional.The antecedent A of a conditional sentence is said to be necessary iff its consequent C cannot be true unless A is true.For example, the library's being open is a necessary antecedent for studying in the library.Cramer et al. argue that AA and DA occur independently of the type of a conditional.On the other hand, in AC most people will conclude A from "A ⇒ C" and C, while the number of people who conclude nothing will increase if A is a non-necessary antecedent.In DC, most people will conclude ¬ A from "A ⇒ C" and ¬ C, while the number of people who conclude nothing will increase if the conditional is factual.Those assumptions are verified by questioning participants who do not receive any education in logic beyond high school training.They then formulate the situation by introducing the abducible "C ← ⊤" if the antecedent is non-necessary, and "ab ← ⊤" if the conditional is factual.In the former case, the observation C does not imply A because the additional "C ← ⊤" can make C explainable by itself.As a result, A is not a skeptical explanation of C. In the latter case, the observation ¬ C does not imply ¬ A because if one employs the explanation "ab ← ⊤" then "C ← A ∧ ¬ab" does not produce "C ↔ A".Dietz et al. (2022) use logic programming rules to represent different types of conditionals.For instance, concl ← prem(x), sufficient(x) represents MP that concl follows if a sufficient premise is asserted to be true.By contrast, not concl ← not prem(x), necessary(x) represents DA that concl does not follow if a necessary premise is asserted to be false.With these rules, Byrne's suppression effect is represented as follows.First, given the fact prem(essay) and sufficient(essay), library ← prem(essay), sufficient(essay) has the effect of withdrawing library.In the current study, we do not distinguish different types of conditionals as in (Cramer et al. (2021); Dietz et al. (2022)).However, completion is done for individual rules, so we could realize partial completion by selecting rules Π ′ ⊆ Π that are subject to be completed in practice.More precisely, if a program Π consists of rules R 1 having necessary antecedents and R 2 having non-necessary antecedents, apply AC completion to R 1 while keep R 2 as they are.The resulting program then realizes AC inference using R 1 only.Likewise, if a program Π consists of rules R 3 having obligatory consequents and R 4 having factual consequents, apply DC completion to R 3 while keep R 4 as they are.The resulting program then realizes DC inference using R 3 only.Such a partial completion is also effectively used for commonsense reasoning in this paper (Proposition 6.2(ii), Definition 6.3).et al. (1991) and (Fung and Kowalski (1997)) compute abduction by deduction using Clark completion.Abduction using AC and DC completion is close to those approaches, while the approach based on Clark completion is restricted to normal logic programs (NLPs).We argued that a (positive) observation O = ¬G is distinguished from a negative observation O = not G, but such a distinction is not considered in NLPs handling only default negation.Inoue and Sakama (1999) introduce transaction programs to compute extended abduction.Extended abduction computes explanations for not only (positive) observations but also negative ones.A transaction program is constructed based on the converse of conditionals, and its semantics is operationally given as a fixpoint of the program.A transaction program is a meta-level specification of the procedure and is different from the current approach.Moreover, a transaction program is defined for NLPs only.Pereira et al. (1991;2017) realize counterfactual reasoning in logic programming.In (Pereira et al. (1991)), a counterfactual conditional "ϕ > ψ" (meaning ϕ ✷→ ψ) is evaluated in a program Π by adding ϕ to Π and computing the maximal non-contradictory submodels of the new program.Then the counterfactual conditional is true iff ψ holds in all such submodels.Pereira and Saptawijaya (2017) first use abduction to compute possible causes of an event.Next, they assume counterfactual assumption and verify whether an expected outcome will happen under possible causes.These studies consider extended/normal logic programs under the well-founded semantics and realize counterfactual reasoning via program revision or abductive reasoning.Unlike our approach, they do not introduce new rules for DA inference in counterfactual reasoning.Gaasterland et al. (1992) introduce neighborhood inference for query answering in Horn logic programs.The scope of a query is expanded by relaxing the specification, which allows a program to return answers related to the original query.They introduce a meta-interpreter to realize it and argue for control strategies.We show that similar reasoning is simulated in ASP using the AC completion.

Conclusion
This paper studies a method of realizing human conditional reasoning in ASP.Different types of completions are introduced to realize logically invalid inferences AC and DA as well as a logically valid inference DC.They are applied to representing human reasoning tasks in the literature, and are also used for computing common sense reasoning in AI.In psychology and cognitive science, empirical studies show that people perform AC, DA or DC inference depending on the context in which a conditional sentence is used.We could import the results of those studies and encode knowledge in a way that people are likely to use it.The proposed theory is used for such a purpose to realize pragmatic inference in ASP and produce results that are close to human reasoning in practice.
Completions introduced in this paper are defined in a modular way, so one can apply respective completion to specific rules of a program according to their contexts.They are combined freely and can be mixed in the same program.Those completions are general in the sense that they are applied to logic programs containing disjunction, explicit and default negation.Since a completed program is still in the class of GEDPs and a GEDP is transformed to a semantically equivalent EDP (Inoue and Sakama (1998)), answer sets of completed programs are computed using existing answer set solvers.
positive or negative) literals and 0 ≤ k ≤ l ≤ m ≤ n.A program might contain two types of negation: default negation (or negation as failure) not and explicit negation ¬.For any literal L, not L is called an NAF-literal and define ¬¬L = L.We often use the letter ℓ to mean either a literal L or an NAF-literal not L.The left of "←" is a disjunction of literals and NAF-literals (called head), and the right of "←" is a conjunction of literals and NAF-literals (called body).Given a rule r of the form (1), define head + (r) = {L 1 , . . ., L k }, head − (r) = {L k+1 , . . ., L l }, body + (r) = {L l+1 , . . ., L m }, and body − (r) = {L m+1 , . . ., L n }.A rule (1) is called a fact if body + (r) = body − (r) = ∅; and it is called Π has the answer set Lit, then AC(Π) has the answer set Lit.
Proposition 4.2 Let Π be a program.If DAC(Π) has the answer set Lit, then Π has the answer set Lit. Proof If DAC(Π) has the answer set Lit, then DAC(Π) Lit = Π Lit ∪ dac(Π) Lit has the answer set Lit. Since dac(Π) Lit = ∅, Π Lit has the answer set Lit. Hence, Π has the answer set Lit. DAC(Π) possibly turns a contradictory AC(Π) into a consistent program.

Example
Π be a program.If W DDA(Π) (or SDDA(Π)) has the answer set Lit, then Π has the answer set Lit. Proof If W DDA(Π) has the answer Lit, then W DDA(Π) Lit = Π Lit ∪ wdda(Π) Lit has the answer set Lit. Since wdda(Π) Lit = ∅, Π Lit has the answer set Lit. Hence, Π has the answer set Lit.The case of SDDA(Π) is proved in a similar manner.W DDA(Π) (resp.SDDA(Π)) possibly turns a contradictory W DA(Π) (resp.SDA(Π)) into a consistent program, while it does not resolve incoherency in general.
arrive on time ← not accident, ¬ arrive on time ← accident.not accident ← arrive on time, accident ← ¬ arrive on time, ¬ arrive on time ←, which has the answer set S = { ¬ arrive on time, accident }.By S ∩ Γ 1 = { accident }, E = { accident } is the explanation.
implies library.Next, given the additional fact necessary(open) and in the absence of prem(open), not library ← not prem(open), necessary(open) )

Table 2 .
Summary of inferences made by completion