part ii approximated theorem proving · 1. motivation ¥suppose that we have a huge database and we...

22
Part II Approximated Theorem Proving Marcelo Finger Renata Wassermann mfi[email protected] [email protected] Department of Computer Science University of S ˜ ao Paulo Brazil c Marcelo Finger Approximated Theorem Proving 0-0/21

Upload: others

Post on 18-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

Part II

Approximated Theorem Proving

Marcelo Finger Renata [email protected] [email protected]

Department of Computer ScienceUniversity of Sao Paulo

Brazil

c©Marcelo Finger Approximated Theorem Proving 0-0/21

Page 2: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

1. Motivation

¥ Suppose that we have a huge database and we want to check whethera formula follows from it.

¥ We may not have enough resources to check the whole database.

¥ But we may be able to find the answer even without checking allformulas:

I Let B={α, β, γ, δ, p, p → q, ϕ, ψ}

I We want to know whether B |= q.

c©Marcelo Finger Approximated Theorem Proving 1/21

1

Page 3: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

1.1 Example

Triangles are polygons.Rectangles are polygons.Rectangles have four right angles.

Cows eat grass.

Animals that eat grass do not have canine teeth.

Carnivorous animals are mammals.

Mammals have canine teeth or molar teeth.

Animals that eat grass are mammals.

Mammals are vertebrate.

Vertebrates are animals.

Brazil is in South America.Volcanic soil is fertile.

c©Marcelo Finger Approximated Theorem Proving 2/21

2

Page 4: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

1.2 Structure of the talk:

¥ Approximate Entailment (S3).

¥ Extended S3.

¥ Incremental Proof Method: Tableaux for S3.

¥ Dynamic properties.

¥ Static expressivity.

¥ Recovering control.

¥ Conclusions and Future Work.

c©Marcelo Finger Approximated Theorem Proving 3/21

3

Page 5: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

2. Approximate Entailment

(Schaerf and Cadoli, 1995)

¥ Goal: Approximated theorem proving in the propositional clausalfragment.

¥ Main idea: Consider only some propositional letters.

I L: propositional letters of the language.

I Context set S ⊆ L.

I Define two approximate entailments:

• |=1S: complete but not sound (wrt CL).

• |=3S: sound and incomplete (wrt CL).

c©Marcelo Finger Approximated Theorem Proving 4/21

4

Page 6: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

2.1 Approximate Entailment – S3

¥ S = L: classical entailment.

¥ Every theorem of S3 is a classical theorem.

¥ Approximations behave classically for p ∈ S:

I v(p) = 1 iff v(¬p) = 0.

¥ If p 6∈ S, there are 3 possibilities:

I v(p) = 1 and v(¬p) = 0

I v(p) = 0 and v(¬p) = 1

I v(p) = 1 and v(¬p) = 1

c©Marcelo Finger Approximated Theorem Proving 5/21

5

Page 7: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

2.2 Example – Cadoli and Schaerf

B = {¬cow ∨ grass-eater, ¬dog ∨ carnivore,

¬grass-eater ∨ ¬canine-teeth,

¬grass-eater ∨ mammal, ¬carnivore ∨ mammal,

¬mammal ∨ canine-teeth ∨ molar-teeth,

¬mammal ∨ vertebrate,

¬vertebrate ∨ animal}.

Let α = ¬cow ∨ molar-teeth.

B |= α?

For S = {grass-eater, mammal, canine-teeth},

B |=3S α, hence B |= α.

c©Marcelo Finger Approximated Theorem Proving 6/21

6

Page 8: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

2.3 Problems with S3

¥ Only defined for clauses.

¥ No axiomatisation.

¥ No indications on how to get S.

¥ Our work:

I Extended S3 to full propositional logic.

I Tableaux for extended S3.

I Heuristics for expanding S.

I Axiomatisation.

c©Marcelo Finger Approximated Theorem Proving 7/21

7

Page 9: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

3. KE-Tableaux for S3 (KES3)

¥ Based on KE-Tableaux [D’Agostino 94].

¥ Formulas are T - and F-marked.

¥ One basic rule (T ¬) is restricted:

T ¬α

F αprovided α ∈ S

¥ Other tableau rules are as in classical KE

c©Marcelo Finger Approximated Theorem Proving 8/21

8

Page 10: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

3.1 Classical KE-Rules

T α → βT αT β

(T →1)

T α → βF βF α

(T →2)

F α → β

T αF β

(F →)

F α∧βT αF β

(F∧1)

F α∧βT βF α

(F∧2)

T α∧β

T αT β

(T∧)

T α∨βF αT β

(T∨1)

T α∨βF βT α

(T∨2)

F α∨β

F αF β

(F∨)

T ¬α

F α(T¬)

F ¬α

T α(F¬)

T α F α(PB)

c©Marcelo Finger Approximated Theorem Proving 9/21

9

Page 11: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

3.2 Example

¥ S = ∅.

¥ ¬α∨β ` α → β ?

1. T ¬α∨β

2. F α → β

Initial Configuration

c©Marcelo Finger Approximated Theorem Proving 10/21

10

Page 12: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

3.3 Example (cont)

¥ S = ∅.

¥ ¬α∨β ` α → β ?

1. T ¬α∨β

2. F α → β

Next Rule: (F →)

F ϕ → ψ

T ϕ

F ψ

c©Marcelo Finger Approximated Theorem Proving 11/21

11

Page 13: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

3.4 Example (cont)

¥ S = ∅.

¥ ¬α∨β ` α → β ?

1. T ¬α∨β

2. F α → β

3. T α

4. F β

Next Rule: (T ∨)

T ϕ∨ψ

F ψ

T ϕ

c©Marcelo Finger Approximated Theorem Proving 12/21

12

Page 14: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

3.5 Example (cont)

¥ S = ∅.

1. T ¬α∨β

2. F α → β

3. T α

4. F β

5. T ¬α

?

Cannot apply: (T ¬)

T ¬ϕ

F ϕ

only applicable if ϕ ∈ S

¥ Rule (T ¬) is blocked because α 6∈ S = ∅.

¥ The tableau does not close: in S3(∅), ¬α∨β 6` α → β.

¥ Indeed, in S3(∅), ¬α∨β 6|=3.2S α → β.

c©Marcelo Finger Approximated Theorem Proving 13/21

13

Page 15: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

4. An Incremental Method to Compute S

¥ The idea:

When the KES3 tableau is blocked, expand S so as tounblock it.

¥ By expanding form S to S′ ⊃ S, we are changing the logic.

¥ No need to redo the tableau. Expansion can resume from where itstopped.

¥ The bigger S, the closer to classical logic.

¥ When S contains all propositions in the sequent, we are in classicallogic.

c©Marcelo Finger Approximated Theorem Proving 14/21

14

Page 16: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

4.1 Example (cont)

¥ S = {α}.

1. T ¬α∨β

2. F α → β

3. T α

4. F β

5. T ¬α

Can apply: (T ¬)

T ¬ϕ

F ϕ

for now ϕ ∈ S

c©Marcelo Finger Approximated Theorem Proving 15/21

15

Page 17: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

4.2 Example (final)

¥ S = {α}.

1. T ¬α∨β

2. F α → β

3. T α

4. F β

5. T ¬α

6. F α

×

Branch Closing Condition

T ϕ

F ϕ

×

¥ The tableau is closed: ¬α∨β ` α → β is derivable in S3({α}).

¥ Indeed, in S3({α}), ¬α∨β |=3.2S α → β.

c©Marcelo Finger Approximated Theorem Proving 16/21

16

Page 18: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

5. Static Properties

¥ Given S, what is T h(S3(S))? (expressivity)

¥ For a fixed S, KES3(S) proves more than CSS3(S).T ¬l ∨α

T l ∨β

F α∨β

F α

F β

T ¬l

F l (l ∈ S)

T l×

T l → α

T l ∨β

F α∨β

F α

F β

F l

T l×

c©Marcelo Finger Approximated Theorem Proving 17/21

17

Page 19: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

6. Dynamic Properties

¥ How do we expand S to S′ ⊃ S? (control)

¥ KES3 can linearly simulate the dynamics of CSS3, generating thesame S.

¥ For the same ∆S, ∆T (CSS3) ⊆ ∆T (KES3).

c©Marcelo Finger Approximated Theorem Proving 18/21

18

Page 20: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

6.1 Control

¥ In CSS3, S controls the atoms over which resolution can be applied.

¥ In KES3, S controls the formulas over which (T¬) can be applied.

¥ If we eliminate ¬-formulas we reduce the control of S on KES3.

¥ How can we recover control?

c©Marcelo Finger Approximated Theorem Proving 19/21

19

Page 21: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

6.2 Recovering control

¥ We can restrict the application of Modus Ponens:

T α → β

T α

T β if α ∈ ST→

T ¬α

F α if α ∈ ST¬

¥ With this, the two systems have the same expressivity and control.

¥ But KES3 allows for fine-tuning (e.g. different weights for the rules).

c©Marcelo Finger Approximated Theorem Proving 20/21

20

Page 22: Part II Approximated Theorem Proving · 1. Motivation ¥Suppose that we have a huge database and we want to check whether a formula follows from it. ¥We may not have enough resources

Conclusions and Future Work

We have:

¥ Extended S3 to full propositional logic.

¥ Given a proof method for the extended system.

¥ Compared the new system to the original one.

¥ Shown how to add control.

Future work includes:

¥ Studying the computational complexity of the proof method.

¥ Applications.

c©Marcelo Finger Approximated Theorem Proving 21/21

21