Post on 22-Jan-2018
OTTER(Organized Techniques
for Theorem-proving and Effective Research)
Heuristics computing 2017/12/03 9:25 – 11:00
Keio University, SFC
■Organized Techniques for Theorem-proving and Effective Research ■Otter is designed to prove theorems stated in first-order logic with equality
OTTER
Install# apt-get install otter# wget http://www.mcs.anl.gov/research/projects/AR/otter/dist33/otter-3.3f.tar.gz# tar zxvf otter-3.3f.tar.gz; cd otter-3.3f; ./configure; make; make install
Argonne National Laboratory the largest national laboratory by size and scope in the Midwest. Argonne was initially formed to carry out Enrico Fermi's work on nuclear reactors as part of the Manhattan Project.
Larry Wos is a mathematician, a researcher in the Mathematics and Computer Science Division of Argonne National Laboratories.
Prolog(1972)
C(1973)
LISP(1953)
1950 200019801970 1990 2010
JAVA(1995)
Ocaml(04)
ML(1973)Type Inference
Isabelle(1986)OTTER(96)
Haskell(1986)
gcc(1985)
Google MapReduce(04)
scala(03)
Coq(1984) Proverif(2003)
Python(1991)
SQL86(86)
Shift-Reduce
Imperative
Proof Assistant
Higher order
Automated reasoning
lamda
Unification
Compiler
Database
Mainframe Object orientedProgramming Data mining BigData(AI2)Algorithm(A1)
PopField(1982)
BoltzmanMachine(85)
BackProp(1986)
SOM(81) SVM(91)Deep Learning(2012)
B: Imperative
Thermodynamics(熱力学)
Proof Assistant Kernel
Autoencoder
Boosting(04)
2015
GraphComputation
Pig(09)
pthread
Redis(09)
multicore
Proof Assistantwith heuristics
SledgeHummer(03)
GPU
A: declarative
C: reasoning
D: heuristics
Deep learning
λ calculus
turing machine
π calculus
optimization
resolution
propagation
recursion
OTTER and Four computing paradigmsWorld war II
Natural dedution
Puzzles and programs
Truth tellers and liars
Tower of Hanoi
Two inverter puzzle
Ferrying problem15 puzzle
N-coins balance puzzle
#apt-get install otter git#git clone https://github.com/RuoAndo/otter-book
Self-replicatingrobots
Tarski parallelaxiom
StrategiesRestriction 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
Imperative
Declarative
Automated reasoning
Loop
Lambda / Monad
Primitive recursive function ?
State Machine
Recursion
TAPE
CLOCK
ATOM
LIST
RECURSION
HEATRESOANCE
Leibniz
Spinoza
?
Example 1: Truth tellers and liars
http://jinavie.tumblr.com/post/38901128124/truth-and-lies#.WiOmGEpl91s
On the fabled Island of Knights and Knaves, we meet two people, A and B, one of whom is a knight and one a knave. The knight always tells the truth, the knave always lies.A says: "C is a knave."B says: "A is a knight."
Who is the knight, who the knave, and who the spy?
%assign(max_proofs,-1).set(hyper_res).set(print_lists_at_end).assign(stats_level,0).
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(T(x)) | -P(L(x)).end_of_list.
list(sos).P(Says(A, L(A))).end_of_list.
https://github.com/RuoAndo/otter-book/tree/master/takefuji-lab/2017
configuration rule fact
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 ⊃ BB ⊃ A
There exists A[i] where B∪¬A → Ф (empty)
A’
Clause Sets and representation
SoS (Set of Support)
Demodulators
Usable
Passive
Term Rewriting
Resolutionand 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
Example 2: Truth tellers, liars and spyOn 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
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は発見できる。
15 puzzle
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.
Complexity of 15 puzzle
1 6 2 45 3 89 10 7 1113 14 15 12
Prg4-8.in : SCORE 437
1 6 2 45 3 89 10 7 1113 14 15 12
Prg4-8-7.in : SCORE 891
11 2 6 94 14 3 51 12 7 1513 10 6
Prg4-8-2.in : SCORE ????
https://github.com/RuoAndo/otter-book/tree/master/15puzzle# cd otter-book# git pull
Paramodulation Usable List: list(usable)
SoS List: list(list)
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
FayJim
Ken
Jim
father
mother SoS List: list(list)
Usable List: list(usable)