15
OTTER (Organized Techniques for Theorem-proving and Effective Research) Heuristics computing 2017/12/18 9:25 – 11:00 Keio University, SFC http://www.mcs.anl.gov/research/projects/AR/otter/

Otter 2017-12-18-01-ss

Embed Size (px)

Citation preview

Page 1: Otter 2017-12-18-01-ss

OTTER

(Organized Techniques

for Theorem-proving and Effective Research)

Heuristics computing

2017/12/18 9:25 – 11:00

Keio University, SFC

http://www.mcs.anl.gov/research/projects/AR/otter/

Page 2: Otter 2017-12-18-01-ss

Example2: Truth teller, Liar and Spy

(Normal)

Page 3: Otter 2017-12-18-01-ss

Example 2: Truth tellers, liars and spy

On the fabled Island of Knights and Knaves, we meet three people, A, B, and C, one of whom

is a knight, one a knave, and one a spy. The knight always tells the truth, the knave always

lies, and the spy can either lie or tell the truth.

A says: "C is a knave."

B says: "A is a knight."

C says: "I am the spy."

Who is the knight, who the knave,

and who the spy?

set(hyper_res).

list(usable).

-P(T(x)) | -P(Says(x,y)) | P(y).

-P(L(x)) | -P(Says(x,y)) | -P(y).

P(T(x)) | P(L(x)) | P(N(x)).

-P(T(x)) | -P(L(x)).

-P(T(x)) | -P(N(x)).

-P(L(x)) | -P(N(x)).

-P(T(x)) | P(L(x)) | P(N(x)).

-P(L(x)) | P(T(x)) | P(N(x)).

end_of_list.

list(sos).

P(Says(A,L(C))).

P(Says(B,T(A))).

P(Says(C,N(C))).

end_of_list.

Always true (恒真)

Always false(恒偽)

Satisfiable(証明可能) Unsatisfiable(証明不可能)

私は正直者だと言っているスパイ

私は嘘つきだと言っているスパイ

https://github.com/RuoAndo/otter-book/tree/master/takefuji-lab/2017

Page 4: Otter 2017-12-18-01-ss

Proof and satisfiability

A

B C

a

A ∩ B → empty set

B∪¬A → not Ф

b

c

fermi particle model bose particle model

X

Y

Z

X

Y

Z

a

ab

c

c

a

X(a) | Y(b)

either, exclusive

electron, proton

X(a) or Y(b)

inclusive

photon

Always true Always false

satisfiable

unsatisfiable

unsatisfiablesatisfiable

Page 5: Otter 2017-12-18-01-ss

Generalization: consistency is non-deterministic

(∃y) (x) ~ Dem (x, y) ⊃ (x) ~ Dem(x, sub(n, A, n))

Dem(x,y) : yの言っていることをxが確かめる。Island is consistent if there are only truth tellers and liars.

島に正直者と嘘つきしかいない場合、確かめる事のできない言明がある。その言明とは、「私は嘘好きである」というものである。

(∃y) (x) ~ Dem (x, y)

Dem(x, sub(n,A,n)): 自分について言っていること(sub(n,A,n)をxが確かめることができる。If the island is consistent, no one in the island know if there are some spy.

「私は嘘つきである」という言明を確かめることができない場合、誰も島にスパイがいることを発見できない。

しかし、OTTERは発見できる。

Page 6: Otter 2017-12-18-01-ss

set(para_into).

list(usable).

EQUAL(l(hole,l(n(x),y)),l(n(x),l(hole,y))).

EQUAL(l(hole,l(x,l(y,l(z,l(u,l(n(w),v)))))),l(n(w), l(x,l(y,l(z,l(u,l(hole,v))))))).

-STATE(l(n(1),l(n(2),l(n(3),l(n(4),l(end,l(n(5), l(n(6),l(n(7),l(n(8),l(end,l(n(9),l(n(10),l(n(11),

l(n(12),l(end,l(n(13),l(n(14),l(n(15), l(hole,end)))))))))))))))))))).

end_of_list.

list(sos).

STATE(l(n(1),l(n(6),l(n(2),l(n(4),l(end,l(n(5), l(hole,l(n(3),l(n(8),l(end,l(n(9),l(n(10),l(n(7),

l(n(11),l(end,l(n(13),l(n(14),l(n(15), l(n(12),end)))))))))))))))))))).

end_of_list.

1 6 2 4

5 3 8

9 10 7 11

13 14 15 12

Prg4-8.in : SCORE 437

1 6 2 4

5 3 8

9 10 7 11

13 14 15 12

Prg4-8-7.in : SCORE 891

11 2 6 9

4 14 3 5

1 12 7 15

13 10 6

Prg4-8-2.in : SCORE ????

Example 3: 15 puzzle

Page 7: Otter 2017-12-18-01-ss

Paramodulation

1 |set(para_into).

2 |assign(stats_level,1).

3 |

4 |list(usable).

5 | father(ken)=jim.

6 | mother(jim)=fay.

7 |end_of_list.

8 |

9 |list(sos).

10 | Grandmother(mother(father(x)),x).

11 |end_of_list.

Grandmother

Fay

Jim

Ken

Jim

father

mother SoS List: list(list)

Usable List: list(usable)

Page 8: Otter 2017-12-18-01-ss

• Condition 1: For all a and x, b exists

where Parity(b, x) == Parity(a, x)

• Condition 2: For all b and x, a exists

where Parity(a,x) != Parity(b,x)

Result: For all x,

H exists Parity (x[i], H) != Parity (x[j], H)

Curious property of parity

Page 9: Otter 2017-12-18-01-ss

Example 4: Two-inverter puzzle

A

B

C

-A

-B

-C

The 2-NOTs problem: Synthesize a black box which computes NOT-

A, NOT-B, and NOT-C from A, B, and C, using an arbitrary number

of ANDs and ORs, but only 2 NOTs.

NOT

AND

AND

AND

AND

AND

AND

AND

AND

AND

AND

OR

OR

OR

OR

OR

OR

OR

OR

NOT

Page 10: Otter 2017-12-18-01-ss

Example 4: Two-inverter puzzle

Page 11: Otter 2017-12-18-01-ss

Primitive recursive function

• The basic primitive recursive functions are given by

these axioms:

• Constant function: The 0-ary constant function 0 is

primitive recursive. => AND

• Successor function: The 1-ary successor function S,

which returns the successor of its argument (see Peano

postulates), is primitive recursive. That is, S(k) = k + 1. =>

OR

• Projection function: For every n≥1 and each i with 1≤i≤n,

the n-ary projection function Pi

n, which returns its i-th

argument, is primitive recursive. => NOT*NOT

Page 12: Otter 2017-12-18-01-ss

Backup slides

Page 13: Otter 2017-12-18-01-ss

Usable Set+

+

++

+

--

lightest

+

-

EMPTY

Usable Set

SoS Set

SoS Set

--

prg2-4.out.lined-----> EMPTY CLAUSE at 0.00 sec --> 8 [hyper,7,4,6] $F.

Size of Usable set (nonliear)

Main Loop

A

B

C

C ⊃ B

B ⊃ A

There exists

A[i] where

B∪¬A → Ф

(empty)

A’

Page 14: Otter 2017-12-18-01-ss

Clause Sets and representation

SoS

(Set of Support)

Demodulators

Usable

Passive

Term

Rewriting

Resolution

and paramodulation

conflict

a b

a b c

a b

c

IF A THEN B : -A | B

IF A & B THEN B : -A | -B | C

IF A THEN B or C : -A | B | C

Page 15: Otter 2017-12-18-01-ss

Strategies

Restriction Strategies

Set of Support

Weighting

Direction Strategies

Ratio

Resonance

Look-ahead Strategies

Hot List

Redundancy control

Subsumption

DemodulationParamodulation

Dynamic Hot List

Subtautology

Resonance restriction

Level SaturationRecursive Tail

Hints

First-in Last-outProof checking filter

http://www.mcs.anl.gov/research/projects/AR/strategies.html

Set of Support