17
OTTER (Organized Techniques for Theorem-proving and Effective Research) Heuristics computing 2014/12/08 9:25 – 11:00 Keio University, SFC

Otter 2014-12-08-02

Embed Size (px)

Citation preview

Page 1: Otter 2014-12-08-02

OTTER(Organized Techniques

for Theorem-proving and Effective Research)

Heuristics computing 2014/12/08 9:25 – 11:00

Keio University, SFC

Page 2: Otter 2014-12-08-02

Languages on Turing machinealgorithm device language

Turing machine Turing tape Computer

Recursive function Kleene Loop C language

lambda calculus Church recursion Haskell

National deduction Gentzen

Mathematical recursion Proof

Mathematical recursionBased on natural number. We can invoke recursive functions endlessly.

ProofA chain of clauses logically

connected from Axioms.

Proof Theory

Hilbert System

Gentzen System

Sequent calculus

Tableau Calculus

Resolution Principle Applied to computation

OTTER is resolution style theorem prover.

Page 3: Otter 2014-12-08-02

Main loop of OTTER

+-

++

++

-

-

+

+++

-

+ - ++

+

+ -

clash

+-+

clash

+-

pick up pick up

Search stopped because sos

empty.

Rules (usable)

Set of support (facts)

Page 4: Otter 2014-12-08-02

Clash (resolve.c)

225 |static void clash(struct clash_nd *c_start,226 | struct context *nuc_subst,

227 | struct literal *nuc_lits,228 | struct clause *nuc,

229 | struct context *giv_subst,230 | struct literal *giv_lits,

231 | struct clause *giv_sat,232 | int (*sat_proc)(struct clause *c),

233 | int inf_clock,234 | int nuc_pos,235 | int ur_box)

+

-

+

-

Nucleus (has at leastone negative literal)

++

Satellite (has no negative literal)

Page 5: Otter 2014-12-08-02

Hyper resolution: atom electron model

+

-++

+

+- +

++

++

+

1 |set(hyper_res).2 |assign(stats_level,1).3 |4 |list(usable).5 | -Sibling(x,y) | Brother(x,y) |

Sister(x,y).6 |end_of_list.7 |8 |list(sos).9 | Sibling(pat, ray) | Cousin(pat, ray).10 |end_of_list.

clash

Set of Support

Pick up

Set of Support

++

yielded state(clause sets)

Hyperresolution focuses on two or more clauses, requiring that one of the clauses (the nucleus) contain at least one negative literal and the remaining (the satellites) contain no negative literals.

Page 6: Otter 2014-12-08-02

Four interactions and atom

定数は項である 変数は項である f が n- 変数関数記号, t1 , ,・・・ tn

が項であれば, f ( t1 , ,・・・ tn ) は項

である .

term

P を n- 変数述語記号, t1 , ,・・・ tn を

項とすると, P ( t1 , ,・・・ tn ) は

原子式である.また,原子式あるいは

原子式の否定をリテラルという.

atom

nirmukta.com

Page 7: Otter 2014-12-08-02

Four interactions and OTTER

+

+ +-

-

+Gravitational interaction(weighting)weight_list(pick_and_purge).weight(P(rew($(0),$(0)),$(1)), 99)

Electromagnetic interaction (resolution)-father(x,y) | -mother(x,z) | grandmother(x,z)

Strong interaction (modulation)

(a=b) | (c=d).P(a) | Q(n, f(c,g(d))).

+

+

Page 8: Otter 2014-12-08-02

Clause representation

IF A THEN B : -A | B

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

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

achievable(state(hls(12),hs(0),ls(0),s(0),rem(3))).

-solvable(state(hls(12),hs(0),ls(0),s(0),rem(3))).

a b

a b c

a b

c

Page 9: Otter 2014-12-08-02

Syntax “A | B” (exclusive, fermi particle model)

AB

C

a

A  ∩  B  →  empty setB∪ ¬ 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

Page 10: Otter 2014-12-08-02

The Twelve-Coins Puzzle■ You have 12 coins. All coins appears to be identical. But you are told that one

of them is a counterfeit (lighter or heavier than other genuine coins).

■ You can use an scale or scales which is an equal-arm balance. The balance provides one of three possible indications: the right pan is heavier, or the pans are in balance, or the left pan is heavier. The balance has sensitivity sufficient

for the task.

■ One objective is to identify the counterfeit coin, and to check whether it is heavy or light.

■This time the balance may be used three times to determine if there is a unique coin—and if there is, to isolate it and determine its weight relative to the

others.

achievable(state(hls(12),hs(0),ls(0),s(0),rem(3))).

-solvable(state(hls(12),hs(0),ls(0),s(0),rem(3))).

Page 11: Otter 2014-12-08-02

Syntax “-A | B”: proof by contradiction

AB

C

A  ⊃  BB → A

There exists Ai where B∪ ¬ A → Ф

1 [] -Greek(x)|Person(x).2 [] -Person(x)|Mortal(x).3 [] Greek(socrates).4 [] -Mortal(socrates).5 [hyper,3,1] Person(socrates).6 [hyper,5,2] Mortal(socrates).7 [binary,6.1,4.1] $F.

3 |list(usable). 4 | -Greek(x) | Person(x). 5 | -Person(x) | Mortal(x). 6 |end_of_list. 8 |list(sos). 9 | Greek(socrates). 10 |end_of_list. 12 |list(passive). 13 | -Mortal(socrates). 14 |end_of_list.

Page 12: Otter 2014-12-08-02

Proof and Satisfiability

Always true Always false

satisfiable

unsatisfiable

unsatisfiablesatisfiable

AB

C

A  ∩  B  →  empty setB∪ ¬ A  → not Ф

Page 13: Otter 2014-12-08-02
Page 14: Otter 2014-12-08-02
Page 15: Otter 2014-12-08-02
Page 16: Otter 2014-12-08-02
Page 17: Otter 2014-12-08-02