Abduction and Induction Deduction, Abduction and Induction - - PowerPoint PPT Presentation

abduction and induction
SMART_READER_LITE
LIVE PREVIEW

Abduction and Induction Deduction, Abduction and Induction - - PowerPoint PPT Presentation

Abduction and Induction Deduction, Abduction and Induction Abduction Mathematical Induction Steffen H olldobler Abduction and Induction (5th January 2009) 1 An Introductory Example: Abduction K | = G . We use the following


slide-1
SLIDE 1

Abduction and Induction

◮ Deduction, Abduction and Induction ◮ Abduction ◮ Mathematical Induction

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 1

slide-2
SLIDE 2

An Introductory Example: Abduction

◮ K | = G. ◮ We use the following atoms: grassIsW et, wheelsAreW et, sprinklerIsRunning, raining. ◮ Let K = {g → w, s → w, r → g}. ⊲ Does K | = w hold? ◮ Idea: Find atom p such that K ∪ {p} | = w and K ∪ {p} is satisfiable. ⊲ p ≡ w ⊲ p ≡ g ⊲ p ≡ s or p ≡ r ◮ This process is called abduction.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 2

slide-3
SLIDE 3

Deduction, Abduction and Induction

◮ Peirce 1931: Kfacts ∪ Krules | = Gresult. ⊲ Deduction is an analytic process based on the application of general rules to particular facts, with the inference as a result. ⊲ Abduction is synthetic reasoning which infers a fact from the rules and the result. ⊲ Induction is synthetic reasoning which infers a rule from the facts and the result.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 3

slide-4
SLIDE 4

An Introductory Example: Induction

◮ Kplus = { (∀Y :number) plus(0, Y ) ≈ Y, (∀X, Y :number) plus(s(X), Y ) ≈ s(plus(X, Y )) } ⊲ Does Kplus | = (∀X, Y :number) plus(X, Y ) ≈ plus(Y, X) hold? ◮ D = N ∪ {♦} I s/1 plus/2 f/1 ⊕/2 ⊲ f(d) =  1 if d = ♦ d + 1 if d ∈ N ⊲ d ⊕ e = 8 > > > > > < > > > > > : if d = e = ♦ ♦ if d = 0 and e = ♦ d if d ∈ N+ and e = ♦ e if d = ♦ and e ∈ N d + e if d, e ∈ N ⊲ where +/2 : N → N is the usual addition on N and N+ = N \ {0}. ◮ Then, I | = Kplus, but (♦ ⊕ 0) = (0 ⊕ ♦) Exercise.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 4

slide-5
SLIDE 5

The Example Continued

◮ Kplus = { (∀Y :number) plus(0, Y ) ≈ Y, (∀X, Y :number) plus(s(X), Y ) ≈ s(plus(X, Y )) } ⊲ Does Kplus | = (∀X, Y :number) plus(X, Y ) ≈ plus(Y, X) hold? ◮ Add Peano’s induction principle to Kplus: (P (0) ∧ (∀M :number) (P (M) → P (s(M)))) → (∀M :number) P (M). ◮ In order to prove the induction base (X = 0) we need P (Y ) ≡ plus(Y, 0) ≈ Y . ◮ Let KI be an appropriate set of induction axioms, then Kplus ∪ KI | = (∀X, Y :number) plus(X, Y ) ≈ plus(Y, X). ◮ How does KI look like? Exercise.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 5

slide-6
SLIDE 6

Abduction

◮ Example Starting a car. ◮ Applications ⊲ fault diagnosis ⊲ medical diagnosis ⊲ high level vision ⊲ natural language understanding ⊲ reasoning about states, actions and causality ⊲ knowledge assimilation

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 6

slide-7
SLIDE 7

A First Characterization of Abduction

◮ Given K and G; find explanation K′ such that ⊲ K ∪ K′ | = G and ⊲ K ∪ K′ is satisfiable. The elements of K′ are said to be abduced. ◮ Abducing atoms is no real restriction. ◮ Weakness of this first characterization: We want to abduce causes of effects, but no other effects.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 7

slide-8
SLIDE 8

Restrictions

◮ Abducible formulas: ⊲ set of pre-specified and domain-dependent formulas; ⊲ abduction is restricted to this set; ⊲ default in logic programming: set of undefined predicates. ◮ Typical criteria for choosing a set of abducible formulas: ⊲ an explanation should be basic, i.e., it cannot be explained by another explanation; ⊲ an explanation should be minimal, i.e., it cannot be subsumed by another explanation; ⊲ additional information; ⊲ domain-dependent preference criteria; ⊲ integrity constraints.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 8

slide-9
SLIDE 9

Abductive Framework

◮ Abductive framework K, KA, KIC, where ⊲ K is a set of formulas, ⊲ KA is a set of ground atoms called abducibles, ⊲ KIC is a set of integrity constraints. ◮ Observation G is explained by K′ iff ⊲ K′ ⊆ KA, ⊲ K ∪ K′ | = G and ⊲ K ∪ K′ satisfies KIC. ◮ K ∪ K′ satisfies KIC iff ⊲ K ∪ K′ ∪ KIC are satisfiable (satisfiability view) or ⊲ K ∪ K′ | = KIC (theoremhood view).

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 9

slide-10
SLIDE 10

Knowledge Assimilation

◮ Task assimilate new knowledge into a given knowledge base. ◮ Example ⊲ K = { (∀X, Y, Z) (sibling(X, Y ) ← parent(Z, X) ∧ parent(Z, Y )), (∀X, Y ) (parent(X, Y ) ← father(X, Y )), (∀X, Y ) (parent(X, Y ) ← mother(X, Y )), father(john, mary), mother(jane, mary) } ⊲ KIC = { (∀X, Y, Z) (X ≈ Y ← father(X, Z) ∧ father(Y, Z)), (∀X, Y, Z) (X ≈ Y ← mother(X, Z) ∧ mother(Y, Z)) }, ⊲ KA = {A | A is a ground instance of father(X, Y ) or mother(X, Y )} ⊲ ≈/2: ‘built–in’ predicate such that (∀X) X ≈ X and s ≈ t for all distinct ground terms s and t. ⊲ Task assimilate sibling(mary, bob).

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 10

slide-11
SLIDE 11

The Example Continued

◮ Four minimal explanations: ⊲ {father(john, bob)} ⊲ {mother(jane, bob)}. ⊲ {father(jane, bob)} ⊲ {mother(john, bob)} ◮ Exercise Revise the example such that the last two minimal explanations are eliminated. ◮ What happens in the revised example if we additionally observe that mother(joan, bob)? ⊲ Only one minimal explanation: {father(john, bob)} ⊲ belief revision.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 11

slide-12
SLIDE 12

Theory Revision

◮ Default reasoning and jumping to a conclusion. ◮ Example ⊲ K = { (∀X) (penguin(X) → bird(X)), (∀X) (birds-fly(X) → (bird(X) → fly(X))), (∀X) (penguin(X) → ¬fly(X)), penguin(tweedy), bird(john) } ⊲ KIC = ∅ ⊲ KA = {A | A is a ground instance of birds-fly(X)} ◮ Task 1 Explain fly(john). ⊲ Minimal set {birds-fly(john)}. ◮ Task 2 Explain fly(tweedy). ◮ What happens if we additionally observe penguin(john)?

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 12

slide-13
SLIDE 13

Abduction and Model Generation

◮ Example ⊲ K = { wobbly-wheel ↔ broken-spokes ∨ flat-tyre, flat-tyre ↔ punctured-tube ∨ leaky-valve } ⊲ KIC = ∅ ⊲ KA = {broken-spokes, punctured-tube, leaky-valve} ◮ K = K← ∪ K→ where ⊲ K← = { wobbly-wheel ← broken-spokes, wobbly-wheel ← flat-tyre, flat-tyre ← punctured-tube, flat-tyre ← leaky-valve } ⊲ K→ = { wobbly-wheel → broken-spokes ∨ flat-tyre, flat-tyre → punctured-tube ∨ leaky-valve }

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 13

slide-14
SLIDE 14

The Wobbly–Wheel Example

◮ Observation wobbly-wheel ◮ What is a minimal and basic explanation? K′ = {broken-spokes ∨ punctured-tube ∨ leaky-valve}. It is unique! ◮ How can this explanation be computed? ⊲ SLD–resolution, ⊲ Model generation.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 14

slide-15
SLIDE 15

Abduction and SLD–Resolution

◮ Consider the SLD-derivation tree for ←wobbly-wheel wrt K←: ←punctured-tube

  • ←leaky-valve

❅ ❅ ❅ ❅ ❅

←flat-tyre

❅ ❅ ❅ ❅ ❅

←broken-spokes

  • ←wobbly-wheel

◮ Combine negated leaves disjunctively.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 15

slide-16
SLIDE 16

Abduction and Model Generation

◮ Remember K→ = { wobbly-wheel → broken-spokes ∨ flat-tyre, flat-tyre → punctured-tube ∨ leaky-valve }. ◮ Add wobbly-wheel to K→. ◮ What are the minimal models of the extended knowledge base? {wobbly-wheel, flat-tyre, punctured-tube}, {wobbly-wheel, flat-tyre, leaky-valve}, {wobbly-wheel, broken-spokes}. ◮ Restrict these models to the abducible predicates.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 16

slide-17
SLIDE 17

Mathematical Induction

◮ Essential proof technique used to verify properties about recursively defined

  • bjects like natural numbers, lists, trees, logic formulas, etc.

◮ Central role in the fields of mathematics, algebra, logic, computer science, formal language theory, etc.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 17

slide-18
SLIDE 18

Problems

◮ Should induction be really used to prove a statement? ◮ Should the statement be generalized before an attempt is made to prove it by induction? ◮ Which variable is to be the induction variable? ◮ What induction principle is to be used? ◮ What is the property used within the induction principle? ◮ Should nested induction be taken into account?

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 18

slide-19
SLIDE 19

Data Structures

◮ Function symbols are split into constructors and defined function symbols: ⊲ Constructors: C ⊆ F, ⊲ Defined function symbols: D ⊆ F, ⊲ C ∩ D = ∅, ⊲ C ∪ D = F, ⊲ T (C): set of constructor ground terms. ◮ Data structures (or sorts) are sets of constructor ground terms.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 19

slide-20
SLIDE 20

Data Structures – Examples

◮ 0:number s:number → number ⊲ T ({0, s}) = {0, s(0), s(s(0)), . . .} is called the sort number. ◮ :bool [ ]:bool ⊲ T ({ , [ ]}) = { , [ ]} is called the sort bool. ◮ [ ]:→ list(number) ::number × list(number) → list(number) ⊲ T ([ ], :}) = {[ ], [0], [0, 0], [s(0)], . . .} is called the sort list(number).

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 20

slide-21
SLIDE 21

Well-Sortedness and Selectors

◮ Well-Sortedness ⊲ Constants and variables are well-sorted. ⊲ If f : S1 × . . . × Sn → S and for all 1 ≤ i ≤ n we find that ti is well-sorted and of sort Si then f(t1, . . . , tn) is well-sorted and of sort S. ◮ We assume that all terms are well-sorted! ◮ Selectors ⊲ For each n-ary constructor c we have n selectors si such that for all 1 ≤ i ≤ n we find si(c(t1, . . . , tn)) ≈ ti.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 21

slide-22
SLIDE 22

Data Structures – Requirements

◮ Different constructors denote different objects. ◮ Constructors are injective. ◮ Each object can be denoted as an application of some constructor to its selectors (if any exist). ◮ Each selector is ‘inverse’ to the constructor it belongs to. ◮ Each selector returns a so-called witness term if applied to a constructor it does not belong to.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 22

slide-23
SLIDE 23

Requirements for Numbers

◮ The requirements can be translated into first order formulas. ◮ The requirements for number are: Knumber = { (∀N :number) 0 ≈ s(N), (∀N, M :number) (s(N) ≈ s(M) → N ≈ M), (∀N :number) (N ≈ 0 ∨ N ≈ s(p(N))), (∀N :number) p(s(N)) ≈ N, p(0) ≈ 0 } where p/1 is the selector for the only argument of s/1 and 0 is the witness term assigned to p(0). ◮ p/1 is a defined function symbols!

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 23

slide-24
SLIDE 24

Defined Functions

◮ Functions are defined on top of data structures. ◮ We define functions with the help of a set of conditional equations, i.e., universally closed equations of the form ∀ l ≈ r ← C such that var(C) ∪ var(r) ⊆ var(l) and C denotes a conjunction of literals.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 24

slide-25
SLIDE 25

Defined Functions – Examples

◮ Predecessor on number: (∀N :number) p(s(N)) ≈ N, p(0) ≈ 0. ◮ Addition on number: Kplus: (∀X, Y :number) (plus(X, Y ) ≈ Y ← X ≈ 0), (∀X, Y :number) (plus(X, Y ) ≈ s(plus(p(X), Y )) ← X ≈ 0). ◮ Less-than on number: Klt: (∀X, Y :number) (lt(X, Y ) ≈ [ ] ← Y ≈ 0), (∀X, Y :number) (lt(X, Y ) ≈ ← X ≈ 0 ∧ Y ≈ 0), (∀X, Y :number) (lt(X, Y ) ≈ lt(p(X), p(Y )) ← X ≈ 0 ∧ Y ≈ 0).

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 25

slide-26
SLIDE 26

Rewriting

◮ A term t can be rewritten wrt K iff 1 t is well-sorted and ground, 2 t contains a term g(t1, . . . , tn), where for all 1 ≤ i ≤ n we find that ti is a constructor ground term, 3 ∀ g(X1, . . . , Xn) ≈ r ← C ∈ K and 4 there exists θ = mgu(g(X1, . . . , Xn), g(t1, . . . , tn)) such that K | = Cθ. ◮ In this case t is rewritten to the term obtained from t by replacing g(t1, . . . , tn) by rθ.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 26

slide-27
SLIDE 27

Cases

◮ Let ∀ g(t1, . . . , tn) ≈ r ← C be a rule and X1, . . . , Xn new variables. ∀ g(X1, . . . , Xn) ≈ r ← X1 ≈ t1 ∧ . . . ∧ Xn ≈ tn ∧ C is called homogeneous form of the rule. ◮ Example (∀X, N :number) (p(X) ≈ N ← X ≈ s(N)) is the homogeneous form of (∀N :number) p(s(N)) ≈ N. ◮ A rule is semantically equivalent to its homogeneous form. ◮ The case of a rule is the condition of its homogeneous form.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 27

slide-28
SLIDE 28

Programs

◮ A program is a set of clauses consisting of data structure declarations and function definitions. ◮ Example Knumber ∪ Kplus is a program. ◮ A program K is ⊲ well-formed iff it can be ordered such that each function symbol occurring in the definition of a function g in K either is introduced before by a data structure declaration or another function definition or, otherwise, is g in which case the function is recursive, ⊲ well-sorted iff each term occurring in K is well-sorted, ⊲ deterministic iff for each function definition occurring in K the cases are mutually exclusive, ⊲ case-complete iff for each function definition of a function g/n occurring in K and each well-sorted n-tuple of constructor ground terms given as input to g/n there is at least one of the cases which is satisfied.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 28

slide-29
SLIDE 29

More Properties of Programs

◮ A program is terminating iff there is no infinite rewriting sequence for any well-sorted ground term. ◮ A program is admissible iff it is well-formed, well-sorted, deterministic, case-complete and terminating. ◮ The rewrite relation wrt an admissible program is confluent Exercise.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 29

slide-30
SLIDE 30

Evaluation

◮ Admissible programs K define a unique evaluator evalK, which maps terms to their normal form. ◮ evalK : T (F) → T (C) ◮ evalK(t) is called value of t. ◮ evalK is an interpretation with domain T (C). ◮ evalK is called standard interpretation of K. ◮ plus(s(0), s(0)) → s(plus(p(s(0)), s(0))) → s(plus(0, s(0))) → s(s(0)).

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 30

slide-31
SLIDE 31

Evaluation – Example

◮ Let K = Knumber ∪ Kplus: ◮ evalK | = K, evalK | = (∀X, Y :number) plus(X, Y ) ≈ plus(Y, X), evalK | = (∀X :number) X ≈ s(X). Exercise. ◮ K | = (∀X, Y :number) plus(X, Y ) ≈ plus(Y, X), K | = (∀X :number) X ≈ s(X). Exercise.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 31

slide-32
SLIDE 32

Theory of Admissible Programs

◮ G is true wrt K iff evalK | = G. ◮ {G | evalK | = G} is called the theory of K. ◮ Idea Add clauses to K such that non-standard interpretations are no longer models of K: ⊲ These clauses are called induction axioms. ◮ Let KI be a decidable set of induction axioms, where evalK | = KI.

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 32

slide-33
SLIDE 33

Induction – Example

◮ Let K = Knumber ∪ Kplus ◮ Let KI be the set of all formulas of the form (P (0) ∧ (∀X :number) (P (X) → P (s(X)))) → (∀X :number) P (X). ◮ This scheme can be instantiatied by, e.g., replacing P (X) by X ≈ s(X): (0 ≈ s(0) ∧ (∀X :number) (X ≈ s(X) → s(X) ≈ s(s(X)))) → (∀X :number) X ≈ s(X). (1) ◮ evalK | = (1) Exercise. ◮ K ∪ {(1)} | = (∀X :number) X ≈ s(X) Exercise. ◮ The proof is finite (in contrast to a proof of evalK | = (∀X :number) X ≈ s(X))).

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 33

slide-34
SLIDE 34

Inductive Theorem Proving

◮ Theorem proving by induction is incomplete (G¨

  • del’s incompleteness theorem).

◮ Induction axioms may be computed from inductively defined data structures. ◮ Heuristics may guide selection of ⊲ the induction variable, ⊲ the induction schema and ⊲ the induction axiom. ◮ Several theorem provers based on induction are available, e.g., ⊲ NQTHM ⊲ OYSTER-CLAM ⊲ INKA

Steffen H¨

  • lldobler

Abduction and Induction (5th January 2009) 34