2. ■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.
3. 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(199
1)
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)
Boltzman
Machine(85)
BackProp(19
86)
SOM(81) SVM(91)
Deep
Learning(2012)
B: Imperative
Thermodynamics
(熱力学)
Proof Assistant Kernel
Autoencoder
Boosting(04)
2015
Graph
Computation
Pig(09)
pthread
Redis(09)
multicore
Proof Assistant
with heuristics
SledgeHummer
(03)
GPU
A: declarative
C: reasoning
D: heuristics
Deep learning
λ calculus
turing machine
π calculus
optimization
resolution
propagation
recursion
OTTER and Four computing paradigms
World war II
Natural dedution
4. 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-replicating
robots
Tarski parallel
axiom
5. 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-out
Proof checking filter
http://www.mcs.anl.gov/research/projects/AR/strategies.html
Set of Support
7. 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
8. 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’
9. 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
10. 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
11. 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は発見できる。