Proving and Constraint Solving in Computational

Proving and Constraint Solving in
Computational Origami
Tetsuo Ida1 , Dorin Ţepeneu1 , Bruno Buchberger2 , and Judit Robu3
1
Department of Computer Science,
University of Tsukuba, Tennoudai 1-1-1, Tsukuba 305-8573, Japan,
{ida, dorinte}@score.cs.tsukuba.ac.jp
2
Research Institute for Symbolic Computation,
Johannes Kepler University, A 4232 Schloss Hagenberg, Austria,
[email protected]
3
Department of Computer Science
Babes-Bolyai University, Mihail Kogalniceanu No.1, Cluj-Napoca 3400, Romania,
[email protected]
Abstract. Origami (paper folding) has a long tradition in Japan’s culture and education. We are developing a computational origami system,
based on symbolic computation system Mathematica, for performing and
reasoning about origami on the computer. This system is based on the
implementation of the six fundamental origami folding steps (origami axioms) formulated by Huzita. In this paper, we show how our system performs origami folds by constraint solving, visualizes each step of origami
construction, and automatically proves general theorems on the result
of origami construction using algebraic methods. We illustrate this by a
simple example of trisecting an angle by origami. The trisection of an
angle is known to be impossible by means of a ruler and a compass. The
entire process of computational origami shows nontrivial combination of
symbolic constraint solving, theorem proving and graphical processing.
1
Introduction
Origami is a Japanese traditional art of paper folding. The word origami4 is
a combined word coming from ori (fold) and kami (paper). For several centuries, origami has been popular among Japanese common people as an art,
as playing toys, and teaching material for children. Over a decade, origami is
now also receiving wide interest among mathematicians, mathematics educators
and computer scientists, as well as origami artists, as origami poses interesting
fundamental geometrical questions.
We are proposing computational origami, as part of a discipline of origami
science (also coined origamics by Haga, a pioneer in Japanese origami research
4
Traditionally, the word origami is used to represent a folding paper, the act of paper
folding or the art of origami. As such, we also use the word origami in a flexible way
depending on the context.
[7]). We believe that the rigor of paper folding and the beauty of origami artworks enhance greatly when the paper folding is supported by a computer. In
our earlier work, computational origami performs paper folding by solving both
symbolically and numerically certain geometrical constraints, followed by the
visualization of origami by computer graphics tools. In this paper we extend the
system for proving the correctness of the origami constructions, as proposed in
our previous paper [3].
Origami is easy to practice. Origami is made even easier with a computer: we
can construct an origami by calling a sequence of origami folding functions on
the Mathematica Notebook [12] or by the interaction with our system, running
in the computing server, using the standard web browser. The constructed final
result, as well as the results of the intermediate steps, can be visualized and
manipulated. Moreover, in cases where a proof is needed, the system will produce
the proof of the correctness of the construction. Namely, for a given sequence
of origami construction steps and a given property, the system proves that the
resulting shape will satisfy the property (or disprove the property).
The rest of the paper is organized as follows. In sections 2 and 3 we present
a formal treatment of origami construction. In section 4 we discuss a method for
trisecting an angle by origami, which cannot be made using the traditional rulerand-compass method. The construction is followed by the proof of the correctness
of the construction in section 5. In section 6 we summarize our contributions and
point out some directions for future research.
2
Preliminaries
In this section we summarize basic notions and notations that are used to explain the principles of origami construction. We assume the basic notions from
elementary Euclidean geometry.
In our formalism origami is defined as a structure O = hχ, Ri, where χ is the
set of faces of the origami, and R is a relation on χ. Let O be the set of origamis.
Origami construction is a finite sequence of origamis O0 , O1 , ..., On with O0 an
initial origami (usually square paper) and Oi+1 = gi (Oi ) for some function gi
defined by a particular fold. R is the combination of overlay and neighborhood
relations on faces, but in this paper we will not elaborate it further.
A point P is said to be on origami O = hχ, Ri if there exists a face X ∈ χ
such that P is on X. Likewise, a line l is said to pass through origami O = hχ, Ri
if there exists a face X ∈ χ such that l passes through the interior of X. We
denote by L the set of lines, and by P the set of points. The set of points on
O is denoted by PO , and the set of lines on O by LO . We abuse the notation ∩
and ∈, to denote by P ∩ O 6= φ (resp. l ∩ O 6= φ) the property that P (resp. l)
is on O, and by P ∈ f the property that point P is on line f .
Furthermore, ’sym’ is the function which computes the symmetric point of a
given point with respect to a given line, ’dist’ is the function which computes the
distance between two parallel lines, and ’bisect’ is the function which computes
the bisector(s) of two lines.
3
Principles of Origami Construction
An origami is to be folded along a specified line on the origami called fold
line. The line segment of a fold line on the origami is called a crease, since
the consecutive operation of a fold and an unfold along the same fold line makes
a crease on the origami.
A fold line can be determined by the points it passes through or by the points
(and/or lines) it brings together. As in Euclidean geometry, by specifying points,
lines, and their configuration, we have the following six basic fold operations
called origami axioms of Huzita [9, 8]. It is known that Huzita’s origami Axiom
set is more powerful than the ruler-and-compass method in Euclidean geometry
[6]. Origami can construct objects that are impossible by the ruler-and-compass
method [4]. One of them is trisecting an angle, which we will show in this paper,
as our example of origami proving and solving.
3.1
Origami Axioms
Huzita’s origami axioms are described in terms of the following fold operations:
(O1) Given two points P and Q, we can make a fold along the crease passing
through them.
(O2) Given two points P and Q, we can make a fold to bring one of the points
onto the other.
(O3) Given two lines m and n, we can make a fold to superpose the two lines.
(O4) Given a point P and a line m, we can make a fold along the crease that
is perpendicular to m and passes through P .
(O5) Given two points P and Q and a line m, either we can make a fold along
the crease that passes through Q, such that the fold superposes P and m,
or we can determine that the fold is impossible.
(O6) Given two points P and Q and two lines m and n, either we can make a
fold along the crease, such that the fold superposes P and m, and Q and n,
simultaneously, or we can determine that the fold is impossible.
The operational meaning of these axioms is the following: finding crease(s)
and folding the origami along the crease.
Let us first formalize the process of finding the creases. Let O be an origami, P
and Q be points, and f , m and n be lines. The above fold operations can be stated
by the following logical formulas. They are the basis for the implementation of
the computational origami system.
µ
¶
Axiom 1:
∀
∃ (P ∈ f ∧ Q ∈ f )
P,Q∈PO µf ∈LO
¶
Axiom 2:
∀
∃ (sym(P, f ) ≡ Q)
P,Q∈PO µf ∈LO
³
´
(m k n) ∧ (f k m) ∧ (dist(f, m) = dist(f, n)) ∨
∀
∃
Axiom 3: m,n∈LO f ∈LO ³
´¶
¬ (m k n) ∧ (f ≡ bisect(m, n))
µ
Axiom 4:
∀
P ∈PO ,m∈LO
¶
∃ ((f ⊥ m) ∧ (P ∈ f ))
f ∈LO
µ
¶
Φ
(P,
Q,
m)
⇒
((Q
∈
f
)
∧
(sym(P,
f
)
∈
m))
∀
∃
1
P,Q∈PO ,m∈LO
f ∈LO
µ
Φ2 (P, Q, m, n) ⇒
∀
¶
Axiom 6: P,Q∈PO ,m,n∈LO
∃ ((sym(P, f ) ∈ m) ∧ (sym(Q, f ) ∈ n))
Axiom 5:
f ∈LO
In Axioms 5 and 6 we have to define the constraints that ensure the existence
of the fold line on the origami. Conditions Φ1 and Φ2 could be explicitly given
as boolean combinations of formulas of the form A = 0 or A > 0, where the A’s
are polynomials in the coordinates of P, Q, m (and n).
All the axioms have existential sub-formulas, hence the essence of an origami
construction is finding concrete terms for the existentially quantified variable f .
Our computational origami system returns the solution both symbolically and
numerically, depending on the input.
4
Trisecting an Angle
We give an example of trisecting an angle in our system. This example shows a
nontrivial use of Axiom 6. The method of construction is due to H. Abe as described in [6, 5]. In the following, all the operations are performed by Mathematica function calls. Optional parameters can be specified by “keyword → value”.
Steps 1 and 2: First, we define a square origami paper, whose corners are designated by the points A, B, C and D. The size may be arbitrary, but for our
example, let us fix it to 100 by 100. The new origami figure is created with
two differently colored surfaces: a light-gray front and a dark-gray back. We
then introduce an arbitrary point, say E at the coordinate (30, 100), assuming A is at (0, 0).
NewOrigami[Square[100, MarkPoints → {’A’,’B’,’C’,’D’}],
FigureCaption → ’Step ’];
PutPoint[’E’, Point[30, 100]];
Our problem is to trisect the angle 6 EAB. The method consists of the following seven steps (steps 3-9) of folds and unfolds.
Steps 3 and 4: We make a fold to bring point A to point D, to obtain the
perpendicular bisector of segment AD. This is the application of (O2). The
points F and G are automatically generated by the system. We unfold the
origami and obtain the crease F G.
FoldBring[A, D];
Unfold[];
D
C
D
E
C
A
E
G
A
B
A
Step 2
C
D
G
F
A
I
A
B
E
F
B
Step 1
D
B
E
Step 4
Step 3
C
D
B
H
G
I
A
Step 5
E
C
F
H
B
Step 6
Fig. 1. Trisecting an angle by origami, steps 1-6.
Steps 5 and 6: Likewise we obtain the crease IH.
FoldBring[A, G];
Unfold[];
Steps 7 and 8: Step 7 is the crucial step of the construction. We will superpose point G and the line that is the extension of the segment AE, and to
superpose point A and the line that is the extension of the segment IH, simultaneously. This is possible by (O6) and is realized by the call of function
FoldBrBr. There are three candidate fold lines to make these superpositions
possible. The system responds with the query of “Specify the line number”
together with the fold lines on the origami image. We reply with the call of
FoldBrBr with the additional parameter 3, which tells the system that we
choose the line number 3. This is the fold line that we are primarily interested in. However, the other two fold lines are also solutions (which trisect
different angles).
FoldBrBr[G, AE, A, IH];
FoldBrBr[G, AE, A, IH, 3];
Steps 9 and 10: We will duplicate the points A and I on the other face that is
below the face that A and I are on, and unfold the origami. The duplicated
Specify the line number.
D
D
E
E
C
C
1
G
G
I
F
A
H
3
2
A
F
I
H
B
B
Step 8
Step 7
Fig. 2. Trisecting an angle by origami, steps 7-8.
D
G
I
E
J
L
A
Step 9
C
D
F
G
H
I
B
A
E
C
F
J
L
H
B
Step 10
Fig. 3. Trisecting an angle by origami, steps 9-10.
points appear as L and J for A and I, respectively. These names are automatically generated. Finally, we see that the segments AJ and AL trisect
the angle 6 EAB.
DupPoint[{’I’, ’A’}]; Unfold[];
ShowOrigamiSegment[{{{A, E}}, {{A, J}}, {{A, L}}}];
Although it is not obvious to see that equational solving is performed, our
system solves a set of polynomial equations, up to the third degree. In the case
of the folds applying (O1) - (O4), the system computes a solution using the well
known mathematical formulas of elementary geometry rather than proving the
existential formulas of Axioms 1 to 4. In the case of FoldBrBr, the system solves
a cubic equation. This explains why we have (at most) 3 possible fold lines at
step 7.
5
Proof of the Correctness of the Trisection Construction
We now prove the following theorem with our system:
Theorem 1. The origami construction in section 4 trisects an angle.
5.1
Proof Method
In this simple example, the correctness of the trisection construction could be
easily verified either by geometric reasoning or by a sequence of simplification
steps of the algebraic equations representing geometric constrains. However, for
proceeding towards a general (and completely automatic) proving method for
origami theorems, we formulate the proving steps in a more general setting by
showing that the above theorem would be proved if we could show that
tan 6 BAL = tan 6 LAJ = tan 6 JAE
(1)
in step 10 of Fig. 3.
A general proof procedure is as follows:
(i) We first translate the equality (1) into the algebraic form. This is done after
we fix the coordinate system (in our case Cartesian system).
(ii) We already observed that all the folding steps are formulated in Axioms 1
- 6. These axioms are easily transcribed in terms of polynomial constraints,
once the representations of lines and points are fixed. The functions sym,
bisect, and dist, and relations k and ⊥ are easily defined.
(iii) We use the Gröbner bases method. We collect all the premise equalities
and inequalities C = {c1 , ..., cn } obtained at step (ii), and the conclusion
equalities and inequalities D = {d1 , ..., dm } obtained at step (i). Let M
be the boolean combinations of the equalities and inequalities of the form
¬ (c1 ∧ ... ∧ cn ) ∨ (d1 ∧ ... ∧ dm ), i.e. C ⇒ D. We prove ∀M by refutation.
The decision algorithm, roughly, proceeds as follows:
(a) Bring M into a conjunctive normal form and distribute ∀ over the conjunctive parts. Treat each of the parts
∀
x,y,z,...
P
separately. Note that P is a disjunction
E1 = 0 ∨ ... ∨ Ek = 0 ∨ N1 6= 0 ∨ ... ∨ Nl 6= 0
of equalities and inequalities.
(b) Then
∀
x,y,z,...
(E1 = 0 ∨ ... ∨ Ek = 0 ∨ N1 6= 0 ∨ ... ∨ Nl 6= 0)
is transformed into
¬
∃
x,y,z,...
(E1 6= 0 ∧ ... ∧ Ek 6= 0 ∧ N1 = 0 ∧ ... ∧ Nl = 0)
and further on to
¬
∃
x,y,z,...,ξ1 ,...,ξk
(E1 ξ1 − 1 = 0 ∧ ... ∧ Ek ξk − 1 = 0 ∧ N1 = 0 ∧ ... ∧ Nl = 0)
with new variables ξ1 , ..., ξk (“Rabinovich trick”).
(c) Now, our question becomes a question on the solvability of a system of
polynomial equalities, which can be decided by computing the reduced
Gröbner basis of {E1 ξ1 − 1, ..., Ek ξk − 1, N1 , ..., Nl }. Namely, one of the
fundamental theorems of Gröbner bases theory tells us that this Gröbner
basis will be {1} iff the system is unsolvable (i.e. has no common zeros),
which was first proved in [1].
5.2
Automated Proof
The proof steps would in general require laborious work of symbol manipulation.
We are developing software for performing such transformations completely automatically. The software is an extension of the geometrical theorem prover [11]
based on Theorema [2].
The following piece of programs will do all the necessary transformations and
the proof outlined above. The program will be self-explanatory, as we use the
names similar to the functions for folding used before.
The proposition to be proved is the following:
Proposition[’Trisection’, any[A,B,C,D,E,F,G,H,I,J,K,L,M,N],
neworigami[A,B,C,D] ∧ pon[E,line[D,C]] ∧
foldBring[A,D,crease[G on line[A,D], F on line[B,C]]] ∧
foldBring[A,G,crease[I on line[A,G], H on line[B,F]]] ∧
foldBrBr[L,A,line[H,I],N,G,line[A,E],
crease[K on line[C,D], M on line[A,B]]] ∧
symmetricPoint[J, I, line[M, K]] ⇒
equalzero[tanof[B, A, A, L] - tanof[L, A, A, J]] ∧
equalzero[tanof[B, A, A, L] - tanof[J, A, A, E]]]
KnowledgeBase[’C1’,any[A,B],{{A,{0,0}},{B,{100,0}}}]
To display graphically the geometrical constraints among the involved
points and lines, we call function Simplify.
Simplify[Proposition[’Trisection’],
by → GraphicSimplifier, using → KnowledgeBase[’C1’]]
K
D
E
C
N
G
F
J
L
I
A
M
Fig. 4. Graphical output of the call of Simplify.
The following is the output of the prover.
H
B
We have to prove:
(Proposition(Trisection))
(neworigami[A, B, C, D] ∧ pon[E, line[D, C]]∧
∀
A,B,C,D,E,F,G,H,I,J,K,L,M,N
foldBring[A, D, crease[G on line[A, D], F on line[B, C]]]∧
foldBring[A, G, crease[I on line[A, G], H on line[B, F ]]]∧
foldBrBr[L, A, line[H, I], N, G, line[A, E],
crease[K on line[C, D], M on line[A, B]]]∧
symmetricPoint[J, I, line[M, K]] ⇒
equalzero[tanof[B, A, A, L] − tanof[L, A, A, J]]∧
equalzero[tanof[B, A, A, L] − tanof[J, A, A, E]])
with no assumptions.
To prove the above statement we use the Gröbner bases method. First we
have to transform the problem into algebraic form.
To transform the geometric problem into an algebraic form we choose an
orthogonal coordinate system.
Let us have the origin in point A, and points {B, M } and {G, D, I} on the
two axes.
Using this coordinate system we have the following points:
{{A, 0, 0}, {B, u1 , 0}, {D, 0, x1 }, {E, x2 , u2 }, {αG , 0, x3 }, {G, 0, x4 },
{αI , 0, x5 }, {I, 0, x6 }, {M, x7 , 0}, {C, x8 , x9 }, {F, x10 , x11 },
{H, x12 , x13 }, {L, x14 , x15 }, {αL , x16 , x17 }, {K, x18 , x19 },
{αN , x20 , x21 }, {N, x22 , x23 }, {αJ , x24 , x25 }, {J, x26 , x27 }},
where αX is a variable generated internally to create point X.
The algebraic form5 of the given construction is:
5
Notation x0 , ..., x27 represents the full sequence of consecutive variables from x0 to
x27
∀
x0 ,...,x27
−x21
((−1) + u1 x0 == 0 ∧ −u1 + −x1 == 0 ∧ −u21 + u1 x8 == 0∧
+ x1 x9 == 0 ∧ −x1 x2 + −u2 x8 + x1 x8 + x2 x9 == 0∧
−x1 + 2x3 == 0 ∧ x1 x3 + −x1 x4 == 0∧
−u1 x9 + x9 x10 + u1 x11 + −x8 x11 == 0∧
x1 x3 + −x1 x11 == 0 ∧ −x4 + 2x5 == 0 ∧ x4 x5 + −x4 x6 == 0∧
−u1 x11 + x11 x12 + u1 x13 + −x10 x13 == 0 ∧ x4 x5 + −x4 x13 == 0∧
−x6 x12 + x6 x14 + −x13 x14 + x12 x15 == 0 ∧ −x14 + 2x16 == 0∧
−x15 + 2x17 == 0 ∧ −x14 x16 + −x15 x17 + x14 x18 + x15 x19 == 0∧
−x1 x8 + x1 x18 + −x9 x18 + x8 x19 == 0∧
x7 x14 + −x14 x16 + −x15 x17 == 0∧
x7 x19 + −x19 x20 + −x7 x21 + x18 x21 == 0∧
−x4 x19 + −x7 x20 + x18 x20 + x19 x21 == 0 ∧ 2x20 + −x22 == 0∧
−x4 + 2x21 + −x23 == 0 ∧ −u2 x22 + x2 x23 == 0∧
−x7 x19 + x19 x24 + x7 x25 + −x18 x25 == 0∧
x6 x19 + x7 x24 + −x18 x24 + −x19 x25 == 0∧
2x24 + −x26 == 0 ∧ −x6 + 2x25 + −x27 == 0 ⇒
u2 x14 x26 + −x2 x15 x26 + −x2 x14 x27 + −u2 x15 x27 == 0∧
−2x14 x15 x26 + x214 x27 + −x215 x27 == 0)
The further output of the proof is omitted here; the proof proceeds as outlined
in step (iii).
Namely,
1.
2.
3.
4.
6
The above problem is decomposed into two independent problems.
The individual problems are separately proved.
For each problem, the reduced Gröbner bases are computed.
Since the result of the computation is {1} for each individual problem, the
proposition is generally true.
Conclusion
We have shown the computer origami construction with the example of trisecting
an angle. Combining the origami simulation software[10], the implementation of
the Gröbner basis algorithm [1], the implementation of the decision algorithm in
Theorema [2], and a new tool [11] in Theorema, which translates the descriptions
of origami construction into the corresponding polynomial equalities, we are able
to offer a coherent tool for computational origami that can
– simulate arbitrary origami sequences both algebraically and graphically,
– translate conjectures about properties of the results of origami sequences
into statements in the form of universally quantified boolean combinations
of polynomial equalities,
– decide the truth of such conjectures and produce a proof or refutation of the
conjecture fully automatically.
We are now working to integrate those software tools into a coherent system, each component working independently but coordinating each other on the
Internet as a symbolic computation grid.
As a next step of our research we plan to study “Origami Solving Problem”,
which asks for finding a sequence of origami steps that will lead to an origami
object with a desired property. However, it is clear that this problem is analogous to the problem of finding geometric objects with desired properties using
only a ruler and a compass. Note, however, that the two problems – origami
construction and the ruler-and-compass construction – are not equivalent, as
we have seen. For further development of origami construction, in analogy to
the ruler-and-compass construction problem, Galois theory suggests itself as the
main approach to solving the origami construction problem.
Acknowledgements
Sponsored by Austrian FWF (Österreichischer Fonds zur Förderung der Wissenschaftlichen Forschung), Project 1302, in the frame of the SFB (Special Research Area) 013 “Scientific Computing”and RICAM (Radon Institute for Applied and Computational Mathematics, Austrian Academy of Science, Linz).
References
1. Buchberger, B.: Ein algorithmisches Kriterium für die Lösbarkeit eines algebraischen Gleichungssystems (An Algorithmical Criterion for the Solvability of Algebraic
Systems of Equations). Aequationes mathematicae 4/3, 1970, pp. 374-383. (English
translation in: Buchberger, B., and Winkler, F. (eds.), Gröbner Bases and Applications, Proceedings of the International Conference “33 Years of Gröbner Bases”,
1998, Research Institute for Symbolic Computation, Johannes Kepler University,
Austria, London Mathematical Society Lecture Note Series, Vol. 251, Cambridge
University Press, 1998, pp. 535 -545.)
2. Buchberger, B., Dupre, C., Jebelean, T., Kriftner, F., Nakagawa, K., Vasaru, D.,
Windsteiger, W.: The Theorema Project: A Progress Report, In Symbolic Computation and Automated Reasoning (Proceedings of CALCULEMUS 2000, Symposium
on the Integration of Symbolic Computation and Mechanized Reasoning, August
6-7, 2000, St. Andrews, Scotland), Kerber, M. and Kohlhase, M. (eds.), A.K. Peters
Publishing Co., Natick, Massachusetts, pp. 98-113.
3. Buchberger, B. and Ida, T.: Origami Theorem Proving, SFB Scientific Computing Technical Report 2003-23-Oct, Research Institute for Symbolic Computation,
Johannes Kepler University Linz, Austria, 2003.
4. Chen, T. L.: Proof of the Impossibility of Trisecting an Angle with Euclidean Tools,
Mathematics Magazine Vol. 39, pp. 239-241, 1966.
5. Fushimi, K.: Science of Origami, a supplement to Saiensu, Oct. 1980, p. 8 (in
Japanese).
6. Geretschläger, R.: Geometric Constructions in Origami (in Japanese, translation by
Hidetoshi Fukagawa), Morikita Publishing Co., 2002.
7. Haga, K.: Origamics Part I: Fold a Square Piece of Paper and Make Geometrical
Figures (in Japanese), Nihon Hyoronsha, 1999.
8. Hull, T.: Origami and Geometric Constructions, available online at
http://web.merrimack.edu/ thull/geoconst.html, 1997.
9. Huzita, H.: Axiomatic Development of Origami Geometry, Proceedings of the First
International Meeting of Origami Science and Technology, pp. 143-158, 1989.
10. Ida, T., Marin, M. and Takahashi, H.: Constraint Functional Logic Programming
for Origami Construction, Proceedings of the First Asian Symposium on Programming Languages and Systems (APLAS2003), Lecture Notes in Computer Science,
Vol. 2895, pp. 73-88, 2003.
11. Robu, J.: Automated Geometric Theorem Proving, PhD Thesis, Research Institute
for Symbolic Computation, Johannes Kepler University Linz, Austria, 2002.
12. Wolfram, S.: The Mathematica Book, 5th ed., Wolfram Media, 2003.