Rigidity of Origami Universal Molecules - Mathematical Reasoning ... [PDF]

5 downloads 171 Views 5MB Size Report
Sep 10, 2012 - decomposition methods. But, in 3D, indecomposable problems can occur (even ...... Fig.13: Illustration of the methodology for deriving a contradiction from the assump- tion that this crease ...... HOL Light: a Tutorial Introduction.
2012

Edi t e dby Te t s uoI da J a c que sFl e ur i ot

Preface This volume contains the papers presented at ADG 2012: The 9th International Workshop on Automated Deduction in Geometry, held on September 17–19, 2012 at the University of Edinburgh. The submissions were each reviewed by at least 3 program committee members, and the committee decided to accept 15 papers for the workshop. The programme also included invited talks by Prof. Michael Beeson and Prof. Dongming Wang. ADG 2012 is part of a well-established, international series of workshops. Previous editions of the meeting were held in Munich in 2010, Shanghai in 2008, Pontevedra in 2006, Gainesville in 2004, Hagenberg in 2002, Zurich in 2000, Beijing in 1998, and Toulouse in 1996. We wish to thank the School of Informatics at the University of Edinburgh for hosting the workshop and for providing financial support and administrative help for the event. Support from EasyChair is also gratefully acknowledged.

September 10, 2012 Edinburgh

Tetsuo Ida Jacques Fleuriot

i

Table of Contents Proof and Computation in Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Michael Beeson Automation of Geometry - Theorem Proving, Diagram Generation, and Knowledge Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dongming Wang

1

3

Equation systems with free-coordinates determinants . . . . . . . . . . . . . . . . . . . Mathis Pascal and Pascal Schreck

5

Improving Angular Speed Uniformity by C 1 Piecewise Reparameterization Jing Yang, Dongming Wang and Hoon Hong

17

Cayley Factorization and the Area Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Susanne Apel A New Vector Algorithm for Automated Affine Geometry Theorem Proving 43 Yu Zou, Jingzhong Zhang and Yongsheng Rao An Algorithm for Automatic Discovery of Algebraic Loci Extended Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Francisco Botana, Antonio Montes and Tomas Recio Algebraic Analysis of Huzita’s Origami Operations and their Extensions . . 61 Fadoua Ghourabi, Asem Kasem and Cezary Kaliszyk Rigidity of Origami Universal Molecules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 John Bowers and Ileana Streinu Interfacing Euclidean Geometry Discourse with Diverse Geometry Software 99 Xiaoyu Chen Formalizing Analytic Geometries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Danijela Petrovi´c and Filip Maric From Tarski to Hilbert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Gabriel Braun and Julien Narboux Towards a Synthetic Proof of the Polygonal Jordan Curve Theorem . . . . . . 147 Phil Scott and Jacques Fleuriot A New Method of Automatic Geometric Theorem Proving and Discovery by Comprehensive Gr¨ obner Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Yao Sun, Dingkang Wang and Jie Zhou Extending the Descartes Circle Theorem for Steiner n-cycles . . . . . . . . . . . . 173 Shuichi Moritsugu ii

Higher-Order Logic Formalization of Geometrical Optics . . . . . . . . . . . . . . . . 185 Umair Siddique, Vincent Aravantinos and Sofiene Tahar Realizations of Volume Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Ciprian Borcea and Ileana Streinu

iii

Program Committee Tetsuo Ida Hirokazu Anai Francisco Botana Xiaoyu Chen Giorgio Dalzotto Jacques Fleuriot Laureano Gonzalez-Vega Hoon Hong Andres Iglesias Prieto Predrag Janicic Deepak Kapur Ulrich Kortenkamp Shuichi Moritsugu Julien Narboux Pavel Pech Tomas Recio Georg Regensburger Juergen Richter-Gebert Pascal Schreck Meera Sitharam Thomas Sturm

University of Tsukuba (Chair) Fujitsu laboratories Ltd University of Vigo Beihang University Universita’ di Pisa University of Edinburgh Universidad de Cantabria North Carolina State University Universidad de Cantabria University of Belgrade University of New Mexico Martin-Luther-Universit¨at Halle-Wittenberg University of Tsukuba University of Strasbourg University of South Bohemia Universidad de Cantabria Inria Saclay – ˆIle-de-France TU Munich University of Strasbourg University of Florida Max Planck Institute

Invited Speakers Michael Beeson Dongming Wang

San Jose State University University Pierre and Marie Curie – CNRS

Additional Reviewers Filip Maric Katsusuke Nabeshima

Antonio Montes Phil Scott

Local Organisers Jacques Fleuriot Suzanne Perry and Ewa Hill Laura Meikle and Petros Papapanagiotou

iv

Proof and Computation in Geometry Michael Beeson San Jose State University, USA

We consider the relationships between algebra, geometry, computation, and proof. The following diagram should commute: Geometric Theorem

Algebraic Translation

Geometric Proof

Algebraic Proof

In the past, much work has been expended on each of the four sides of the diagram, both in the era of computer programs and in the preceding centuries. Yet, we still do not have machine-found or even machine-checkable geometric proofs of the theorems in Euclid Book I, from a suitable set of first-order axioms– let alone the more complicated theorems that have been verified by computerized algebraic computations. First-order geometrical proofs are beautiful in their own right, and they give more information than algebraic computations, which only tell us that a result is true, but not why it is true (i.e. what axioms are needed and how it follows from those axioms). Moreover there are some geometrical theorems that cannot be treated algebraically at all. We will discuss the possible approaches to getting first-order geometrical proofs, the obstacles to those approaches, and some recent efforts. In particular we discuss efforts to use a theorem-prover or proof-checker to facilitate a “back translation” from algebra to geometry (along the bottom of the diagram). This possibility has existed since Descartes defined multiplication and square root geometrically, but has yet to be exploited in the computer age. Chou wrote, “I know of no theorem proved in that way.” To accomplish that ultimate goal, we must first bootstrap down the left side of the diagram as far as the definitions of multiplication and square root. We will discuss the progress of an attempt to do that, using the axiom system of Tarski and resolution theorem-proving.

Automation of Geometry — Theorem Proving, Diagram Generation, and Knowledge Management Dongming Wang Laboratoire d’Informatique de Paris 6, Universit´e Pierre et Marie Curie – CNRS, 4 place Jussieu, 75252 Paris cedex 05, France

The process of theorem proving in geometry is sophisticated and intelligencedemanding. Mechanizing this process has been the objective of many great scientists, from ancient times to the information era. Scientific breakthroughs and technological advances have been made in the last three decades, which allows us now to automate the process (almost) fully on modern computing devices. The remarkable success of automated theorem proving has been a major source of stimulation for investigations on the automation of other processes of geometric deduction such as diagram generation and knowledge management. This talk provides an account of historical developments on the mechanization and the automation of theorem proving in geometry, highlighting representative methodologies and approaches. Automated generation of dynamic diagrams involving both equality and inequality constraints is discussed as another typical task of geometric deduction. The presentation will then be centered around the concept and the management of geometric knowledge. We view geometric theorems, proofs, and diagrams as well as methods as knowledge objects and thus as part of the geometric knowledge. We are interested in creating reliable software environments in which different kinds of geometric knowledge are integrated, effective algorithms and techniques for managing the knowledge are implemented, and the user can use the built-in knowledge data and functions to develop new tools and to explore geometry visually, interactively, and dynamically. We have considered and studied several foundational and engineering issues of geometric knowledge management and adopted some key strategies to deal with the issues. We will explain and discuss such issues and strategies and demonstrate the effectiveness of the strategies by some pieces of software that have implemented preliminary and experimental versions of our geometric knowledge base, geometric-object-oriented language, and geometric textbook system.

Equation systems with free-coordinates determinants P. Mathis and P. Schreck LSIIT, UMR CNRS 7005 Universit´e de Strasbourg, France {mathis,schreck}@unistra.fr

Abstract. In geometric constraint solving, it is usual to consider CayleyMenger determinants in particular in robotics and molecular chemistry, but also in CAD. The idea is to regard distances as coordinates and to build systems where the unknowns are distances between points. In some cases, this allows to drastically shrink the size of the system to solve. On the negative part, it is difficult to know in advance if the yielded systems will be small and then to build these systems. In this paper, we describe two algorithms which allow to generate such systems with a minimum number of equations according to a chosen reference with 3 or 4 fixed points. We can then compute the smaller systems obtainable when one reference is fixed. We also discuss what are the criteria so that such system can be efficiently solved by homotopy.

1

Introduction

The main goal of distance geometry consists in specifying sets of points by the mean of known pairwise distances. Thus, it is widely studied in domains where distances are primitive notions such as molecular modeling in chemistry or biology [5], robotics [10], cartography with town and country planning [1] or even in CAD [4] and mathematics [13]. Distance geometry allows to fundamentally incorporate in the formulation of the problem the invariance by the group of direct isometries. In the particular field of constraint solving, considering distance geometry —when it is possible— can drastically reduce the size of the equation system to solve. One of the classical tools used in distance geometry is based on CayleyMenger determinants. Some authors studied extensions in order to take into account other geometric objects and relations such points and distances. For instance, in [4, 13], hyperplanes and hyperspheres are considered together with constraints of incidence, tangency and angle. These results are encouraging steps toward the use of distance geometry in CAD, even if one cannot yet manage lines in 3D within this framework. When considering geometric constraint solving in CAD, methods based on Cayley-Menger determinants have to be mixed with other ingredients. For instance, trilateration has to be used to retrieve the coordinates of points, or decomposition of large constraint systems into smaller rigid subsystems must be

6

done in order to manage the complexity [3]. But, one must bear in mind that the systems of algebraic equations yielded by using Cayley-Menger have to be effectively solved. Thus, it is important to have systems with the smallest possible size and/or the smallest possible total degree. In this paper, we propose two algorithms that transform a geometric constraint system involving points and hyperplanes with distance and angle constraints, into an equivalent system of Cayley-Menger determinants. These algorithms are interesting for small indecomposable constraint systems since they produce one of the smallest systems of Cayley-Menger determinant obtainable by fixing a reference of four or three points. We also describe a brute force algorithm and a greedy heuristic to find the better reference(s) for a given problem. We focus on 3D problems, but it could be used in 2D for indecomposable problems. We present some examples using this method with the standard homotopy method for numerical solving. The rest of the paper is organized as follows. Section 2 recalls some results about the methods based on Cayley-Menger determinants and their extensions. Section 3 describes our algorithms. Section 4 presents some experiments that we made, and the results that we obtained. We conclude in section 5 by giving some tracks for future works.

2

2.1

Preliminaries

Cayley-Menger determinants

Recall that given n points {p1 , . . . , pn } in the Euclidean space of dimension d, the Cayley-Menger (CM for short) determinant of these points is: ¯ ¯0 1 ¯ ¯1 0 ¯ ¯ D(p1 , . . . , pn−1 , pn ) = ¯ 1 r2,1 ¯ .. .. ¯. . ¯ ¯ 1 rn,1

¯ 1 . . . 1 ¯¯ r1,2 . . . r1,n ¯¯ 0 . . . r2,n ¯¯ .. . . .. ¯ . . ¯¯ . rn,2 . . . 0 ¯

where ri,j is the square distance between pi and pj .

In dimension d, a set of n ≥ d + 2 points specified by a Cayley-Menger determinant is embeddable in Rd if D(p1 , . . . , pn ) = 0. In particular, in 3D, for 5 or 6 distinct points we have : D(p1 , p2 , p3 , p4 , p5 ) = 0 and D(p1 , p2 , p3 , p4 , p5 , p6 ) = 0. In addition, for n = d + 3, Sippl and Scheraga [6] showed that Cayley-Menger determinant equation for points and distances D(p1 , . . . , pn−1 , pn ) = 0 can be

7

substituted by D∗ (p1 , . . . , pn−1 , pn ) = 0 where: ¯ ¯0 1 1 ¯ ¯1 0 r 1,2 ¯ ¯ 1 r2,1 0 ¯ .. .. D∗ (p1 , . . . , pn−1 , pn ) = ¯¯ .. . . ¯. ¯ ¯ 1 rn−2,1 rn−2,2 ¯ ¯ 1 r1,n r2,n

¯ ¯ ... 1 ¯ . . . r1,n−1 ¯¯ . . . r2,n−1 ¯¯ ¯ .. .. ¯ . . ¯ ¯ .. . rn−2,n−1 ¯¯ . . . rn−1,n ¯

This simplification that removed one line and one column is made thanks to Jacobi’s theorem with the fact that minors involving d + 2 objects are equal to 0. It will be useful to minimize the degree of the equations. Cayley-Menger determinants were extended by [12] to hyperplanes and hyperspheres. In this paper, we use definitions coming from [12] but we restrict ourselves to points and hyperplanes. For a given set of n objects pi , the matrix M is defined as follows: ¶ µ 0 δ M= t δ G with δ = (δ1 , . . . , δn ) and δi = 1 if pi is a point and δi = 0 if it is a hyperplane. Noting gi,j the i-th row and j-th column element of G, we have : – gi,j is the square distance between pi and pj if they are both points – gi,j is the signed distance of pi and pj if one is a point and the other a hyperplane (so 0 for incidence relation) – gi,j equals − 21 cos(pi , pj ) if they are both hyperplanes.

The determinant of M is also called a Cayley-Menger determinant and the previous notation D(p1 , . . . , pn ) is used. In dimension d, the property D(p1 , . . . , pn ) = 0 if n ≥ d + 2 remains. D∗ form can be used but not with hyperplanes as pn−1 or pn . Thus, such determinants lead to equations where unknowns correspond to unknown distances or angles. Given a set O of geometric objects among points and hyperplanes, and a set of constraints among distances, incidences and angles, the rule of the game consists in finding subsets of O, each of size equal or greater than d + 2. Each subset gives rise to the nullity of a determinant, that is an equation, and the overall system of equations must be well-formed. 2.2

Terminology

For the sake of clarity, we precise the terminology used in the rest of the paper. Since each considered constraint involves two objects (point or hyperplane), system S can be seen as a constraint graph G. Its vertices correspond to the primitives and its edges to the constraints. In a Cayley-Menger determinant related to constraint system S, ri,j can be either a fixed values if it corresponds to a contraint or an unknown. These latter correspond to an absence of edge in G and has to be computed. We call CM-system related to S any system of

8

equations where each equation is a Cayley-Menger determinant that respect the previous condition. The algorithms which we study in this paper follow a strategy where a point or a pair of points is considered with respect to a fixed set of points that is called a reference. For instance, in the first algorithm, a set of four points, say R = {p1 , p2 , p3 , p4 } is fixed and all the equations come from identities of the form D(p1 , p2 , p3 , p4 , P ) = 0 or D(p1 , p2 , p3 , p4 , P, Q) = 0 where P and Q are objects that are not in R. We call external edge any edge of G whose extremities are not in R.

p6

p5

p7

p4

p8

p3 p1

p2

Fig. 1. Disulfide bond

Consider example of figure 1 that is the geometric model for the disulfide bond well-known in chemistry. With R = {p1 , p2 , p3 , p8 }, we can consider a CMsystem like the following one with 10 equations. The first equation, D(R, p4 ) = 0, involves all possible pairwise distances between points p1 , p2 , p3 , p8 , p4 . Among these 10 distances, only two of them, p1 p4 and p4 p8 are not known, they do not correspond to edges in graph of figure 1. So the first equation has two unknowns. And the overall system contains 1 unknowns and is well-formed. Thanks to trilateration, the solutions of this CM-system permit to compute the coordinates for variables of constraint system S. We say that such a system is CM-equivalent to S if it is well-constrained and it allows to retrieve all the solutions of S.

9

 D(R, p4 ) =0     D(R, p ) =0  5    D(R, p ) =0  6    D(R, p ) =0  7   D(R, p4 , p5 ) = 0 D(R, p4 , p6 ) = 0     D(R, p4 , p7 ) = 0     D(R, p5 , p6 ) = 0     D(R, p5 , p7 ) = 0    D(R, p6 , p7 ) = 0

Note that D∗ can be used instead of D when 6 points are involved: this does not change the number of equations and this leads to a reduction of the degree of the system. On the other hand, with R = {p1 , p2 , p3 }, we can consider a CMsystem with 8 equations that also permits to solve system S:

 D(R, p4 , p5 ) = 0     D(R, p4 , p6 ) = 0     D(R, p4 , p7 ) = 0    D(R, p5 , p6 ) = 0 D(R, p5 , p7 ) = 0     D(R, p6 , p7 ) = 0     D(R, p6 , p8 ) = 0    D(R, p7 , p8 ) = 0

We show in the next section how to build these CM-systems.

3

Two algorithms for setting CM-systems

One of the crucial questions when dealing with CM-system is: “how can I compute a reasonable CM-system equivalent to S?”. It is of course possible to compute the distances between each pair of points, but this is exponentially and so unreasonable. We describe here two algorithms which have good qualities for small constraint systems. Each algorithm takes as input a well-constrained constraint system S (or equivalently its graph) and a reference R. In the 3D case, the first algorithm considers references with 4 points, and the second one uses references with 3 points. There are two ideas which have guided the design of these algorithms. We already spoke of the first one that consists in always use the given reference in a CM-equation leading to use Cayley-Menger determinants with 5 or 6 points [5]. This way, all the points are expressed within this reference and trilateration can be used to compute the coordinates of all the points. The second idea is to use all the constraints given by S since all the information is needed.

10

3.1

A 3D algorithm with |R| = 4

Without loss of generality, we note the points {p1 , p2 , . . . pn }, with R = {p1 , p2 , p3 , p4 }. The first algorithm is described by the following pseudo-code: Input: G and R = {p1 , p2 , p3 , p4 } Output: SCM SCM = ∅ 1- for each point P in {p5 , . . . pn }, add D(R, P ) to SCM 2- for each external edge (P , Q) of G, add D(R, P , Q) to SCM First, we prove that SCM is well-constrained when S is so. It is worth to recall that well-constrained means “well-constrained modulo the direct isometries” for S while it means “having a finite number of solutions for the unknown distances” for SCM. We first show that SCM is structurally well-constrained, that is: (a) it contains as many equations as unknowns; and (b) each of its subsystems contains more unknowns than equations. For point (a), let us note t the total number of equations of SCM, n the number of points of S and k the number of external edges. It is easy to see that t = (n − 4) + k. On the other hand, we have 4(n − 4) distances involved for each point P in the step 1 (in addition to the 6 distances involved in completing R to a clique in G), and k additional distances involved in the second step. Summing up the distances, we have 4(n − 4) + k + 6 distances involved in SCM, and since S is well-constrained, it contains 3n − 6 constraints. Then we have, 4(n−4)+k +6−3n+6 = n−4+k unknowns and the same number of equations. For point (b), we consider a sub-system of SCM with m equations involving c constraints and y points of S. Let us note x the number of unknowns (that is the distances which are not constrained by S), and m = m1 + m2 where m1 is the number of equations of type 1, coming from step 1, and m2 is the number of equations of type 2, coming from step 2 of the previous algorithm. We have to prove that m ≤ x. We have first the equality x = 4(y − 4) + m2 + 6 − c indeed, we have y −4 points out of R, for each of these points there is 4 distances linking it to R; in addition, we have m2 distances corresponding to the external edges from the m2 equations of type 2. We also have 6 distances to make R a clique and we have to subtract the c distances corresponding to some constraints in S. But, since S is well-constrained, we have also c ≤ 3y − 6 Thus, we obtain: x ≥ y − 4 + m2 It is easy to see that y −4 ≥ m1 (y −4 = m1 when considering the whole system). We can then conclude that x ≥ m Actually, we can directly prove that SCM is CM-equivalent to S. Indeed, SCM is not over-constrained, since every solution of S give a solution of SCM.

11

In turn, because of the step 1 of our algorithm, every solution of SCM gives by trilateration a set of points which fulfills all the constraints of S since all the constraints of S are taken into account thanks to steps 1 and 2. 3.2

A 3D algorithm with |R| = 3

The second algorithm is even simpler. Three points are chosen for R, and we note R = {p1 , p2 , p3 }: Input: G and R Output: SCM SCM = ∅ 1- for each external edge (P , Q), add D(R, P , Q) to SCM We also note k the number of external edges. SCM contains then k equations. For each point which is not in R, either it is not involved in an external edge and it is connected with three known distances to R, so it can be forgotten, either it is an extremity of an external edge and step 1 add 3 distances between it and R. Moreover all the external edges are considered during this step. So, all the constraints of S are taken into account. Following the reasoning of previous subsection, it is easy to see that SCM contains k equations and k + 3(n − 3) + 3 − 3n + 6 = k unknowns. One can easily prove that SCM is structurally well-constrained. It is also easy to see that SCM is CM-equivalent to S. Several questions arise then, among them: – – – –

is algorithm 2 better than algorithm 1? do these algorithms yield the better systems CM-equivalent to S? how to choose reference R in order to minimize k? what are the criteria that can be used to define the “quality” of such a CM-system?

We give a short answer to question 2: no. Consider the example of the double Stewart’s platform, the constraint graph is given on Fig. 2 (all the edges correspond to distance constraints). When choosing a single reference, the best choice for algorithm 1 leads to a CM-system with 9 equations related to reference {p1 , p5 , p6 , p7 }, for instance. For algorithm 2, the better CM-system uses reference {p4 , p5 , p6 } and contains 6 equations. By changing the reference during the construction of a CM-system, we can obtain a system with only 4 equations:  D(p2 , p3 , p4 , p6 , p1 ) = 0    D(p2 , p3 , p4 , p6 , p5 ) = 0 D(p4 , p6 , p8 , p9 , p5 ) = 0    D(p4 , p6 , p8 , p9 , p7 ) = 0 We discuss the other questions in the next subsection.

12 p9 p8

p7 p6 p4

p5 p3 p1

p2

Fig. 2. Double Stewart ’s platform

3.3

A better system?

Better than the classical Cartesian approach? Size is the first quality criterion one can think of for a constraint system. First, one can wonder if this approach is better than the Cartesian one. With |R| = 3, the system is smaller if k < 3n − 6 which always occurs (k is the number of external edges which is always less than the overall number of geometric constraints). With |R| = 4, it is smaller if n − 4 + k < 3n − 6, this implies k < 2n − 2 which is often the case. These considerations have to be moderated by the fact that clever methods of decomposition can be used in the classical approaches for geometric constraint solving (see for instance [2, 11, 9]). To avoid any ambiguity, in the following, k3 is k for a 3 points reference and k4 for a 4 points reference. A 3 or a 4 points reference? Next, one can ask whether it is better to choose either a 3 points or a 4 points reference. Given a 3 points reference R3 , if a 4th vertex p is added, does the number of unknowns could decrease ? With R4 = R3 ∪ {p}, it is obvious that k3 > k4 and that k3 − k4 is the degree of p in the graph. The number of equations is smaller if n − 4 + k4 < k3 , that implies n − 4 < k3 − k4 . So, if there exist a vertex the degree of which is greater or equal to n − 4 then the number of equations can be reduced with R ∪ p. Choosing the best reference. In short, the number of equations is in O(k). To get the smallest value for k, one has to find out a reference whose vertices cover a maximum set of edges. This is strongly related to the maximum coverage problem which is NP-hard. But for constraint systems involving a small amount of points, a brute force algorithm can be used in practice. For larger problems, a classical greedy algorithm provides a satisfactory outcome and for most of our examples it gives the best result. This algorithm consists in iteratively choosing one of the most connected vertexes and in removing it from the graph. For instance, with example of disulfide bond and R = {p2, p3, p6, p7}, the size of the system is 6. With R = {p3, p7, p8}, its size

13

is 5. Degree and numerical solving. Once a CM-system has been built, it has to be solved. Here we consider numerical resolution of such systems. CM-systems usually have many solutions, most of which are non-reals (about two thirds of the solutions in our experiments). Indeed, many numerical values found are negative whereas they often represent squared distances. A numerical method like Newton-Raphson has a complexity mostly related to the size of the system. But this method only provides one solution. Since we have algebraic systems of equations, we can use classical homotopy methods in order to get all the solutions. With homotopy, the criterion is the degree of the system (Bezout or BBK bound). Indeed, the total degree of the system determines the number of paths which have to be followed by homotopy. Here, we have considered Bezout bound which is the product of the degrees of the equations. Let us notice that equations coming from CM determinants with 5 or 6 objects have degree either 2 or 4. Due to Sippl optimization, the size of the matrix is the same for 5 or 6 objects. If all unknowns are in the i-th row (and i-th column by symmetry) then the degree is 2. Otherwise, it is 4. Homotopy complexity is mostly related to the degree of the system but also linked to the number of equations since in each path the system must be evaluated many times. Finding out the best system is then an optimization problem. It amounts to getting a system with a minimum degree with the least equations. So far, since our experiments were made on problems with less than 30 objects, we use a brute force algorithm which selects the interesting systems with small Bezout bound or with the smaller size. Classical optimizations such simulated annealing are intended to be implemented. The next section, presents some examples that we have solved with our methods.

4

Examples

As the degree of systems grows exponentially with its size, it is only possible to use homotopy with small systems. This is another reason to have powerful decomposition methods. But, in 3D, indecomposable problems can occur (even if it is quite unusual with CAD problems). We made some experiments with a kind of brute-force search. On 3D problems, all possible systems with 4 points reference are considered first. Then, the same is done with all possible 3 points reference. The best solution according to the degree of the system is chosen. Numerical solving is performed with HOM4PS [8]. This free software implements both the classical homotopy continuation method that is based on Bezout bound and the polyhedral homotopy continuation that uses the BKK bound. Packages as Bertini and PHCpack were tested but HOM4PS was more effective and robust. It is faster and always provides the same numerical solutions for a same system.

14

Table 1 shows results for some few examples. In these examples, numerical values for distances were arbitrarily chosen in small values (distances are between 1 and 10). In this table, r is the reference chosen, eq the number of equations, sol the number of solutions, BB the Bezout bound of the system, t ch the solving time in seconds with classical homotopy, BKK the BKK bound and t ph the solving time with polyhedral homotopy. The first example is the common Stewart platform consisting in two triangles lying in two different planes and connecting by six distances. In figure 3a, bold edges are external edges for reference p2 , p3 , p5 . With this very little example, the algorithm provides the same equation systems whatever the user choices : either 4 points or 3 points references, either size criterion or degree criterion. The example of figure 1 is dealt in [5] (in 825 sec. with a Bernstein solver) with the 10 equations system referenced in the table. The system is “handmade”. With a 4 points reference, our brute-force algorithm suggests a system of 6 equations. Nevertheless, the degree of this 6 equations system is higher than the 10 equations one and it takes more time to yield the solutions. With a 3 points reference, the algorithm offers a system having 5 equations. This latter has a higher degree than the 10 equations systems but homotopy complexity also depends on the size of the system. In this case, the 5 equations system takes less time. Another example comes from [7] and is given in figure 3b. This paper presents a specific parameterization that results in 3 equations. The trick is to decompose the problem into straightforward solved rigid bodies (here the tetrahedrons). The 3 equations are then a formulation of the distances between the top vertex of each tetrahedron and a rear vertex of an neighboring tetrahedron. This formulation takes also into account the shared point between the rigid bodies. Without decomposition, 6 equations are enough to solve it within less than 1 second. The reference chosen by the algorithm is the 3 points shared by the tetrahedrons. The last example of figure 3c involves 10 points and 24 distances, the dotted lines in the figure represent the edges at the rear. Table 1. experiments carried out in PC with Intel 2.66 Ghz CPU. Times are given in seconds. Study case r eq Stewart platform p2 , p3 , p5 2 Disulfide p1 , p2 , p3 , p8 10 Disulfide p2 , p3 , p6 , p7 6 Disulfide p3 , p7 , p8 5 3 tetrahedrons p1 , p2 , p3 6 4 branches star p8 , p9 , p10 6

sol BB t ch BKK t ph 6 16 0.004 8 0.004 18 1024 6.47 64 0.62 18 4096 252.05 496 5.31 40 512 3.75 128 0.34 14 512 0.7 128 0.1 66 4096 15.48 384 1.25

The icosahedron problem [13] is part of the folklore of distance geometry. It consists in 12 points and 30 distances. In the underlying graph, each vertex has

15 p3

p2 p4 p2 p6

p5 p3 p1 p1 (a)

(b) p1

p8

p7

p2 p3

p10

p9

p4

p6

p5 (c)

Fig. 3. Few 3D examples

degree 5 since each point is linked by 5 distances constraints to 5 neighboring points. With a 3 points reference, the size of the system varies from 15 to 18 equations. As in none configuration of reference there is a vertex with a degree greater or equal to 9, none of 4 points reference can decrease the size of the system. Actually, with 4 points reference, the size is between 19 and 23 equations. All these systems have degrees between 230 and 238 that is too much to consider homotopy. This problem cannot be decomposed with common methods used in CAD and such a system must be dealt with other numerical techniques.

5

Conclusion

In this paper, we made a short study on the setting of systems of equations from the Cayley-Menger determinants. The desired quality of the systems depends on the numerical method used to solve it. Here we have considered two criteria: both the size of the system and its degree. According to our tests, our greedy algorithm produces a good approximation of the smallest CM-system corresponding to a constraint system. For a resolution by homotopy, the degree of the system has a greater influence on performance than the size that it was also involved. Also, we use an algorithm that produces systems both small and with low degree. For now, only a brute-force algorithm has been implemented. We plan to address this optimization problem with conventional methods such as simulated annealing. Furthermore, in our algorithms, the systems are selected according to Bezout bound but we intend to study a search that results in a system with the smaller BKK bound. Finally, when the number of objects increases the degree becomes

16

prohibitive. However, most problems in CAD can be decomposed into subsystems [3, 9]. This decomposition requires the integration of new mechanisms, especially with the choice of the reference.

References 1. Ming Cao, Brian D. O. Anderson, and A. Stephen Morse. Sensor network localization with imprecise distances. Systems & Control Letters, 55(11):887–893, 2006. 2. C. Hoffmann, A. Lomonosov, and M. Sitharam. Decomposition plans for geometric constraint systems, part i : Performance measures for cad. J. Symbolic Computation, 31:367–408, 2001. 3. P. Mathis and S. E.B. Thierry. A formalization of geometric constraint systems and their decomposition. Formal Aspects of Computing, 22(2):129–151, 2010. 4. D. Michelucci. Using cayley menger determinants. In In Proceedings of the 2004 ACM symposium on Solid modeling, pages 285–290, 2004. 5. Josep M. Porta, Llu´ıs Ros, Federico Thomas, Francesc Corcho, Josep Cant´ o, and Juan Jes´ us P´erez. Complete maps of molecular-loop conformational spaces. Journal of Computational Chemistry, 28(13):2170–2189, 2007. 6. M J Sippl and H A Scheraga. Cayley-menger coordinates. Proc Natl Acad Sci USA, 83:2283, 1986. 7. Meera Sitharam, Jrg Peters, and Yong Zhou. Optimized parametrization of systems of incidences between rigid bodies. Journal of Symbolic Computation, 45(4):481 – 498, 2010. 8. T. Y. Liet T. L. Lee and C. H. Tsai. Hom4ps-2.0: a software package for solving polynomial systems by the polyhedral homotopy continuation method. COMPUTING, 83:109–133, 2008. 9. Simon E.B. Thierry, Pascal Schreck, Dominique Michelucci, Christoph F¨ unfzig, and Jean-David G´enevaux. Extensions of the witness method to characterize under-, over- and well-constrained geometric constraint systems. Computer-Aided Design, 43(10):1234 – 1249, 2011. 10. Federico Thomas and Llu´ıs Ros. Revisiting trilateration for robot localization. IEEE Transactions on Robotics, 21(1):93–101, 2005. 11. Qiang Lin Xiao-Shan Gao and Gui-Fang Zhang. A c-tree decomposition algorithm for 2d and 3d geometric constraint solving. Computer-Aided Design, 38(1):1–13, january 2006. 12. L. Yang. Solving geometric constraints with distance-based global coordinate system. In Proceedings of the Workshop on Geometric Constraint Solving), 2003. Beijing, China (available at the URL http://www.mmrc.iss.ac.cn/ ascm/ascm03/). 13. Lu Yang. Distance coordinates used in geometric constraint solving. In Automated Deduction in Geometry, pages 216–229, 2002.

Improving Angular Speed Uniformity by C 1 Piecewise Reparameterization Jing Yang1 , Dongming Wang2 , and Hoon Hong3 1

2

LMIB – School of Mathematics and Systems Science, Beihang University, Beijing 100191, China [email protected] Laboratoire d’Informatique de Paris 6, CNRS – Universit´e Pierre et Marie Curie, 4 place Jussieu – BP 169, 75252 Paris cedex 05, France [email protected] 3 Department of Mathematics, North Carolina State University, Box 8205, Raleigh, NC 27695, USA [email protected]

Abstract. We show how to compute a C 1 piecewise-rational reparameterization that closely approximates to the arc-angle parameterization of any plane curve by C 1 piecewise M¨ obius transformation. Making use of the information provided by the first derivative of the angular speed function, the unit interval is partitioned such that the obtained reparameterization has high uniformity and continuous angular speed. An iteration process is used to refine the interval partition. Experimental results are presented to show the performance of the proposed method and the geometric behavior of the computed reparameterizations. Keywords: Parametric plane curve, angular speed uniformity, C 1 piecewise M¨ obius transformation, monotonic behavior.

1

Introduction

Parametric curves have been used extensively in areas such as computer aided geometric design, computer graphics, and computer vision. A curve may have infinitely many different parameterizations. Depending on where and how it will be used, one may need to find a suitable or optimal parameterization out of the infinitely many or to convert a given parameterization into another (more) suitable one. In this paper, we are concerned with parameterizations used for plotting, so typical choices are arc-length [1, 2, 5–8, 10, 15], chord-length [3, 11, 13] and arc-angle [9, 12, 17, 18]. This is the third in a series of papers in which we study the problem of reparameterizing plane curves to improve their angular speed uniformity (or closeness to arc-angle parameterization). In the first paper [17], we proposed a method for finding the optimal reparameterization of any plane curve among those obtained by M¨obius transformations. In the second paper [18], we allowed C 0 piecewise M¨obius transformations. The computed C 0 piecewise-rational reparameterization can approximate to the uniform parameterization as closely as one wishes,

18

-

Fig. 1. Dot plots (left) and angular speeds (right) of two parameterizations of the same curve. The first row shows one parameterization with discontinuous angular speed and the second row shows the other with continuous angular speed. The red dots on the left-hand side correspond to the segment points.

but its angular speed sometimes lacks continuity, causing sudden changes in the density of points in plotting (see Figure 1). In this third paper, we address the problem of discontinuity by restricting piecewise M¨obius transformations to be C 1 . We describe a method that can produce almost uniform reparameterizations with continuous angular speed. In Section 2, we state the problem of C 1 piecewise reparameterization. In Section 3, we give an algorithm for computing a C 1 piecewise reparameterization from any given parameterization of a plane curve. In Section 4, we provide experimental results on the performance of the algorithm and compare them with the results obtained using C 0 piecewise M¨obius transformations.

2

Problem

We begin by recalling some notions and results from [17, 18]. For any regular parameterization p = (x(t), y(t)) : [0, 1] → R2 of a plane curve, we denote its angle, angular speed, average angular speed and the L2 norm of angular speed by θp , ωp , µp and σp2 respectively. They are defined

19

by the following expressions θp = arctan

y′ , x′

¯ ¯ ωp = ¯θp′ ¯ ,

µp =

Z

1

ωp (t) dt,

σp2 =

Z

1

(ωp (t) − µp )2 dt.

0

0

(1)

Definition 1 (Angular Speed Uniformity). The angular speed uniformity up of p is defined as 1 (2) up = 1 + σp2 /µ2p (with up = 1 when µp = 0). Let T = (t0 , . . . , tN ),

S = (s0 . . . , sN ),

α = (α0 , . . . , αN −1 ),

where 0 = t0 < · · · < tN = 1, 0 = s0 < · · · < sN = 1, and 0 ≤ α0 , . . . , αN −1 ≤ 1. Definition 2 (C 1 Piecewise M¨ obius Transformation). A map m is called a C 1 piecewise M¨ obius transformation if it has the following form  .    .. (3) m(s) = mi (s), if s ∈ [si , si+1 ];    .. .

such that

m′i (si+1 ) = m′i+1 (si+1 ), where mi (s) = ti + ∆ti

(4)

(1 − αi )˜ s (1 − αi )˜ s + (1 − s˜)αi

and ∆ti = ti+1 − ti , ∆si = si+1 − si , s˜ = (s − si )/∆si . Now we are ready to state the problem precisely. Let p be a rational parameterization of a plane curve. The problem is essentially one of constrained optimization: find T, S and α such that up◦m is near maximum, subject to the constraint (4), where m is the transformation determined by T, S and α. Remark 1. The constraint (4) ensures that the resulting reparameterization is C 1 continuous, since ωp◦m = ωp (t)|t=t(s) · m′ (s). Remark 2. From now on, we make the natural assumption that p is not a straight line and ωp 6= 0 for all t ∈ [0, 1].

3

Method

Recall the problem of constrained optimization formulated in the preceding section. Finding an exact optimal solution to this problem is difficult both theoretically and practically due to the highly nonlinear dependency of up◦m on T, S, α. Therefore we will try to compute an approximately optimal solution instead.

20

3.1

Determination of T

It is proved in [17] that if a transformation r satisfies the condition (r−1 )′ =

ωp , µp

(5)

then up◦r = 1, that is, p ◦ r is an arc-angle parameterization. Since µp is a constant, the condition (5) means that (r−1 )′ is proportional to ωp . Hence, if ′ (m−1 i ) is similar to ωp over [ti , ti+1 ], then mi is close to the optimal r over [ti , ti+1 ]. In this case, p ◦ m will be a good reparameterization. As given in Definition 2, mi (s) = ti + ∆ti

(1 − αi )˜ s . (1 − αi )˜ s + (1 − s˜)αi

Taking derivative of both sides of this equality with respect to s, we obtain m′i (s) =

αi (1 − αi ) ∆ti · . ∆si [(1 − αi )˜ s + αi (1 − s˜)]2

(6)

It follows that ′ (m−1 i ) (t) =

∆si (1 − αi ) αi ·£ ¤ ∆ti αi t˜ + (1 − αi )(1 − t˜) 2

(7)

(where the derivative is with respect to t, and similarly elsewhere). Observe that ′ each (m−1 i ) is monotonic over [ti , ti+1 ]. If ωp is also monotonic over [ti , ti+1 ], then −1 ′ ωp and (mi ) are likely similar and approximately proportional. This suggests that t1 , . . . , tN −1 should be chosen such that ωp′ (ti ) = 0. Example 1. Consider the parameterization ¶ µ t2 − 4 t + 4 t3 − 6 t2 + 9 t − 2 , , p= 2 t4 − 16 t3 + 40 t2 − 32 t + 9 2 t4 − 16 t3 + 40 t2 − 32 t + 9 whose plot is shown in Figure 2. The angular speed of p is ¯ ¯ ¯ 2(2 t4 − 16 t3 + 40 t2 − 32 t + 9) · G ¯ ¯, ωp = ¯¯ ¯ F where

F = 4 t12 − 96 t11 + 1032 t10 − 6560 t9 + 27448 t8 − 79744 t7 + 165784 t6 −251680 t5 + 283789 t4 − 239208 t3 + 144730 t2 − 53800 t + 8753, G = 2 t6 − 24 t5 + 138 t4 − 464 t3 + 939 t2 − 1068 t + 551.

(8)

21

Now ωp′ = −

4 (t − 2) · H , F2

where H = 16 t20 − 640 t19 + 12320 t18 − 151680 t17 + 1336544 t16 − 8928256 t15 +46713024 t14 − 195122432 t13 + 657869152 t12 − 1800130816 t11 +4002473088 t10 − 7212888576 t9 + 10468965804 t8 − 12110797504 t7 +10998339008 t6 − 7681616640 t5 + 4019329519 t4 − 1526783864 t3 +406515286 t2 − 72301976 t + 7081867. By solving ωp′ (t) = 0 for t over (0, 1), we obtain T = (0, 0.580, 1). 3.2

Determination of S

Recall (5), which may be rewritten into Rt r−1 =

0

ωp dt . µp

If m is a C 1 piecewise M¨obius transformation which approximates to r closely, Rt then s = m−1 ≈ 0 ωp dt/µp . This suggests us to choose s1 , . . . , sN −1 with R ti ωp dt si = 0 . (9) µp Example 2 (Continued from Example 1). For the parameterization p given in Example 1, we have R 0.580 Z 1 ωp dt ωp dt = 3.811, s1 = 0 = 0.535. µp = 3.811 0 Thus S = (0, 0.535, 1). 3.3

Determination of α

We want to solve the constraint (4) for α1 , . . . , αN −1 in terms of T, S and α0 . For this purpose, we use a few shorthand notations: λi = φk+1 =

∆ti , ∆si k Y

λ2i ,

ρi = ψk+1 =

1 − αi , αi k Y

λ2i+1

i=0

i=0

with φ0 = ψ0 = 1. The following Lemma first appeared in [2] without a proof.

(10)

22

Lemma 1. Let Ψk =

φ2 ψk2 and Φk = k+1 . The constraint (4) is equivalent to 2 φk ψk2  Ψk ρ0 λ0   , if i = 2k;   λi ρi = (11)   Φk   , if i = 2k + 1. ρ0 λ0 λi

Proof. Refer to (6). Using the shorthand notations, we have m′i (s) = λi

ρi . [(1 − s˜) + ρi s˜]2

Hence the constraint (4) implies λi = λi+1 ρi+1 . ρi

(12)

We prove the lemma by induction on i. When i = 0, k = 0 and the conclusion can be easily verified. Assume that the conclusion holds for a positive i. If i = 2k, then by (12) ρi+1 =

=

1 λ22k 1 λ2 1 λ2i · = · = 2 2k · λi ρi λi+1 Ψk ρ0 λ0 λi+1 ψk ρ0 λ0 λi+1 φ2k 1 φ2k+1 φ2k λ22k 1 1 Φk 1 · = = . 2 2 ψk ρ0 λ0 λi+1 ψk ρ0 λ0 λi+1 ρ0 λ0 λi+1

Similarly, if i = 2k + 1, then ρi+1 =

=

λ2 λ2 1 1 λ2i 1 · = 2k+1 · = 2 2k+1 · Φk λi ρi λi+1 λi+1 λi+1 φk+1 1 ρ0 λ0 ψk2 ρ0 λ0 2 ψk+1 ψk2 λ22k+1 ρ0 λ0 1 Ψk+1 ρ0 λ0 ρ0 λ0 · = = . 2 2 φk+1 1 λi+1 φk+1 λi+1 λi+1

Therefore the conclusion holds in both cases.

⊓ ⊔

Next, we will express the objective function up◦m in terms of T, S and α0 . For this end, we use the following shorthand notations: Z ti+1 ωp2 (t) · (1 − t˜)2 dt, (13) Ai = ti ti+1

Bi =

Z

ωp2 (t) · 2 t˜(1 − t˜) dt,

Ci =

Z

ωp2 (t) · t˜2 dt.

ti ti+1 ti

23

Lemma 2. The following equality holds for any parameterization p and C 1 piecewise M¨ obius transformation m: up◦m =

µ2p , ηp,m

(14)

where ⌊ N 2−1 ⌋

ηp,m

X · Φk Ψk ρ0 λ0 A2k + λ2k B2k + = C2k ρ0 λ0 k=0

Φk A2k+1 + λ2k+1 B2k+1 + Ψk+1 ρ0 λ0 C2k+1 + ρ0 λ0

¸

and those terms above whose subscripts are greater than N − 1 take value 0. Proof. It is proved in [17] that up◦m = and m

−1

µ2p , ηp,m

where

ηp,m =

Z

0

1

ωp2 (t) dt (m−1 )′

is the inverse function of m. Since m is piecewise, we have N −1 Z ti+1 X ωp2 (t) dt. ηp,m = ′ (m−1 i ) (t) i=0 ti

It follows from (7) that ∆ti [(1 − αi )(1 − t˜) + αi t˜]2 · ′ ∆si (1 − αi )αi (m−1 i ) (t) h 1 i = λi ρi (1 − t˜)2 + 2 t˜(1 − t˜) + t˜2 , ρi 1

=

where λi and ρi are as in (10). Hence ηp,m =

N −1 X i=0

³ Ci ´ λi Ai ρi + Bi + . ρi

(15)

The lemma is proved by substituting the expressions of ρi in Lemma 1 into (15). ⊓ ⊔ Theorem 1. Let T and S be fixed. Then up◦m has a unique global maximum at s P 1 ρ0 = , (16) λ0 Q where ⌊ N 2−1 ⌋

P =

X

k=0

Φk (A2k+1 + C2k ) ,

Q=

⌊ N 2−1 ⌋ ³

X

k=0

´ Ψk A2k + Ψk+1 C2k+1 .

(17)

24

Proof. As µp is a constant, we only need to minimize ηp,m . It is easy to verify that ηp,m ≥ µ2p . From (15), we see that when ρ0 approaches 0 or ∞ the value of ηp,m goes to +∞. Thus there must be a global minimum point ρ0 ∈ (0, ∞) such that dηp,m = 0. (18) dρ0 Rewrite

dηp,m dρ0

= 0 into −Q · λ0 + P

1 = 0, ρ20 λ0

where P and Q are as in (17). Solving the above equation for ρ0 , we obtain s P 1 ρ0 = . λ0 Q ⊓ ⊔ Example 3 (Continued from Example 2). For p and T in Example 1 and S in Example 2, calculations result in P = 35.864, Q = 0.740 and λ0 = 1.086, so ρ0 = 6.414. By (12), we have ρ1 = 0.188 and thus α = (0.135, 0.842). 3.4

Iteration

Once T, S and α are computed, we can construct a C 1 piecewise M¨obius transformation m1 for p such that p1 = p ◦ m1 has better uniformity than p. Then we can use the same method to construct another C 1 piecewise M¨obius transformation m2 for p1 such that p2 = p1 ◦ m2 has better uniformity than p1 , and repeat the process. In this way, we may get m1 , . . . , mn and p1 , . . . , pn such that pn = pn−1 ◦ mn = p ◦ m1 ◦ · · · ◦ mn has the desired uniformity. The approach explained above involves extensive computations with floatingpoint numbers, resulting sometimes in instability, in particular in the process of ′ solving the equation ωp◦m = 0. In what follows we propose an alternative 1 ◦···◦mk approach that can avoid manipulating floating-point numbers. Note that if m1 and m2 are C 1 piecewise M¨obius transformations, then so is m1 ◦ m2 . Therefore finding m1 , . . . , mn such that pn has the desired uniformity is equivalent to finding a single m such that m = m1 ◦ · · · ◦ mn and p ◦ m has the desired uniformity. Thus the key question is how to find the partition for m1 ◦ · · · ◦ mn without computing each mi . Suppose that T and α have been computed by using the method presented in Sections 3.1–3.3. Let ti , ti+1 ∈ T and αi ∈ α. Now we compute tij ∈ (ti , ti+1 ) such that the corresponding sij ∈ (si , si+1 ) are the partition nodes satisfying ′ ωp◦m (sij ) = 0. According to [17], we have ωp◦m =

ωp (t). (m−1 )′

It follows that ·

ωp (ωp◦m ) = (m−1 )′ ′

¸′

=

ωp′ (m−1 )′ − ωp (m−1 )′′ [(m−1 )′ ]

2

.

25

Combining (11) and (16), we have ρi ∈ (0, +∞), which implies αi ∈ (0, 1). By (7), (m−1 )′ > 0 when t ∈ (ti , ti+1 ). Thus the solution to (ωp◦m )′ = 0 for t over (ti , ti+1 ) is the same as that to ωp′ (m−1 )′ − ωp (m−1 )′′ = 0.

(19)

Substituting (7) and (m−1 )′′ =

∆si 2 αi (1 − αi )(1 − 2 αi ) ·£ ¤3 ∆t2i αi t˜ + (1 − αi )(1 − t˜)

into (19) and simplifying the result, we obtain £ ¤ ωp′ · ∆ti · αi t˜ + (1 − αi )(1 − t˜) − 2 ωp · (1 − 2 αi ) = 0.

(20)

By solving this equation for t, we can get a partition Ti of (ti , ti+1 ). From Ti (i = 0, . . . , N − 1), we can compute a refined partition T ∗ of [0, 1]. The partition T ∗ may be further refined in the same way by iteration. From T ∗ and p, we may compute a reparameterization p ◦ m of p, which is equivalent to p ◦ m1 ◦ · · · ◦ mn . Example 4 (Continued from Example 3). Refer to Examples 1 and 3 for ωp , ωp′ , T and α. Consider the first interval, i.e., (0, 0.580), in the partition T . To compute a partition of this interval, we substitute t0 = 0, t1 = 0.580, α0 = 0.135, ωp and ωp′ into (20). The solution to the obtained equation gives a partition of (0, 0.580), which is T1 = (0, 0.424, 0.553, 0.580). Similarly for (0.580, 1), we can also get a partition of it, which is T2 = (0.580, 0.611, 0.749, 1). Thus T ∗ = (0, 0.424, 0.553, 0.580, 0.611, 0.749, 1) is a refined partition of [0, 1] we wanted. Remark 3. The above alternative approach allows one to compute a refined partition of the unit interval by solving equations of the form (20). Unlike the bruteforce approach of iteration, this approach computes ωp and ωp′ only once. Moreover, the integrations Ai , Bi , Ci are computed also much more effectively, using this approach than using the bruteforce one, because the latter involves integrations of piecewise functions many times, which usually take a large amount of computing time. Remark 4. In practice, with two or three iterations one may reach the desired uniformity, e.g., u ≥ 0.99.

26

3.5

Algorithm

Now we summarize the ideas and results discussed above into an algorithm. Algorithm 1 (C 1 Reparameterize) Input: p, a rational parameterization of a plane curve; δ, a real number greater than 1. Output: p∗ , a C 1 piecewise-rational reparameterization of p; u∗ , the uniformity of p∗ . 1.

Compute ωp and µp using (1), up using (2) and ωp′ .

2.

mnew ← Id; unew ← up .

3.

Do mold ← mnew ; uold ← unew ; mnew , unew ← Improve(mold , ωp , ωp′ , µp ) Until unew /uold < δ.

4.

p∗ ← p ◦ mnew ; u∗ ← unew .

5.

Return p∗ , u∗ .

Algorithm 2 (Improve) Input: mold , a C 1 piecewise M¨obius transformation; ωp , the angular speed of a parametric plane curve p; ωp′ , the derivative of ωp ; µp , the average angular speed of p. Output: mnew , an improved C 1 piecewise M¨obius transformation for p; unew , the uniformity of p ◦ mnew . 1.

Let Told , Sold and αold be the parameters for mold .

2.

Compute Tnew from Told and αold , using (20).

3.

Compute Snew from Tnew , using (9).

4.

Compute ρ0new from Tnew and Snew , using (16).

5.

Compute ρinew (i > 0) from Tnew , Snew and ρ0new , using (11).

6.

Compute αnew from ρinew , using (10).

7.

Compute unew from µp and ρinew , using (14) and (15).

8.

Construct mnew from Tnew , Snew and αnew , using (3).

9.

Return mnew , unew .

Remark 5. In the main algorithm C 1 Reparameterize, ωp , ωp′ and µp are computed only once and used repeatedly in the iteration step as input to the subalgorithm Improve. The iteration terminates when the condition unew /uold < δ is

27

satisfied, i.e., when it cannot improve the uniformity by a factor greater than or equal to the given δ. 3.6

Example

Example 5 (Continued from Example 4). For p in Example 1 with δ = 1.01, the algorithm C 1 Reparameterize starts with the computation of ωp , µp and ωp′ (see Examples 1 and 2 for the results). After setting mold (s) = s and uold = 0.403, the algorithm calls Improve with ωp , ωp′ , µp and mold as input. With Told = (0, 1), Sold = (0, 1) and αold = 1/2 as the parameters for mold , we compute Tnew , Snew αnew (as done in Examples 1–3) and unew = 0.969, and get  0.939 s   s ∈ [0, 0.535];   1.366 s + 0.135 , mnew (s) =   0.710 s − 0.869   , s ∈ [0.535, 1]. 1.469 s − 1.628

Since unew /uold = 2.406 > δ, we update mold with mnew and uold with unew and call Improve. Now with Told = (0, 0.580, 1), Sold = (0, 0.535, 1) and αold = (0.135, 0.842) as the parameters for mold , we compute Tnew = (0, 0.424, 0.553, 0.580, 0.611, 0.749, 1), Snew = (0, 0.170, 0.402, 0.535, 0.679, 0.905, 1), αnew = (0.359, 0.284, 0.481, 0.523, 0.729, 0.617), unew = 0.997, and get

mnew (s) =

 1.601 s   ,   1.657 s + 0.359        1.185 s − 0.080   ,   1.855 s + 0.030        0.264 s + 0.160     0.285 s + 0.367 ,

  0.084 s − 0.348   ,   0.315 s − 0.691        1.068 s − 1.170   ,   2.022 s − 2.101        0.829 s − 1.212   , 2.461 s − 2.844

s ∈ [0, 0.170]; s ∈ [0.170, 0.402]; s ∈ [0.402, 0.535]; s ∈ [0.535, 0.679]; s ∈ [0.679, 0.905]; s ∈ [0.905, 1].

Since unew /uold = 1.029, which is still bigger than δ, we update mold with mnew and uold with unew , and call Improve again. With the updated Told , Sold and

28

αold as the parameters for mold , we compute Tnew = (0, 0.323, 0.424, 0.476, 0.523, 0.553, 0.572, 0.580, 0.589, 0.611, 0.648, 0.683, 0.749, 0.839, 1), Snew = (0, 0.113, 0.170, 0.220, 0.302, 0.402, 0.492, 0.535, 0.582, 0.679, 0.790, 0.847, 0.905, 0.950, 1), αnew = (0.446, 0.433, 0.436, 0.411, 0.435, 0.475, 0.499, 0.501, unew

0.529, 0.582, 0.568, 0.581, 0.563, 0.552), = 1.000,

and get

 1.589 s  , s ∈ [0, 0.113];    0.953 s + 0.446         1.760 s − 0.058 , s ∈ [0.113, 0.170]; mnew (s) = 2.345 s + 0.169   ..   .         0.321 s − 0.768 , s ∈ [0.950, 1] 2.094 s − 2.542 (which consists of 14 pieces). Since unew /uold = 1.003 < δ, the iteration terminates. Finally, p∗ = p ◦ mnew is obtained as a desired reparameterization with up∗ = 1.000. Figure 2 shows the original parameterization p and the improved reparameterization p∗ .

Fig. 2. Curve p and its reparameterization p∗ computed by using a C 1 piecewise M¨ obius transformation. The dot plots using p and p∗ are shown on the left-hand side and in the middle respectively. The red and blue curves on the right-hand side show the angular speeds of p and p∗ respectively.

Remark 6. In Examples 1–5 and the experiments in Section 4, T , S, α and m are all computed numerically. It is worth pointing out that if floating-point numbers are turned finally into rational numbers and q = p ◦ m is computed symbolically, then q is an exact reparameterization of p. However, the continuity of angular

29

speed of q is not guaranteed to be exact unless ρi are computed also symbolically at the last stage.

4

Experiments

The algorithm described in Section 3.5 has been implemented in Maple. It performs well as shown by the experimental results given in this section. The experiments were carried out on a PC Intel(R) Core(TM)2 Duo CPU P8400 @2.26GHz with 2G of RAM. The benchmark curves, chosen from [4, 14, 16], are all rational and their angular speeds are nonzero over [0, 1]. For the curves taken from [4], the involved parameters are specialized to concrete values. The list of the curves (in Maple format) is available from the authors upon request. Table 1. Reparameterization by standard, C 0 and C 1 piecewise M¨ obius transforma¯ = tions (with δ = 1.01). In the table, u = Uniformity, N = Number of pieces, D Discontinuity (average), T = Time (seconds). Curve Original u C1 0.403 C2 0.552 C3 0.403 C4 0.926 C5 0.987 C6 0.797 C7 0.836 C8 0.741 C9 0.337 C10 0.347 C11 0.555 C12 0.764 C13 0.747 C14 0.301 C15 0.276 C16 0.283 C17 0.682 C18 0.226

Standard u 0.412 0.558 0.643 0.973 0.987 0.797 0.853 0.741 0.337 0.347 0.555 0.764 0.747 0.301 0.667 0.283 0.890 0.228

T 0.015 0.000 0.000 0.000 0.015 0.000 0.015 0.016 0.015 0.015 0.015 0.015 0.000 0.015 0.015 0.000 0.000 0.000

u 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 0.999 1.000 1.000 1.000 1.000

C 0 piecewise ¯ D N 0.008 0.023 0.004 0.013 0.004 0.004 0.017 0.015 0.010 0.008 0.019 0.006 0.017 0.010 0.021 0.010 0.002 0.000

14 6 18 4 4 22 5 8 16 16 18 22 10 4 18 16 8 8

C 1 piecewise T 0.391 0.047 0.328 0.047 1.016 0.359 0.047 0.093 0.172 0.219 0.203 0.328 0.094 0.031 0.219 0.203 0.063 0.078

u 1.000 1.000 1.000 1.000 1.000 1.000 1.000 0.999 0.999 1.000 1.000 1.000 1.000 0.999 0.999 0.999 1.000 1.000

N 14 6 12 4 4 18 5 8 16 16 22 18 10 4 16 16 7 8

T 0.297 0.062 0.328 0.062 0.734 0.407 0.047 0.110 0.188 0.235 0.516 0.328 0.094 0.047 0.250 0.218 0.062 0.078

Table 1 presents the experimental results of reparameterization using standard M¨obius transformations, C 0 piecewise M¨obius transformations and C 1 piecewise M¨obius transformations. In order to make comparisons fair, the way used for computing partitions for C 0 piecewise reparameterizations here is different from that described in [18], but similar to the process of computing partitions for C 1 piecewise reparameterizations explained in Section 3.4. One can see that

30

the uniformities of parameterizations may be improved only slightly by standard M¨obius transformations, but dramatically by piecewise ones. C 0 piecewise reparameterization often introduces discontinuity in angular speed. For any piecewise parameterization p with (0, t1 , . . . , tN −1 , 1) as a partition of [0, 1], the local discontinuity of the angular speed of p at ti may be naturally defined to be ¯ − ¯¯ ¯ ωp (t+ i ) − ωp (ti ) ¯ Di = 2 ¯¯ − ¯. ωp (t+ i ) + ωp (ti )

The totalPand average discontinuities of the angular speed of p may be measured N −1 ¯ = D/(N − 1) respectively. The total discontinuity of by D = i=1 Di and D the angular speed of any C 1 piecewise parameterization is 0 (or almost 0 when computations are performed numerically). There is not much difference between the uniformities and computing times for C 0 and C 1 reparameterizations, while C 0 reparameterizations may have positive discontinuity, so we advocate the use of C 1 piecewise reparameterizations in practice. Remark 7. In step 2 of Algorithm 2, all the solutions of the equation (20) are needed. We have encountered two test examples (not included in Table 1) for which the numeric solver of Maple used in our implementation failed to find all the solutions. For these two examples, the uniformities of the computed reparameterizations are 0.959 and 0.737 (of which the latter is not close to 1 at all).

5

Conclusion

We have presented a method for computing C 1 piecewise-rational reparameterizations of given parametric plane curves. Such reparameterizations may have significantly better uniformity and meanwhile keep their angular speed function continuous. The latter represents a major advantage of C 1 piecewise-rational reparameterizations over C 0 ones. In addition to the basic idea of computing C 1 piecewise M¨obius transformations, the method contains two key ingredients for partitioning the unit interval: (1) the interval is first partitioned by using the information provided by the first derivative of the angular speed function; (2) the obtained interval partition is further refined by using an iteration process. Experimental results are provided to show the good performance of the proposed algorithm. It can be concluded that C 1 piecewise-rational reparameterizations computed by our algorithm may have uniformity almost as high as C 0 ones’, but the former possess better geometric continuity and thus are more suitable for applications. The iteration idea used in this paper for interval partitioning may be used to compute C 1 piecewise arc-length reparameterizations as well, and thus to enhance the method described in [10].

References 1. Cattiaux-Huillard, I., Albrecht, G. and Hern´ andez-Mederos, V.: Optimal parameterization of rational quadratic curves. Computer Aided Geometric Design 26(7), pp. 725–732 (2009).

31 2. Costantini, P., Farouki, R., Manni, C. and Sestini, A.: Computation of optimal composite re-parameterizations. Computer Aided Geometric Design 18(9), pp. 875–897 (2001). 3. Farin, G.: Rational quadratic circles are parameterized by chord length. Computer Aided Geometric Design, 23(9), pp. 722–724 (2006). 4. Famous curves index: http://www-history.mcs.st-and.ac.uk/Curves/Curves.html (2005). 5. Farouki, R.: Optimal parameterizations. Computer Aided Geometric Design 14(2), pp. 153–168 (1997). 6. Farouki, R. and Sakkalis, T.: Real rational curves are not unit speed. Computer Aided Geometric Design 8(2), pp. 151–157 (1991). 7. Gil, J. and Keren, D.: New approach to the arc length parameterization problem. In: Straßer, W. (Ed.), Prodeedings of the 13th Spring Conference on Computer Graphics (Budmerice, Slovakia, June 5–8, 1997), pp. 27–34. Comenius University, Slovakia (1997). 8. J¨ uttler, B.: A vegetarian approach to optimal parameterizations. Computer Aided Geometric Design 14(9), pp. 887–890 (1997). 9. Kosters, M.: Curvature-dependent parameterization of curves and surfaces. Computer-Aided Design 23(8), pp. 569–578 (1991). 10. Liang, X., Zhang, C., Zhong, L. and Liu, Y.: C 1 continuous rational reparameterization using monotonic parametric speed partition. In: Proceedings of the 9th International Conference on Computer-Aided Design and Computer Graphics (Hong Kong, China, December 7–10, 2005), pp. 16–21. IEEE Computer Society, 2005. 11. L¨ u, W.: Curves with chord length parameterization. Computer Aided Geometric Design 26(3), pp. 342–350 (2009). 12. Patterson, R. and Bajaj, C.: Curvature adjusted parameterization of curves. Computer Science Technical Report CSD-TR-907, Paper 773, Purdue University, USA (1989). 13. S´ anchez-Reyes, J. and Fern´ andez-Jambrina, L.: Curves with rational chord-length parametrization. Computer Aided Geometric Design 25(4–5), pp. 205–213 (2008). 14. Sendra, J. R., Winkler, F. and P´erez-D´ıaz, S.: Rational Algebraic Curves: A Computer Algebra Approach. Algorithms and Computation in Mathematics, Vol. 22. Springer-Verlag, Berlin Heidelberg (2008). 15. Walter, M. and Fournier, A.: Approximate arc length parameterization. In: Velho, L., Albuquerque, A. and Lotufo, R. (Eds.), Prodeedings of the 9th Brazilian Symposiun on Computer Graphics and Image Processing (Fortaleza-CE, Brazil, October 29 – November 1, 1996), pp. 143–150. Caxambu, SBC/UFMG (1996). 16. Wang, D. (Ed.): Selected Lectures in Symbolic Computation (in Chinese). Tsinghua University Press, Beijing (2003). 17. Yang, J., Wang, D. and Hong, H.: Improving angular speed uniformity by reparameterization (revised version under review). 18. Yang, J., Wang, D. and Hong, H.: Improving angular speed uniformity by optimal C 0 piecewise reparameterization. In: Prodeedings of the 14th International Workshop on Computer Algebra in Scientific Computing (Maribor, Slovakia, September 3–6, 2012), pp. 349–360, LNCS 7442, Springer-Verlag, Berlin Heidelberg (2012).

Cayley Factorization and the Area Principle Susanne Apel

Technische Universität München, Zentrum Mathematik, Boltzmannstr. 3, 85748 Garching, Germany

We address the problem of the generalized Cayley factorization introduced in [8] and give a more direct construction for interpreting the zero-sets of bracket polynomials geometrically in terms of synthetic constructions, i.e. in terms of sequences of join and meet. Abstract.

1 Introduction Generally speaking, the task of Cayley factorization deals with the problem of translating an algebraic term back to geometry. More precisely, the algebraic expressions in question are the homogenous bracket polynomials. They arise in numerous applications and due to the rst fundamental theorem of invariant theory, they constitute all polynomial invariants of a point conguration under projective transformations. On the other hand, there are so-callled synthetic constructions. The synthetic in question considered are geometric constructions essentially based on joining points and meeting lines. Each synthetic construction induces a homogenous bracket polynomial which has integer coecients. The problem of Cayley factorization asks for reversing this process: in which cases is it possible to translate a homogenous bracket polynomial with integer coecients to a synthetic construction?

1.1

A Famous Example

The most prominent example is given by Pascal's Theorem which characterizes the six points

a, b, c, d, e, f

in

RP2

to lie on a common conic (see also Fig. 1)

via the collinearity of the three constructed (and dependent) points With

X = (a, b, c, d, e, f )

we dene the bracket

[∗, ∗, ∗]X

x, y

and

z.

to be the determinant

of the homogenous coordinates of the points inserted in the bracket. So e.g.

[a, c, e]X = det(a, c, e) There is also a characterization of the six points lying on a common conic in terms of

[a, c, e]X [a, d, f ]X [b, c, f ]X [b, d, e]X − [a, c, f ]X [a, d, e]X [b, c, e]X [b, d, f ]X = 0. a, b, c, d, e, f are points in the RP2 with concrete homogenous coordinates but consider a, b, c, d, e, f to be we end up with If we no longer suppose that

variables

34 the identities given in Fig. 1, where the brackets are considered to be formal symbols inside the bracket ring [10]. In particular, Fig. 1 gives us a direct correspondence between a synthetic constructionnamely checking the collinearity of

x, y

and

zand

the vanishing of a bracket polynomial.



Fig. 1.

line

[a, c, e][a, d, f ][b, c, f ][b, d, e] −[a, c, f ][a, d, e][b, c, e][b, d, f ] = 0



Pascal's theorem: a, b, c, d, e, f lie on a common conic ⇔ x, y, z lie on a common

2 The Problem of Cayley Factorization 2.1

Synthetic Constructions

The way we view synthetic constructions is a a straightforward generalization of what is going on with Pascal's theorem. Now suppose a nite number of variables

a, b, c, . . .

are given. We allow ourselves to call those variables "points"

for obvious reasons. Then a synthetic construction arises from: 1. Using a sequence of

points

x, y

join

and

z

(∨) and

meet

(∧) operations in order to determine

a, b, c,. . . . More precisely, each ∨ and ∧ resulting in a point can be expressed as a variable or as (A ∨ B) ∧ (C ∨ D), where A, B, C and D are allowed to be variables or again a sequence of ∨ and ∧ that represents a point. Asking for the collinearity of x, y and z. three

depending on

(non-empty) sequence of

2.

2.2

Computation of Synthetic Constructions in terms of the Grassmann-Cayley Algebra

We can inductively dene an a computation of synthetic constructions which will be compatible with the rules of Grassmann-Cayley algebra.

[x, y, z] to check the collinearity of the corresponding points. A, B, C and D variables or a sequence of ∨ and ∧ that represent points

1. Write 2. For

it holds

(A ∨ B) ∧ (C ∨ D) = [A, B, C] D − [A, B, D] C = [C, D, B] A − [C, D, A] B

35

all in the variables

Plugging in

∨-∧-sequences

evaluations of

and using the linearity of the

bracket, each computation of a synthetic construction will give a bracket polynomial

a, b, c, . . . . In addition, this bracket polynomial will be Z.

homogenous and will have coecients in

Problem 1. mial

P

(Cayley factorization) Given a multi-homogeneous bracket polyno-

with integer coecients.

Is there a synthetic construction whose bracket expansion is equal to

P

in the

bracket ring?

3 Some Known Results and a Renement of the Problem Another introduction to the topic can be found for example in [7] or [2]. On the concrete problem on Cayley factorization, there exists an algorithm to decide the multi-

linear

problem given in [11]. In [5] one can nd algorithms for factoring

bracket polynomials up to a specic degree in the brackets. There are also some cases of addressing special cases of bracket polynomials, e.g. [9]. We will now focus on the approach considered in [8]. They give the example

[a, b, c][d, e, f ]+[a, b, d][c, e, f ] of a a bracket polynomial, that cannot be factored into a synthetic construction. Nevertheless, there is an almost factorization:

 (ac∧bd)∨(ad∧bc) ∧ef ∧cd = [a, c, d][b, c, d]([a, b, c][d, e, f ]+[a, b, d][c, e, f ]) They show, that this phenomenon can be generalized to

Given a multi-homogeneous bracket polynomial P with integer coecients. Then there exists a bracket monomial M such that the product M · P can be factored into a synthetic construction. Theorem 1.

This motivates the generalized Cayley factorization problem:

Problem 2.

(Generalized Cayley Factorization Problem) Given a multi-homogenous

bracket polynomial

P

with integer coecients. Find a synthetic construction

such that its computation equals degree of

M

in the brackets is

M ·P

minimal

for a bracket monomial

M

such that the

among all candidates.

The bound that they were able to improve in the common special case that the coecients of the bracket polynomial are in

105 · (#

summands in

P ) · (#

{−1, 1}

is:

brackets per summand of

P)

The approach sketched below is able to reduce this bound to

10 · (#

summands in

P ) · (#

brackets per summand of

P − 1).

The size of the synthetic construction is directly reected in the degree of the multiplier monomial. Therefore, we obtain a much less complicated construction. The approach is able to detect the introducing example of Pascal's theorem automatically by factoring the corresponding bracket polynomial. In [8], the size of the construction is due to the approach that essentially a

global

coordinate

36 system is introduced. The bracket polynomial is broken up into elementary arithmetic operations which are in turn mimicked by von Staudt constructions. In order to use this system, every calculation has to be represented on a single geometric line, along which it is geometrically calculated afterwards. This reduction needs a lot of join and meet operations. In [7] it is commented to be far too general to be of practical use. This statement goes with the fact that not a single example of the algorithm is worked out in [8].

4 An Instructive Example The main ideas are outlined with the help of an instructive example. The general approach will be sketched in Sect. 5. Consider the equation

[a, b, g][a, c, e][b, c, f ][e, d, f ][a, f , h] − [a, e, g][a, b, c][f , b, h][f , c, e][a, d, f ] = 0 rewritten as As it turns out, to each

[a, b, g] [a, c, e] [b, c, f ] [e, d, f ] [a, f , h] =1 [a, e, g] [a, b, c] [f , b, h] [f , c, e] [a, d, f ] factor in (∗), the so called area principle can be

(∗) applied.

The Area Principle The area principle as used in the following is due to Grünbaum and Shephard, see e.g. [4]. It also ts in the context of the more general area method as used in [3]. It is valid in euclidean geometry only. So we assume euclidean geometry for the moment. Nevertheless, the nal resulting construction and the resulting bracket polynomial are projective invariants. Therefore, the specialization to euclidean geometry is in principle feasible. In detail, the area principle is originally stated as follows (see also Fig. 4):

The Area Method:

[a,d,c] [b,c,d]

=

|a,x| |x,b|

∆(a, d, c) |x, b|. The

In euclidian geometry, the ratio of the (oriented) areas of the triangles and

∆(b, c, d)

equals the ration of the (oriented) lengths

|a, x|

and

lengths can be interpreted as (suitable) projections of the triangles to the line spanned by

a

and

b.

Assuming that we embed the euclidean space into

the standard embedding (z

= 1),

we can summarize:

[a, d, c] |a, x| = [b, c, d] |x, b| where

x = cd ∧ ab = [c, d, a] b − [c, d, b] a

RP2

by

37 In order to apply the area principle to (∗), we dene the intersections

k = ag ∧ be l = ac ∧ eb m = bf ∧ ch n = ef ∧ dc o = af ∧ hd With this setting (∗) reduces to

|b, k| |e, l| |c, m| |d, n| |h, o| · · · · =1 |k, e| |l, b| |m, h| |n, c| |o, d|

(∗)

and has combinatorics as diagrammatically shown below.

c

b k

d

l e

4.1

n

m h

o

Combining length-ratios

As an additional ingredient, we need:

If in a triangle the sides are cut by three concurrent lines that pass through the corresponding opposite vertex, then the product of the three (oriented) length ratios along each side equals 1 (compare Figure below). Theorem 2.

Ceva's theorem:

|a, x| |b, y| |c, z| · · =1 |x, b| |y, c| |z, a|

We plug in a Ceva-conguration by dening

z = (n h ∧ o c) d ∧ c h which implies

|d, n| |h, o| |h, z| · = . |n, c| |o, d| |z, c| This reduces the combinatorics to

38

c

b k

l

n

m z

e



d

m

k

o

h

c

b

z

l e

h

and (∗) reduces to

|b, k| |e, l| · |k, e| |l, b|

We record for the general case,

|c, m| |h, z| · =1 |m, h| |z, c|

·

(∗)

that plugging in Ceva congurations enables

us to combine two length-ratios into one single length-ratio, as long as they have exactly one endpoint in common. Depending on the original distribution of signs induced by applying the area principle one might want be interested in plugging in a so-called Menelaus conguration as well. Menelaus's theorem states that the product of the three (oriented) length ratios along each side of a

−1 if the cuts along the sides come from a single line. So by letting |h,o| |h,z| z = n o ∧ c h we can obtain |d,n| |n,c| · |o,d| = − |z,c| . Observe, that the construction triangle is

for a Menelaus conguration is less complicated and should be preferred in the general case. However, one has to pay attention to the overall sign and some Ceva congurations may be needed. Since Ceva congurations do not need outer intersections on the edges of a triangles and are therefore easier to draw, we used an example with a Ceva conguration. Ceva's and Menelaus's theorem can be used as building blocks also in the related context of generating and proving incidence theorems in [6] and [1].

4.2

Combining 2-Cycles

Now we are left with two 2-cycles of length-ratios. If we look closer at them, we see, that 2-cycles in fact encode cross-ratios and (∗) can be rewritten as

cr(b, e; k, l)

·

cr(c, h; m, z)

There are well-known constructions (see e.g. Fig. 2) in terms of a point

q

on the line spanned by

b

and

e

such that

cr(c, h; m, z) = cr(e, b; q, l) Now (∗) reduces to

1=

|b, k| |e, l| · |k, e| |l, b|

=

|b, k| |e, q| · |k, e| |q, b|

·

|e, q| |b, l| · |q, b| |l, e|



and



to nd

39

b

h m q

k

z

l c e

Fig. 2.

Construction a point q such that cr(c, h; m, z) = cr(e, b; q, l)

k = q. Since k was dened to be ag ∧ be, (∗) a, g and q which is a (generalized) Cayely factor-

This equation holds as soon as reduces to the collinearity of ization of

P.

The complete construction is given in Fig. 3. More precisely, the

formal computation of the construction (see Sect. 2.2) indicates a multiplier monomial of degree 8 in the brackets.

A generalized Cayley factorization for [a, b, g][a, c, e][b, c, f ][e, d, f ][a, f , h] − [a, e, g][a, b, c][f , b, h][f , c, e][a, d, f ]

Fig. 3.

40

5 Generalization and Main Ideas Until now we only did one example. However, we have seen almost every ingredient needed to treat the more general case. We only saved ourselves some case distinctions and the technical details. The approach can be considered as introducing ad-hoc

local

coordinate lines whenever the area principle is applied

and length ratios are combined. The algorithm has been implemented in Mathematica by the author. In this implementation it is able to compute Cayley factorizations of even medium sized bracket polynomials. The algorithm will be presented at the conference. In detail, the following main ideas can be adapted to be applicable also in the general case: First rewrite the bracket polynomial in terms of ratios of brackets by dividing by one summand of the polynomial:

[∗, ∗, ∗] · · · [∗, ∗, ∗] + · · · + [∗, ∗, ∗] · · · [∗, ∗, ∗] − [∗, ∗, ∗] · · · [∗, ∗, ∗] = 0 ⇐⇒ [∗, ∗, ∗] · · · [∗, ∗, ∗] + · · · + [∗, ∗, ∗] · · · [∗, ∗, ∗] =1 [∗, ∗, ∗] · · · [∗, ∗, ∗] ⇐⇒ [∗, ∗, ∗] · · · [∗, ∗, ∗] [∗, ∗, ∗] · · · [∗, ∗, ∗] + ··· + =1 [∗, ∗, ∗] · · · [∗, ∗, ∗] [∗, ∗, ∗] · · · [∗, ∗, ∗] [∗,∗,∗] [∗,∗,∗] . If this is not possible, introduce additional bracket-factors equal to 1. After apply-

For each summand, try to apply the area principle to factors of the form

ing the area principle, the combinatorics of the length ratios will be composed of cycles. Use the theorem of Ceva and the theorem of Menelaus in order to reduce every cycle to a 2-cycle. While doing that, pay attention to sign-changes. The resulting 2-cycles represent in fact cross-ratios which can be combined by a construction similar to Fig. 2.

Fig. 4.

∞.

Projective Addition of the points x and y w.r.t. the projective basis 0, 1 and

41 Now every summand of the bracket polynomial is reduced to a 2-cycle resp. cross-ratio. Use the tool of projective addition (Fig. 4) in order to sum up all summands of the bracket polynomial. At the end, the bracket polynomial is reduced to the question whether a single cross-ratio equals

1,

which can be

translated either into the question of the coincidence of two points or into the collinearity of three points as required.

References 1. Apel, S. and Richter-Gebert, J., Cancellation Patterns in Automatic Geometric Theorem Proving, in Automated Deduction in Geometry - 8th International Workshop, ADG 2010, Munich, Germany, July 22-24, (2010), Revised Selected Papers, Schreck, P., Narboux J. and Richter-Gebert, J. (eds.), LNCS 6877. Springer, (2011), 133 2. Doubilet, P., Rota, G.-C. and Stein, J., On the foundations of combinatorial theory: IX. Combinatorial methods in invariant theory., Stud. Appl. Math., 53 (1974), 18 215. 3. Fearnley-Sander, D., Plane Euclidean Reasoning, in Automated Deduction in Geometry - ADG 1998 Proceedings, Gao, X.-S., Yang L.& Wang, D. (eds.), LNAI 1669. Springer-Verlag, Berlin Heidelberg, (1999), 86110. 4. Grünbaum B. and Shephard, G.C., Ceva, Menelaus, and the Area Principle, Mathematics Magazine, 68 (1995), 254268. 5. Li H. and Wu Y., Automated short proof generation for projective geometric theorems with Cayley and bracket algebras: I. Incidence geometry, Journal of Symbolic Computation, 36 (2003), 717762 6. Richter-Gebert, J., Mechanical theorem proving in projective geometry, Annals of Mathematics and Articial Intelligence, 13 (1995), 139172. 7. Sturmfels, B., Algorithms in Invariant Theory, Springer-Verlag Wien New York, (1993) 8. Sturmfels, B. and Whiteley W., On the Synthetic Factorization of Projectively Invariant Polynomials, Journal of Symbolic Computation, 11 (1991), 439454 9. Tay, T., On the Cayley factorization of calotte conditions Discrete & Computational Geometry, 11 (1994), 97109 10. White, N., The Bracket Ring of Combinatorial Geometry I, Transactions AMS 202 (1975), 7995. 11. White, N., Multilinear Cayley factorization J. Symb. Comput. 11 (1991), 42438.

A New Vector Approach to Automated Affine Geometry Theorem Proving (Extended Abstract) Yu Zou1 , Jingzhong Zhang1,2 , and Yongsheng Rao1 1

1

College of Computer Science and Educational Software, Guangzhou University, Guangzhou, 510006, China [email protected] 2 Chengdu Institute for Computer Applications, Chinese Academy of Sciences, Chengdu, 610041, China

Problem, Motivation and State of the Art

It is sometimes a nice shortcut to deal with some geometry problems by way of vector calculation. Based on a vector approach, Chou, Gao and Zhang proposed a method of automated geometry theorem proving for a class of geometry statements whose hypotheses can be described constructively and whose conclusions can be represented by equations of vectors or by polynomial equations of inner products and vector products of vectors[1, 2]. The key step of this method is to eliminate constructed points from the conclusions of a geometry statement based on a few basic equalities on the inner and vector products. However, as known that it is possible to solve many geometry problems by using only some very basic vector properties rather than properties of the inner product and vector product of vectors. Here is an example. Example 1. In triangle ABC, AD = 2DB, BE = 3EC, F is the intersection of DF AE and CD. Find the ratios FAF E and F C (Fig. 1).

Fig. 1. Find two ratios

AF FE

and

DF FC

44

−−→ −→ −−→ −→ −−→ −→ −−→ −−→ Solution. Since AF + F C = AC = AB + BC, AB = 32 AD = 23 (AF + F D), −−→ −−→ −−→ −−→ BC = 4EC = 4(EF + F C), we have −→ −−→ 3 −→ −−→ −−→ −−→ −→ −−→ −−→ −−→ AF + F C = (AF + F D) + 4(EF + F C) =⇒ AF + 6F C = 8F E + 3DF . 2 −→ −−→ −−→ −−→ Notice that AF , F E are collinear, and DF , F C are also collinear, thus −→ −−→ −−→ −−→ DF AF = 8, = 2. AF = 8F E, 6F C = 3DF =⇒ FE FC DF As shown above, we get the value of two ratios ( FAF E and F C ) at the same time and we just use the following basic properties of vectors: −−→ −−→ 1. AB = −BA; −−→ −−→ −−→ −−→ 2. AB = k CD (k ∈ IR ) ⇐⇒ A, B, C, D are collinear or AB is parallel to CD; −−→ −−→ −→ −−→ −→ −−→ 3. AB + BC = AC or BC = AC − AB; → → 4. (Fundamental theorem of plane vectors) Let − e1 and − e2 be two non-collinear − → vectors in a plane, then any vector e of the plane could be expressed as the → → → → → linear combination of − e1 and − e2 uniquely in the form of − e = a− e1 + b− e2 .

For solving Example 1, the crucial step is to deduce an equation of vectors −→ −−→ −−→ −−→ AF , F E, DF , F C since F = AE∩DC and it is also available to get the equivalent −→ −−→ −−→ −−→ forms of AF + 6F C = 8F E + 3DF in other ways. Of course, some skills are involved here and such skills maybe not so easy to be developed as mechanized steps. Usually, when solving geometry problems involving intersections of lines (especially problems of affine geometry) by way of vector calculation, we need to find some segment ratios divided by intersection points. Therefore, in this paper we propose a new vector approach to automated affine geometry theorem proving and focus on the following two problems: 1. How to find the segment ratios divided by the intersection point of two lines more directly by way of vector calculation? 2. How to solve as many as possible affine geometry problems by using as few as possible properties of vectors (rather than the inner product and vector product of vectors) in a mechanized way?

2 2.1

Main Idea Vector-Intersecting Theorem

Here is an interesting theorem. Theorem 1 (Vector-Intersecting Theorem). Let P, Q, M, N be four different points, O be the intersection point of P Q and M N (P Q ∦ M N ). If three −−→ −−→ −−→ −−→ −−→ −−→ −−→ −−→ vectors P Q, P M and P N satisfy P Q = xP M + y P N , then P Q = (x + y)P O −−→ y O and M − − → = x (Fig. 2). ON

45

Fig. 2. Vector-Intersecting Theorem

−−→ −−→ −−→ −−→ Proof. Obviously, x + y 6= 0, or else P Q = xP M − xP N = xN M which means P Q is parallel to M N . −−→ −−→ −−→ By P Q = xP M + y P N , we have −−→ −−→ −−→ −−→ −−→ −−→ OQ − OP = x(OM − OP ) + y(ON − OP ) −−→ −−→ −−→ −−→ =⇒ (x + y − 1)P O + y ON = xM O + OQ. −−→ −−→ −−→ −−→ Notice that P O, OQ are collinear, and M O, ON are also collinear, thus −−→ −−→ −−→ −−→ −−→ −−→ −−→ M O y (x + y − 1)P O = OQ, y ON = xM O =⇒ P Q = (x + y)P O, −−→ = . x ON Somebody else may has ever proposed a theorem like Vector-Intersecting Theorem, but so far we have not found it. In Fig.2, if point Q coincides with O, then Vector-Intersecting Theorem is very like the familiar formula: −−→ −−→ Let O be a point on M N and M O : M N = λ, then for any point P not on −−→ −−→ −−→ M N , P O = (1 − λ)P M + λP N ; 2.2

Preliminary Application

−−→ −−→ By Vector-Intersecting Theorem, to find the value of segment ratios (P O/OQ −−→ −−→ and M O/ON ) divided by the intersection point O of P Q and M N , it is enough −−→ −−→ −−→ for us to get a linear equation of vectors (P Q,P M ,P N ) and represent it in the −−→ −−→ −−→ form of P Q = xP M + y P N . Note that O = P Q ∩ M N = QP ∩ M N = M N ∩ P Q = N M ∩ P Q, we can −−→ −−→ −−→ −−→ −−→ −−→ also consider finding the relation of vector sets (QP ,QM ,QN ), (M N ,M P ,M Q) −−→ −−→ −−→ or (N M ,N P ,N Q). Now let’s solve Example 1 again by Vector-Intersecting Theorem. −−→ −→ −−→ −−→ −→ Solution 1. Since F = AE ∩ CD, AE = 41 AB + 34 AC and AB = 32 AD, we −→ −−→ −→ have AE = 83 AD + 34 AC.

46 3 −→ −−→ −→ −→ 4 By Vector-Intersecting Theorem, AE = ( 38 + 34 )AF = 89 AF , DF − − → = 3 = 2. FC −−→ 1 −→ 2 −−→ 1 −→8 8 −−→ Solution 2. Note that F = CD ∩AE, and CD = 3 CA+ 3 CB = 3 CA+ 3 CE, → 8 −−→ −−→ −−→ − AF 3 thus CD = ( 31 + 83 )CF = 3CF , − − → = 1 = 8. FE 3 Here are two more examples.

Example 2. Two diagonals of a parallelogram bisect each other (Fig.3).

Fig. 3. Two diagonals bisect each other

−→ −−→ −−→ −−→ −−→ Proof. Since O = AC ∩ BD, and AC = AB + BC = AB + AD, by Vector− → −→ −→ −→ − 1 BO Intersecting Theorem, AC = (1 + 1)AO = 2AO, − − → = 1 = 1. OD

Example 3 (Theorem of Centroid). Let D, E and F be the midpoints of the sides BC, CA and AB of triangle ABC respectively. Show that AD, BE, CF are − − → − − → −→ BG CG AG concurrent and − − → = − − → = − − → = 2 where G is the intersection of AD, BE, CF GD GE GF (Fig. 4).

Fig. 4. Theorem of Centroid

−−→ −−→ −→ Proof. Let G = AD ∩ BE, then AD = 21 AB + 12 AC = − − → −−→ −→ 1 Vector-Intersecting Theorem, AD = 23 AG and BG − − → = 1/2 = 2. GE

−→ 1− 2 AB

−→ + AE, by

47

−−→ −→ −→ −→ −−→ Let G1 = AD ∩ CF , then AD = 12 AB + 21 AC = AF + 21 AC, by Vector−−→ −−→ −−→ 1 1 Intersecting Theorem, AD = 32 AG1 and CG −−→ = 1/2 = 2. Therefore, G1 = G and 2.3

−→ AG − − → GD

=

− − → BG − − → GE

=

G1 F − − → CG − − → = GF

2.

Magic of Vector-Intersecting Theorem

As shown above, it is so convenient, effective and direct to find the segment ratios divided by the intersection point of two lines by using Vector-Intersecting Theorem. In fact, Vector-Intersecting Theorem could be more flexible. First, when dealing with O = P Q∩M N , it is also available to get an equation −−→ −−→ −−→ −−→ −−→ −−→ of (P Q,P M ,P N ) in the form of tP Q = txP M + ty P N (t 6= 0), which implies −−→ −−→ that tP Q = t(x + y)P O. −−→ Second, there are two other two-line intersecting cases implied by P Q = −−→ −−→ xP M + y P N (x + y 6= 0): −−→ −−→ −−→ −−→ −−→ −−→ (1) P Q = xP M + y P N =⇒ xP M = P Q − y P N . −−→ −−→ −−→ When y 6= 1, xP M = P Q − y P N implies the segment ratios divided by the intersection point (P M ∩ QN ) of P M and QN ; −−→ −−→ −−→ −−→ −−→ −−→ (2) P Q = xP M + y P N =⇒ y P N = P Q − xP M . −−→ −−→ −−→ When x 6= 1, y P N = P Q − xP M implies the segment ratios divided by the intersection point (P N ∩ QM ) of P N and QM . −−→ −−→ −−→ Therefore, one equation of (P Q,P M ,P N ) can actually represent three twoline intersecting cases. The following example could show the details. Example 4 (Gauss-line Theorem). Let A, B, C, D be four points on a plane, E = AB ∩ CD, F = AC ∩ BD. Let M, N and L be the midpoints of AD, BC and EF , respectively. Show that M, N and L are collinear (Fig. 5).

Fig. 5. Gauss-line Theorem

48

−−→ −−→ −→ Proof. Let AD = aAB + bAC. −−→ −−→ −→ On one hand, note that aAB = AD − bAC and E = AB ∩ CD, by Vector−−→ −→ Intersecting Theorem, aAB = (1 − b)AE. −→ −−→ −−→ On the other hand, note that bAC = AD − aAB and F = AC ∩ BD, by −→ −→ Vector-Intersecting Theorem, bAC = (1 − a)AF . Notice that −−→ −−→ −−→ 1 −−→ −→ −−→ −→ 1 −−→ 1 M N = AN − AM = (AB + AC) − AD = ((1 − a)AB + (1 − b)AC), 2 2 2 −−→ −→ −−→ 1 −→ −→ 1 −−→ −→ 1 a + b − 1 −−→ a + b − 1 −→ AB+ AC), N L = AL−AN = (AE+AF )− (AB+AC) = ( 2 2 2 1−b 1−a thus

2.4

−−→ (1 − a)(1 − b) MN −−→ = a + b − 1 . NL

General Two-line Intersecting Cases

So far, we have seen the capability and convenience of Vector-Intersecting Theorem. It is time to make use of Vector-Intersecting Theorem for automated geometry theorem proving. Before doing it, the first thing we need to consider is how to deal with general two-line intersecting cases mechanically. Generally, given a nontrivial geometry statement involving intersections of lines, there are at least three non-collinear points being constructed initially. For example, in Example 5, A, B, C could be the initially constructed points. Note −−→ that three non-collinear points A, B, C decide two non-collinear vectors AB and −→ AC, and by fundamental theorem of plane vectors, any vector of plane ABC −−→ −→ could be expressed as the linear combination of AB and AC uniquely. Let P, Q, M, N be four points of plane ABC, O = P Q∩M N . The mechanical steps of dealing with general two-line intersecting cases is done as follows. −→ −→ −−→ −−→ −−→ −→ 1. Express AP , AQ, AM , AN as the linear combination of AB and AC respectively: −→ −−→ −→ −→ −−→ −→ AP = a1 AB + b1 AC; AQ = a2 AB + b2 AC; −→ −→ −−→ −→ −−→ −−→ AM = a3 AB + b3 AC; AQ = a4 AB + b4 AC; −−→ −−→ −−→ −−→ 2. Express every vector of (P Q,P M ,P N ) as the linear combination of AB and −→ AC respectively: −→ −−→ −−→ −→ −→ P Q = AQ − AP = (a2 − a1 )AB + (b2 − b1 )AC; −−→ −−→ −→ −−→ −→ P M = AM − AP = (a3 − a1 )AB + (b3 − b1 )AC; −−→ −−→ −→ −−→ −→ P Q = AN − AP = (a4 − a1 )AB + (b4 − b1 )AC;

49

−−→ −−→ −−→ 3. Find (x, y) such that P Q = xP M + y P N by way of solving system of linear equations, which is easy for computers; By Vector-Intersecting Theorem, −−→ −−→ −−→ P Q = (x + y)P O =⇒ P O =

1 −−→ P Q; x+y −→ −−→ −→ −→ −→ −−→ 4. Express AO as the linear combination of AB and AC by AO = AP + P O −→ −−→ (Note that AP and P Q have been expressed as the linear combination of −−→ −→ AB and AC), which maybe necessary for later computation. 2.5

Necessary Properties of Vectors

Now, let’s recall which properties of vectors are used for solving above problems. −−→ −−→ 1. AB = −BA; −−→ −−→ −−→ −−→ 2. AB = k CD (k ∈ IR ) ⇐⇒ A, B, C, D are collinear or AB is parallel to CD; −−→ −−→ −→ −−→ −→ −−→ 3. AB + BC = AC or BC = AC − AB; → → 4. Fundamental theorem of plane vectors: Let − e1 and − e2 be two non-collinear − → vectors in a plane, then any vector e of the plane could be expressed as the → → → → → linear combination of − e1 and − e2 uniquely in the form of − e = a− e1 + b− e2 ; −−→ −−→ 5. Let O be a point on M N and M O : M N = λ, then for any point P not on −−→ −−→ −−→ M N , P O = (1 − λ)P M + λP N ; 6. Vector-Intersecting Theorem. Actually, the fifth and the sixth property of vectors could be deduced from the former four ones. Therefore, it is enough for us to use above properties of vectors for solving many geometry problems (especially the Hilbert intersection point statements) without the help of the inner product and vector product of vectors. Based on the above properties of vectors and the mechanized steps for dealing with general two-line intersecting cases, it is not difficult to develop a new vector algorithm for automated Hilbert intersection point statements proving. 2.6

Machine Proving Examples

Based on our experience of developing the Mass Point Method[3], we have developed a new vector algorithm for proving Hilbert intersection point statements and have implemented the algorithm in Maple to be a new prover. The structure of our new vector algorithm is quite like that of the Mass Point Method, where the details are omit. Here are two examples proved by the prover entirely automatically. Example 5. Machine proving for Gauss-line Theorem (Fig. 6). Example 6 (Pappus’ Theorem). Let ABC and XY Z be two lines, and P = AY ∩ BX, Q = AZ ∩ CX, R = BZ ∩ CY . Then P, Q and R are collinear (Fig. 7 and Fig.8).

50

(a) Input to the prover

(b) Machine vector proof Fig. 6. Machine Proving for Gauss-line Theorem

(a) Diagram for Pappus’ Theorem Fig. 7. Pappus’ Theorem

(b) Input to the prover

51

Fig. 8. Machine vector proof for Pappus’ Theorem

52

3

Originality

In this paper, our main original contributions are as follows. 1. We are not sure if it is the first time to describe what is Vector-Intersecting Theorem, so far as we know, it is the first attempt to discuss how to solve geometry problems by using Vector-Intersecting Theorem directly; 2. So far as we know, it is the first attempt to try to develop a new vector algorithm for solve a class of geometry statements based on Vector-Intersecting Theorem; 3. In our opinion, compared to the area method[1] or the vector method[2], the new vector algorithm is easier to be implemented; compared to the mass point method, the machine proofs produced by the new vector algorithm are more readable. It is also possible to deal with problems involving intersections of lines and circles by combining Vector-Intersecting Theorem and other properties of vectors in metric geometry, which is our undergoing work.

References 1. Chou, S.C., Gao, X.S., Zhang, J.Z.: Machine proofs in geometry: Automated production of readable proofs for geometry theorems. Singapore.World Scientific (1994) 2. Chou, S.C., Gao, X.S., Zhang, J.Z.: Mechanical theorem proving by vector calculation. In: Proc ISSAC-93, Keiv, (1993)284-291 3. Yu Zou, Jingzhong Zhang. Automated Generation of Readable Proofs for Constructive Geometry Statements with the Mass Point Method. Schreck P., Narboux J. and Richter-Gebert J.(eds.) Proceedings of the 8th International Workshop on Automated Deduction in Geometry (ADG 2010). LNAI 6877, Springer-Verlag, Berlin Heidelberg, 2011:221-258

An Algorithm for Automatic Discovery of Algebraic Loci Extended Abstract Francisco Botana, Antonio Montes and Tomas Recio Depto. Matem´ atica Aplicada I, Universidad de Vigo, Spain Depto. Matem` atica Aplicada II, Universitat Polit`ecnica de Catalunya, Catalunya Depto. Matem´ aticas, Estad´ıstica y Computaci´ on, Universidad de Cantabria, Spain

1

Introduction

A defining characteristic of dynamic geometry (DG) systems is that unconstrained parts of a construction can be moved, and, as they do, all elements automatically self–adjust, preserving dependent relationships and constraints (see [1]). As a natural consequence, DG software allows users to keep track on the path of an object that depends on another one while this last object is dragged. These constructive loci are perhaps one of the most appealing abilities in DG. This constraint approach led to a simple strategy: the locus of a tracer object, depending somehow on a driver object with a predefined path, is drawn by sampling the driver path and plotting the tracer position for each sample. Most DG programs use segments to join these positions in order to suggest a continuous curve. Nevertheless, the uniform division of the path can produce anomalous loci when a small variation of the driver object produces important changes on the tracer position, as illustrated in Figure 1 by the curve returned in The Geometer’s Sketchpad [2] as a conchoid when the focus O is almost on the path of the driver point P .

Fig. 1. An aberrant conchoid of Nicomedes in The Geometer’s Sketchpad.

54

It must be noted that in order to get both branches of the conchoid the user must compute two loci, corresponding to the two possible intersections of a circle and the driver’s path. A relevant issue when finding locus consists of the knowledge the system has about the new object. The above approach describes a locus just as a list of points, thus forbiding a posteriori computations (consider, for instance, computing a tangent to a curve obtained as locus). Cabri [3] includes an option to compute the equations of loci based on polynomial interpolation. It uses a sample of points on the locus to generate equations (with degree not greater than 6), so giving just approximate results. Figure 2 shows the equations for an astroid (note again that the astroid is obtained as two loci). Although the algorithm is not public, it seems that it is very unstable, and the returned results are frequently erroneous even for simple cases.

Fig. 2. Equations returned by Cabri for the upper and lower halves of an astroid.

2

Automatic Loci Discovery via Groebner Bases

In [4] a further development of the well–known approach to automatic theorem proving in elementary geometry via algorithmic commutative algebra and algebraic geometry is discussed. Rather than confirming/refuting geometric statements or deriving geometric formulae, the issue of automatic discovery of statements is considered. The method has been specialized in [5] to deal with discovery of standard loci. A rough description of the method is as follows: Given a geometric construction with a point whose locus is the one we are looking for, the procedure begins by translating the geometric properties into algebraic expressions. We use the field of rational numbers Q and C, the field of complex numbers, as an algebraically closed field containing the former. The collection of construction properties is then expressed as a set of polynomial equations

55

p1 (x1 , . . . , xn ) = 0, . . . , pr (x1 , . . . , xn ) = 0, where p1 , . . . , pr ∈ Q[x1 , . . . , xn ]. Thus, the affine variety defined by V = {p1 = 0, . . . , pr = 0} ⊂ Cn contains all points (x1 , . . . , xn ) ∈ Cn which satisfy the construction requirements, that is, the set of all common zeros of p1 , . . . , pr in the n-dimensional affine space of C describe all the possible positions of the construction points. In particular, the positions of the locus point define the locus we are searching for. Thus, supposing that the locus point coordinates are xn−1 , xn , the projection πn−2 : V ⊂ Cn → C2 gives an extensional definition of the locus in the affine space C2 . This projection can be computed via the (n − 2)th elimination ideal of hp1 , . . . , pr i, In−2 . The Closure theorem states that V (In−2 ) is the smallest affine variety containing πn−2 (V ), or, more technically, that V (In−2 ) is the Zariski closure of πn−2 (V ). So, except some missing points that lie in a variety strictly smaller than V (In−2 ), we can describe the locus computing a basis of In−2 . This basis is computed as follows: given the ideal hp1 , . . . , pr i ⊂ Q[x1 , . . . , xn ], let G be a Groebner basis of it with respect to lex order where x1 > x2 > . . . > xn . The Elimination theorem states that Gn−2 = G ∩ Q[xn−1 , xn ] is a Groebner basis of In−2 . Unfortunately, we will find in many cases that Gn−2 = ∅, that is, V (hGn−2 i) = C2 , which only allows as conclusion the irrelevant statement that ”the locus is contained in the plane”. Nevertheless, we do not want to eliminate all variables except those of the locus point, but simply the variables stemming from dependent points. So, the construction properties are translated into a set of polynomial equations p1 (x1 , . . . , xs , u1 , . . . , ut ) = 0, . . . , pr (x1 , . . . , xs , u1 , . . . , ut ) = 0, where x1 , . . . , xs are the dependent point coordinates, and u1 , . . . , ut are those of free points. Note that the coordinates of the locus point are included in this {u− } set (thus also allowing the study of loci of points not constructible in the environment). The elimination of x1 , . . . , xs in the ideal hp1 , . . . , pr i returns another ideal hq1 , . . . , qm i whose affine variety V (q1 , . . . , qm ) ⊂ Ct contains the locus. Despite the cost of computing Groebner bases, this method has been proved as successful for automatically determining loci in DG environments (see a prototype in [5]). It has been incorporated into JSXGraph [6] under a web–based access, and is currently being incorporated into GeoGebra [7, 8]. Apart from the structural algebraic limitation of this method, its main drawback deals with the inclusion of special/degenerate components of the sought loci. If a geometric constraint becomes undefined for some instance of the construction, the corresponding polynomial will not be taken into account during elimination, and a spurious part of the locus will be included in the final answer. As an illustration of the case, consider a lima¸con of Pascal where the focus lies on the base curve.

56

Fig. 3. An extra circle when computing a lima¸con of Pascal with JSXGraph.

In such a case, an extra circle centered at the focus will be returned as part of the lima¸con, as computed by JSXGraph in Figure 3. Another source of imprecision comes from the variety–like description of loci. A variety describing a locus can contain extra points not satisfying the geometric constraints of the problem. For instance, the pedal of an ellipse with respect to its center will be described by a variety including the center, if following the above approach. Since this point is not a part of the pedal, any subsequent computation using its polynomial description will be wrong.

3

Automatic Loci Discovery via Parametric Groebner Bases

The remotion of special/degenerated parts and the computation of loci as constructible sets, rather than varieties can be efficiently solved in the field of dynamic geometry by using the theory of parametric polynomial systems. Here, we propose using the Groebner Cover (GC) algorithm [9]. The variables occurring in the equations which describe a locus construction can be divided into a set of parameters and a set of unknowns. The parameters (a, b) correspond to the locus point, while the unknowns (x, y, . . .) (variables from now on), correspond to the remaining points of the geometric construction. Finding the locus is equivalent to obtain the set of values of the parameters for which it exists a finite number of values of the variables. The values of the parameters for where it does not exist any solution do not form part of the locus. Moreover, the parameter values for which it exists an infinite number of solutions of the variables correspond to a degenerate construction and must also be excluded from the “Normal” locus.

57

Thus, we look for solutions of the parametric system in terms of the parameter values, and the structure of the solution space. More formally, a parametric polynomial system over Q is a finite set of polynomials p1 , . . . , pr ∈ Q[¯ a, x ¯] in the variables x ¯ = x1 , . . . , xn and parameters a ¯ = a1 , . . . , am . The goal is studying the solutions of the algebraic systems {p1 (a, x ¯), . . . , pr (a, x ¯)} ⊂ Q[¯ x] which are obtained by specializing the parameters to concrete values a ∈ Cm . The GC algorithm emphasizes the obtention of a canonical description (as compact as possible) of the parametric system. Before sketching our algorithmic use of GC, we discuss in some detail the obtention of a lima¸con of Pascal. Let O(0, 2) be a fixed point on the circle c : x2 + y 2 = 4 and l be a line passing through O and P (x, y) (any point on c). Let Q(a, b) be a point on l such that distance(P, Q) = 1. We seek for the locus of Q when P moves along the circle c. The system of equations is: S = x2 + y 2 − 4, (b − 2)x − ay + 2a, (a − x)2 + (b − y)2 − 1. The standard elimination procedure of the preceding section returns the variety V = V(a4 + 2a2 b2 + b4 − 9b2 − 9b2 + 4b + 12) ∪ V(a2 + b2 − 4b + 3), where the former corresponds to the sought conchoid, whereas the last one comes from a degeneracy stemming from the coincidence of P and the focus O. GC returns four segments for this parametric system: – Segment 1 • segment: Q2 \ (V(a2 + b2 − 4b + 3) ∪ V(a4 + 2a2 b2 − 9a2 + b4 − 9b2 + 4b + 12)) • basis: {1} – Segment 2 • segment: (V(a2 + b2 − 4b + 3) \ (V(2b − 3, 4a2 − 3)) ∪(V(a4 + 2a2 b2 − 9a2 + b4 − 9b2 + 4b + 12) \ (V(2b − 3, 4a2 − 3) ∪ V(b − 2, a)) • basis: 

(2a2 + 2b2 − 4b)y + (−a2 b − 2a2 − b3 + 2b2 − 3b + 6), (2a2 + 2b2 − by)x + (−a3 − ab2 + 4ab − 3a).

– Segment 3 • segment: V(b − 2, a) \ V(1) • basis: {4y − 7, 16x2 − 15} – Segment 4 • segment: V(2b − 3, 4a2 − 3) \ V(1) • basis: {x + 2ay − 4a, y 2 − 3y + 2}

58

These segments must be understood as follows. Segment 1 states that any general point in the plane does not satisfy the locus conditions (there is no solution of the parametric system, since the basis is {1}), unless the point lies on the circle a2 +b2 −4b+3 = 0 or the curve a4 +2a2 b2 −9a2 +b4 −9b2 +4b+12 = 0 (note that these factors were previously obtained with the standard elimination approach). Segment 2 declares that the points lying on the circle and the lima¸con satisfy the required constraints, and the variables x, y can be expressed in terms of the parameters a, b by the given base and have a single solution. Nevertheless, some of these points correspond to other parametric values, as described by segments 3 and 4, where the system has two solutions in the variables. A locus–oriented procedure to interpret this canonical segment decomposition is as follows: Add all the segments corresponding to a finite number of solutions (in the variables), i.e. segments 2, 3 and 4 in this example. This gives exactly the same result as with the previous method, namely the variety V . Nevertheless, if we specialize the basis over the component V(a2 +b2 −4b+3) we obtain {y −2, x} as basis. This shows that this curve of the locus corresponds to a single point of the variables (the point P ), and thus it should be declared as a special component of the locus. An automatic procedure that takes into account the above discussion when it is applied to the GC gives the following output for the locus: [[V(a2 + b2 − 4b + 3), ”Special”], [V(a4 + 2a2 b2 − 9a2 + b4 − 9b2 + 4b + 12)]] so that one can distinguish between the ”Normal” components of the locus and the ”Special” components if they exist. A live demo of loci computations by using a Singular [10] webservice [11] with the described approach will be given during the talk. This web–based resource could be used to enhance DG systems abilities, as GeoGebra is currently doing for symbolic proving. Acknowledgements First and third authors supported by the Spanish “Ministerio de Econom´ıa y Competitividad” and by the European Regional Development Fund (ERDF), under the Project MTM2011–25816–C02–(01, 02). Second author partly supported by ESF EUROCORES programme EuroGIGA – ComPoSe IP04 – MICINN Project EUI–EURC–2011–4306.

References 1. 2. 3. 4.

King, J., Schattschneider, D.:Geometry Turned On. MAA, Washington (1997) Jackiw, N.: The Geometer’s Sketchpad. Key Curriculum Press, Berkeley (1997) Laborde, J.M., Bellemain, F.: Cabri Geometry II. Texas Instruments, Dallas (1998) Recio, T., V´elez, M.P.: Automatic Discovery of Theorems in Elementary Geometry. J. Autom. Reasoning 23, 63–82 (1999)

59 5. Botana, F., Valcarce, J.L.: A Software Tool for the Investigation of Plane Loci. Math. Comput. Simul. 61(2), 139–152 (2003) 6. JSXGraph, http://jsxgraph.uni-bayreuth.de 7. GeoGebra, http://www.geogebra.at 8. GeoGebra Locus Line Equation, http://www.geogebra.org/trac/wiki/ LocusLineEquation 9. Montes, A., Wibmer, M.: Groebner Bases for Polynomial Systems with Parameters. J. Symb. Comput. 45, 1391–1425 (2010) 10. Decker, W., Greuel, G.M., Pfister, G., Sch¨ onemann, H.: Singular 3–1–3 — A computer algebra system for polynomial computations, http://www.singular. uni-kl.de (2011) 11. Singular WebService, http://code.google.com/p/singularws

Algebraic Analysis of Huzita’s Origami Operations and their Extensions Fadoua Ghourabi1 , Asem Kasem2 , and Cezary Kaliszyk3 1

University of Tsukuba, Japan [email protected] 2 Yarmouk Private University, Syria [email protected] 3 University of Innsbruck, Austria [email protected]

Abstract. We investigate the basic fold operations, often referred to as Huzita’s axioms, which represent the standard seven operations used commonly in computational origami. We reformulate the operations by giving them precise conditions that eliminate the degenerate and incident cases. We prove that the reformulated ones yield a finite number of fold lines. Furthermore, we show how the incident cases reduce certain operations to simpler ones. We present an alternative single operation based on one of the operations without side conditions. We show how each of the reformulated operations can be realized by the alternative one. It is known that cubic equations can be solved using origami folding. We study the extension of origami by introducing fold operations that involve conic sections. We show that the new extended set of fold operations generates polynomial equations of degree up to six.

Keywords: fold operations, computational origami, conic section

1

Introduction

Origami is commonly conceived to be an art of paper folding by hand. It is not restricted to an art, however. We see continuous surge of interests in scientific and technological aspects of origami. It can be a basis for the study of geometrical systems based on reflections, and the industrial applications can be found abundantly, such as in automobile industry, space industry etc. In this paper, we focus on the algebraic and geometrical aspects of origami. Suppose that we want to construct a geometrically interesting shape, say a regular heptagon, from a sheet of paper. We need a certain level of precision even though we make the shape by hand. Since we do not use a ruler to measure the distance, nor do we use additional tools4 , what we will do by hand is to construct creases and points. The creases are constructed by folding. The creases we make by folding are the segments of the lines that we will treat. The creases and the 4

This restriction will be relaxed in Section 7.

62

four edges of the initial origami form line segments. The points are constructed by the intersection of those segments. In the treatment of origami5 in this paper, origami is always sufficiently large such that, whenever we consider the intersections of segments, we consider the intersections of the lines that extend the segments. The shape of the origami that we want to obtain by folding is a (possibly overlaid) face(s) constructed by the convex set of the thus-constructed points. As the crease is constructed by folding, the main question is how to specify the fold. Since we fold an origami along the line, the question is boiled down to how to specify the line along which we fold the origami. We call this line fold line. In 1989 Huzita proposed the set of basic fold operations often referred to as Huzita’s axiom set [4]. Later studies showed that Huzita’s set of fold operations is more powerful than Euclidean tools, i.e. straightedge and compass (abbreviated to SEC hereafter), in that we can construct a larger set of points of coincidence by applying Huzita’s set of operations than by SEC [1]. More precisely, the field of origami constructible numbers includes the field of SEC constructible numbers, therefore, the class of the shapes formed by connecting the coincidences is richer than that of the shapes formed by SEC. The trisector of a given arbitrary angle is a famous example that is constructible by origami, but not by SEC [11, 6]. This triggered the activities of researchers who are interested in mathematical aspects of origami such as the contribution of Martin [10] and Alperin [1]. Although several studies have been made to confirm the power of origami as we have seen above, we propose a more rigorous treatment of Huzita’s set of operations. We choose not to use of terminology of Huzita’s axiom itself as the set does not constitute a mathematical axiom set. The need for a formal method for the origami theory is pressing since folding techniques have been adapted in industry. This paper presents a preparatory but necessary rigorous statements of Huzita’s basic fold operations towards the formalization of origami theory in proof assistants. In this paper we restate Huzita’s basic fold operations. We make the new statements more precise by clarifying the conditions that enable folds. We analyze the operations algebraically and present theorems about the finite number of fold lines. We also introduce a general origami principle that performs all the operations. Furthermore, we extend the capability of basic fold operations by introducing conic sections and show that this extension is defined by equations of degree six. The structure of the rest of the paper is as follows. In Section 2, we summarize our notions and notations. In Section 3, we present Huzita’s basic fold operations. In Section 4, we define the possible superpositions of geometrical objects of origami. In Section 5, we reformulate the basic fold operations. In Section 6, we introduce a general origami principle that performs all the basic fold operations. 5

The word origami is also used to refer to a square sheet of paper used to perform origami.

63

In Section 7, we consider superpositions of points and conic sections. In Section 8, we conclude with remarks on future directions of research.

2

Preliminaries

An origami is notated by O. An origami O is supposed to represent a square sheet of paper with four points on the corners and four edges that is subject to folding. Some intersections of lines may not fit on the square paper. However, we want to work with these points. To achieve this, we consider O to be a sufficiently large surface so that all the points and lines that we treat are on O. In this paper, we restrict the use of geometrical objects only to points, lines and s-pairs (to be defined in Section 4). We use α and β to note either a point or a line. Points are notated by a single capital letter of the Latin alphabet such as A, B, C, D, P , Q etc.6 , and lines are notated by γ, k, m, and n. Since we use Cartesian coordinate system in this paper, a line is represented by a linear equation ax + by + c = 0 in variables x and y. The notation “f (x, y) := polynomial in x and y = 0” is used to declare that f is a curve represented by the equation polynomial = 0. (x, y) on the lefthand side of := may be omitted. The sets of all points and lines are notated by Π and L, respectively. Abusing the set notation we use P ∈ m to mean point P is on line m. For a set S, we notate its cardinality by |S|. For two lines m and n, m k n is true when m and n are parallel or equal.

3

Fold Principle

3.1

Basic idea

By hand we can fold the origami by tentatively making a line either to let it pass through two points or to superpose points and lines. The former corresponds to applying a straightedge in Euclidean construction. In practice, to construct a line that passes through a point we bend the paper near the point and we flatten the paper gradually until we make the point lie on the intended fold line. The latter is pertinent to origami. Superposition involves two points, a point and a line, and two lines. To superpose two points, we bring one point to another, and then we flatten the paper. To superpose a point and a line, the easy way is to bring the point onto the line, and then we flatten the paper. Superposition of two lines is more complex, and we will treat the operation along with its algebraic meaning in Section 4. 3.2

Huzita’s Basic Fold Operations

We restate the set of seven basic fold operations of Huzita. The first six were proposed by Huzita and below are their statements as they appear in [4]. The 6

A ∼ F , X and Y are overloaded, in fact. The meaning the symbols denote should be clear from the context.

64

seventh was proposed by Justin [7] and rephrased by us to fit in with Huzita’s statements. (1) Given two distinct points, you can fold making the crease pass through both points (ruler operation). (2) Given two distinct points, you can fold superposing one point onto the other point (perpendicular bisector). (3) Given two distinct (straight) lines, you can fold superposing one line onto another (bisector of the angle). (4) Given one line and one point, you can fold making the crease perpendicular to the line and passing through the point (perpendicular footing). (5) Given one line and two distinct points not on this line, you can fold superposing one point onto the line and making the crease pass through the other point (tangent from a point to a parabola). (6) Given two distinct points and two distinct lines, you can fold superposing the first point onto the first line and the second point onto the second line at the same time. (7) Given a point and two lines, you can fold superposing the point onto the first line and making the crease perpendicular to the second line. We will call this set of basic fold operations Huzita’s fold principle. The set of points and lines that can be constructed using the first five and seventh operations is the same, as the set of points and lines that can be constructed by SEC. The sixth operation is more powerful: it allows constructing common tangents to two parabolas which are not realizable by SEC. Huzita and Justin carefully worked out the statements to exclude the cases that give infinite fold lines by imposing conditions on points and lines (e.g. distinct points, distinct lines, etc.). However, some of these conditions are insufficient or unnecessary. A thorough discussion on Huzita’s statements is given in [9]. While these statements are suitable for practicing origami by hand, a machine needs stricter guidance. An algorithmic approach to folding requires formal definition of fold operations. Furthermore, we need to explicitly identify the conditions that ensure the finite number of fold lines.

4

Superposition

We define a superposition pair, s-pair for short, (α, β). It is a pair of geometrical objects α and β that are to be superposed. An s-pair (α, β) defines a fold line along which the origami is folded to superpose objects α and β. Depending upon the types of the objects, we have the following superpositions. Point-point superposition When points P and Q are distinct, the s-pair (P, Q) defines a unique fold line that superposes P and Q. This unique line is the perpendicular bisector of the line segment whose start and end points are P and Q, respectively, and is denoted by P l Q

65

When points P and Q are equal, the s-pair (P, Q), i.e. the s-pair (P, P ), does not define a unique fold line to superpose P onto itself. Points P and P are superposed by any fold line that passes through P . Namely, the s-pair (P, P ) defines the infinite set I(P ) of fold lines that pass through P , i.e. I(P ) = {γ | P ∈ γ} Here we note that two sets I(P ) and I(Q) can define a line, denoted by P Q, passing through points P and Q, i.e. γ = I(P )∩I(Q). The straightedge operation can even be replaced by the superpositions. Line-line superposition When lines m and n are equal, what we do is superposing a line onto itself. This is achieved in the following way. Choose an arbitrary point on the line, divide the line into the two half lines, and then superpose the two half lines with the dividing point at the ends of the both half lines. Geometrically speaking, we construct a perpendicular to m and fold along that perpendicular. Any perpendicular to m superposes the line m onto itself. Hence, the s-pair (m, m) defines the following infinite set B(m) of fold lines. B(m) = {X l Y | X, Y ∈ m, X 6= Y } Note that, in passing, we exclude m itself from B(m). Namely, m is not considered as the fold line to superpose m onto itself as this does not create new lines. To superpose two distinct lines, we assume the capability of hands that slides a point along a line. By the combination of superposition and of sliding, we can achieve the superposition of two distinct lines. Point-line superposition An s-pair (P, m) defines the following set Γ (P, m) of fold lines that superpose P and m. ( {X l P | X ∈ m} if P 6∈ m Γ (P, m) = B(m) ∪ I(P ) if P ∈ m Here we define Γ (P, m) by cases of P 6∈ m and P ∈ m. If P ∈ / m then the fold line that superposes P and m is a tangent to the parabola with focus P and directrix m [7, 10, 1]. Therefore, {X l P | X ∈ m}, in the former case, denotes the set of tangents of the parabola defined by the focus P and the directrix m. The latter corresponds to folding along any perpendicular to m or along any line that passes through P .

5 5.1

Formulation of Fold Revisit of Huzita’s Fold Principle

Table 1 shows the reformulation of Huzita’s fold principle by a superposition or combinations of two superpositions. Each row of Table 1 corresponds to each

66

basic operation given in Subsection 3.2. The second column shows the superpositions used to formalize each fold operation. The third column summarizes the degenerate cases of each operation. In practice, a degenerate case means infinite folding possibilities to achieve the superpositions in the second column. Huzita implicitly assumed P 6∈ m whenever a point P and a line m are to be superposed. The fourth column indicates this assumption of the incidence relation. An incident case is one where the s-pair (α, β) ∈ Π × L has the property α ∈ β. This can occur in the operations where we have point-line superposition(s), namely operations (5), (6) and (7). In the case of (6), it is enough to have only one s-pair that has the property α ∈ β. Propositions of incidence may cover some of degenerate configurations. In Table 2, redundancy of propositions is avoided in the last two columns. For instance in the case of (5), if P = Q ∧ P ∈ m then there are infinite possible fold lines passing through Q and superposing P and m. More precisely, any line passing through P is a possible fold line. Or, the proposition P ∈ m of incidence covers the degeneracy proposition. In other words, by eliminating the case where P ∈ m, we also eliminate the case where P = Q and P ∈ m. The proposition P = Q ∧ P ∈ m is removed from degeneracy column of the operation (5) in Table 2. The more general condition, i.e. P ∈ m, is kept in the incidence column. Table 1. Superpositions in Huzita’s fold principle operation (1) (2) (3) (4) (5) (6) (7)

s-pairs degeneracy incidence (P, P ), (Q, Q) P =Q − (P, Q) P =Q − (m, n) m=n − (m, m), (P, P ) − − (P, m), (Q, Q) P =Q∧P ∈m P ∈m (P, m), (Q, n) (P ∈ m ∧ Q ∈ n ∧ (m k n ∨ P = Q))∨ P ∈ m ∨ Q ∈ n (P 6∈ m ∧ Q 6∈ n ∧ m = n ∧ P = Q) (P, m), (n, n) mkn∧P ∈m P ∈m

The notion of superposition enable us to reformulate Huzita’s fold principle. We first introduce a function ζ that, given a sequence of s-pairs, computes all the fold lines that realize all the given s-pairs (i.e. superpose the elements). The detailed definition of ζ is beyond the scope of this paper. Function ζ has been implemented as the core of computational origami system Eos [3, 5]. We provide the reformulation of Huzita’s fold principle: a new set of operations that specify ζ. We denote this new formalization by H. (O1) Given two distinct points P and Q, fold O along the unique line that passes through P and Q.

67 Table 2. Superpositions in Huzita’s fold principle with simpler conditions for degeneracy operation

s-pairs

degeneracy

incidence

(1)

(P, P ), (Q, Q)

P =Q



(2)

(P, Q)

P =Q



(3)

(m, n)

m=n



(4)

(m, m), (P, P )





(5)

(P, m), (Q, Q)



P ∈m

(6)

(P, m), (Q, n) P = Q ∧ m = n P ∈ m ∨ Q ∈ n

(7)

(P, m), (n, n)



P ∈m

(O2) Given two distinct points P and Q, fold O along the unique line to superpose P and Q. (O3) Given two distinct lines m and n, fold O along a line to superpose m and n. (O4) Given a line m and a point P , fold O along the unique line passing through P to superpose m onto itself. (O5) Given a line m, a point P not on m and a point Q, fold O along a line passing through Q to superpose P and m. (O6) Given two lines m and n, a point P not on m and a point Q not on n, where m and n are distinct or P and Q are distinct, fold O along a line to superpose P and m, and Q and n. (O7) Given two lines m and n and a point P not on m, fold O along the unique line to superpose P and m, and n onto itself. The above statements of (O1) ∼ (O7) include the conditions that eliminates degeneracy and incidence. These conditions correspond to the negations of the propositions of third and fourth column of Table 2 in natural language. Using ζ, we define origami constructible objects. Definition 1 (Origami constructible objects). Given a set of initial objects S (⊆ Π ∪ L), the set of origami constructible objects is inductively defined as the least set containing origami constructible objects given in 1. ∼ 4.: 1. A point P is origami constructible, if P ∈ S. 2. An s-pair (α, β) is origami constructible if α and β are origami constructible. 3. A line γ is origami constructible if γ ∈ ζ(s) and s is a sequence of origami constructible s-pairs. 4. The intersection of lines m and n is origami constructible if m and n are origami constructible. One may wonder why the reflection of an origami constructible point across an origami constructible line is not included in this definition. In fact, reflections are constructible using the operations of H [10]. In practice, however, reflections are treated as if they were in the above inductive definition.

68

5.2

Properties of Operations in H

We now study the properties of the operations in H. For each operation, we will show the finiteness of the number of the constructible fold lines under certain conditions. This result is important to ensure the decidability of the fold since otherwise we would have an infinite computation. For each of (O1), (O2) and (O4), we have a unique fold line. Since all the objects that we study now are origami constructible, the sets of points and lines are now denoted by ΠO and LO (each subscripted by O) in all the propositions to follow. The first two are easy ones. Proposition 1 (Fold line of (O1)). ∀ P, Q ∈ ΠO such that P 6= Q, ∃ ! γ ∈ I(P ) ∩ I(Q). This unique γ is denoted by P Q. Proposition 2 (Fold line of (O2)). ∀ P, Q ∈ ΠO such that P 6= Q, ∃ ! γ = P l Q. Proposition 3 (Fold line of (O4)). ∀ m ∈ LO ∀ P ∈ ΠO ∃ ! γ ∈ B(m) ∩ I(P ) A fold line in (O5) is determined by s-pairs (P, m) and (Q, Q) under the condition of P 6∈ m. The fold in (O5) is impossible in certain configurations. The following proposition more sharply describes this property. Proposition 4 (Fold lines of (O5)). ∀ m ∈ LO ∀ P, Q ∈ ΠO such that P 6∈ m | Γ (P, m) ∩ I(Q) | 6 2. Proof. The algebraic proof of this proposition is straightforward and extendable to the general cases of conic sections. Recall that Γ (P, m) defines the set of the tangents of the parabolas whose focus and directrix are P and m, respectively. A general form of an equation of the parabola is given by the following irreducible polynomial equation f (x, y) := Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0,

(5.1)

where A, B, C, D, E and F are constants, not both A and B are 0, and B 2 = 4AC. The tangent to the curve f (x, y) at the point (X, Y ) is given by g(x, y) :=

∂f ∂f (X, Y ) · (x − X) + (X, Y ) · (y − Y ) = 0. ∂x ∂y

(5.2)

69

Let Q be (u, v). As the line g passes through Q, we have g(u, v) = 0. We will solve for X and Y of the system of equations {f (X, Y ) = 0, g(u, v) = 0}. Since g(u, v) is linear in X and Y , finding the solutions is reduced to solving, in X (or in Y ), the (at most) second degree polynomial equation obtained from f (X, Y ) = 0 by eliminating either Y or X. Obviously, the number of real solutions is less or equal to 2. ⊓ ⊔ Concerning (O7), the following proposition holds. Proposition 5 (Fold lines of (O7)). ∀ m, n ∈ LO ∀ P ∈ ΠO such that P 6∈ m, | Γ (P, m) ∩ B(n) | 6 1. Proof. The proof is similar to the proof of Proposition 4. We use the formula (5.1) there. Instead of the condition that the tangent passes through a particular point, we impose the condition that the slope of the tangent at point (X, Y ) is given, say k(6= ∞), in this proposition. From Eq. (5.1), we have the equation representing the tangent at (X, Y ). h(x, y) := D + 2Ax + By + (E + Bx + 2Cy)

dy (X, Y ) = 0 dx

(5.3)

dy Since k(= dx (X, Y )) is given, all we need is to solve for X and Y in the system of equations

{f (X, Y ) = 0, D + 2AX + BY + (E + BX + 2CY )k = 0}

(5.4)

It is easy to see that we have at most two real solutions for the pair (X, Y ). However, when B 2 = 4AC, which is the case of the parabola, we have at most one real solution by an easy symbolic computation by computer algebra systems. ⊓ ⊔ Most interesting case is (O6), which actually gives extra power over SEC. Proposition 6 (Fold lines of (O6)). ∀ m, n ∈ LO ∀ P, Q ∈ ΠO such that P 6∈ m ∧ Q 6∈ n ¬(P = Q ∧ m = n) ⇒ if m k n then | Γ (P, m) ∩ Γ (Q, n) | 6 2 else 1 6 | Γ (P, m) ∩ Γ (Q, n) | 6 3.

(5.5)

70

Proof. Instead of the general equation (5.1) of the conic section, we use the following equation for the parabola defined by the focus (u, v) and the directrix ax + by + c = 0. ¡ ¢¡ ¢ f (x, y) := a2 + b2 (x − u)2 + (y − v)2 − (ax + by + c)2 = 0. (5.6)

We only have to consider the cases of m 6= n and of P 6= Q ∧ m = n. We consider the former, first. Let fi (x, y) be the function given in (5.6) with all the constants a, b, c, u and v being indexed by i. Let P and Q be points at (u1 , v1 ) and at (u2 , v2 ) respectively, and m and n be the line a1 x + b1 y + c1 = 0, and a2 x + b2 y + c2 = 0, respectively. Note that we can give a unique representation for the same line, so that the two lines are equal iff each coefficient a, b and c for each equation are equal. Now, let f1 and f2 be the parabolas defined by P and m, and by Q and n, respectively. We distinguish the following two cases. 1. m 6k n As in the proof of Proposition 5, we derive the the tangent h1 with the slope t at point (X1 , Y1 ) on f1 (x, y) = 0, and the tangent h2 with slope t at point (X2 , Y2 ) on f2 (x, y) = 0. The system {f1 (X1 , Y1 ) = 0, h1 (X1 , Y1 ) = 0} yields X1 and Y1 as functions of t. Similarly, we obtain X2 and Y2 as functions of t. Since (Y1 − Y2 ) − t(X1 − X2 ) = 0, we have the polynomial equation, whose polynomial is degree 3 in t. Hence, the number of distinct real solutions is 1, 2 or 3. 2. m k n Similarly to case 1., we obtain the polynomial equation of degree 2 in t. Hence we have 1 or 2 distinct real solutions. What remains to be considered is the case of P 6= Q ∧ m = n. Similarly to the case 2, above, we obtain the polynomial equation of degree 2 in t. Furthermore, the discriminant of the obtained equation is easily shown to be non-negative. Hence, the relation (5.5) follows. ⊓ ⊔ Operation (O3) is a special case of (O6) with m = n and P 6= Q. In this case, the fold operation is about superposing the two lines P Q and m. As the coloraly of Proposition 6. Proposition 7 (Fold lines of (O3)). ∀ m ∈ LO ∀ P, Q ∈ ΠO P 6= Q ⇒ 1 6 | Γ (P, m) ∩ Γ (Q, m) | 6 2.

6

(5.7)

General Origami Principle

Since the algebraic interpretation of (O6) can be expressed by a cubic equation, a natural question is whether (O6) can do all the rest of fold operations of H with certain side conditions. The answer is basically, yes, but we need to carefully

71

analyze the degenerate and incident cases, which will form the premise of the implicational formula of Lemma 1 that we will prove next. We start with the general origami principle, which we denote by G, that consists of the following single operation. (G) Given two points P and Q and two lines m and n, fold O along a line to superpose P and m, and Q and n. Operation (G) is obtained by removing all the side conditions of (O6). Martin’s book [10] defines a fundamental fold operation that is operation (G) with the following finiteness condition:“If for two given points P and Q and for given lines p and q there are only a finite number of lines t such that both P t is on p and Qt is on q”. Martin uses the notation P t to denote the reflection of point P . He further showed that some simpler operations (Yates postulates) can be derived from the fundamental fold operation. We extend this by showing that all Huzita’s fold operations can be a achieved using (G), in particular under what conditions a finite number of fold lines is achieved. We refine the above Martin’s statement using the results obtained so far in this paper. We will show how the degenerate and incident cases of (G) realize the rest of the operations. We first consider the degenerate case of (G), i.e. m = n ∧ P = Q. This case generates the infinite set of fold lines Γ (P, m). Furthermore, when the arguments of (O6) are more constrained, (O6) is reduced to (O2) and (O3). Suppose (O6) is given two s-pairs (P, m) and (Q, n), and further that P ∈ n ∧ Q ∈ m, we have Lemmas 1 and 2 below. In the following, we denote by {Oi}, i = 1, . . . , 7, the set of fold lines that operation (Oi) can generate. Lemma 1. ∀ s-pairs (P, m) and (Q, n) that are origami constructible, if m 6= n ∧ P = Q ∧ (P ∈ n ∧ Q ∈ m) then {O6} ⊆ {O3}. Proof. (Sketch) To perform (O6), P and Q have to be the intersection of m and n. (O6) then generates the two bisectors of the angle formed by m and n. Those lines are constructible by (O3) using m and n. ⊓ ⊔ Lemma 2. ∀ s-pairs (P, m) and (Q, n) that are origami constructible and satisfy (P 6∈ m∧Q 6∈ n), if m 6= n∧P 6= Q∧(P ∈ n∧Q ∈ m), then {O6} ⊆ {O2}∪{O3}. Proof. (Sketch) Under the condition m 6= n ∧ P 6= Q ∧ (P ∈ n ∧ Q ∈ m), (O6) generates three fold lines, i.e. P l Q and the two bisectors of the angle formed by m and n. The first one is constructible by (O2) (cf. Fig. 1(a)), and the latter ones by (O3) (cf. Fig. 1(b)). ⊓ ⊔ Theorem 1. ∀ s-pairs

(P, m) and (Q, n) that are origami constructible,

¬((P ∈ m ∧ Q ∈ n ∧ (m k n∨P = Q))∨ (P 6∈ m ∧ Q 6∈ n ∧ m = n∧P = Q)) ⇒ [ {G} = {Oi}. i=1,...,7

72

(a)

(O2) performed by (G)

(b)

(O3) performed by (G)

Fig. 1. (O2) and (O3) by (G) when m 6= n ∧ P 6= Q

Proof. We first prove that (G) is reduced to (O1), (O4), (O5), (O6) and (O7) under certain configurations of the parameters. This implies that under such conditions, {G} ⊆ {Oi}, where i = 1, 4, 5, 6 and 7. We distinguish four cases.

(a)

(O5) performed by (G)

when P does not move

(b)

(O7) performed by (G)

when P moves

Fig. 2. Incident case of (G) for P ∈ m ∧ Q 6∈ n

1. P 6∈ m ∧ Q 6∈ n If (m = n ∧ P = Q), i.e. the degenerate case, then (G) is an undefined operation since it generates the infinite set Γ (P, m). Otherwise, (G) performs (O6). 2. P ∈ m ∧ Q 6∈ n We further distinguish two cases of fold; P does not move, and P moves along m. In the former case, the fold line passes through P and superposes Q and n, which is the case of (O5) as shown in Fig. 2(a). In the latter case, the fold line is a perpendicular to m and superposes Q and n, which is the case of (O7) (cf. Fig. 2(b)). 3. P 6∈ m ∧ Q ∈ n Similarly to the case 1, we have the cases of (O5) and (O7).

73

4. P ∈ m ∧ Q ∈ n We further distinguish the following four cases: (a) m k n The fold lines are perpendiculars common to the lines m and n. They are infinite and form the set B(m). (b) ¬(m k n) ∧ (P = Q) This is the case that P is the intersection of m and n. Any line passing through P is the fold line. Therefore, we have the set of infinite number of fold lines I(P ). In this case neither P or Q does move by the fold. (c) ¬(m k n) ∧ (P 6= Q) We distinguish the following three cases: i. P moves and Q does not move The fold line is the perpendicular to m passing through Q that superposes P and m. This is the case of (O4) (cf. Fig. 3(a)). ii. Q moves and P does not move. Similarly to the above case, we have the case of (O4). iii. Neither P or Q moves. The fold line is P Q constructible by (O1) (cf. Fig. 3(b)). Table 3 summarizes the relations of (G) and corresponding operations of H for all possible combinations of the conditions. The condition to eliminate the infinite cases are as follows. (P ∈ m ∧ Q ∈ n ∧ (m k n ∨ P = Q))∨ (P 6∈ m ∧ Q 6∈ n ∧ m = n ∧ P = Q) Furthermore, by Lemmas 1 and 2, (O6) can be reduced to (O2) and (O3) under certain conditions. Therefore we obtain the following result ¬((P ∈ m ∧ Q ∈ n ∧ (m k n∨P = Q))∨ (P 6∈ m ∧ Q 6∈ n ∧ m = n∧P = Q)) ⇒ [ {G} ⊆ {Oi}. i=1,...,7

The relation {G} ⊇

[

{Oi}

i=1,...,7

can be shown as follows. For each (Oi) we add parameters that satisfy the constraints to (O6) operation as shown in Table 3 in the case of (O1), (O4) - (O7) and the conditions stated in Lemmas 1 and 2 in the case of (O2) and (O3). ⊓ ⊔ Theorem 1 states that the principle G is as good as H, although G is much simpler under the condition ¬((P ∈ m ∧ Q ∈ n ∧ (m k n ∨ P = Q))∨ (P 6∈ m ∧ Q 6∈ n ∧ m = n ∧ P = Q)).

74 Table 3. (G) to perform (O1), (O4) - (O7) incidence P ∈ m, Q ∈ n

degeneracy operation movement mkn B(m) (↔, ↔) ¬(m k n) ∧ P = Q I(P ) (·, ·) ¬(m k n) ∧ P 6= Q (O1) (·, ·) ¬(m k n) ∧ P 6= Q (O4) (↔, ·) ¬(m k n) ∧ P 6= Q (O4) (·, ↔) P ∈ m, Q 6∈ n (O5) (·, ∗) (O7) (↔, ∗) P 6∈ m, Q ∈ n (O5) (∗, ·) (O7) (∗, ↔) P 6∈ m, Q 6∈ n m = n ∧ P = Q Γ (P, m) (∗, ∗) ¬(m = n ∧ P = Q) (O6) (∗, ∗) Note: – Expression (x, y) denotes the movements x and y of points P and Q, respectively. – We denote movement x (or y) by symbols: “move” by “↔”, “non-move” by “·” and “do-not-care” by “*”.

So let us define G′ as G with the above condition. Nevertheless, G′ has the following drawback. G′ may create lines whose geometrical properties are different. During origami construction, a fold step may give rise to multiple possible fold lines. The user should choose a suitable fold line among the possible ones. However, in proving geometrical properties by algebraic methods like Gr¨obner bases, this is likely to cause problems, since the property that we want to prove may be true only for certain choices. For example, when P ∈ m and Q ∈ n, G′ generates two kinds of fold lines whose geometrical meaning are different, namely those by (O4) and (O1). In Fig. 3(a), the fold line γ1 is perpendicular to m, whereas in Fig. 3(b), γ2 is not necessary perpendicular to m. Although, the user chooses either γ1 or γ2 to perform the construction, the proof by Gr¨obner bases includes both cases. If the property that we want to prove depends on the perpendicularity of the fold line and line m, then the proof fails since perpendicularity doesn’t hold for γ2 .

7

Fold with Conic Sections

We further explore the possibility of strengthening the power of origami. We extend Huzita’s basic operations to allow solving polynomial equations of certain degrees while maintaining the manipulability of origami by hand. It has been shown in [9] that an extension that combines the use of compass with origami leads to interesting origami constructions, but does not increase the construction power of origami beyond what is constructible by H. The extension generates

75

(a)

(O4) performed by (G)

when P moves and Q does

(b)

(O1) performed by (G)

when neither P nor Q moves

not move

Fig. 3. Incident case of (G) for P ∈ m ∧ Q ∈ n

polynomial equations of degree 4, which can be reduced to equations of degree 3. It is also possible to increase origami power by allowing multi-fold as suggested by Alperin and Lang [2]. Although the m-fold method generates an arbitrarily high degree polynomial, accurately folding origami by m-lines simultaneously would be difficult even for m = 2. We further explore the foldability involving superposition of points and more general curves, which are still constructible using simple tools. In this section, we study the superposition with conic sections and describe the algebraic properties of the fold operation that superposes one point and a line, and superposes another point and a conic section assumed to be on the origami. This operation is realizable by hand and furthermore we expect to have a finite number of fold lines, which ensures the foldability. We consider a fold operation that simultaneously superposes two points with two conic sections to be difficult to perform by hand. Besides, folding to superpose a point with a conic section, with other combinations of simultaneous superpositions involving points and lines can be reduced to a more general one: superposition of two points with a line and a conic section. To illustrate folding with conic sections by hand, an ellipse, parabola and hyperbola can be drawn on origami using pins, strings, a pencil and a straightedge, where only origami constructible points and lengths are used. Abstracting from the method used to draw a particular conic section on origami, we state the following fold operation in general: – Given two points P and Q, a line m and a conic section C, where P is not on C and Q is not on m, fold O along a line to superpose P and m, and Q and C. With little modification of the analysis performed with (O6) in Section 5.2, we obtain the following result, which corresponds to Proposition 6 for (O6). Proposition 8. Given origami constructible points P at (a, b) and Q at (c, d), an origami constructible line m := y = 0, and a conic section C := Ax2 + Bxy +

76

Cy 2 +Dx+Ey +F = 0, where coefficients A, B, . . . , F are origami constructible numbers and not all A, B and C are zero. We assume that P is not on m and Q is not on C. Let γ be the fold line to superpose P and m, and Q and C. Then the slope t of γ satisfies the following polynomial equation of degree six in t. bBc + Ac2 + b2 C − Bcd − 2bCd + Cd2 + cD + bE − dE + F + (−b2 B − 2Abc − 2aBc + 2Bc2 − 4abC + 4bcC + 3bBd + 4Acd + 4aCd − 4cCd − 2Bd2 − bD + 2dD − 2aE + 2cE) t + (Ab2 + 4abB + 4aAc − 4bBc − 2Ac2 + 4a2 C − 2b2 C − 8acC + 4c2 C − 4Abd − 6aBd + 6Bcd + 4bCd + 4Ad2 − 2Cd2 + 2aD + 2F ) t2 + (−4aAb − 4a2 B + 2b2 B + 4Abc + 6aBc − 2Bc2 + 4abC − 4bcC + 8aAd − 4bBd − 4Acd − 4aCd + 4cCd + 2Bd2 + 2dD − 2aE + 2cE) t3 + 2

2

(4a A − 2Ab − 4abB − 4aAc + 3bBc + Ac2 + b2 C + Bcd − 4Abd + 2aBd − 2bCd + Cd2 + 2aD − cD − bE + dE + F ) t4 + (4aAb − b2 B − 2Abc + bBd + bD) t5 + Ab2 t6

Proof. (Sketch) Let points U and V be the reflections of P and Q respectively across the fold line γ. Point U is on line m and point V is on the given conic section C. Furthermore, fold line γ is the perpendicular bisector of segments P U and QV . From the equations of these relations, with algebraic manipulation by a computer algebra system, we can derive the above degree six equation in slope t of line γ. ⊓ ⊔ This equation looks laborious; one should only note that it is an equation in t of degree six over the field of origami constructible numbers. In the example shown in Fig. 4, we assume origami constructible points P at (3, -4), Q at (-1, 1) and m := y = 0. The conic section C := 2x2 + 2xy + y 2 + x + 2y − 10 = 0 is an ellipse depicted in Fig. 4. Giving concrete numerical values that realize the figure, we obtain the following equation for t. 16t6 − 78t5 + 84t4 + 39t3 − 66t2 + t + 8 = 0

(7.1)

Solving Eq. (7.1) using Mathematica 8 yields six real solutions that correspond to six possible fold lines k1 , · · · , k6 in Fig. 4. The same operation can be performed by hand, obtaining fold lines with certain slopes. Each slope value is one real solution to the equation.

8

Concluding Remarks

We reformulated the Huzita’s operations giving them precise definitions with side conditions that eliminate the degenerate and incident cases. We showed that for each of the reformulated operations only a finite number of fold lines is possible. We gave an alternative single operation based on operation (O6) and showed

77

(a)

(b)

(c)

(d)

(e)

(f)

Fig. 4. Fold lines k1 , · · · , k6 whose slopes are the six distinct real solutions of the equation 16t6 − 78t5 + 84t4 + 39t3 − 66t2 + t + 8 = 0

how each of the reformulated operations can be performed using the new one. Furthermore, we investigated the combination of origami operations and conic sections. We showed that finding a fold line that superposes two points, one with a line and the other with a conic section, is reduced to solving an equation of degree six. We can think of two directions for future work of this research. First, the principles of folding presented in this paper have been worked out carefully, so that they can be formalized in a proof assistant. Starting from a formalization of the basic geometric concepts, one can formally define the lines (or sets of lines) that arise from particular fold operations. This can be used to specify the superpositions that arise from the composition of fold operations, and the set of origami constructible points and lines. We imagine that such a development would give a basis for a formalized origami theory. Recently, it has been shown [8], that the decision procedures already present in modern proof assistants combined with the symbolic computation procedures are strong enough to solve many of the goals arising in computational origami problems.

78

Second, further investigation of fold operations involving conic sections is required to give exact definitions of the fold operations with their degenerate and incident cases. We showed that superposing two points onto line and conic section gives rise to equation of degree six. However the bigger question is whether this fold operation would solve all the equations of degree five and six. In other words, can we find an algorithm for translating degree five and degree six equations, possibly with certain conditions, into origami fold problems?

References 1. R. C. Alperin. A Mathematical Theory of Origami Constructions and Numbers. New York Journal of Mathematics, 6:119–133, 2000. 2. R. C. Alperin and R. J. Lang. One-, Two, and Multi-fold Origami Axioms. In Origami4 Fourth International Meeting of Origami Science, Mathematics and Education, pages 371–393. A K Peters Ltd, 2009. 3. F. Ghourabi, T. Ida, H. Takahashi, and A. Kasem. Reasoning Tool for Mathematical Origami Construction. In CD Proceedings of the International Symposium on Symbolic and Algebraic Computation (ISSAC 2009), 2009. 4. H. Huzita. Axiomatic Development of Origami Geometry. In Proceedings of the First International Meeting of Origami Science and Technology, pages 143–158, 1989. 5. T. Ida, A. Kasem, F. Ghourabi, and H. Takahashi. Morley’s theorem revisited: Origami construction and automated proof. Journal of Symbolic Computation, 46(5):571 – 583, 2011. 6. A. Jones, S. A. Morris, and K. R. Pearson. Abstract Algebra and Famous Impossibilities. Springer-Verlag New York, Inc., 1991. 7. J. Justin. R´esolution par le pliage de l’´equation du troisi`eme degr´e et applications g´eom´etriques. In Proceedings of the First International Meeting of Origami Science and Technology, pages 251–261, 1989. 8. C. Kaliszyk and T. Ida. Proof Assistant Decision Procedures for Formalizing Origami. In J. H. Davenport, W. M. Farmer, J. Urban, and F. Rabe, editors, Proc. of the 4th Conference on Intelligent Computer Mathematics (CICM’11), volume 6824 of LNCS, pages 45–57. Springer Verlag, 2011. 9. A. Kasem, F. Ghourabi, and T. Ida. Origami Axioms and Circle Extension. In Proceedings of the 26th Symposium on Applied Computing, pages 1106–1111. ACM press, 2011. 10. G. E. Martin. Geometric Constructions. Springer-Verlag New York, Inc., 1998. 11. P. L. Wantzel. Recherches sur les moyens de connaitre si un probl`eme de g´eom´etrie peut se r´esoudre avec la r`egle et le compas. Journal de Math´ematiques Pures et Appliqu´ees, pages 366–372, 1984.

Rigidity of Origami Universal Molecules John C. Bowers1,? and Ileana Streinu2,?? 1

2

Department of Computer Science, University of Massachusetts, Amherst, MA 01003, USA. [email protected] Department of Computer Science, Smith College, Northampton, MA 01063, USA. [email protected], [email protected]

Abstract. In a seminal paper from 1996 that marks the beginning of computational origami, R. Lang introduced TreeMaker, a method for designing origami crease patterns with an underlying metric tree structure. In this paper we address the foldability of paneled origamis produced by Lang’s Universal Molecule algorithm, a key component of TreeMaker. We identify a combinatorial condition guaranteeing rigidity, resp. stability of the two extremal states relevant to Lang’s method: the initial flat, open state, resp. the folded uniaxial base computed by Lang’s algorithm. The proofs are based on a new technique of transporting rigidity and flexibility along the edges of a paneled surface.

1

Introduction

Origami, the ancient art of paper folding, is the source of many challenging open questions, both mathematical and computational. Origami design starts with a piece of paper, usually a convex polygon such as a square or a rectangle, on which a set of line segments (the crease pattern) is first drawn. The open, flat piece Fig. 1: A simple crease of paper is then folded at the creases to produce pattern on a square sheet a crude three-dimensional shape, called a base (see of paper (the flat, open Fig. 1). The base is intended to capture the general state) and two possible structure of some more intricate and artistic origami folded, projectable bases. design, into which it will be further bent, creased and folded. In this paper we focus on flat-faced origami3 . The creased “paper” behaves like a mechanical panel-and-hinge structure, and for this reason we will call it a paneled origami. Specific definitions and concepts needed to follow the results in this paper will be given in Sec. 3. ? ??

3

Research supported by an NSF Graduate Fellowship. Research supported by NSF CCF-1016988 and DARPA “23 Mathematical Challenges”s, under “Algorithmic Origami and Biology”. Sometimes called rigid origami in the literature. We avoid this terminology because of its potential for ambiguity in the context of this paper.

80

We address one of the major open questions in algorithmic origami: when are such paneled origamis “foldable”? Neither an efficient algorithm nor a good characterization are known for this decision problem, with the exception of singlevertex origami [20, 18] and some disparate cases, including the “extreme bases” of [6]. In this paper, we focus on the patterns produced by Lang’s Universal Molecule algorithm [14] for origami design. Computational Origami. To survey all aspects of the growing literature on computational origami and its applications is beyond the scope of this paper; we will mention only the problems and directions that are related to Lang’s approach. The reader may consult accessible historical surveys and articles in recent origami conference proceedings [17, 21] and richly illustrated books such as [16, 8]. In a seminal paper [14] that marks the beginnings of computational origami, Robert Lang formalized fundamental origami concepts, most prominently the uniaxial base: a flat-folded piece of paper with an underlying metric tree structure, whose faces project to a tree, called the shadow tree. “Flattening” the tree (i.e. aligning its edges along a single line) brings all the faces into one plane and the boundary of the original paper into a single line (the axis of the uniaxial base). Fig. 1 shows two such uniaxial bases, slightly perturbed from the flattened state to illustrate their folding patterns. Lang also described an algorithm, implemented in his freely-available TreeMaker program [15], for decomposing the paper into smaller regions called molecules and for computing in each of them a certain crease pattern (which Lang calls a universal molecule). A folded state of the complete crease pattern (obtained by putting together the universal molecules) is shown to be a uniaxial base. Subsequent to Lang’s publication of his method in 1996, several related questions emerged, aiming at solving variations of the origami design problem: NPhardness results for general crease pattern foldability [1], the fold-and-one-cut problem [7], the disk-packing method of [9] further extensions to piecewise linear surfaces [2], etc. TreeMaker (available at http://www.langorigami.com/) has been used for over 15 years by Lang and fellow origami artists to produce bases for complex and beautiful designs. It has inspired a wealth of new developments in mathematical and computational origami. Yet, fundamental properties of the algorithm have only appeared in sketchy form (in [14, 16, 8]) and a comprehensive analysis of the algorithm (both correctness and complexity) is long due. To the best of our knowledge, many of its properties still await formal proofs, and some are yet to be discovered. Origami design with Lang’s TreeMaker. We turn now to the specific crease patterns produced by Lang’s method and give it a very informal, high-level description; details will follow in Sec. 3. The input is a metric tree: a tree with (positive) length information attached to its edges. In Fig. 2(a), the edge lengths are calculated directly from a geometric realization (drawing) of the tree. TreeMaker is comprised of two phases: the first one solves a non-linear optimization problem, which results in a decomposition of (a minimally scaled version of) the original piece of paper into polygonal pieces, called molecules. The molecules

81

(a) Tree

(b) Lang polygon and crease pattern

(c) Uniaxial base

Fig. 2: The elements of Lang’s Universal Molecule algorithm. (a) The input metric tree. (b) The universal molecule: a crease pattern of an input doubling polygon of the tree. (c) A folded state projecting down (along dotted lines) onto the metric tree.

have specific relationships to subtrees of the given metric tree, and, when they are convex, are further subdivided in the second phase of Lang’s algorithm. This phase, referred to as the Universal Molecule algorithm, deals independently with each convex piece, by finding a crease pattern (called a Universal Molecule, as in Fig. 2(b)) that has a fold (configuration) as a certain type of flat origami called a uniaxial base. The uniaxial base has an underlying tree structure: groups of faces (called flaps) are folded flat (overlapping) and project to a single tree edge. Fig. 2(c) shows such a uniaxial state, with its flaps moved away from the trunk to illustrate the underlying tree structure. Lang then argues that the folded universal molecule pieces can be glued together along their boundaries to match the connectivity of the original piece of paper, but leaves open if (and when) this can be done in a non-self-intersecting manner, or when the folding of the base can be carried out continuously, without stretching, cutting, tearing or even bending of the paper. Contributions. We present what we believe to be substantial contributions to the long-due theoretical analysis of Lang’s algorithm and address several open questions concerning properties of the origami crease patterns and uniaxial bases that it computes. We show that only certain special crease patterns have a chance to be foldable and identify a combinatorial pattern of a Universal Molecule (captured in an associated outerplanar graph) that forces it to be rigid in the open state and stable (not unfoldable) in the uniaxial state. This unexpected behavior of the algorithm puts in perspective some of the most relevant properties of the computed output, and opens the way to design methods that may overcome these limitations. Our proof technique, called rigidity transport, is algorithmic in nature and, to the best of our knowledge, new. As is the case with similar questions in combinatorial rigidity theory, a complete characterization of rigid, resp. stable patterns appears to be substantially more difficult; we leave it as an open question. We also completed a comprehensive correctness proof of Lang’s Universal Molecule algorithm by identifying and proving several useful relationships between the structures it works on, and their computational invariants. A summary of our approach to describing Lang’s algorithm, which makes the identification of these invariants natural and streamlines the correctness proof, is given in Sec. 3.

82

Supplement. Rigidity properties of flat-faced origamis are hard to grasp from static images, without experimentation with physical or simulated models. The reader is referred to our web site http://linkage.cs.umass.edu/origamiLang, where an applet for designing Lang crease patterns and uniaxial bases, and our recent video [3], are available.

2

Overview of the Main Results

Lang’s algorithm produces origami patterns that may fold into uniaxial bases, i.e. which have a state that is uniaxial. We first show that many of these patterns are in fact rigid: they are isolated points in the origami’s configuration space, and therefore do not fold to anything. The folded uniaxial base lies in a different component of the configuration space, and, due to its intrinsic tree-like structure, it is obviously flexible. However, we can show that it is also isolated, but in a different way, which we’ll call stable. Such distinguishing properties, although possibly experienced “intuitively” by origamists, have been neither previously identified nor proven in the literature. These new and surprising results would not have been possible without a complete understanding and theoretical analysis, including correctness, of Lang’s algorithm. Lang’s ideas are sound, but other than a very sketchy sequence of statements, no comprehensive proof, complete with the algorithm’s invariants, was made available since the algorithm was first announced in 1996. Since the first phase of TreeMaker may sometimes fail, there was no guarantee (other than perhaps statistical evidence from running the code) that the second phase (the Universal Molecule) would not come across some special situation where it would also fail. We will therefore rely, throughout this paper, on: Theorem 1. (Correctness of Lang’s Universal Molecule Algorithm [14, 4]) Given an input metric tree and a valid Lang polygon associated to it, Lang’s universal molecule algorithm correctly computes a crease pattern which has a second, flat-folded realization as a uniaxial base which projects exactly to the input metric tree. The proof required us to clarify the role of various structures appearing in the algorithm (in particular, what we call a Lang polygon associated to a metric tree) and to identify and prove relationships (invariants) between them. For instance, we prove that splitting edges, introduced by Lang’s algorithm to reconcile the metric properties of the input tree within the constraints of the polygonal piece of paper, do not cross. This permits the alFig. 3: Rigid crease pattern. gorithm to proceed recursively in an un-equivocal The mountain/valley assignmanner. We clarify the role of the perpendicular ment indicates the pattern of creases and track them during the algorithm’s exe- the flat-folded uniaxial base cution. By contrast, Lang defines them at a post- configuration. computation step, when they are extended recursively in a manner that was

83

never shown to let them “arrive” precisely at specific points, at a well-defined distance from the polygon corners. The proof sketch is given in Sec. 3, with full details available in [4]. We proceed now with the main results, starting with the base case of a family of examples:

Fig. 4: A metric tree with two compatible Lang polygons, each one with its universal molecule pattern and associated splitting graph. In the first case, all the faces of the splitting graph are exposed. In the second case, one triangular face is isolated from the polygon boundary. Tiling colors indicate edge types (splitting edges, bisectors, perpendiculars).

Theorem 2. (Rigid Universal Molecules exist) The universal molecule from Fig. 3 is rigid, as a paneled origami: the flat, open configuration is an isolated point, i.e. not part of any flex (continuous path) in the configuration space. It is easy to verify that this example is a universal molecule by following the description of Lang’s algorithm given in Sec. 3. The coordinates are generic, i.e. the pattern does not change under small perturbations. The proof, given in the next section, is also indicative of the fact that its rigidity is not a simple artifact of some rare occurrence or numerical error. We generalize this example in two ways, first by turning it into a sufficient criterion for detecting the rigidity of the crease pattern, then by extending it to the folded base produced by Lang’s algorithm. To any universal molecule crease pattern, we associate an outerplanar graph, called the splitting graph. Its cycle boundary corresponds to the input polygon, and its diagonals to splitting edges introduced by Lang’s algorithm. Indeed, a splitting edge is introduced by the algorithm whenever the distance between two polygon corners becomes equal to the tree distance between the two corresponding leaves; the diagonal in the outerplanar graph is just a book-keeping device. A face of an outerplanar graph is said to be internal if it shares no edge with the boundary. A universal molecule pattern is said to have an isolated peak, if its splitting graph has an isolated internal triangular face. See the second example in Fig. 4, where, in the crease pattern, a degree-6 “peak” is isolated from the boundary in the manner of the basic example from Fig. 3. A universal molecule crease pattern is generic if the splitting edges have no common endpoints.

84

Theorem 3. (Universal Molecules with isolated peaks are rigid) If it has an isolated peak, a generic crease pattern produced by Lang’s Universal Molecule algorithm is always rigid. A uniaxial base produced by Lang’s algorithm is always flexible, inheriting the same degrees of freedom as its shadow tree. A foldable base should be reached through a continuous deformation path from the open origami state. Of course, we know that Universal Molecule crease patterns with isolated peaks lead to uniaxial bases that cannot be reached from the open state, but can they be reached from some other interesting intermediate configuration that is not just a reconfiguration of its flaps? For instance, is it possible to separate the overlapping faces forming a flap? We prove that this is not the case. Theorem 4. (Stability of Lang Uniaxial Bases with isolated peaks) If it has an isolated peak and is a generic crease pattern, a universal molecule leads to a uniaxial base that cannot be unfolded, in the sense that the overlapping panels grouped into flaps cannot be separated.

3

Computing the Universal Molecule

We present now our formulation of Lang’s Universal Molecule algorithm, from [4]. We define the input (a metric tree and a convex polygonal region, forming what we call a Lang molecule), output (an extended universal molecule tiling and a specific uniaxial base compatible with it), the algorithm (as a sweep process with two types of events, and with splitting and merging subroutines in a divideand-conquer fashion at certain events), and relationships maintained throughout the execution between the input and output structures (“invariants”). Metric trees and doubling cycles. A metric tree (T, w) is a tree T with leaves A = {a1 , · · · , an }, internal nodes B = {b1 , · · · , bm }, edges E and weights w(e) > 0 on the edges e ∈ E. Assume that a topological embedding of T is also given by circular orderings of the neighbors of each in- Fig. 5: A metric tree surrounded by a douternal node of the tree. Construct the bling cycle, a possible Lang molecule associ(metric) doubling cycle CT by walk- ated to it, and its universal molecule crease ing around the topologically embed- pattern. ded tree and listing the vertices (with repetitions) in the order in which they are encountered. The vertices of the doubling cycle retain, as (not unique) labels, the labels of the internal tree nodes from which they came. Each edge of the tree is thus traversed twice, in both directions, and appears as such in the doubling cycle, together with the lengths inherited from the tree; this is illustrated in Fig. 5. Lang molecule. A Lang molecule L = (T, PT ) associated to a metric tree (T, w) is a convex polygonal region RT with polygon boundary PT satisfying

85

the following two conditions: (a) PT is a metric realization of a doubling cycle CT , and (b) the distance, inside the polygonal region RT , between two vertices corresponding to leaves ai and aj in the tree T is at least the distance in the tree between these leaves. These conditions imply that the vertices of the Lang molecule polygon PT labeled with internal nodes bi ∈ B of T must be straight, i.e. incident to an angle of π. See Fig. 5. Remarks. In TreeMaker, the first (“optimization”) phase produces a decomposition into such polygonal regions, called here Lang molecules in recognition of this fact. We remark that condition (b) does not hold for all convex realizations of CT . An important invariant in our proof of correctness is that contours (defined below) remain Lang molecules. We also note that Lang does not retain markers for the inner nodes of the tree on the polygon boundary. Parallel sweep and contours. A parallel sweep is a process in which the polygon edges are moved, parallel with themselves and at constant speed, towards the interior, as in Fig. 6. It has been used in the literature to define the straight-skeleton of a polygon. The process is parametrized by h, representing a height, or distance between a polygon edge and a line parallel to it. The moving lines cross at vertices ai (h), i = 1, · · · , n, which trace the inner bisectors si of Fig. 6: Contours and an the polygon vertices, starting at height h = 0 with edge contraction event in a ai (0) = ai . This gives a continuous family of poly- parallel sweep. gons P (h) (called h-contours or simply contours of P ), parametrized by the height h. A Universal Molecule (UM) is a specific crease pattern on a Lang molecule, made by tracing all the vertices of the polygon (corresponding to both leaf and internal nodes of the metric tree) during a parallel sweep with events described below. The distinctive property of the UM (which of course needs a proof) is that it has an isometric realization as a uniaxial base whose shadow tree is isometric to the given metric tree of the Lang molecule. Fig. 2 illustrates this correspondence. In some special (and rare) cases, the main structure underlying a universal molecule is just the straight-skeleton of the molecule’s convex polygon. Edge contraction event. As h increases, the edges shrink until one of them reaches zero length. We call this an (edge) contraction event; it happens for a pair of consecutive bisectors (sk , sk+1 ) whose intersection ck is at minimum distance h from the corresponding edge ak ak+1 of the original polygon, as in Fig. 6. Note that several events may happen simultaneously, either at the same crossing point ck or at different ones. Tree and contour polygon shrinking. Perpendiculars dropped from a vertex of the contour polygon to the two adjacent polygon sides (on whose bisector it moves) cut off equal length segments from these sides. Interpreting this in terms of the metric tree and its doubling polygon, we remark that (a) the parallel

86

B

(a) Leaf nodes move inwards on (b) The counterpart on the uniaxial base is a line their edges. Internal nodes stay sweep, parallel to the axis. Illustrated here is a fixed. splitting event. Fig. 7: Parallel sweeping a Lang molecule: the effect on the metric tree, the tiling and the uniaxial base.

sweep is reflected by a simultaneous constant-speed decrease in the lengths of the leaf edges in T ; for each leaf, the constant depends on the angle at the corresponding Lang polygon vertex; the result is a shrunken-tree process T (h); (b) the contour P (h) is a (parallel) realization of the metric doubling polygon of T (h). See Fig. 7(a). The distance between two leaves in the (original) tree equals the sum of the pieces removed from their corresponding leaf edges, plus the distance in the shrunken tree. The standard alignment of T (h) is related to that of T by fixing the internal nodes and shrinking the leaves Fig. 7(b) shows the effect of the sweep on the uniaxial base and the correspondence with the shrunken tree.

Algorithm 1 CalculateUniversalMolecule(PT , T ) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:

if IsBaseCase(PT , T, h1 , h2 ) then return HandleBaseCase(PT , T ) end if h1 ←− GetNextContractionEvent(PT ) h2 ←− GetNextBranchingEvent(PT , T ) h ←− min{h1 , h2 } G0 ←− ComputeAnnulusTiling(PT , PT (h)) if h1 ≤ h2 then G ←− CalculateUniversalMolecule(PT (h), T (h)) else P1 , T1 , P2 , T2 ←−SplitAtBranchingEvent(PT (h), T (h)) G1 ←− CalculateUniversalMolecule(P1 , T1 ) G2 ←− CalculateUniversalMolecule(P2 , T2 ) G ←− MergeMolecules(G1 , G2 ) end if return MergeAnnulus(G0 , G)

Splitting events. For the shrunken tree T (h), the h-contour P (h) may stop being a Lang polygon: this happens exactly when the distance between two non-consecutive leaf vertices of a contour becomes equal to their distance in the

87

shrunken h-tree T (h). We call this a splitting event, as it splits the current Lang polygon, by a diagonal called a splitting edge, into two smaller Lang polygons. See Fig. 7(a). We have now all the ingredients to present the algorithm. Lang’s Universal Molecule algorithm. The input is a metric tree T and a Lang molecule RT with boundary P = PT associated to it. The output is a crease pattern such that the resulting origami has a realization as a 3D uniaxial base whose shadow is a standard alignment of the input metric tree. The algorithm is a parallel sweep with two types of events: (edge) contraction and splitting events. At a contraction event, the algorithm is invoked, recursively, on the resulting contour with fewer vertices. Besides tracking the next pair of bisectors that will cross (to detect contraction events), the algorithm also maintains pairwise distances between all the vertices of the polygon to detect a splitting event. Here, the segment between the pair of vertices now at the critical distance is used to divide the current contour polygon into two, and the algorithm is then invoked recursively on both. The merging occurring in the end extends the recursively computed crease pattern with an “annulus tiling” between two Lang polygons. Main data structure: the UM-tiling. The algorithm maintains a partial universal molecule (UM-tiling) of the contour representing the state Fig. 8: A UM-tiling obtained by merging the crease pat- of the parallel sweep at the current height h. tern of the first contour into the tiled annulus. When it recurses, this partial UM-tiling state is saved on a stack and the current contour is passed as a parameter to the new call. a1 When it returns from a recursive step, the b1 algorithm refines the tiling on top of the stack b1 b2 with the information returned from the recura5 sive call, which is a complete tiling of a sub- a2 molecule, by subdividing the convex face of the contour on which the call was made with the b1 b2 returned UM tiling. See Fig. 8. b2 Types of vertices and edges in the UMtiling. The vertices, edges and faces of the tiling carry several attributes. The edges of the UM-tiling are of several types: polygon edges and splitting edges (black), contour edges (gray), parallel to a parent polygon or to a splitting edge, and trace edges: green for the bisectors tracing the cor-

a1 a2 b1

b2 a5

b3

b3 a3

b3 a3

b3

a4

Fig. 9: A UM-tiling. The edge colors, red, green, black and gray denote the four types of edges: perpendiculars, bisectors, splitting and contour edges.

a4

88

ner vertices of the polygon (those that correspond to the leaves of the tree), and red for the perpendiculars tracing the marker vertices on the edges of the polygon (those corresponding to the internal nodes of the tree). The colors in Fig. 9 make it easy to notice several connectivity patterns: the red edges connect vertices labeled with internal tree nodes (bi ); the green edges follow paths from leaf-vertices (ai ) that meet at vertices which, generically, are incident to 3 red and 3 green edges, in alternating circular order; the gray edges of a convex contour are totally nested inside lower level contours. The splitting edges partition a contour into smaller convex contours. The UM-data structure also retains height information for all nodes (both as an index, indicating the nesting of the recursive call which computed them, and as a value); and pointers to parent nodes along directed paths towards the original polygon vertices; and several labels of these nodes. This information is used to prove invariant properties, including those mentioned briefly in this overview. The proof is by induction, with the base cases handling small polygons corresponding to trees with 1, 2 and 3 leaves. Tiling the annulus is done by taking all bisectors of all the nodes (including the markers) of the current polygon (as in Fig. 8(a)), and extending them to the next contour based on a given height value, thus creating the vertices and edges of the next contour. This step also fills in the attributes of edges and vertices. Polygon splitting. To maintain recursively the invariant that PT (h) is a Lang polygon for T (h), at a splitting event (corresponding to a pair of polygon vertices ai and aj ), PT (h) is split into P1 and P2 by a diagonal from ai (h) to aj (h). The tree T (h) is split into two trees T1 and T2 , with T1 defined as the nodes corresponding to the vertices traFig. 10: The splitting of a polygon at a splitting versed by a ccw walk from event. The distance between the vertices a2 and a4 ai (h) to aj (h) in PT (h), and in the polygon becomes equal to their distance in T2 by a walk from aj (h) to the tree. ai (h) in PT (h). This splits the tree T along the path from ai to aj . Markers to the internal nodes of T1 and T2 along this path are maintained. Fig. 10 illustrates the splitting on a Lang polygon and its corresponding tree. Merging Split Molecules. Finally, the call on line 14 of the algorithm merges the tilings from recursive calls after a splitting event, to form a tiling for the joint contour. Because there are matching copies of internal vertices along the sides in each polygon, the merge step just glues these copies back together. In terms of uniaxial bases, this step glues two recursively computed uniaxial bases

89

along their common boundary to form the uniaxial base of the larger, merged contour. Merging the border. To complete the UM-tiling for a Lang molecule, the UMtiling of an inner contour is glued to the annulus tiling (previously computed) (Fig. 8). Because a UM-tiling does not split the contour edges, the edges of the polygon PT (h) are common to both the annulus and the crease pattern obtained recursively for PT (h). Uniaxial base. We relate now properties of the universal molecule tiling for a Lang molecule to the flat uniaxial base, which is also recursively constructed (at least conceptually) by the algorithm. We define below a mapping B : V 7→ P ⊂ R3 of the vertices i ∈ V to points pi ∈ P in a 3D plane perpendicular to the xy-plane. We need two coordinates: a z and an x-coordinate. The z-coordinate is the height value of the vertex in the universal molecule tiling, and the x is the coordinate of the corresponding node in the standard alignment of the tree. See Fig. 7(b). The following invariants relate the data structures used in the algorithm. Invariant 1 (Tree and contour): The contour P (h) at the time h of an event is a Lang molecule of the corresponding shrunken tree T (h) obtained by reading off the edge length information from the vertex markings on the contour. Invariant 2 (UM-tiling and uniaxial base): The UM-tiling G(h) computed by the algorithm for a Lang molecule L(h) = (T (h), PT (h)) satisfies the following properties: (1) the polygon boundary is preserved (i.e. no new vertices are added to it); (2) there exists a uniaxial base B(h), isomorphic and isometric to the UMtiling, which projects to the standard alignment of the tree T (h) and maps the edges of PT (h) exactly onto their corresponding edges in the standard alignment of T (h); and (3) the image of the contour P (h) in the base B(h) is the intersection of B(h) with the z = h plane. This completes the overall description of Lang’s Universal Molecule algorithm.

4

Rigid Universal Molecules

In this section we prove Theorem 2. The challenge here is to prove rigidity in the absence of infinitesimal rigidity; indeed, infinitesimal rigidity would have implied rigidity, but this is not the case: an infinitesimal motion, with vertex velocities perpendicular to the plane of the “paper”, always exists. Towards this goal, we introduce a different technique, called rigidity transport. It is algorithmic, can be applied on any graph as long as it has vertices with 4 “unvisited” edges that act as “transmitters” (cf. definition given below) and which are reachable from a starting point via “transport” edges. Four-vertex origamis. A single vertex origami with 4 creases has a onedimensional configuration space, and the singularity point may allow for flexes

90

along different branches. A tabulation of the configuration spaces of planar 4gons can be found in [10], and the relationship between the Euclidean, spherical and single-vertex origami is discussed at large in [20, 18]. We start by identifying the types of 4-edge single-vertex origamis (called, for simplicity,“gadgets” or single-vertex 4-gons) that appear in a Universal Molecule crease pattern, according to the following scenario. Rigidity transport. Assume that the dihedral edge of one such 4-edge gadget is kept, rigidly, in the flat open position (of 180o ) or flexed: can the behavior of the other edges be predicted? Fig. 11 tabulates all possibilities when this can be done, for 4-edge gadgets created by the universal molecule algorithm and needed in the main proof of this section. An arrow pointing towards the center indicates the “input” to the gadget, i.e. the mechanical action of keeping the dihedral angle as it is or perturbing it slightly. For easy reading we color-code these “signals”: black (and with a cross on the tail to indicate “rigidity”), if the dihedral edge is kept at 180o , and red (and with a small crescent on the tail, to indicate a small flex), if it is perturbed (flexed) slightly. An arrow pointing outwards indicates a forced behavior on another edge. A dotted edge signifies that the behavior can be anything (i.e. it is not determined by the input).

Fig. 11: Possible rigidity transport patterns that can be found in the three types of degree 4 vertices found in a flexible flat single vertex origami.

The center vertices are also colored to indicate the type of the single vertex gadget. In black we have the generic case: when an edge is rigidified, the resulting single vertex origami corresponds to a spherical triangle and thus is rigid, just as in the Euclidean case. In the proof below, this case will be applied to the endpoints of a splitting edge. In white, we have the case of two aligned edges; the other two make equal angles (different from 90o ) with them. In the proof below, this case will be applied to a contraction event. The equal angles form because the two perpendiculars are meeting an angle bisector edge. In gray,

91

we have the special case when two pairs of opposite edges are each aligned, and one is perpendicular to the other; this case will apply along a splitting edge, at the marker vertices present along it. Here keeping one edge rigid, resp. deforming it slightly, forces its aligned pair to have the same behavior; moreover, the deformation of the dihedral angle of an edge forces the flatness (and hence, rigidity) of the perpendicular pair. This process (of inferring rigidity/flatness of an edge from what happens with another edge incident to the same vertex) will be called rigidity transport. We summarize these very simple facts in the following Lemma. Lemma 1. The dependency patterns of folded, resp. rigid crease edges from Fig. 11 correctly depict 4-vertex origami configurations in the vicinity of the flat, open state. Proof. It is based on spherical geometry, on the description from [10] for classifying configuration spaces of polygons, and on the results of [11, 12] concerning singularities of polygonal chains (Euclidean and spherical). t u Remark. The previous lemma applies not just to the specific example from Theorem 2, but to all crease patterns produced by Lang’s algorithm. We emphasize again that Fig. 11 does not cover all possible scenarios, but just those that are necessary in our proofs of Theorems 2 and 3. Proof of Theorem 2. Overview. We assume that the origami is flexible and derive a contradiction by analyzing a potential nearby realization, in which the dihedral angle of at least one edge must be (slightly) smaller than 180o . We use the types of folds that may occur at vertices of degree 4, as classified in Lemma 1. We will start at the central vertex and “propagate” flat (rigid) edges and flexed edges by sequentially applying one of inferences (input-implies-output) illustrated in Fig. 11. If an edge incident to a vertex is rigid, the degree of the vertex is reduced by one, when its flexibility is analyzed. A step in such a sequence of inferences is illustrated in Fig. 12.

Fig. 12: An example of the logical inference used to prove rigidity (Case 1). The red vertex at the center is assumed to be rigid. We analyze the blue highlighted vertex in each figure and conclude, from its type and rigidity of one incident edge, the rigidity of its neighbors. We continue this process for all vertices and conclude that the entire origami must be flat.

92

The analysis of flexibility of our example reduces to just two cases. First, we assume that at the most central vertex of the crease pattern, all edges remain flat. Using Lemma 1, we then iteratively propagate the “flatness” and infer that all edges must remain flat. Otherwise, one of the edges incident to the central vertex is not flat, i.e. either a valley or a mountain. Following again the simple rules of local foldability at neighboring vertices, we arrive at a contradiction where one edge will need to be both flat, and not flat, simultaneously. From this we conclude that the crease pattern in Fig. 3 should be rigid. We analyze now in detail each case, using the guidelines from Fig. 13: (left) vertex labels, (center) vertex types (black, gray and white, as classified in Lemma 1 and illustrated in Fig. 11) and (right) an oriented inference “path” leading to a contradiction, in Case 2 below. Case 1: all edges incident to 1 are flat. The following inference (see Fig. 12) show that, in this case, all edges of the crease pattern have to be flat: the vertices 2, 6, 10, incident to 1, are white, have a rigid input edge (the one coming from 1), hence the other edges (to 5, 7, 18 etc.) are implied to be rigid; 13, 18, 22 are black each with a flat incident edge, and thus all edges incident to them are flat. Therefore, 17, 23, 28 (also black) are flat. Then the gray 3, 5, 7, 9, 12, and 24 are incident to two flat edges incident to the same face and are thus flat. By the same reasoning, 4, 8 and 11 are flat; 16, 21, and 27 are white, with one flat edge, hence all are flat; 15, 20, 26 are flat by the same reasoning; 14, 19, 25 now have all but 3 edges proved to be flat by the statements above; since none of these are collinear, they must be all flat. Thus all edges are flat: contradiction.

17

18

16 5

15

19 7

20

6 8

21

1

4

9 10

14

3

2

25

11 13

22 23

24

12 27

26

28

Fig. 13: Illustration of the methodology for deriving a contradiction from the assumption that this crease pattern flexes.

Case 2: some edge incident to vertex 1 is not flat. In this case, at least 4 of them must be non flat, and hence in one of the 6 pairs of consecutive edges, neither edge is flat. A contradiction will be derived in each case, and all cases are similar, so we present the argument only for the pair of edges (1,4) and (1,6), assumed to be displaced (not flat), as in Fig. 13(right). Since (1, 4) is not flat and vertex 4 is gray, edge (4, 5) is flat; since (4, 5) is flat, and 5 is gray, then (5, 17) is flat; (5, 17) flat and 17 black, implied that (17, 18) is flat; (17, 18) being flat implies that (18, 6) is flat. Finally, (18, 6) being flat implies by (b) that (6,

93

1) is flat. This contradicts the assumption that (1, 6) is deformed away from flatness. What completes the proof is the observation that the same sequence of inferences applies to all possible subsets of edges incident to 1. t u

5

Crease Patterns with Isolated Peaks

We extract now the characteristic features of the generic example from the previous section to prove Theorem 3. It can be observed that the previous example contains a special vertex “surrounded” by three split edges. On the other hand, the leftmost molecule from Fig. 4 doesn’t have such a vertex. We use now the splitting graph, defined previously as an outerplanar graph whose outer cycle corresponds to the given polygon and the diagonals correspond to the splitting events. Then we apply the argument used in the proof of Theorem 2 to obtain a sufficient condition for the universal molecule crease pattern to be rigid. Proof of Theorem 3. The proof requires an understande2 ing of Lang’s algorithm and of its properties which were briefly sketched in Sec. 3. We follow the e3 algorithm as it identifies the three splitting edges making an isolated face in the splitting graph. These e1 edges e1 , e2 , e3 are added to the Universal Molecule crease pattern Fig. 14: The crease pattern induced by an isoat events happening at different lated peak in the splitting graph. heights h1 < h2 < h3 (by the assumption of genericity). Then, the splitting edge e1 is on the h1 -contour, and includes edge e2 and its h2 -contour, which in turn includes edge e3 and its h3 -contour. Extending the crease pattern with bisector and perpendiculars around these three splitting edges, we obtain a pattern illustrated in Fig. 14. On the left, we see the three splitting edges (black) and their endpoints (of “black”-type, according to the classification from Lemma 1). There is a unique center vertex (the “peak”), of degree 6, with three green bisectors and three red perpendiculars emanating from it. The other endpoints of the green bisectors are exactly as they are depicted in the picture: two go to edge e3 , the latest to be added as a split edge, and one goes to e2 . The endpoints of the splitting edges are connected by a path of bisector edges, and additional vertices of the crease pattern may be present along all these segments, as illustrated in Fig. 14(right). With this pattern in place, one recognizes immediately the applicability of the proof of Theorem 2 to derive that all the edges that are part of this figure (of three splitting segments and all of their incident edges) must be rigid. To complete the proof for the entire crease pattern, we proceed by induction. First, we identify a few properties of the Universal Molecule crease pattern (which follow from the invariants of the algorithm). The base case of a generic recursive call to Lang’s algorithm is when the contour polygon is a triangle. The bisectors of the

94

triangle meet in one vertex, which we’ll call a peak; indeed, in the uniaxial state, these will be points of local maximum height for the folded paper. Generically, these are the only vertices of degree larger than 4 (namely, 6) that appear in the crease pattern. Next, we remark that each splitting segment has exactly one peak vertex on each side, and each peak is connected by two paths of bisector segments, to the endpoints of each split segment in its vicinity and by a path of perpendicular edges to some point on such a splitting edge. Therefore, if a splitting edge is proven to be “rigid” because of what happens on one of its sides, then all the edges incident to it are so, and the rigidity is transported to the peak on the other side. To complete the proof, we show inductively (proceeding outwards from an inner triangle towards the polygon sides) that all the split edges become rigid, once those of an isolated triangle (in the split graph) have been proven to be so. t u

6

Stable Lang Bases

The Uniaxial State. In the uniaxial state produced by Lang’s algorithm, the perpendicular creases of the universal molecule are grouped together, overlapping in groups that project to nodes of the input metric tree. They act as hinges about which flaps can be rotated. The uniaxial state is therefore flexible, suggesting that it may be able to reach other interesting configurations through appropriate deformations. Notice that two faces sharing creases that are bisectors or splitting edges are folded flat, one on top of the other, while the faces sharing a Fig. 15: Visualizing a Lang uniaxial base (view perpendicular edge may not be from below) by slightly perturbing the metric so. Fig. 15, showing from below while maintaining the combinatorial structure a slight perturbation of a uniax- of the realization. ial base (just enough to see which faces overlap and which not) may help with visualizing these properties. A state which is obtained from the flat uniaxial base simply by rotations of flaps about hinges is called tree-reachable. We prove now that the uniaxial state may sometimes be stable, or not unfoldable, meaning that there is no nearby configuration which is not tree-reachable. To be unfoldable, i.e. to unfold (presumably, towards the original open flat state of the paper), requires the bisector and splitting edges to open slightly. Our goal is to show that no such crease is opening, i.e. it cannot have a non-zero dihedral angle (while maintaining rigidly the faces) in a small neighborhood of some tree-reachable configuration. Proof of Theorem 4 (Sketch). The proof follows a similar plan as for Theorem 3. The critical step is the base case, i.e. the counterpart of Theorem 2, which

95

relies on a slightly different set of gadgets. These, and the chain of implications leading to a contradiction to the assumption that the base is not stable in one of two cases, are depicted in Fig. 16. The generalization to those cases where the splitting graph has internal triangles is the same as in Theorem 3, therefore we focus now on the base case. Rigidity Transport. In this case we assume that a nearby state exists where some non-perpendicular crease 0,π is opening and analyze the rigidity transport on the graph. Instead of transporting “flatness” of an (a) (b) edge, we transport Fig. 16: The rigidity transport argument for one of two the property of being cases needed to derive a contradiction to the hypothesis “closed” or “open”. that an unfolding of the uniaxial base exists. The gadgets for this transport are shown in Fig. 16 (left). The edge colors represent: closed edge (black), i.e. faces incident to the edge are folded on top of another, at an angle of zero, opened edge (red) (i.e. the incident faces make a dihedral angle slightly larger than zero), unknown (dotted) and a special type (gray) whose angle must be either 0 or π (but no other value). To obtain a contradiction, the proof assumes that a nearby state exists and proceeds in two cases: 1. all non-perpendiculars incident to 1 are closed, and 2. one of the non-perpendiculars is opening. In each case we derive a contradiction. We analyze in detail each case, using the vertex labels (left) and vertex types (center) from Fig. 13, and the oriented inference “path” from Fig. 16 (right) leading to a contradiction in Case 2 below. Case 1: all non-perpendiculars incident to 1 are closed. The proof of this is exactly the same as Case 1 for Theorem 2 except that, rather than flatness, the property of an edge of being closed is propagated, and we don’t propagate along the perpendiculars. This is because the propagation rules for closed and flat edges are the same for the vertex types we encounter here along the non-perpendiculars. Case 2: some non-perpendicular incident to 1 is opening. We will show that the three non-perpendiculars incident to one are opening, and the incident perpendiculars are each either closed or flat. Since this state of a degree 6 vertex does not exist in the general case in which the angles at 1 are not all equal, this is a contradiction. We will assume that (1, 6) is opening, and show the inference necessary to prove (1, 2) is opening and (1, 4) is 0 or π. Since (1, 6) is opening and 6 is white, (6, 18) is opening. Since (6, 18) is opening, and 18 is black, (18, 17) is opening. Similarly, (17, 5) is opening. (17, 5) is opening, and 5 is gray, so 0,π

0,π

0,π

0,π

96

(5, 4) is opening. (5, 4) is opening, and 4 is gray so (4, 3) is opening, and (4, 1) is either 0 or π. (4, 3) is opening, and 3 is gray, so (3, 13) is opening. (3, 13) is opening, and 13 is black, so (13, 2) is opening. (13, 2) is opening, and 2 is white so (2, 1) is opening. To complete the proof, we observe that an analogous sequence beginning with (1, 2) shows that (1, 11) is 0 or π and (1, 10) is opening. Then the same sequence beginning at (1, 10) shows (1, 8) is 0 or π. This does not depend on which non-perpendicular of 1 we begin with and no such state exists for vertex 1. t u Concluding remarks. Theorem 2 says more than the fact that the uniaxial base corresponding to the crease pattern cannot be reached through continuous flat-faced folding: it says that the creased paper does not move at all if the faces are to remain rigid. Fig. 4 shows an example of a metric tree and two possible Lang molecules for it, whose splitting graphs indicate that one is rigid. The flatface flexibility of the other, if true, will have to be established by other means. Thus, a full characterization of the flexible origami patterns produced by Lang’s algorithm remains an open question, and Lang’s algorithm requires further investigation as to which crease patterns yield continuously foldable origamis.

References 1. M. W. Bern and B. Hayes. The complexity of flat origami. In SODA: ACM-SIAM Symposium on Discrete Algorithms, 1996. 2. M. W. Bern and B. Hayes. Origami embedding of piecewise-linear two-manifolds. Algorithmica, 59(1):3–15, 2011. 3. J. C. Bowers and I. Streinu. Lang’s universal molecule algorithm (video). Proc. 28th Symp. Computational Geometry (SoCG’12), 2012. 4. J. C. Bowers and I. Streinu. Lang’s universal molecule algorithm. Technical report, University of Massachusetts and Smith College, Dec. 2011. ´ 5. A. L. Cauchy. Sur le polygones et le poly`edres, seconde m´emoire. Journal de l’Ecole Polytechnique, XVIe Cahier(Tome IX):87–90, 1813. Oevres compl`etes, IIme S´erie, Vol. I, Paris, 1905, 26-38. 6. E. D. Demaine and M. L. Demaine. Computing extreme origami bases. Technical Report CS-97-22, Department of Computer Science, University of Waterloo, May 1997. 7. E. D. Demaine, M. L. Demaine, and A. Lubiw. Folding and one straight cut suffices. Proc. 10th Annual ACM-SIAM Sympos. Discrete Alg. (SODA ’99), pages 891–892, January 1999. 8. E. D. Demaine and J. O’Rourke. Geometric Folding Algorithms: Linkages, Origami, and Polyhedra. Cambridge University Press, 2007. 9. D. Eppstein. Faster circle packing with application to nonobtuse triangulations. International Journal of Computational Geometry and Applications, 7(5):485–491, October 1997. 10. M. Farber. Invitation to Topological Robotics. Z¨ urich Lectures in Advanced Mathematics. European Mathematical Society, 2008. 11. M. Kapovich and J. J. Millson. Moduli spaces of linkages and arrangements. Advances in Geometry, 172:237–270, 1999.

97 12. M. Kapovich and J. J. Millson. On the moduli space of a spherical polygonal linkage. Canad. Math. Bull., 42(3):307–320, 1999. 13. N. Katoh and S. Tanigawa. A proof of the molecular conjecture. Discrete and Computational Geometry, 45(4):647–700, 2011. 14. R. J. Lang. A computational algorithm for origami design. In Proceedings of the 12th Annual ACM Symposium on Computational Geometry, pages 98–105, 1996. 15. R. J. Lang. Treemaker 4.0: A program for origami design, 1998. 16. R. J. Lang. Origami design secrets: mathematical methods for an ancient art. Ak Peters Series. A.K. Peters, 2003. 17. R. J. Lang, editor. Origami 4: Fourth International Meeting of Origami Science, Mathematics, and Education. A. K. Peters, 2009. 18. G. Panina and I. Streinu. Flattening single-vertex origami: the non-expansive case. Computational Geometry: Theory and Applications, 46(8):678–687, October 2010. 19. I. Streinu and L. Theran. Slider-pinning rigidity: a Maxwell-Laman-type theorem. Discrete and Computational Geometry, 44(4):812–834, September 2010. 20. I. Streinu and W. Whiteley. Single-vertex origami and spherical expansive motions. In J. Akiyama and M. Kano, editors, Proc. Japan Conf. Discrete and Computational Geometry (JCDCG 2004), volume 3742 of Lecture Notes in Computer Science, pages 161–173, Tokai University, Tokyo, 2005. Springer Verlag. 21. P. Wang-Iverson, R. J. Lang, and M. Yim. Origami 5: Fifth International Meeting of Origami Science, Mathematics, and Education. Taylor and Francis, 2011.

Interfacing Euclidean Geometry Discourse with Diverse Geometry Software (Extended Abstract) Xiaoyu Chen SKLSDE – School of Computer Science and Engineering, Beihang University, Beijing 100191, China

Abstract. We present a framework for interfacing natural statements narrated in Euclidean geometry documents with diverse geometry software systems for automated theorem proving, problem solving, diagram construction and generation. In order to deal with the problem of conversions between different concepts, such a framework, based on a formalization mechanism, is able to manipulate geometric concepts at the semantic level and realize interplay between natural contents and software tools. We focus our research on the design of interfaces and present a case study of this framework by developing converters to transform English and Chinese geometric statements into/from the native formats of selected dynamic geometry systems, geometric automated theorem provers, and computer algebra systems.

Keywords: Interfaces, formalization, geometric theorem proving, dynamic diagram generation.

1

Introduction

Dynamic geometry systems (DGSs) have been studied for several decades and a number of systems (and packages) have been developed. These systems share some common features, such as creating and visualizing geometric diagrams that can be manipulated dynamically by moving free (or semi-free) points, but there are still distinctive features and significant differences with each other. The focused functionalities and complementary strengths of these systems can be revealed in the following aspects. – Almost all DGSs take geometric constructions as the inputs so that diagrams can be created according to a sequence of construction steps. The execution of each construction step, depending on the already constructed objects (e.g., points, lines, and circles), will create at least one new object. Such a sequence makes it easy for a DGS to determine the positions of objects uniquely and to choose which objects can be moved freely or accordingly. Some systems (e.g., Geometry Expressions [12] and GEOTHER [26]) also accept a set of geometric constraints as the inputs and are able to generate

100

dynamic diagrams in which the dependencies of objects are determined through algebraic calculations on these constraints. – All DGSs store geometric constructions or constraints in specific formats that are interpreted and processed inside the systems. Most of the systems provide graphical interfaces for users to input constructions or constraints in a point-and-click manner via available buttons or menu options and present textual descriptions for the properties of created objects to the users. Some systems enable editable scripting languages to describe and manipulate constructions (e.g., JavaScript interface with GeoGebraApplet [18]) or constraints (e.g., predicates of GEOTHER) and even support high-level programming functionalities (e.g., GCL language of GCLC and WINGCLC [16] and CindyScript of Cinderella [3]). – Most DGSs support for automated geometric theorem proving by integrating specific theorem provers or interfacing external computer algebra systems (CASs). Most of the generated proofs or decision results are presented in human-readable textual formats. Some systems can produce intuitive diagrammatic proof visualizations (e.g., Geometry Explorer [27]) and dynamically present the properties of the created objects used in each proof step (e.g., JGEX [28]). Some systems interface with the Coq proof assistant to perform interactive geometry theorem proving and the constructed proofs can be verified within Coq theorem prover (e.g., GeoView [1] and GeoProof [19]). Some systems are able to automatically discover geometry theorems [2] and solve geometry problems (e.g., Math-XP [8]). – Most DGSs focus on Euclidean geometry. Some of them support for projective, hyperbolic, and elliptic geometries (e.g., Cinderella). Some are able to deal with algebraic expressions, perform symbolic and numeric computations, dynamically visualize mathematical, not only geometric, objects (e.g., GeoGebra and GCLC/WINGCLC), and simulate interactive physics experiments (e.g., Cinderella). There is no single system that covers diverse capabilities of all these systems. Integration of different systems is desired to enhance the functionality of an individual system. Aiming at interchanging data among DGSs and geometry theorem provers, an XML-based format for describing geometric constructions and proofs has been proposed [23] and special converters have been implemented to deal with transformations between the XML-based specifications and toolnative formats (of GCLC, Eukleides, and GCLCprover, for the moment [15]) . Such a common format was used for storing, communicating, and presenting data in the web-based GeoThms system that links dynamic geometry tools (GCLC and Eukleides), geometry theorem provers (GCLCprover), and a retrievable repository, geoDB, containing constructive problem statements, automatically generated figures and proofs in Euclidean geometry [24, 17, 13]. Since then, the i2g common file format was specified through intensive collaboration between the partners of Intergeo consortium and aims at creating a file format that could serve as a standard in the DGS industry [6]. Up to now, ten DGSs (including Cabri, Cinderella, and GeoGebra) are able to exchange

101

resources with each other [5]. An open web-based platform has been built to collect, retrieve, and share mathematics teaching resources specified in such a standard file format and created by more than one thousand interested members who are using a DGS of choice [14]. Focusing on testing and evaluating diverse geometric automated theorem proving systems (GATPs) in an appropriate context, the Thousands of Geometric problems for geometric Theorem Provers (TGTP) system provides the community of automated reasoning in geometry with a comprehensive and easily accessible library of test problems. To describe geometric conjectures and generated proofs, a common format that extends the i2g file format by using the Content Dictionaries of OpenMath is being developed [20]. Converters dealing with such a common format, one for each GATP, allow to test all the GATPs (Coq Area Method, GCLC Area Method, GCLC Wu Method, and GCLC Gr¨ obner Basis Method, for the moment) with all the problems in the library, independent of any particular GATP system [22, 25]. These resources or libraries take advantages of some standard common formats to uniform the specifications of geometry contents and make the contents more accessible, reusable, and adaptable. However, the contents are usually refined, reconstructed, and reproduced from the available geometry documents (e.g., textbooks and papers) that have been accumulated for years to record and communicate geometric knowledge and are still playing an important role in our daily geometry education and research. In order to ease the processes of building standard sharable resources or libraries, a study of making diverse geometry software understand and manipulate the contents existing in a massive number of Euclidean geometry documents has been initiated, such as making a GATP and a DGS read a theorem stated in Euclid’s Elements and automatically generate its readable proof and a dynamic diagram for its configuration. This study will also help build up an integrated environment with sophisticated software tools to make geometry documents more accessible, usable, and exploitable. To succeed in our preliminary objectives, we will focus our research and development on the interfaces of compiling the contents into executable formats that can be interpreted in geometry software systems for automated theorem proving, problem solving, diagram construction and generation as much as possible. The contents of geometry documents are usually represented in natural languages (e.g., English and Chinese) and are needed to be converted into the native counterparts (that have the same semantic models as the natural contents) in target software tools for execution. At the syntax level, conversions of data from one system to another system can be carried out only if the two systems share a common set of domain concepts (or symbols). For example, the i2g common file format and the OpenMath format serve as exchange standards between different systems under such a condition. However, geometry documents may be expanded with newly defined concepts (or symbols) that can be beyond the world of already existing software systems. Therefore, the conversions should be carried out not only at the syntax level but also at a semantic level, i.e., explaining statements in geometry documents

102

into understandable statements that share common concepts (or symbols) with a target software tool. We propose a formalization framework to accomplish conversions at the semantic level and further to achieve our objectives. We will present the framework and demonstrate mainly the interfaces and their design and implementation.

2

Methodologies

The framework is based on formal representations of the contents in Euclidean geometry documents and facilitated with multiple conversion interfaces with the other formats (see Fig. 1). The formalization respects the structure of natural representations and rearranges the involved elements in a strict syntax so that conversions between formal and natural statements at the syntax level are possible. In general, it is tough work to translate natural languages into formal ones because of ambiguity (but it is easy vice versa). However, the natural statements we are dealing with are specific in Euclidean geometry in the field of which statements are usually represented in a linearly constructed way and the representation patterns can be exhausted and identified feasibly. Ambiguity can thus be easily reduced automatically (or interactively). For example, an English statement “D, E, F are Euler points of triangle ABC with respect to the vertices A, B, C respectively” can be formalized as “{D; E; F }:=Eulerpoint({A; B; C},triangle(A, B, C)).” Such a formalization provides structural features of natural statements so that the formalized statements can be conveniently manipulated and then interfaced with external DGSs, GATPs, and CASs, etc. for dynamic diagram construction, theorem proving, and quantity calculation. Two aspects of conversions at the semantic level are taken into account to deal with the formalized statements (see the shaded area of Fig. 1). One aspect is to downgrade geometric concepts used in the statements by applying definitions of these concepts in a way of macro expansion. For example, “the Euler point of triangle ABC with respect to the vertex A” will be transformed into “the middle point of the segment which joins the vertex A and the orthocenter of triangle ABC”. The concept “Euler point” used in this statement is downgraded into concepts “middle point,” “segment,” and “orthocenter”. The goal for such a transformation is making it possible to interface the resulting statement with available software at the syntax level because “Euler point” usually cannot be manipulated in a target system (i.e., constructed in a DGS, proved in a GATP, and calculated in a CAS) while “middle point,” “segment,” and “orthocenter” can. The other aspect is to transform the statement vice versa, i.e., to upgrade geometric concepts. The goal for such a transformation is to make the results (i.e., a sequence of constructions, proofs, and algebraic expressions) created by the available software presented more naturally. Conversions at the syntax level between formalized statements and their counterparts in a target system are able to take the available standards as

103

Fig. 1. The framework for interfacing Euclidean geometry discourse with diverse geometry software

coordination formats. The goal is to reduce development costs on conversions between the formalized statements and diverse software systems by reusing converters of the i2g common file format with GeoGebra and Cinderella, etc. and the XML-based format with GCLC for constructions, and OpenMath Phrasebooks [21] for algebraic calculations in Mathematica and Magma, etc.

3

A Case Study

As a case study of the presented framework, we focus our design and implementation on the interfaces between plane Euclidean geometry documents in English with the following systems. GeoGebra is interfaced to construct dynamic diagrams for geometric statements; GeoDraw [29, 9], a software package that has been developed for drawing dynamic diagrams automatically from predicate specifications of a given set of geometric relations, is integrated to automatically generate dynamic figures with involving inequality constraints (such as “equilateral triangles erected externally on the sides of a triangle, ” and “a point inside a circle”); GEOTHER is integrated to prove geometric theorems (or check geometric conjectures) by using algebraic methods; Maple will be interfaced to solve algebraic problems.

104

We have designed a Geometry Description Language (GDL) [11] to formalize natural geometric configurations, definitions, propositions, and problems. A list of 135 formalized definitions is available for downgrading and upgrading geometric concepts [7]. Based on such a formalization, interfaces with GeoGebra and GEOTHER have been implemented [4] and interfaces with GeoDraw and Maple are being improved. Currently, we have tested the developed interfaces with 20 example theorems. More test examples are going to be used in the next stage and those examples that fail the transformations will be collected and analyzed for training the interfaces.

References 1. Y. Bertot, F. Guilhot and L. Pottier: Visualizing Geometrical Statements with GeoView. In: Electronic Notes in Theoretical Computer Science 103, pp. 49–65 (2004) 2. F. Botana and J.L. Valcarce: A Dynamic-Symbolic Interface for Geometric Theorem Discovery. In: Computers and Education 38, pp. 21–35 (2002) 3. Cinderella 2.0, http://doc.cinderella.de 4. X. Chen: Electronic Geometry Textbook: A Geometric Textbook Knowledge Management System. In: Proceedings of MKM 2010, LNAI 6167, pp. 278–292. Springer, Heidelberg (2010) 5. Dynamic Geometry Software Speaking Intergeo, http://i2geo.net/xwiki/bin/view /Softwares/ 6. S. Egido, M. Hendriks, Y. Kreis, U. Kortenkamp and D. Marqu`es: i2g Common File Format Final Version. Tech. Rep. D3.10, The Intergeo Consortium (2010) 7. Formalized Geomtry Definitions, http://geo.cc4cm.org/text/constraintScript.xml 8. H. Fu and S. Li: Teaching Mathematics by Math-XP. In: Proceedings of TIME 2004, Canada, http://rfdz.ph-noe.ac.at/fileadmin/Mathematik Uploads /ACDCA/TIME2004/time contribs/Fu/fu.pdf 9. GeoDraw, http://geo.cc4cm.org/draw/ 10. GeoGebra, http://www.geogebra.org/ 11. Geometry Description Language, http://geo.cc4cm.org/text/GDL.html 12. Geometry Expressions, http://www.geometryexpressions.com/ 13. GeoThms, http://hilbert.mat.uc.pt/ geothms/ 14. Intergeo, http://i2geo.net/ 15. P. Jani˘ci´c: GCLC – A Tool for Constructive Euclidean Geometry and More Than That. In: Proceedings of ICMS 2006, LNCS 4151, pp. 58–73. Springer, Heidelberg (2006) 16. P. Jani˘ci´c: Geometry Constructions Language. In: Journal of Automated Reasoning 44(1-2) (2010) 17. P. Jani˘ci´c and P. Quaresma: System Description: GCLCprover + Geothms. In: Proceedings of IJCAR 2006, LNAI 4130, pp. 145–150. Springer, Heidelberg (2006) 18. JavaScript Interface with GeoGebraApplet, http://wiki.geogebra.org/en/Reference :JavaScript 19. J. Narboux: A graphical user interface for formal proofs in geometry. In: Journal of Automated Reasoning 39, pp. 161–180 (2007) 20. OpenMath, http://www.openmath.org/cd/ 21. OpenMath Phrasebooks, http://dam02.win.tue.nl/new-web/products.html

105 22. P. Quaresma: Thousands of Geometric problems for geometric Theorem Provers (TGTP). In: Proceedings of ADG 2010, LNAI 6877, pp. 169–181. Springer, Heidelberg (2011) 23. P. Quaresma, P. Jani˘ci´c, J. Tomasevic, M. Vujosevic-Janicic and D. Tosic: XMLbased Format for Geometry – XML-based Format for Descriptions of Geometrical Constructions and Geometrical Proofs. Chapter in Communicating Mathematics in Digital Era, pp. 183–197. A K Peters, Ltd. Wellesley, MA, USA (2008) 24. P. Quaresma and P. Jani˘ci´c: Geothms – a Web System for Euclidean Constructive Geometry. In: Electronic Notes in Theoretical Computer Science 174(2), pp. 35–48 (2007) 25. TGTP, http://hilbert.mat.uc.pt/TGTP/ 26. D. Wang: GEOTHER 1.1: Handling and Proving Geometric Theorems Automatically. In: Proceedings of ADG 2002. LNAI 2930, pp. 194–215. Springer, Heidelberg (2004) 27. S. Wilson and J. Fleuriot: Combining Dynamic Geometry, Automated Geometry Theorem Proving and Diagrammatic Proofs. In: Proceedings of UITP 2005. Springer, Heidelberg (2005) 28. Z. Ye, S.-C. Chou and X. Gao: An Introduction to Java Geometry Expert. In: Proceedings of ADG 2008, LNAI 6301, pp. 189–195. Springer, Heidelberg (2011) 29. T. Zhao, D. Wang, H. Hong and P. Aubry: Real Solution Formulas of Cubic and Quartic Equations Applied to Generate Dynamic Diagrams with Inequality Constraints. In: Proceedings SAC 2012, pp. 94-101. ACM Press, New York (2012)

Formalizing Analytic Geometries Danijela Petrovi´c, Filip Mari´c Faculty of Mathematics, University of Belgrade

Abstract. We present our current work on formalizing analytic (Cartesian) plane geometries within the proof assistant Isabelle/HOL. We give several equivalent definitions of the Cartesian plane and show that it models synthetic plane geometries (using both Tarski’s and Hilbert’s axiom systems). We also discuss several techniques used to simplify and automate the proofs. As one of our aims is to advocate the use of proof assistants in mathematical education, our exposure tries to remain simple and close to standard textbook definitions. Our other aim is to develop the necessary infrastructure for implementing decision procedures based on analytic geometry within proof assistants.

1

Introduction

In classic mathematics, there are many different geometries. Also, there are different viewpoints on what is considered to be standard (Euclidean) geometry. Sometimes, geometry is defined as an independent formal theory, sometimes as a specific model. Of course, the connections between different foundations of geometry are strong. For example, it can be shown that the Cartesian plane represents (a canonical) model of formal theories of geometry. The traditional Euclidean (synthetic) geometry, dating from the ancient Greece, is a geometry based on a, typically small, set of primitive notions (e.g., points, lines, congruence relation, . . . ) and axioms implicitly defining these primitive notions. There is a number of variants of axiom systems for Euclidean geometry and the most influential and important ones are Euclid’s system (from his seminal “Elements”) and its modern reincarnations [1], Hilbert’s system [10], and Tarski’s system [22]. One of the most influential inventions in mathematics, dating from the XVII century, was the Descartes’s invention of coordinate system, allowing algebraic equations to be expressed as geometric shapes. The resulting analytic (or Cartesian) geometry bridged the gap between algebra and geometry, crucial to the discovery of infinitesimal calculus and analysis. With the appearance of modern proof assistants, in recent years, many classical mathematical theories have been formally analyzed mechanically, within proof assistants. This has also been the case with geometry and there have been several attempts to formalize different geometries and different approaches to geometry. We are not aware that there have been full formalizations of the seminal Hilbert’s [10] or Tarski’s [22] development, but significant steps have been made and major parts of these theories have been formalized within different

108

proof assistants [16, 17, 13]. As the common experience shows, using the proof assistants significantly raises the level of rigour as many classic textbook developments turn out to be imprecise or sometimes even flawed. Therefore, any formal treatment of geometry, including ours, should rely on using proof assistants, and all the work presented in this paper is done within Isabelle/HOL proof assistant [18]1 . Main applications of our present work are in automated theorem proving in geometry and in mathematical education and teaching of geometry. When it comes to automated theorem proving in geometry (GATP), the analytic approach has shown to be superior. The most successful methods in this field are algebraic methods (e.g., Wu’s method [23] and the Gr¨obner bases method [3, 12]) relying on the coordinate representation of points. Modern theorem provers relying on these methods have been used to show hundreds of non-trivial theorems. On the other hand, theorem provers based on synthetic axiomatizations have not been so successful. Most GATP systems are used as trusted software tools as they are usually not connected to modern proof assistants. In order to increase their reliability, they should be connected to the modern proof assistants (either by implementing them and proving their correctness within proof assistants, or by having proof assistants check their claims). Several steps in this direction have already been made [6, 15]. In mathematics education in high-schools and in entry levels of university both approaches (synthetic and analytic) to geometry are usually demonstrated. However, while the synthetic approach is usually taught in its full rigor (aiming to serve as an example of rigorous axiomatic development), the analytic geometry is usually presented much more informally (sometimes just as a part of calculus). Also, these two approaches are usually presented independently, and the connections between the two are rarely formally proved within a standard curriculum. Having this in mind, this work tries to bridge several gaps that we feel are present in current state-of-the-art in the field of formalizations of geometry. 1. First, we aim to formalize Cartesian geometry within a proof assistant, in a rigorous manner, but still very close to standard high-school exposures. 2. We aim to show that several different definitions of basic notions of analytic geometry found in various textbooks all turn out to be equivalent, therefore representing a single abstract entity — the Cartesian plane. 3. We aim to show that the standard Cartesian plane geometry represents a model of several geometry axiomatizations (most notably Tarski’s and Hilbert’s). 4. We want to formally analyze model-theoretic properties of different axiomatic systems (for example, we want to show that all models of Hilbert’s geometry are isomorphic to the standard Cartesian plane). 5. We want to formally analyze axiomatizations and models of non-Euclidean geometries and their properties (e.g., to show that the Poincar´e disk is a model of the Lobachevsky’s geometry). 1

Proof documents are available online at http://argo.matf.bg.ac.rs

109

6. We want to formally establish connections of the Cartesian plane geometry with algebraic methods that are the most successful methods in GATP. Several of these aims have been already established, while some other are still in progress. In this paper we will describe the first three points. The last point has already been discussed in [15], while other points are left for further work. This extended abstract contains formal logic representation of axioms, definitions and theorems present in our Isabelle/HOL formalization. However, detailed proofs are not presented and just some proof steps are outlined. Apart from having many theorems formalized and proved within Isabelle/HOL, we also discuss our experience in applying different techniques used to simplify the proofs. The most significant was the use of “without the loss of generality (wlog)” reasoning, following the approach of Harrison [9] and justified by using various isometric transformations. Overview of the paper. In Section 2 some background on Isabelle/HOL and the notation used is given. In Section 3 we give several definitions of basic notions of the Cartesian plane geometry and prove their equivalence. In Section 4 we discuss the wlog reasoning and the use of isometric transformations in formal geometry proofs. In Section 5 and Section 6 we show that our Cartesian plane geometry models the axioms of Tarski and the axioms of Hilbert. In Section 7 we discuss the current state-of-the-art in formalizations of geometry. Finally, in Section 8 we draw some conclusions and discuss future work.

2

Background

Isabelle/HOL. Isabelle/HOL is a proof assistant which embodies Higher Order Logic HOL. It provides powerful automated generic proof methods, based usually on simplification and classical reasoning. Isar is a declarative proof language of Isabelle/HOL, allowing more structured, readable proofs to be written. In Isabelle/HOL JP1 ; . . . Pn K =⇒ Q means if P1 , . . . , Pn hold, then Q holds. This notation is used to denote both inference rules and statements (lemmas, theorems). Isar language also allows the notation assumes "P1 " ..."Pn " shows "Q", and it will be used in this paper. We will also use object-level connectives ∧, ∨, −→, and ←→ to denote conjunction, disjunction, implication and logical equivalence. Quantifiers will be denoted by ∀x. P x and ∃x. P x.

3

Formalizing Cartesian Geometry

When formalizing a theory, one should decide which notions are considered to be primitive, and which are defined based on those primitives. Our formalization of analytic geometry aims at establishing the connection with synthetic geometries so it follows primitive notions given in synthetic approaches. Each geometry considers a class of objects called the points. Some geometries (e.g. Hilbert’s)

110

also consider distinct set of objects called the lines, while some (e.g. Tarski’s geometry) do not consider lines, at all. In some expositions of geometry, lines are a defined notion, and they are defined as sets of points. This assumes dealing with the full set theory, and many axiomatizations try to avoid this. In our analytic geometry formalization, we are going to define both points and lines, since we want to allow to analyze both Tarski’s and Hilbert’s geometry. The basic relation connecting points and lines is incidence, informally stating that a line contains a point (or dually that the point is contained in a line). Other primitive relations (in most axiomatic systems) are betweenness (defining the order of collinear points) and congruence. It is worth mentioning that usually, many notions that are derived in synthetic geometries are taken as basic in some text on analytic geometry and are directly defined. For example, some high-school textbooks define lines to be perpendicular if their slopes multiply to −1. However, this breaks the connections with synthetic geometries (where perpendicularity is a derived notion) as this characterization should be proved as a theorem, and not taken as a definition. 3.1

Points in Analytic Geometry.

Point in a real Cartesian plane is determined by its x and y coordinate. So, points are pairs of real numbers (R2 ), what can be easily formalized in Isabelle/HOL by type synonym pointag = ”real × real”. 3.2

The Order of Points.

The order of (collinear) points is defined using the betweenness relation. This is a ternary relation and B(A, B, C) denoting that points A, B, and C are collinear and that B is between A and C. However, some axiomatizations (e.g., Tarski’s) allow the case when B is equal to A or C (we will say the between relation is inclusive), while some other (e.g., Hilbert’s) do not (and we will say that the between relation is exclusive). In the first case, the between relation holds if there ~ = k · AC. ~ We want to avoid explicis a real number 0 ≤ k ≤ 1 such that AB itly defining vectors (as they are usually not a primitive, but a derived notion in synthetic geometries) and so we formalized betweenness in Isabelle/HOL as following: BTag (xa, ya) (xb, yb) (xc, yc) ←→ (∃(k :: real). 0 ≤ k ∧ k ≤ 1 ∧ (xb − xa) = k · (xc − xa) ∧ (yb − ya) = k · (yc − ya)) If A, B, and C are required to be distinct, then 0 < k < 1 must hold, and the ag relation is denoted by BH . 3.3

Congruence.

∼t CD The congruence relation is defined on pairs of points. Informally, AB = denotes that the segment AB is congruent to the segment CD. Standard metric

111 2 in p R defines that distance of points A(xA , yA ), B(xB , yB ) 2to be d(A, B) = (xB − xA )2 + (yB − yA )2 . Squared distance is defined as dag A B = (xB − xA )2 +(yB −yA )2 . The points A, B are congruent to the points C, D iff d2ag A B = d2ag C D. In Isabelle/HOL this can be formalized as:

d2ag (x1 , y1 ) (x2 , y2 ) = (x2 − x1 ) · (x2 − x1 ) + (y2 − y1 ) · (y2 − y1 ) A1 B 1 ∼ =ag A2 B2 ←→ d2ag A1 B1 = d2ag A2 B2 3.4

Lines and incidence.

Line equations. Lines in the Cartesian plane are usually represented by the equations of the form Ax + By + C = 0, so a triplet (A, B, C) ∈ R3 determines a line. However, triplets where A = 0 and B = 0 do not correspond to valid equations and must be excluded. Also, equations Ax + By + C = 0 and kAx + kBy + kC = 0, for a real k 6= 0, define a same line. So, a line must not be defined just by a single equation, but a line must be defined as a class of equations that have proportional coefficients. Formalization in Isabelle/HOL proceeds in several steps. First, the domain of valid equation coefficients (triplets) is defined. typedef line coeffs ag = {((A :: real), (B :: real), (C :: real)). A 6= 0 ∨ B 6= 0} When this type is defined, the function Rep line coeffs converts abstract values of this type to their concrete underlying representations (triplets of reals), and the function Abs line coeffs converts (valid) triplets to values of this type. Two triplets are equivalent iff they are proportional. l1 ≈ag l2 ←→ (∃ A1 B1 C1 A2 B2 C2 . (Rep line coeffs l1 = (A1 , B1 , C1 )) ∧ Rep line coeffs l2 = (A2 , B2 , C2 ) ∧ (∃k. k 6= 0 ∧ A2 = k · A1 ∧ B2 = k · B1 ∧ C2 = k · C1 )) It is shown that this is an equivalence relation. The definition of the type of lines uses the support for quotient types and quotient definitions that has been recently introduced to Isabelle/HOL [11]. So, lines (the type line ag ) are defined using the quotient_type command, as equivalence classes of the ≈ag relation. To avoid using set theory, geometry axiomatizations that explicitly consider lines use the incidence relation. If the previous definition of lines is used, then checking incidence reduces to calculating whether the point (x, y) satisfies the line equation A · x + B · y + C = 0, for some representative coefficients A, B, and C. ag in h (x, y) l ←→ (∃ A B C. Rep line coeffs l = (A, B, C) ∧ (A · x + B · y + C = 0)) However, to show that the relation based on representatives is well defined, it must be shown that if other representatives A0 , B 0 , and C 0 are chosen (that are proportional to A, B, and C), then A0 · x + B 0 · y + C = 0. So, In our

112

Isabelle/HOL formalization, we use the quotient package. Then, A ∈ag H l is defined using the quotient_definition based on the relation ag in h. The welldefinedness lemma is lemma shows "l ≈ l0 =⇒ ag in h P l = ag in h P l0 " Affine definition. In affine geometry, a line is defined by fixing a point and a vector. As points, vectors also can be represented by pairs of reals type synonym vecag = ”real × real”. Vectors defined like this form vector space (with naturally defined vector addition and scalar multiplication). Points and vectors can be added as (x, y) + (vx , vy ) = (x + vx , y + vy ). Then, line is represented by a Point and a non-zero vector: typedef line point vec ag = {(p :: pointag , v :: vecag ). v 6= (0, 0)} However, different points and vectors can determine a single line, and a quotient construction must be used again. l1 ≈ag l2 ←→ (∃ p1 v1 p2 v2 . Rep line point vec l1 = (p1 , v1 ) ∧ Rep line point vec l2 = (p2 , v2 ) ∧ (∃km. v1 = k · v2 ∧ p2 = p1 + m · v1 )) It is shown that this is indeed an equivalence relation. Then, the type of lines (line ag ) is again defined by a quotient definitions) are defined using the command quotient_type, as equivalence classes of the ≈ag relation. In this case, incidence is defined based on the following definition (again lifted using the quotient package, after showing the well-definedness). ag in h p l, ←→ (∃ p0 v0 . Rep line point vec l = (p0 , v0 ) ∧ (∃k. p = p0 + k · v0 )) Another possible definition of line is an equivalence class of pairs of distinct points. We did not formalize this approach, as it is trivially isomorphic to the affine definition (the difference of points is the vector appearing in the affine definition). 3.5

Isometries.

Isometries are usually defined notions in synthetic geometries. Reflections can be defined first, and then other isometries can be defined as compositions of reflections. However, in our current formalizations, isometries are used only as an auxiliary tool to simplify our proofs (as discussed in Section 4). So we were not concerned with defining isometries in terms of primitive notions (points and congruence) but we give their separate (analytic) definitions and prove the properties needed in our later proofs. Translation is defined for a given vector (not explicitly defined, but represented by a pair of reals). The formal definition in Isabelle/HOL is straightforward.

113

transpag (v1 , v2 ) (x1 , x2 ) = (v1 + x1 , v2 + x2 ) Rotation is parametrized for a real parameter α (representing the rotation angle), while only rotations around the origin are considered (other rotations can be obtained by composing translations and a rotation around the origin). Elementary trigonometry is used to give the following formal definition in Isabelle/HOL. rotpag α (x, y) = ((cos α) · x − (sin α) · y, (sin α) · x + (cos α) · y) There is also central symmetry that is easily defined using point coordinates: sympag (x, y) = (−x, −y) Important properties of all isometries are invariance properties, i.e., they preserve basic relations (betweenness and congruence). BTag A B C ←→ BTag (transpag v A) (transpag v B) (transpag v C) AB ∼ =ag CD ←→ (transpag v A)(transpag v B) ∼ =ag (transpag v C)(transpag v D) ag ag ag BT A B C ←→ BT (rotp α A) (rotpag α B) (rotpag α C) AB ∼ =ag CD ←→ (rotpag α A)(rotpag α B) ∼ =ag (rotpag α C)(rotpag α D) ag ag ag ag BT A B C ←→ BT (symp A) (symp B) (sympag C) AB ∼ =ag CD ←→ (sympag A)(sympag B) ∼ =ag (sympag C)(sympag D) Isometries are used only to transform points to canonical position (usually to move them to the y-axis). The following lemmas show that this is possible. ∃v. transpag v P = (0, 0) ∃α. rotpag α P = (0, p) BTag (0, 0) P1 P2 −→ ∃α p1 p2 . rotpag α P1 = (0, p1 ) ∧ rotpag α P2 = (0, p2 ) Isometric transformations of lines are defined using isometries of points (a line is transformed by transforming its two arbitrary points).

4

Using Isometric Transformations

One of the most important techniques used to simplify our formalization relied on using isometric transformations. We shall try to give a motivation for applying isometries on the following, simple example. Let us prove that in our model, if BTag A X B and BTag A B Y then BTag X B Y . Even on this simple example, if a straightforward approach is taken and isometric transformations are not used the algebraic calculations become tedious. Let A = (xA , yA ), B = (xB , yB ), and X = (xX , yX ). Since BTag A X B holds, there is a real number k1 , 0 ≤ k1 ≤ 1, such that (xX − xA ) = k1 · (xB − xA ), and (yX −yA ) = k1 ·(yB −yA ). Similarly, since BTag A B Y holds, there is a real number k2 , 0 ≤ k2 ≤ 1, such that (xB −xA ) = k2 ·(xY −xA ), and (yB −yA ) = k2 ·(yY −yA ).

114

Then, we can define a real number k by (k2 −k2 ·k1 )/(1−k2 ·k1 ). If X 6= B, then, using straightforward but complex algebraic calculations, it can be shown that 0 ≤ k ≤ 1, and that (xB − xX ) = k · (xY − xX ), and (yB − yX ) = k · (yY − yX ), and therefore BTag X B Y holds. The degenerate case X = B holds trivially. However, if we apply the isometric transformations, then we can assume that A = (0, 0), B = (0, yB ), and X = (0, yX ), and that 0 ≤ yX ≤ yB . The case yB = 0 holds trivially. Otherwise, xY = 0 and 0 ≤ yB ≤ yY . Hence yX ≤ yB ≤ yY , and the case holds. Note that in this case no significant algebraic calculations were needed and the proof relied only on simple transitivity properties of ≤. Comparing the previous two proofs, indicates how applying isometric transformations significantly simplifies the calculations involved and shortens the proofs. Since this technique is used throughout our formalization, it is worth discussing what is the best way to formulate the appropriate lemmas that justify its use and use as much automation as possible. We followed the approach of Harrison [9]. The property P is invariant under the transformation t iff it is not affected after transforming the points by t. inv P t ←→ (∀ A B C. P A B C ←→ P (tA) (tB) (tC)) Then, the following lemma can be used to reduce the statement to any three collinear points to the positive part of the y-axis (alternatively, x-axis could be chosen). lemma assumes "∀ yB yC . 0 ≤ yB ∧ yB ≤ yC −→ P (0, 0) (0, yB ) (0, yC )" "∀ v. inv P (transpag v )" "∀ α. inv P (rotpag α )" "inv P (sympag )" shows "∀ A B C. BTag A B C −→ P A B C" It turns out that showing that the statement is invariant under isometric transformations is mostly done by automation using the lemmas stating that the betweenness and congruent relations are invariant to isometric transformations.

5

Tarski’s geometry

Our goal in this section is to prove that our definitions of the Cartesian plane satisfy all the axioms of Tarski’s geometry [22]. Tarski’s geometry considers only points, (inclusive) betweenness (denoted by Bt (A, B, C)) and congruence (denoted by AB ∼ =t C) as basic objects. In Tarski’s geometry lines are not explicitly present and collinearity is defined by using the betweenness relation Ct (A, B, C) ←→ Bt (A, B, C) ∨ Bt (B, C, A) ∨ Bt (C, A, B)

115

5.1

Axioms of congruence.

First three Tarski’s axioms express basic properties of congruence. AB ∼ =t BA AB ∼ =t CC −→ A = B AB ∼ =t CD ∧ AB ∼ =t EF −→ CD ∼ =t EF We want to prove that our relation ∼ =ag satisfies the properties of the relation ∼ =t abstractly given by the previous axioms (i.e., that the given axioms hold for our Cartesian model)2 . For example, for the first axiom this reduces to showing that AB ∼ =ag BA. The proofs are rather straightforward and are done almost automatically (by simplifications after unfolding the definitions). 5.2

Axioms of Betweenness.

Identity of Betweenness. First axiom of (inclusive) betweenness gives its one simple property and, for our model, it is also proved almost automatically. Bt (A, B, A) −→ A = B The axiom of Pasch. The next axiom is the Pasch’s axiom: Bt (A, P, C) ∧ Bt (B, Q, C) −→ (∃X. (Bt (P, X, B) ∧ Bt (Q, X, A))) Under the assumption that all points involved are distinct the picture corresponding to this axioms is: B

Q X A

P

C

Before we discuss the proof that our Cartesian plane satisfies this axiom we discuss some issues related to the Tarski’s geometry that turned out to be important for our overall proof organization. The latest version of Tarski’s axiom system was designed to be minimal (it contains only 11 axioms), and the central axioms that describe the betweenness relation are the identity of betweenness and Pasch’s axiom. In formalizations of Tarski’s geometry ([17]), all other elementary properties of this relation are derived from these two axioms. For 2

In our formalization, axioms of Tarski’s geometry are formulated in a locale [2], and it is shown that the Cartesian plane is an locale interpretation. Since this is a technical issue of the formalization organization in Isabelle/HOL, we will not discuss it in more details

116

example, to derive the symmetry property (i.e., Bt (A, B, C) −→ Bt (C, B, A)), the axiom of Pasch is applied to triplets ABC and BCC and the point X is obtained so that Bt (C, X, A) and Bt (B, X, B), and then, by axiom 1, X = B and Bt (C, B, A). However, in our experience, in order to prove that our Cartesian plane models Tarski’s axioms (especially the axiom of Pasch), it would be convenient to have some of its consequences (e.g., the symmetry and transitivity) already proved. Indeed, earlier variants of Tarski’s axiom system contained more axioms, and these properties were separate axioms. Also, the symmetry property seems to be simpler property than Pasch’s axiom (for example, it involves only the points lying on a line, while the axiom of Pasch allows points that lie in a plane that are not necessarily collinear). Moreover, the previous proof uses rather subtle properties of the way that the Pasch’s axiom is formulated. For example, if its conclusion used Bt (B, X, P ) and Bt (A, X, Q) instead of Bt (P, X, B) and Bt (Q, X, A), then the proof could not be conducted. Therefore, we decided that a good approach would be to directly show that some elementary properties (e.g., symmetry, transitivity) of the betweenness relation hold in the model, and use these facts in the proof of much more complex Pasch’s axiom. BTag BTag BTag BTag

A A A A

A B X X

B C −→ BTag C B A B ∧ BTag A B Y −→ BTag X B Y B ∧ BTag A B Y −→ BTag A X Y

Returning to the proof that our Cartesian plane satisfy the full Pasch’s axiom, first several degenerate cases need to be considered. First group of degenerate cases arise when some points in the construction are equal. For example, Bt (A, P, C) allows that A = P = C, that A = P 6= C, that A 6= P = C and that A 6= P 6= C. A direct approach would be to analyze all these cases separately. However, a better approach is to carefully analyze the conjecture and identify which cases are substantially different. It turns out that only two different cases are relevant. If P = C, then Q is the point sought. If Q = C, then P is the point sought. Next group of degenerate cases arise when all points are collinear. In this case, either Bt (A, B, C) or Bt (B, A, C) or Bt (B, C, A) holds. In the first case B is the point sought, in the second case it is the point A, and in the third case it is the point P .3 Finally, the central case remains. In that case, algebraic calculations are used to calculate the coordinates of the point X and prove the conjecture. To simplify the proof, isometries are used, as described in Section 4. The configuration is transformed so that A becomes the origin (0, 0), and so that P = (0, yP ) and 3

Note that all degenerate cases that arise in the Pasch’s axioms were proved directly by using these elementary properties and that coordinate computations did not need to be used in those cases. This suggests that degenerate cases of Pasch’s axiom are equivalent to the conjunction of the given properties. Further, this suggests that if Tarski’s axiomatics was changed so that it included these elementary properties, then the Pasch’s axiom could be weakened so that it includes only the central case of non-collinear, distinct points.

117

C = (0, yC ) lie on the positive part of the y-axis. Let B = (xB , yB ), Q = (xQ , yQ ) and X = (xX , yX ). Since Bt (A, P, C) holds, there is a real number k3 , 0 ≤ k3 ≤ 1, such that yP = k3 · yC . Similarly, since Bt (B, Q, C) holds, there is a real number k4 , 0 ≤ k4 ≤ 1, such that (xB −xA ) = k2 ·(xY −xA ), and xQ −xB = −k4 ∗xB and 3 ·(1−k4 ) . yQ − yB = k4 ∗ (yC − yB ). Then, we can define a real number k1 = k4k+k 3 −k3 ·k4 A 6= P 6= C and points are not collinear, then, using straightforward algebraic calculations, it can be shown that 0 ≤ k1 ≤ 1, and that xX = k1 · xB , and yX −yP = k1 ·(yB −yP ), and therefore Bt (P, X, B) holds. Similarly, we can define 4 ·(1−k3 ) and show that 0 ≤ k2 ≤ 1 and that following a real number k2 = k4k+k 3 −k3 ·k4 holds: xX − xQ = −k2 · xQ and yX − yQ = −k2 · yQ and thus Bt (Q, X, A) holds. From these two conclusion we have determined point X. Lower dimension axiom. The next axiom states that there are 3 non-collinear points. Hence any model of these axioms must have dimension greater than 1. ∃ A B C. ¬ Ct (A, B, C) It trivially holds in our Cartesian model (e.g., (0, 0), (0, 1), and (1, 0) are noncollinear. Axiom (Schema) of Continuity. Tarski’s continuity axiom is essentially the Dedekind cut construction. Intuitively, if all points of a set of points are on one side of all points of the other set of points, then there is a point between the two sets. The original Tarski’s are defined within the framework of First Order Logic and sets are not explicitly recognized in Tarski’s formalization. Instead of speaking about sets of points, Tarski uses first order predicates φ and ψ. (∃a. ∀x. ∀y. φ x ∧ ψ y −→ Bt (a, x, y)) −→ (∃b. ∀x. ∀y. φ x ∧ ψ y −→ Bt (x, b, y)) However, the formulation of this lemma within the Higher Order Logic framework of Isabelle/HOL does not restrict predicate φ and ψ to be FOL predicates. Therefore, from a strict viewpoint, our formalization of Tarski’s axioms within Isabelle/HOL gives a different geometry than Tarski’s original axiomatic system. lemma assumes "∃a. ∀x. ∀y. φ x ∧ ψ y −→ BTag a x y" shows "∃b. ∀x. ∀y. φ x ∧ ψ y −→ BTag x b y" Still, it turns out that it is possible to show that the Cartesian plane also satisfies the stronger variant of the axiom (without FOL restrictions on predicates φ and ψ). If one of the sets is empty, the statement trivially holds. If the sets have a point in common, that point is the point sought. In other cases, isometry transformations are applied so that all points from both sets lie on the positive part of the y-axis. Then, the statement reduces to proving lemma assumes

118

"P = {x. x ≥ 0 ∧ φ(0, x)}" "Q = {y. y ≥ 0 ∧ ψ(0, y)}" "¬(∃b. b ∈ P ∧ b ∈ Q)" "∃x0 . x0 ∈ P " "∃y0 . y0 ∈ Q" "∀x ∈ P. ∀y ∈ Q. BTag (0, 0) (0, x) (0, y)" shows "∃b. ∀x ∈ P. ∀y ∈ Q. BTag (0, x) (0, b) (0, y)" Proving this requires using non-trivial properties of reals, i.e., their completeness. Completeness of reals in Isabelle/HOL is formalized in the following theorem (the supremum, i.e., the least upper bound property): (∃x. x ∈ P ) ∧ (∃y. ∀x ∈ P. x < y) −→ ∃S. (∀y. (∃x ∈ P. y < x) ↔ y < S) The set P satisfies the supremum property. Indeed, since, by an assumption, P and Q do not share a common element, from the assumptions it holds that ∀x ∈ P. ∀y ∈ Q. x < y, so any element of Q is an upper bound for P . By assumptions, P and Q are non-empty, so there is an element b such that ∀x ∈ P. x ≤ b and ∀y ∈ Q. b ≤ y, so the theorem holds. 5.3

Axioms of Congruence and Betweenness.

Upper dimension axiom. Three points equidistant from two distinct points form a line. Hence any model of these axioms must have dimension less than 3. AP ∼ =t CQ ∧ P 6= Q −→ Ct (A, B, C) =t BQ ∧ CP ∼ =t AQ ∧ BP ∼ C

P A

Q

B

Segment construction axiom. ∼t CD ∃E. Bt (A, B, E) ∧ BE = The proof that our Cartesian plane models this axiom is simple and starts by transforming the points so that A becomes the origin and that B lies on the positive part of the y-axis. Then A = (0, 0) and B = (0, b), b ≥ 0. Let q d=

d2ag C D. Then E = (0, b + d).

Five segment axiom. AB ∼ =t A0 B 0 ∧ BC ∼ =t B 0 C 0 ∧ AD ∼ =t A0 D0 ∧ BD ∼ =t B 0 D0 ∧ 0 0 0 ∼ Bt (A, B, C) ∧ Bt (A , B , C ) ∧ A 6= B −→ CD =t C 0 D0 Proving that our model satisfies this axiom was rather straightforward, but it required complex calculations. To simplify the proofs, points A, B and C were transformed to the positive part of the y-axis. Since calculations involved square roots, we did not manage to use much automatisation and many small steps needed to be spelled out manually.

119

The axiom of Euclid. Bt (A, D, T ) ∧ Bt (B, D, C) ∧ A 6= D −→ (∃XY. (Bt (A, B, X) ∧ Bt (A, C, Y ) ∧ Bt (X, T, Y ))) The corresponding picture when all points are distinct is:

X

A

B D

T

C Y

6

Hilbert’s geometry

Our goal in this section is to prove that our definitions of the Cartesian plane satisfy the axioms of Hilbert’s geometry. Hilbert’s plane geometry considers points, lines, betweenness (denoted by Bh (A, B, C)) and congruence (denoted by AB ∼ =h C) as basic objects. In Hilbert original axiomatization [10] some assumptions are implied from the context. For example, if it is said ,,there exist two points”, it always means two distinct points. Without this assumption some statements do not hold (e.g. betweenness does not hold if the points are equal). 6.1

Axioms of Incidence

First two axioms are formalized by a single statement. A 6= B −→ ∃! l. A ∈h l ∧ B ∈h l The final axioms of this groups is formalized within two separate statements. ∃AB. A 6= B ∧ A ∈h l ∧ B ∈h l ∃ABC. ¬ Ch (A, B, C) The collinearity relation Ch (used in the previous statement) is defined as Ch (A, B, C) ←→ ∃l. A ∈h l ∧ B ∈h l ∧ C ∈h l. Of course, we want to show that our Cartesian plane definition satisfies these axioms. For example, this means that we need to show that

120 ag A 6= B −→ ∃l. A ∈ag H l ∧ B ∈H l.

Proofs of all these lemmas are trivial and mostly done by unfolding the definitions and then using automation (using the Gr¨obner bases methods). 6.2

Axioms of Order

Axioms of order describe properties of the (exclusive) betweenness relation. Bh (A, B, C) −→ A 6= B ∧ A 6= C ∧ B 6= C ∧ Ch (A, B, C) ∧ Bh (C, B, A) A 6= C −→ ∃B. Bh (A, C, B) A ∈h l ∧ B ∈h l ∧ C ∈h l ∧ A 6= B ∧ B 6= C ∧ A 6= C −→ (Bh (A, B, C) ∧ ¬Bh (B, C, A) ∧ ¬Bh (C, A, B)) ∨ (¬Bh (A, B, C) ∧ Bh (B, C, A) ∧ ¬Bh (C, A, B)) ∨ (¬Bh (A, B, C) ∧ ¬Bh (B, C, A) ∧ Bh (C, A, B)) ∼ag , ∈ag , and B ag satisfy these axioms are The proof that the relations = H H simple and again have been done mainly by unfolding the definitions and using automation. Axiom of Pasch. A 6= B ∧ B 6= C ∧ C 6= A ∧ Bh (A, P, B) ∧ P ∈h l ∧ ¬C ∈h l ∧ ¬A ∈h l ∧ ¬B ∈h lh −→ ∃Q. (Bh (A, Q, C) ∧ Q ∈h l) ∨ (Bh (B, Q, C) ∧ Q ∈h l) C Q

B A

P

In the original Pasch axiom there is one more assumption – points A, B and C are not collinear, so the axiom is formulated only for the central, nondegenerate case. However, in our model the statement holds trivially if they are, so we have shown that our model satisfies both the central and the degenerate case of collinear points. Note that, due to the properties of the Hilbert’s between relation, the assumptions about the distinctness of points cannot be omitted. The proof uses the standard technique. First, isometric transformations are used to translate points to the y-axis, so that A = (0, 0), B = (xB , 0) and P = (xP , 0). Let C = (xC , yC ) and Rep line coeffs l = (lA , lB , lC ). We distinguish two major cases, depending in which of the given segments requested point lies. Using the property Bh (A, P, B) it is shown that lA · yB 6= 0 and then, two C coefficient k1 = lA−l·yCB and k2 = lAl·yAB·y+l are defined. Next, it is shown that it B holds 0 < k1 < 1 or 0 < k2 < 1. Using 0 < k1 < 1, the point Q = (xQ , yQ ) is

121

determined by xQ = k1 · xC and yQ = k1 · yC , thus Bh (A, Q, C) holds. In the other case, when the second property holds, the point Q = (xq , yq ) is determined by xQ = k2 · (xC − xB ) + xB and yQ = k2 · yC , thus Bt (B, Q, C) holds. 6.3

Axioms of Congruence

The first axiom gives the possibility of constructing congruent segments on given lines. In Hilbert’s Grundlagen [10] it is formulated as follows: If A, B are two points on a line a, and A0 is a point on the same or another line a0 then it is always possible to find a point B 0 on a given side of the line a0 through A0 such that the segment AB is congruent to the segment A0 B 0 . However, in our formalization part on a given side is changed and two points are obtained (however, that is implicitly stated in the original axiom). A 6= B ∧ A ∈h l ∧ B ∈h l ∧ A0 ∈h l0 −→ ∃B 0 C 0 . B 0 ∈h l0 ∧ C 0 ∈h l0 ∧ Bh (C 0 , A0 , B 0 ) ∧ AB ∼ = h A0 C 0 =h A0 B 0 ∧ AB ∼ The proof that this axiom holds in our Cartesian model, starts with isometric transformation so that A0 becomes (0, 0) and l0 becomes the x-axes. Then, it is rather simple to find the two points on the x-axis by determining their coordinates using condition that d2ag between them and the point A0 is same as the d2ag A B. The following two axioms are proved straightforward by unfolding the corresponding definitions, and automatically performing algebraic calculations and the Gr¨ obner bases method. AB ∼ =h A00 B 00 =h A00 B 00 −→ A0 B 0 ∼ =h A0 B 0 ∧ AB ∼ 0 0 0 0 0 ∼ Bh (A, B, C) ∧ Bh (A , B , C ) ∧ AB =h A B ∧ BC ∼ = h A0 C 0 =h B 0 C 0 −→ AC ∼ Next three axioms in the Hilbert’s axiomatization are concerning the notion of angles, and we have not yet considered angles in our formalization.

6.4

Axiom of Parallels

¬P ∈h l −→ ∃! l0 . P ∈h l0 ∧ ¬(∃ P1 . P1 ∈h l ∧ P1 ∈h l0 ) The proof of this axiom consists of two parts. First, it is shown that such line exists and second, that it is unique. Showing the existence is done by finding coefficients of the line sought. Let P = (xP , yP ) and Rep line coeffsl = (lA , lB , lC ). Then coefficients of the requested line are (lA , lB , −lA ·xP −lB ·yP ). In the second part, the proof starts from the assumption that there exist two lines that satisfy the condition P ∈h l0 ∧ ¬(∃ P1 . P1 ∈h l ∧ P1 ∈h l0 ). In the proof it is shown that their coefficients are proportional and thus the lines are equal.

122

6.5

Axioms of Continuity

Axiom of Archimedes. Let A1 be any point upon a straight line between the arbitrarily chosen points A and B. Choose the points A2 , A3 , A4 , . . . so that A1 lies between A and A2 , A2 between A1 and A3 , A3 between A2 and A4 etc. Moreover, let the segments AA1 , A1 A2 , A2 A3 , A3 A4 , . . . be equal to one another. Then, among this series of points, there always exists a point An such that B lies between A and An . It is rather difficult to represent series of points in a manner as stated in the axiom and our solution was to use list. First, we define a list such that each four consecutive points are congruent and betweenness relation holds for each three consecutive points. definition congruentl l −→ length l ≥ 3 ∧ ∀i. 0 ≤ i ∧ i + 2 < length l −→ (l ! i)(l ! (i + 1)) ∼ =h (l ! (i + 1))(l ! (i + 2)) ∧ Bh ((l ! i), (l ! (i + 1)), (l ! (i + 2))) Having this, the axiom can be bit transformed, but still with the same meaning, and it states that there exists a list of points with properties mentioned above such that for at least one point A’ of the list, Bt (A, B, A0 ) holds. In Isabelle/HOL this is formalized as: Bh (A, A1 , B) −→ (∃l. congruentl(A # A1 # l) ∧ (∃i. Bh (A, B, (l ! i)))) The main idea of the proof is in the statements d2ag A A0 > d2ag A B and A A0 = t · d2ag A A1 . So, in the first part of the proof we find such t that 2 t · dag A A1 > d2ag A B holds. This is achieved by applying Archimedes’ rule for real numbers. Next, it is proved that there exists a list l such that congruentl l holds, that it is longer then t, and that it’s first two elements are A and A1 . This is done by induction on the parameter t. The basis of induction, when t = 0 trivially holds. In the induction step, the list is extended by one point such that it is congruent with the last three elements of the list and that between relation holds for the last two elements and added point. Using these conditions, coordinates of the new point are easily determined by algebraic calculations. Once constructed, the list satisfies the conditions of the axiom, what is easily showed in the final steps of the proof. The proof uses some additional lemmas which are mostly used to describe properties of the list that satisfies condition congruentl l. d2ag

7

Related work

There are a number of formalizations of fragments of various geometries within proof assistants.

123

Formalizing Tarski geometry using Coq proof assistant was done by Narboux [17]. Many geometric properties are derived, different versions of Pasch axiom, betweenness and congruence properties.The paper is concluded with the proof of existence of midpoint of a segment. Another formalization using Coq was done for projective plane geometry by Magaud, Narboux and Schreck [13, 14]. Some basic properties are derived, and the principle of duality for projective geometry. Finely the consistency of the axioms are proved in three models, both finite and infinite. In the end authors discuss the degenerate cases and choose ranks and flats to deal with them. First attempt to formalize first groups of Hilbert’s axioms and their consequences within a proof assistant was done by Dehliger, Dufourd and Schreck in intuitionistic manner in Coq [4]. The next attempt in Isabelle/Isar was done by Meikle and Fleuriot [16]. The authors argue the common believed assumption that Hilbert’s proofs are less intuitive and more rigorous. Important conclusion is that Hilbert uses many assumptions that in formalization checked by a computer could not be made and therefore had to be formally justified. Guilhot connects Dynamic Geometry Software (DGS) and formal theorem proving using Coq proof assistant in order to ease studying the Euclidean geometry for high school students [8]. Pham, Bertot and Narboux suggest a few improvements [19]. The first is to eliminate redundant axioms using a vector approach. They introduced four axioms to describe vectors and tree more to define Euclidean plane, and they introduced definitions to describe geometric concepts. Using this, geometric properties are easily proved. The second improvement is use of area method for automated theorem proving. In order to formally justify usage of the area method, Cartesian plane is constructed using geometric properties previously proved. Avigad describes the axiomatization of Euclidean geometry [1]. Authors start from the claim that Euclidean geometry describes more naturally geometry statements than some axiomatizations of geometry done recently and it’s diagrammatic approach is not so full of weaknesses as some might think. In order to prove this, the system E is introduced in which basic objects such as point, line, circle are described as literals and axioms are used to describe diagram properties from which conclusions could be made. The authors also illustrate the logical framework in which proofs can be constructed. In the work are presented some proofs of geometric properties as well as equivalence between Tarski’s system for ruler-and-compass and E. The degenerate cases are avoided by making assumptions and thus only proving general case. In [21] is proposed the minimal set of Hilbert axioms and set theory is used to model it. The main properties and theorems are carried out within this model. In many of these formalizations discussion about degenerate cases is omitted. Although, usually the general case expresses important geometry property, observing degenerate cases usually leads to conclusion about some basic properties such as transitivity or symmetry, and thus makes them equally important. Beside formalization of geometries many authors tried to formalize automated proving in geometry.

124

Gr´egoire, Pottier and Th´ery combine a modified version of Buchbergers algorithm and some reflexive techniques to get an effective procedure that automatically produces formal proofs of theorems in geometry [7]. G´enevaux, Narboux and Schreck formalize Wu’s simple method in Coq [6]. Their approach is based on verification of certificates generated by an implementation in Ocaml of a simple version of Wu’s method. Fuchs and Th´ery formalize Grassmann-Cayley algebra in Coq proof assistant [5]. The second part, more interesting in the context of this paper, presents application of the algebra on the geometry of incidence. Points, lines and there relationships are defined in form of algebra operations. Using this, theorems of Pappus and Desargues are interactively proved in Coq. Finally the authors describe the automatisation in Coq of theorem proving in geometry using this algebra. The drawback of this work is that only those statements where goal is to prove that some points are collinear can automatically be proved and that only non-degenerate cases are considered. Pottier presents programs for calculating Grobner basis, F4, GB and gbcoq and compares them [20]. A solution with certificates is proposed and this shortens the time for computation such that gbcoq, although made in Coq, becomes competitive with two others. Application of Gr¨obner basis on algebra, geometry and arithmetic are represented through three examples.

8

Conclusions and Further Work

In this paper, we have developed a formalization of Cartesian plane geometry within Isabelle/HOL. Several different definitions of the Cartesian plane were given, but it was shown that they are all equivalent. The definitions were taken from the standard textbooks. However, to express them in a formal setting of a proof assistant, much more rigour was necessary. For example, when expressing lines by equations, some textbooks mention that equations represent the line if their coefficients are “proportional”, while some other fail even to mention this. The texts usually do not mention constructions like equivalence relations and equivalence classes that underlie our formal definitions. We have formally shown that the Cartesian plane satisfies all Tarski’s axioms and most of the Hilbert’s axioms (including the continuity axiom). Proving that our Cartesian plane model satisfies all the axioms of the Hilbert’s system is left for further work (as we found the formulation of the completeness axiom and the axioms involving the derived notion of angles problematic). Our experience shows that proving that our model satisfies simple Hilbert’s axioms was easier than showing that it satisfies Tarski’s axioms. This is mostly due to the definition of the betweenness relation. Namely, Tarski’s axiom allows points connected by the betweenness relation to be equal. This gives rise to many degenerate cases that need to be considered separately, what complicates reasoning and proofs. However, Hilbert’s axioms are formulated using derived notions (e.g., angles) what posed problems for our formalization.

125

The fact that analytic geometry models geometric axioms is usually taken for granted, as a rather simple fact. However, our experience shows that, although conceptually simple, the proof of this fact requires complex computations and is very demanding for formalization. It turned out that the most significant technique used to simplify the proof was “without loss of generality reasoning” and using isometry transformations. For example, we have tried to prove the central case of the Pasch’s axiom, without applying isometry transformations first. Although it should be possible do a proof like that, the arising calculations were so difficult that we did not manage to finish such a proof. After applying isometry transformations, calculations remained non-trivial, but still, we managed to finish this proof (however, many manual interventions had to be used because even powerful tactics relying on the Gr¨obner bases did not manage to do all the algebraic simplifications automatically). From this experiment on Pasch’s axiom, we learned the significance of isometry transformations and we did not even try to prove other lemmas directly. Our formalization of the analytic geometry relies on the axioms of real numbers and properties of reals are used throughout our proofs. Many properties would hold for any numeric field (and Gr¨obner bases tactics used in our proofs would also work in that case). However, for showing the continuity axioms, we used the supremum property, not holding in an arbitrary field. In our further work, we would like to build analytic geometries without using the axioms of real numbers, i.e., define analytic geometries within Tarski’s or Hilbert’s axiomatic system. Together with the current work, this would help analyzing some model theoretic properties of geometries. For example, we want to show the categoricity of both Tarski’s and Hilbert’s axiomatic system (and prove that all models are isomorphic and equivalent to the Cartesian plane). Our present and further work also includes formalizing analytic models of non-Euclidean geometries. For example, we have given formal definitions of the Poincar´e disk (were points are points in the unit disk and lines are circle segments perpendicular to the unit circle) using the Complex numbers available in Isabelle/HOL and currently we are showing that these definitions satisfy all axioms except the parallel axiom. Finally, we want to connect our formal developments to the implementation of algebraic methods for automated deduction in geometry, making formally verified yet efficient theorem provers for geometry.

References 1. Jeremy Avigad, Edward Dean, and John Mumma. A formal system for Euclid’s Elements. Review of Symbolic Logic, 2(4):700–768, 2009. 2. Clemens Ballarin. Interpretation of locales in isabelle: Theories and proof contexts. In MKM, LNCS 4108, pp. 31–43. Springer, 2006. 3. Bruno Buchberger. Bruno Buchberger’s PHD thesis 1965: An algorithm for finding the basis elements of the residue class ring of a zero dimensional polynomial ideal. J. Symb. Comput., 41(3-4):475–511, 2006.

126 4. Christophe Dehlinger, Jean-Franois Dufourd and Pascal Schreck. Higher-Order Intuitionistic Formalization and Proofs in Hilberts Elementary Geometry. In Automated Deduction in Geometry, ADG’01, LNCS 2061, Springer. 2001. 5. Laurent Fuchs and Laurent Th´ery. A formalization of Grassmann-Cayley algebra in COQ and its application to theorem proving in projective geometry. In Automated Deduction in Geometry, ADG’10, pp. 51–67. Springer. 2011. 6. Jean-David G´enevaux, Julien Narboux, and Pascal Schreck. Formalization of Wu’s simple method in COQ. In CPP, LNCS 7086, pp. 71–86. Springer, 2011. 7. Benjamin Gr´egoire, Lo¨ıc Pottier, and Laurent Th´ery. Proof certificates for algebra and their application to automatic geometry theorem proving. In Automated Deduction in Geometry, LNCS 6301, pp. 42–59. Springer, 2011. 8. F. Guilhot. Formalisation en COQ et visualisation dun cours de g´eom´etrie pour le lyc´e. TSI 24, 11131138, 2005. 9. John Harrison. Without loss of generality. In TPHOLs, LNCS 5674, pp. 43–59. Springer, 2009. 10. David Hilbert. Grundlagen der Geometrie. Leipzig, B.G. Teubner, 1903. 11. Cezary Kaliszyk and Christian Urban. Quotients revisited for Isabelle/HOL. In SAC, pp. 1639–1644. ACM, 2011. 12. Deepak Kapur. Using Gr¨ obner bases to reason about geometry problems. Journal of Symbolic Computation, 2(4), 1986. 13. Nicolas Magaud, Julien Narboux, and Pascal Schreck. Formalizing projective plane geometry in coq. In Automated Deduction in Geometry 2008., pages 141–162. 14. Nicolas Magaud, Julien Narboux, and Pascal Schreck. A case study in formalizing projective geometry in COQ: Desargues theorem. Comput. Geom., 45(8):406–424, 2012. 15. Filip Mari´c, Ivan Petrovi´c, Danijela Petrovi´c, and Predrag Janiˇci´c. Formalization and implementation of algebraic methods in geometry. In THEDU’11, Electronic Proceedings in Theoretical Computer Science 79, pp. 63–81. 2012. 16. Laura I. Meikle and Jacques D. Fleuriot. Formalizing Hilbert’s Grundlagen in Isabelle/Isar. In TPHOLs, LNCS 2758, pp. 319–334. Springer, 2003. 17. Julien Narboux. Mechanical theorem proving in Tarski’s geometry. In Automated Deduction in Geometry, LNCS 4869, pp. 139–156. Springer, 2006. 18. Tobias Nipkow, Lawrence C. Paulson, and Markus Wenzel. Isabelle/HOL - A Proof Assistant for Higher-Order Logic, LNCS 2283. Springer, 2002. 19. Tuan-Minh Pham, Yves Bertot, and Julien Narboux. A COQ-based library for interactive and automated theorem proving in plane geometry. In ICCSA (4), LNCS 6785, pp. 368–383. Springer, 2011. 20. Lo¨ıc Pottier. Connecting Gr¨ obner bases programs with COQ to do proofs in algebra, geometry and arithmetics. CoRR, abs/1007.3615, 2010. 21. William Richter. A minimal version of Hilbert’s axioms for plane geometry. www.math.northwestern.edu/ richter/hilbert.pdf 22. W. Schwabhuser, W. Szmielew, and A. Tarski. Metamathematische Methoden in der Geometrie. Springer-Verlag, 1983. 23. Wen-Ts¨ un Wu. On the decision problem and the mechanization of theorem proving in elementary geometry. Scientia Sinica, 21, 1978.

From Tarski to Hilbert Gabriel Braun and Julien Narboux University of Strasbourg, LSIIT, CNRS, UMR 7005

Abstract. In this paper, we report on the formal proof that Hilbert’s axiom system can be derived from Tarski’s system. For this purpose we mechanized the proofs of the first twelve chapters of Schwab¨ auser, Szmielew and Tarski’s book: Metamathematische Methoden in der Geometrie. The proofs are checked formally within classical logic using the Coq proof assistant. The goal of this development is to provide clear foundations for other formalizations of geometry and implementations of decision procedures.

1

Introduction

Euclid is considered as the pioneer of the axiomatic method. In the Elements, starting from a small number of self-evident truths, called postulates or common notions, he derives by purely logical rules most of the geometrical facts that were discovered in the two or three centuries before him. But upon a closer reading of Euclid’s Elements, we find that he does not adhere as strictly as he should to the axiomatic method. Indeed, at some steps in some proofs he uses a method of “superposition of triangles”. This kind of justification cannot be derived from his set of postulates1 . In 1899, in der Grundlagen der Geometrie, Hilbert described a more formal approach and proposed a new axiom system to fill the gaps in Euclid’s system. Recently, the task consisting in mechanizing Hilbert’s Grundlagen der Geometrie has been partially achieved. A first formalization using the Coq proof assistant [2] was proposed by Christophe Dehlinger, Jean-Fran¸cois Dufourd and Pascal Schreck [3]. This first approach was realized in an intuitionist setting, and concluded that the decidability of point equality and collinearity is necessary to check Hilbert’s proofs. Another formalization using the Isabelle/Isar proof assistant [4] was performed by Jacques Fleuriot and Laura Meikle [5]. Both formalizations have concluded that, even if Hilbert has done some pioneering work about formal systems, his proofs are in fact not fully formal, in particular degenerated cases are often implicit in the presentation of Hilbert. The proofs can be made more rigorous by machine assistance. Indeed, in the different editions of die Grundlagen der Geometrie the axioms were changed, but the proofs were not always changed accordingly, this obviously resulted in some inconsistencies. The use of a proof assistant solves this problem: when an 1

Recently, Jeremy Avigad and Edward Dean and John Mumma have shown that it is possible to define a formal system to model the proofs of Euclid’s Elements [1]

128

axiom is changed it is easy to check if the proofs are still valid. In [6], Phil Scott and Jacques Fleuriot proposed a tool to write readable formalised proof-scripts that correspond to Hilbert’s prose arguments. In the early 60s, Wanda Szmielew and Alfred Tarski started the project of a treaty about the foundations of geometry based on another axiom system for geometry designed by Tarski in the 20s2 . A systematic development of Euclidean geometry was supposed to constitute the first part but the early death of Wanda Szmielew put an end to this project. Finally, Wolfram Schwabh¨auser continued the project of Wanda Szmielew and Alfred Tarski. He published the treaty in 1983 in German: Metamathematische Methoden in der Geometrie [8]. In [9], Art Quaife used a general purpose theorem prover to automate the proof of some lemmas in Tarski’s geometry, but the lemmas which can be solved using this technique are some simple lemmas which can be proved within Coq using the auto tactic. The axiom system of Tarski is quite simple and has good meta-theoretical properties. Tarski’s axiomatization has no primitive objects other than points. This allows us to change the dimension of the geometric space without changing the language of the theory (whereas in Hilbert’s system one needs the notion of ’plane‘). Some axioms provide a means to define the lower and upper dimension of the geometric space. Gupta proved the axioms independent [10], except the axiom of Pasch and the reflexivity of congruence (which remain open problems). In this paper we describe our formalization of the first twelve chapters of the book of Wolfram Schwabh¨ auser, Wanda Szmielew and Alfred Tarski in the Coq proof assistant. Then we answer an open question in [5]: Hilbert’s axioms can be derived from Tarski’s axioms and we give a mechanized proof. Alfred Tarski worked on the axiomatization and meta-mathematics of euclidean geometry from 1926 until his death in 1983. Several axiom systems were produded by Tarski and his students. In this formalization, we use the version presented in [8]. We aim at one application: the use of a proof assistant in education to teach geometry [11] This theme has already been partially addressed by the community. Fr´ed´erique Guilhot has realized a large Coq development about Euclidean geometry following a presentation suitable for use in french high-school [12] and Tuan-Minh Pham has further improved this development [13]. We have presented the formalization and implementation in the Coq proof assistant of the area decision procedure of Chou, Gao and Zhang [14–17] and of Wu’s method [18, 19]. Formalizing geometry in a proof assistant has not only the advantage of providing a very high level of confidence in the proof generated, it also permits us to insert purely geometric arguments within other kind of proofs such as, for instance, proof of correctness of programs or proofs by induction. But for the time being most of the formal developments we have cited are distinct and as they do not use the same axiomatic system, they cannot be combined. In [20], we have shown how to prove the axioms of the area method within the formalization of geometry by Guilhot and Pham. 2

These historical pieces of information are taken from the introduction of the publication by Givant in 1999 [7] of a letter from Tarski to Schwabh¨ auser (1978).

129

The goal of our mechanization is to do another step toward the merging of all these developments. We aim at providing very clear foundations for other formalizations of geometry and implementations of decision procedures. We will first describe the axiom system of Tarski, its formalization within the Coq proof assistant. As our other Coq developments about geometry are in 2D, we limit ourselves to 2-dimensional geometry. Then we give a quick overview of the formalization. To show the difficulty of the task, we will give the proof of one of the non trivial lemmas which was not proved by Tarski and his co-authors although they are used implicitly. Then we describe Hilbert’s axiom system and its formalization in Coq. Finally, we describe how we can define the concepts of Hilbert’s axiom system and prove the axioms within Tarski’s system.

2 2.1

Tarski’s Geometry Tarski’s Axiom System

Alfred Tarski worked on the axiomatization and meta-mathematics of Euclidean geometry from 1926, until his death in 1983. Several axiom systems were produced by Tarski and his students. In this section we describe the axiom system we used in the formalization. Further discussion about the history of this axiom system and the different versions can be found in [21]. The axioms can be expressed using first order logic and two predicates. Note that the original theory of Tarski assumes first order logic. Our formalization is performed in a higher order logic setting (the calculus of constructions), hence, the language allowed in the statements and proofs makes the theory more expressible. The meta-theoretical results of Tarski may not apply to our formalization. betweenness The ternary betweenness predicate β A B C informally states that B lies on the line AC between A and C. equidistance The quaternary equidistance predicate AB ≡ CD informally means that the distance from A to B is equal to the distance from C to D. Note that in Tarski’s geometry, only points are primitive objects. In particular, lines are defined by two distinct points whereas in Hilbert’s axiom system lines and planes are primitive objects. Figure 1 provides the list of axioms that we used in our formalization. The formalization of this axiom system in Coq is straightforward (Fig. 2). We use the Coq type class mechanism [22] to capture the axiom system. Internally the type class system is based on records containing types, functions and properties about them. Note that we know that this system of axioms has a model: Tuan Minh Pham has shown that these axioms can be derived from Guilhot’s development using an axiom system based on mass points [13].

130

Identity Pseudo-Transitivity Symmetry Identity Pasch Euclid

5 segments Construction Lower Dimension Upper Dimension Continuity

β A B A ⇒ (A = B) AB ≡ CD ∧ AB ≡ EF ⇒ CD ≡ EF AB ≡ BA AB ≡ CC ⇒ A = B β A P C ∧ β B Q C ⇒ ∃X, β P X B ∧ β Q X A ∃XY, β A D T ∧ β B D C ∧ A 6= D ⇒ β ABX ∧ β AC Y ∧ β X T Y AB ≡ A0 B 0 ∧ BC ≡ B 0 C 0 ∧ AD ≡ A0 D0 ∧ BD ≡ B 0 D0 ∧ β A B C ∧ β A0 B 0 C 0 ∧ A 6= B ⇒ CD ≡ C 0 D0 ∃E, β A B E ∧ BE ≡ CD ∃ABC, ¬β A B C ∧ ¬β B C A ∧ ¬β C A B AP ≡ AQ ∧ BP ≡ BQ ∧ CP ≡ CQ ∧ P 6= Q ⇒ β ABC ∨ β BC A ∨ β C AB ∀XY, (∃A, (∀xy, x ∈ X ∧ y ∈ Y ⇒ β A x y)) ⇒ ∃B, (∀xy, x ∈ X ⇒ y ∈ Y ⇒ β x B y). Fig. 1. Tarski’s axiom system.

Class Tarski := { Tpoint : Type; Bet : Tpoint -> Tpoint -> Tpoint -> Prop; Cong : Tpoint -> Tpoint -> Tpoint -> Tpoint -> Prop; between_identity : forall A B, Bet A B A -> A=B; cong_pseudo_reflexivity : forall A B : Tpoint, Cong A B B A; cong_identity : forall A B C : Tpoint, Cong A B C C -> A = B; cong_inner_transitivity : forall A B C D E F : Tpoint, Cong A B C D -> Cong A B E F -> Cong C D E F; inner_pasch : forall A B C P Q : Tpoint, Bet A P C -> Bet B Q C -> exists x, Bet P x B /\ Bet Q x A; euclid : forall A B C D T : Tpoint, Bet A D T -> Bet B D C -> AD -> exists x, exists y, Bet A B x /\ Bet A C y /\ Bet x T y; five_segments : forall A A’ B B’ C C’ D D’ : Tpoint, Cong A B A’ B’ -> Cong B C B’ C’ -> Cong A D A’ D’ -> Cong B D B’ D’ -> Bet A B C -> Bet A’ B’ C’ -> A B -> Cong C D C’ D’; segment_construction : forall A B C D : Tpoint, exists E : Tpoint, Bet A B E /\ Cong B E C D; lower_dim : exists A, exists B, exists C, ~ (Bet A B C \/ Bet B C A \/ Bet C A B); upper_dim : forall A B C P Q : Tpoint, P Q -> Cong A P A Q -> Cong B P B Q -> Cong C P C Q -> (Bet A B C \/ Bet B C A \/ Bet C A B) }

Fig. 2. Tarski’s axiom system as a Coq type class.

131

2.2

Overview of the Formalization of the Book

The formalization closely follows the book [8]. But many lemmas are used implicitly in the proofs and are not stated by the original authors. We first give a quick overview of the different notions introduced in the formal development. Then we provide as an example a proof of a lemma which was not given by the original authors. This lemma is not needed to derive Hilbert’s axioms but it is a key lemma for the part of our library about angles. The proof of this lemma represents roughly 100 lines of the 24000 lines of proof of the whole Coq development. The different concepts involved in Tarski’s geometry We followed closely the order given by Tarski to introduce the different concepts of geometry and their associated lemmas. We provide some statistics about the different chapters in Table 1. Chapter Chapter Chapter duces

2: betweeness properties 3: congruence properties 4: properties of betweeness and congruence This chapter introthe definition of the concept of collinearity:

Definition 1 (collinearity). To assert that three points A, B and C are collinear we note: Col A B C Col A B C := β A B C ∨ β A C B ∨ β B A C Chapter 5: order relation over pair of points The relation bet le between two pair of points formalizes the fact that the distance of the first pair of points is less than the distance between the second pair of points: Definition 2 (bet le). bet le A B C D := ∃y, β C y D ∧ AB ≡ Cy Chapter 6: the ternary relation out Out A B C means that A , B and C lies on the same line, but A is not between B and C: Definition 3 (out). Out P A B := A 6= P ∧ B 6= P ∧ (β P A B ∨ β P B A) Chapter 7: property of the midpoint This chapter provides a definition for midpoint but the existence of the midpoint will be proved only in Chapter 8. Definition 4 (midpoint). is midpoint M A B := β A M B ∧ AM ≡ BM

132

Chapter 8: orthogonality lemmas To work on orthogonality, Tarski introduces three relations: Definition 5 (Per). P er A B C := ∃C 0 , midpoint B C C 0 ∧ AC ≡ AC 0

A b

C′

C

×

b

b

B

Definition 6 (Perp in). P erp in X A B C D := A 6= B ∧ C 6= D ∧ Col X A B ∧ Col X C D ∧ (∀U V, Col U A B ⇒ Col V C D ⇒ P erU X V ) Finally, the relation Perp which we note ⊥: Definition 7 (Perp). AB ⊥ CD := ∃X, P erp in X A B C D Chapter 9: position of two points relatively to a line In this chapter, Tarski introduces two predicates to assert the fact that two points which do not belong to a line are either on the same side, or on both sides of the line. Definition 8 (both sides). Given a line l defined by two distinct points A and B, two points X and Y not on l, are on both sides of l is written: A X B Y X B := ∃T, Col A B T ∧ β X T Y A Y b

b

A b

B

X b

T b

Y

Definition 9 (same side). Given a line l defined by two distinct points A and B. Two points X and Y not on l, are on the same side of l is written: A XY B A

XY

B := ∃Z, A b

X Z

X Y

b

b

A b

B b

Z

B∧A

Y Z

B

133

Chapter 10: orthogonal symmetry The predicate is image allows us to assert that two points are symmetric. Given a line l defined by two distinct points A and B. Two points P and P 0 are symmetric points relatively to the line l means: Definition 10 (is image). is image P P 0 A B := (∃X, midpoint X P P 0 ∧ Col A B X) ∧ (AB ⊥ P P 0 ∨ P = P 0 )

P b

X

A

B b

r

b

P′ b

Chapter 11: properties about angles In this chapter, Tarski gives a definition on angle congruence using the similarity of triangles: Definition 11 (angle congruence). ]ABC ∼ = ]DEF := A 6= B ⇒ B 6= C ⇒ D 6= E ⇒ F 6= F ⇒  β B A A0 ∧ AA0 ≡ ED ∧      β B C C 0 ∧ CC 0 ≡ EF ∧ 0 0 0 0 β E D D0 ∧ DD0 ≡ BA ∧ ∃A , ∃C , ∃D , ∃F    β E F F 0 ∧ F F 0 ≡ BC ∧   A0 C 0 ≡ D 0 F 0 b

C′ b

F′

F b

A′ b

b

A

b

b

C B

E b

b

D

b

D′

Definition 12 (in angle). P in ]ABC := A 6= B∧C 6= B∧P 6= B∧∃X, β A X C∧(X = B∨Out B X P ) Definition 13 (angle comparison). ]ABC ≤ ]DEF := ∃P, P in ]DEF ∧ ]ABC ∼ = ]DEP Chapter 12: parallelism Tarski defines a strict parallelism over two pairs of points: Definition 14 (parallelism). AB k CD := A 6= B ∧ C 6= D ∧ ¬∃X, Col X A B ∧ Col X C D

134 Chapter

Number Number of lemmas of lines of specification Betweeness properties 16 69 Congruence properties 16 54 Properties of betweeness and congruence 19 151 Order relation over pair of points 17 88 The ternary relation out 22 103 Property of the midpoint 21 101 Orthogonality lemmas 77 191 Position of two points relatively to a line 37 145 Orthogonal symmetry 44 173 Properties about angles 187 433 Parallelism 68 163

Number of lines of proof 111 116 183 340 426 758 2412 2333 2712 10612 3560

Table 1. Statistics about the development.

A Proof Example In this section we give an example of a proof. In [8], Tarski and his co-authors proves that given two angles, one is less or equal to the other one: Theorem 1 (lea cases). ∀A B C D E F, A 6= B ⇒ C 6= B ⇒ D 6= E ⇒ F 6= E ⇒ ]ABC ≤ ]DEF ∨ ]DEF ≤ ]ABC To prove the lemma lea cases, Tarski uses implicitly the fact that given a line l, two points not on l, are either on the same side of l or on both sides. But he does not give explicitly a proof of this fact. Tarski proved that if two points are on both sides of a line, they are not on the same side (lemma l9 9 ), and if two points are on the same side, they are not on both sides (lemma l9 9 bis). To prove that two points are either on the same side of a line, or on both sides, we need to show that if two points are not on both sides of a line they are on the same side which is the reciprocal lemma of l9 9 bis. We will show the main steps necessary to prove that two points not on a given line l and not on both sides of l are on the same side: Lemma (not two sides one side). ¬Col A B X ⇒ ¬Col A B Y ⇒ ¬A

X Y

B⇒A

XY

B

Proof. The lemmas used in this proof are shown on Table 2. Step one: First we build the point PX on the line AB such that XPX ⊥ AB. The existence of PX is proved by the lemma l8 18 existence (the lemmas used in this proof are provided in Table 2).

135 Lemma 1 (l8 21). ∀ABC, A 6= B ⇒ ∃P, ∃T, AB ⊥ P A ∧ Col A B T ∧ β C T P Lemma (or bet out). ∀ABC, A 6= B ⇒ C 6= B ⇒ β A B C ∨ Out B A C ∨ ¬Col A B C Lemma (l8 18 existence3 ). ∀ABC, ¬Col A B C ⇒ ∃X, Col A B X ∧ AB ⊥ CX Lemma (perp perp col). ∀AB XY P, P 6= A ⇒ Col A B P ⇒ AB ⊥ XP ⇒ P A ⊥ Y P ⇒ Col Y X P Lemma (out one side). ∀ABXY, (¬Col A B X ∨ ¬Col A B Y ) ⇒ Out A X Y ⇒ A

XY

B

Lemma (l8 8 2). A C

∀P QABC, P

Q⇒P

AB

Q⇒P

B C

Q

Table 2. Lemmas used in the proof.

Step two: To prove that the points X and Y are on the same side of the line AB we prove the existence of a point P verifying A X B ∧ A YP B as required by P the definition of the relation “same side” (Definition 9). The key step of the proof is the lemma l8 21 which allows to build such a point P . Then we will establish that this point P verifies the expected property. To use the lemma l8 21 we need a point on the line AB different from PX . Since A 6= B, the point PX must be different from both A and B. For our proof we suppose that PX 6= A. The same proof could be done using B instead of A. Thus we can instantiate the lemma l8 21 with the points PX , A and Y : PX 6= A ⇒ ∃P, ∃T, PX A ⊥ P PX ∧ Col PX A T ∧ β Y T P b

X

b

b

A

Y

PX b b b

T P b

B

136

Step three: We can trivially prove that Y and P are located on both sides of the line AB since T is collinear with A and P x. Therefore T is collinear with A and B, and T is between P and Y which correspond exactly to the definition of the “both sides” relation (Definition 8). Thus we get: A

P Y

B

(1)

Step four: Now it remains to show that X and P are located on both sides of the line AB. First, we prove that X, P x and P are collinear using the lemma perp perp col. Second, we use the lemma or bet out applied to the three points X, PX and P to distinguish three cases: 1. β X PX P 2. Out PX X P 3. ¬Col X PX P 1. The first case gives trivially a proof of A X B since β X PX P and P Col A B PX which is the definition of the relation “both sides” (Definition 8). Since A X B and A YP B (step 3) we can conclude A X Y B using P the definition of the relation “same side” (Definition 9). 2. The second case also leads to a contradiction: The lemma out one side allows to deduce A P X B . Using out one side applied to PX A X P we have: (¬Col PX A X ∨ ¬Col PX A P ) ⇒ Out PX X P ⇒ PX

XP

A

Since PX is collinear with A and B we also get: B ⇐⇒ A B (symmetry of “same side”) XP PX Finally, we will derive the contradiction using lemma l8 8 2 : Using l8 8 2 applied to A, B, P , X and Y , we get: A

A |

P Y {z

(1)

B⇒A B⇒A } | P{zX }

X Y

(2)

B

(2)

The hypothesis ¬A X B is in contradiction with the conclusion A X B. Y Y 3. The third case leads easily to a contradiction since we proved Col X PX P . t u

3

Hilbert’s Axiom System

Hilbert’s axiom system is based on two abstract types: points and lines (as we limit ourselves to 2-dimensional geometry we do not introduce ’planes’ and the related axioms). In Coq’s syntax we have:

137 Point : Type Line : Type

We assume that the type Line is equipped with an equivalence relation EqL which denotes equality between lines: EqL : Line -> Line -> Prop EqL_Equiv : Equivalence EqL

We do not use Leibniz equality (the built-in equality of Coq), because when we will define the notion of line inside Tarski’s system, the equality will be a defined notion. Note that we do not follow closely the Hilbert’s presentation because we use an explicit definition of the equality relation. We assume that we have a relation of incidence between points and lines: Incid : Point -> Line -> Prop

We also assume that we have a relation of betweeness: BetH : Point -> Point -> Point -> Prop

Notice that contrary to the Bet relation of Tarski, the one of Hilbert implies that the points are distinct. The axioms are classified by Hilbert into five groups: Incidence, Order, Parallel, Congruence and Continuity. We formalize here only the first four groups, leaving out the continuity axiom. We provide details only when the formalization is not straightforward. 3.1

Incidence Axioms

Axiom (I 1). For every two distinct points A, B there exist a line l such that A and B are incident to l. line_existence : forall A B, AB -> exists l, Incid A l /\ Incid B l;

Axiom (I 2). For every two distinct points A, B there exist at most one line l such that A and B are incident to l. line_unicity : forall A B l m, A B -> Incid A l -> Incid B l -> Incid A m -> Incid B m -> EqL l m;

Axiom (I 3). There exist at least two points on a line. There exist at least three points that do not lie on a line. two_points_on_line : forall l, exists A, exists B, Incid B l /\ Incid A l /\ A B ColH A B C := exists l, Incid A l /\ Incid B l /\ Incid C l plan : exists A, exists B, exists C, ~ ColH A B C

138

3.2

Order Axioms

It is straightforward to formalize the axioms of order: Axiom (II 1). If a point B lies between a point A and a point C then the point A,B,C are three distinct points through a line, and B also lies between C and A. between_col : forall A B C : Point, BetH A B C -> ColH A B C between_comm : forall A B C : Point, BetH A B C -> BetH C B A

Axiom (II 2). For two distinct points A and B, there always exists at least one point C on line AB such that B lies between A and C. between_out :

forall A B : Point, A B -> exists C : Point, BetH A B C

Axiom (II 3). Of any three distinct points situated on a straight line, there is always one and only one which lies between the other two. between_only_one : forall A B C : Point, BetH A B C -> ~ BetH B C A /\ ~ BetH B A C between_one : forall A B C, AB -> AC -> BC -> ColH A B C -> BetH A B C \/ BetH B C A \/ BetH B A C

Axiom (II 4 - Pasch). Let A, B and C be three points that do not lie in a line and let a be a line (in the plane ABC) which does not meet any of the points A, B, C. If the line a passes through a point of the segment AB, it also passes through a point of the segment AC or through a point of the segment BC.

b

B

B b

a A b

a b

C

A b

C b

To give a formal definition for this axiom we need an extra definition: cut l A B := ~Incid A l /\ ~Incid B l /\ exists I, Incid I l /\ BetH A I B pasch : forall A B C l, ~ColH A B C -> ~Incid C l -> cut l A B -> cut l A C \/ cut l B C

139

3.3

Parallel Axiom

As we are in a two-dimensional setting, we follow Hilbert and say that two lines are parallel when they have no point in common. Then Euclid’s axiom states that there exists a unique line parallel to another line l passing through a given point P . Note that as the notion of parallel is strict we need to assume that P does not belong to l. Para l m := ~ exists X, Incid X l /\ Incid X m; euclid_existence : forall l P, ~ Incid P l -> exists m, Para l m; euclid_unicity : forall l P m1 m2, ~ Incid P l -> Para l m1 -> Incid P m1 -> Para l m2 -> Incid P m2 -> EqL m1 m2;

3.4

Congruence Axioms

The congruence axioms are the most difficult to formalize because Hilbert does not provide clear definitions for all the concepts occurring in the axioms. Here is the first axiom: Axiom (IV 1). If A, B are two points on a straight line a, and if A0 is a point upon the same or another straight line a0 , then, upon a given side of A0 on the straight line a0 , we can always find one and only one point B 0 so that the segment AB is congruent to the segment A0 B 0 . We indicate this relation by writing AB ≡ A0 B 0 . To formalize the notion of “on a given side”, we split the axiom into two parts: existence and uniqueness. We state the existence of a point on each side, and we state the uniqueness of this pair of points. cong_existence : forall A B l M, A B -> Incid M l -> exists A’, exists B’, Incid A’ l /\ Incid B’ l /\ BetH A’ M B’ /\ CongH M A’ A B /\ CongH M B’ A B cong_unicity : forall A B l M A’ Incid A’ l -> Incid B’ l BetH A’ M B’ -> CongH M A’ Incid A’’ l -> Incid B’’ l BetH A’’ M B’’ -> CongH M A’’ (A’ = A’’ /\ B’ = B’’) \/ (A’

B’ A’’ B’’, A B -> Incid M l -> -> A B -> CongH M B’ A B -> -> A B -> CongH M B’’ A B -> = B’’ /\ B’ = A’’)

Axiom (IV 2). If a segment AB is congruent to the segment A0 B 0 and also to the segment A00 B 00 , then the segment A0 B 0 is congruent to the segment A00 B 00 . The formalization of this axiom is straightforward: cong_pseudo_transitivity : forall A B A’ B’ A’’ B’’, CongH A B A’ B’ -> CongH A B A’’ B’’ -> CongH A’ B’ A’’ B’’

140

Note that from the last two axioms we can deduce the reflexivity of the relation ≡. Axiom (IV 3). Let AB and BC be two segments of a straight line a which have no points in common aside from the point B, and, furthermore, let A0 B 0 and B 0 C 0 be two segments of the same or of another straight line a0 having, likewise, no point other than B 0 in common. Then, if AB ≡ A0 B 0 and BC ≡ B 0 C 0 , we have AC ≡ A0 C 0 . First, we define when two segments have no common points. Note that we do not introduce a type of segments for the sake of simplicity. Definition disjoint A B C D := ~ exists P, Between_H A P B /\ Between_H C P D.

Then, we can formalize the axioms IV 3: addition: forall A B C A’ B’ C’, ColH A B C -> ColH A’ B’ C’ -> disjoint A B B C -> disjoint A’ B’ B’ C’ -> CongH A B A’ B’ -> CongH B C B’ C’ -> CongH A C A’ C’

Angle Hilbert defines an angle with two distinct half-lines emanating from a same point. The imposed condition that two half-lines be distinct excludes the null angle from the definition. Tarski defines an angle with three points. Two of them have to be different from the third which is the top of the angle. Such a definition allows null angles. For our formalization of Hilbert, we choose to differ slightly from his definition and use a triple of points. Our definition includes the null angle. Defining angles using half-lines consists in a definition involving four points and the proof that two of them are equal. It is just simpler to use only three points. Record Triple {A:Type} : build_triple {V1 V V2 Pred

Type := : A ; : A ; : A ; : V1 V /\ V2 V}.

Definition angle := build_triple Point.

Axiom (IV-4). Given an angle α, an half-line h emanating from a point O and given a point P , not on the line generated by h, there is a unique half-line h0 emanating from O, such that the angle α0 defined by (h, O, h0 ) is congruent with α and such that every point inside α0 and P are on the same side relatively to the line generated by h. To formalize this axiom we need definitions for the underlying concepts. Hilbert uses the “same side” notion to define interior points of an angle:

141

Given two half-lines h and h0 emanating from a same point, every point P on the same side of h as a point of h0 and on the same side of h0 as as a point of h is in the interior of the angle defined by h and h0 . Hilbert gives a formal definition of the relative position of two points of a line compared to a third point: ∀A O B , β A O B ⇐⇒ A and B are on both sides of O

∀A A0 O , β A A0 O ∨ β A0 A O ⇐⇒ A and A’ are on the same side of O

A′

A b

b

O b

(3)

(4)

B b

This second definition (4) allows to define the notion of half-line: given a line l, and a point O on l, all pairs of points laying on the same side of O belong to the same half-line emanating from O. outH P A B := BetH P A B \/ BetH P B A \/ (P A /\ A = B);

We define the interior of an angle as following: InAngleH a P := (exists M, BetH (V1 a) M (V2 a) /\ ((outH (V a) M P) \/ M = (V a))) \/ outH (V a) (V1 a) P \/ outH (V a) (V2 a) P;

Hilbert gives a formal definition of the relative position of two points and a line: same_side A B l := exists P, cut l A P /\ cut l B P;

Then the fourth axiom is a little bit verbose because we need to manipulate the non-degeneracy conditions for the existence of the angles and half-lines. hcong_4_existence: forall a h P, ~Incid P (line_of_hline h) -> ~ BetH (V1 a)(V a)(V2 a) -> exists h1, (P1 h) = (P1 h1) /\ (forall CondAux : P2 h1 P1 h, CongaH a (angle (P2 h) (P1 h) (P2 h1) (conj (sym_not_equal (Cond h)) CondAux)) /\ (forall M, ~ Incid M (line_of_hline h) /\ InAngleH (angle (P2 h) (P1 h) (P2 h1) (conj (sym_not_equal (Cond h)) CondAux)) M -> same_side P M (line_of_hline h)));

The uniqueness axiom requires an equality relation between half-lines4 : 4

P1 is the function to access to the first point of the half-line and P2 the second point.

142 hEq : relation Hline := fun h1 h2 => (P1 h1) = (P1 h2) /\ ((P2 h1) = (P2 h2) \/ BetH (P1 h1) (P2 h2) (P2 h1) \/ BetH (P1 h1) (P2 h1) (P2 h2)); hline_construction a (h: Hline) P (hc:Hline) H := (P1 h) = (P1 hc) /\ CongaH a (angle (P2 h) (P1 h) (P2 hc) (conj (sym_not_equal (Cond h)) H)) /\ (forall M, InAngleH (angle (P2 h) (P1 h) (P2 hc) (conj (sym_not_equal (Cond h)) H)) M -> same_side P M (line_of_hline h)); hcong_4_unicity : forall a h P h1 h2 HH1 HH2, ~Incid P (line_of_hline h) -> ~ BetH (V1 a)(V a)(V2 a) -> hline_construction a h P h1 HH1 -> hline_construction a h P h2 HH2 -> hEq h1 h2

The last axiom is easier to formalize as we already have all the required definitions: Axiom (IV 5). If the following congruences hold AB ≡ A0 B 0 , AC ≡ A0 C 0 , ]BAC ≡ ]B 0 A0 C 0 then ]ABC ≡ ]A0 B 0 C 0 cong_5 : forall A B C A’ B’ C’, forall H1 : (BA /\ CA), forall H2 : (B’A’ /\ C’A’), forall H3 : (AB /\ CB), forall H4 : (A’B’ /\ C’B’), CongH A B A’ B’ -> CongH A C A’ C’ -> CongaH (angle B A C H1) (angle B’ A’ C’ H2) -> CongaH (angle A B C H3) (angle A’ B’ C’ H4)

4

Hilbert follows from Tarski

In this section, we describe the main result of our development, which consists in a formal proof that Hilbert’s axioms can be defined and proved within Tarski’s axiom system. We prove that Tarksi’s system constitutes a model of Hilbert’s axioms (continuity axioms are excluded from this study). Encoding the concepts of Hilbert within Tarski’s geometry In this section, we describe how we can define the different concepts involved in Hilbert’s axiom system using the definition of Tarski. We also compare the definitions in the two systems when they are not equivalent. We will define the concepts of line, betweenness, out, parallel, angle. Lines: To define the concept of line within Tarski, we need the concept of two distinct points. For our formalization in Coq, we use a dependent type which consists in a record containing two elements of a given type A together with

143

a proof that they are distinct. We use a polymorphic type instead of defining directly a couple of points for a technical reason. To show that we can instantiate Hilbert type class in the context of Tarski, Coq will require that some definitions in the two corresponding type classes share the definition of this record. Record Couple {A:Type} : Type := build_couple {P1: A ; P2 : A ; Cond: P1 P2}.

Then, we can define a line by instantiating A with the type of the points to obtain a couple of points: Definition Line := @Couple Tpoint.

But, if for example we have four distinct points A, B, C and D which are collinear, the lines AB and CD are different according to Leibniz equality (the standard equality of Coq), hence we need to define our own equality on the type of lines: Definition Eq : relation Line := fun l m => forall X, Incident X l Incident X m.

We can easily show that this relation is an equivalence relation. And we also show that it is a proper morphism for the Incident predicate. Lemma eq_incident : forall A l m, Eq l m -> (Incident A l Incident A m).

Betweeness: As noted before, Hilbert’s betweenness definition differs from Tarski’s one. Hilbert define a strict betweenness which requires that the three points concerned by the relation to be different. With Tarski, this constraint does not appear. Hence we have: Definition Between_H A B C

:=

Bet A B C /\ A B /\ B C /\ A C.

Out: Here is a definition of the concept of ’out’ defined using the concepts of Hilbert: Definition outH := fun P A B => Between_H P A B \/ Between_H P B A \/ (P A /\ A = B).

We can show that it is equivalent to the concept of ’out’ of Tarski: Lemma outH_out : forall P A B, outH P A B out P A B.

Parallels: The concept of parallel lines in Tarski’s formalization includes the case where the two lines are equal, whereas it is excluded in Hilbert’s. Hence we have: Lemma Para_Par : forall A B C D, forall HAB: AB, forall HCD: CD, Para (Lin A B HAB) (Lin C D HCD) -> Par A B C D

where par denotes the concept of parallel in Tarski’s system and Para in Hilbert’s. Note that the converse is not true.

144

Angle: As noted before we define an angle by a triple of points with some side conditions. We use a polymorphic type for the same reason as for the definition of lines: Record Triple {A:Type} : build_triple {V1 V V2 Pred

Type := : A ; : A ; : A ; : V1 V /\ V2 V}.

Definition angle := build_triple Tpoint. Definition InAngleH a P := (exists M, Between_H (V1 a) M (V2 a) /\ ((outH (V a) M P) \/ M=(V a))) \/ outH (V a) (V1 a) P \/ outH (V a) (V2 a) P. Lemma in_angle_equiv : forall a P, (P (V a) /\ InAngleH a P) InAngle P (V1 a) (V a) (V2 a).

Main result Once the required concepts have been defined, we can use our large set of results describe in Sec. 2.2 to prove every axiom of Hilbert’s system. To capture our result within Coq we assume we have an instance T of the class Tarski, and we show that we have an instance of the class Hilbert: This requires 1200 lines of formal proof. From a technical point, to capture this fact in Coq, we could have built a functor from a module type to another module type. We chose the approach based on type classes, because type classes are first class citizens in Coq. Section Hilbert_to_Tarski. Context ‘{T:Tarski}. Instance Hilbert_follow_from_Tarski : Hilbert. Proof. ... (* omitted here *) Qed. End Hilbert_to_Tarski.

5

Conclusion

We have proposed the first formal proof that Hilbert’s axioms can be derived from Tarski’s axioms. This work can now serve as foundations for the many other Coq developments about geometry. The advantage of Tarski’s axioms lies in the fact that there are few axioms and most of them have been shown to be independent from the others. Moreover a large part of our proofs are independent of some axioms. For instance the axiom of Euclid is used for the first time in Chapter 12.

145

Hence, the proofs derived before this chapter are also valid in absolute geometry. In the future we plan to reconstruct the foundations of Fr´ed´erique Guilhot’s formalization of high-school geometry and of our formalizations of automated deduction methods in geometry [17, 19] using Tarski’s axioms.

Availability The full Coq development consists of more than 500 lemmas and 24000 lines of formal proof. The formal proofs and definitions with hypertext links and dynamic figures can be found at the following url: http://dpt-info.u-strasbg.fr/˜narboux/tarski.html

Acknowledgments We would like to thank our reviewers for their numerous remarks which helped improving this paper.

References 1. Avigad, J., Dean, E., Mumma, J.: A formal system for euclid’s elements. Review of Symbolic Logic 2 (2009) 700–768 2. Coq development team: The Coq Proof Assistant Reference Manual, Version 8.3. TypiCal Project. (2010) 3. Dehlinger, C., Dufourd, J.F., Schreck, P.: Higher-Order Intuitionistic Formalization and Proofs in Hilbert’s Elementary Geometry. In: ADG’00. Volume 2061 of LNAI., Springer-Verlag (2000) 306–324 4. Paulson, L.C.: The Isabelle reference manual (2006) 5. Meikle, L., Fleuriot, J.: Formalizing Hilbert’s Grundlagen in Isabelle/Isar. In: TPHOLs’03. Volume 2758 of LNCS. (2003) 319–334 6. Scott, P., Fleuriot, J.: An Investigation of Hilberts Implicit Reasoning through Proof Discovery in Idle-Time. In Schreck, P., Narboux, J., Richter-Gebert, J., eds.: Automated Deduction in Geometry. Volume 6877 of Lecture Notes in Computer Science. Springer Berlin / Heidelberg (2011) 182200 10.1007/978-3-642-25070-5 11. 7. Tarski, A., Givant, S.: Tarski’s system of geometry. The bulletin of Symbolic Logic 5(2) (June 1999) 8. Schwabh¨ auser, W., Szmielew, W., Tarski, A.: Metamathematische Methoden in der Geometrie. Springer-Verlag (1983) In german. 9. Quaife, A.: Automated development of Tarski’s geometry. Journal of Automated Reasoning 5(1) (1989) 97–118 10. Gupta, H.N.: Contributions to the axiomatic foundations of geometry. PhD thesis, University of California, Berkley (1965) 11. Narboux, J.: Toward the use of a proof assistant to teach mathematics. In: The Seventh International Conference on Technology in Mathematics Teaching (ICTMT7), Bristol, United Kingdom (2005) 12. Guilhot, F.: Formalisation en Coq et visualisation d’un cours de g´eom´etrie pour le lyc´ee. TSI 24 (2005) 1113–1138 In french.

146 13. Pham, T.M.: Description formelle de propri´et´e g´eom´etriques. PhD thesis, Universit´e de Nice - Sophia-Antipolis (2011) 14. Chou, S.C., Gao, X.S., Zhang, J.Z.: Machine Proofs in Geometry. World Scientific (1994) 15. Narboux, J.: A decision procedure for geometry in Coq. In: TPHOLs’04. Volume 3223 of LNCS., Springer-Verlag (2004) 225–240 16. Narboux, J.: Formalisation et automatisation du raisonnement g´eom´etrique en Coq. PhD thesis, Universit´e Paris Sud (September 2006) In french. 17. Janicic, P., Narboux, J., Quaresma, P.: The Area Method : a Recapitulation. Journal of Automated Reasoning 48(4) (2012) 489–532 18. Chou, S.C.: Mechanical Geometry Theorem Proving. D. Reidel Publishing Company (1988) 19. Genevaux, J.D., Narboux, J., Schreck, P.: Formalization of Wu’s simple method in Coq. In Jouannaud, J.P., Shao, Z., eds.: CPP 2011 First International Conference on Certified Programs and Proofs. Volume 7086 of LNCS., Kenting, Taiwan, Province Of China, Springer-Verlag (December 2011) 71–86 20. Pham, T.M., Bertot, Y., Narboux, J.: A Coq-based Library for Interactive and Automated Theorem Proving in Plane Geometry. In: The 11th International Conference on Computational Science and Its Applications (ICCSA 2011). Volume 6785 of LNCS., Santander, Spain, Springer-Verlag (2011) 368–383 21. Narboux, J.: Mechanical Theorem Proving in Tarski’s geometry. In Eugenio Roanes Lozano, F.B., ed.: Automated Deduction in Geometry 2006. Volume 4869 of LNCS., Pontevedra, Spain, Francisco Botana, Springer (2007) 139–156 22. Sozeau, M., Oury, N.: First-class type classes. In Mohamed, O.A., Mu˜ noz, C., Tahar, S., eds.: TPHOLs. Volume 5170 of LNCS., Springer (2008) 278–293

Towards a synthetic proof of the Polygonal Jordan Curve Theorem (Extended Abstract) Phil Scott and Jacques Fleuriot [email protected], [email protected] School of Informatics, University of Edinburgh, UK. [email protected], [email protected]

1

Introduction

The Jordan Curve Theorem effectively says that if a closed curve does not intersect itself, then it must divide its plane into an inside and an outside. The first rigorous formulation of this statement was given by Jordan in 1894 [2], but his proof was criticised eleven years later by Veblen [14]. In Veblen’s own proof, generally accepted as the first rigorous proof of the theorem, he points out that Jordan assumed without proof that the theorem held in the special case of the polygon. In his 1899 edition of the celebrated Foundations of Geometry [8], David Hilbert gave his own formulation of the special case in terms of just three primitive relations on three primitive domains: an incidence relation on points and lines; an incidence relation on points and planes; and finally, a linear ordering relation on triples of points. These primitives are sufficient to formulate the theorem, and Hilbert claimed that his axioms allowed one to prove the theorem “without much difficulty.” In 1904, Veblen gave a standalone formulation and synthetic proof of the special case based on his own axiomatic system, using similar primitives. He gave a detailed two page proof broken down into several lemmas. Even so, according to Reeken and Kanovei [9], the proof was deemed “inconclusive”. Solomon Feferman, writing after a long history of proofs of the theorem, gives caution by pointing out that the theorem “turned out to be devilishly difficult to prove even for reasonably well-behaved simple closed curves, namely those with polygonal boundary” [5]. It is little wonder that in the tenth edition of the Foundations of Geometry, Bernays had edited out the phrase “without much difficulty.” The Jordan Curve Theorem has a long history within the formal verification community. The MIZAR [3] community first began its verification in 1991, and completed the special case in 1996. The full proof was completed in 2005. In the same year, Hales completed the proof in HOL Light [6, 7]. Both proofs use the special case for polygons, though in a restricted form: in the case of the MIZAR proof, only polygons with edges parallel to axes are considered. In Hales’ proof, the polygon is restricted to lie on a grid. The formulations are algebraic

148

rather than synthetic, and so are outside the scope of Hilbert’s and Veblen’s formulations. We are currently verifying Hilbert’s Foundations of Geometry, which was the first rigorous axiomatic treatment of Euclidean geometry, and has been called the most influential work in geometry on the 20th century [1]. There have been partial attempts to formalise it, one utilising an intuitionistic approach by Dehlinger et al [4] in the Coq theorem prover [15], while our own project started from a partial formalisation by Meikle and Fleuriot [10] in the Isabelle theorem prover [11]. We have since migrated to HOL Light [7] where we have found it easier to rapidly prototype automated tools. We have reached the point where we must verify Hilbert’s formulation of the Polygonal Jordan Curve Theorem, a daunting prospect given its history. In this paper, we discuss aspects of our ongoing proof, and describe some of the representations and automated tools that have assisted us so far.

2

Formulation of the Theorem

Hilbert states the theorem under very weak geometric assumptions, before any notions of angle, distance, parallels or continuity are introduced. The only notions Hilbert had recourse to were those of incidence and the linear ordering of points. This setting rules out traditional proofs of the theorem, including the one by Hales, and therefore makes the proof particularly challenging. Indeed, we can intuitively point out that a proof of the polygonal Jordan curve theorem is effectively a means to navigate a maze whose walls are defined by a single edge, and then note that in a world in which there is no notion of distance, orientation or even a notion of what it means for a path to run parallel to an edge, our ability to navigate is likely to be significantly compromised. THEOREM 9. Every single polygon lying in a plane α separates the points of the plane α that are not on the polygonal segment of the polygon into two regions, the interior and the exterior, with the following property: If A is a point of the interior (an inner point) and B is a point of the exterior (an exterior point) then every polygonal segment that lies in α and joins A and B has at least one point in common with the polygon. On the other hand if A, A′ are two points of the interior and B, B ′ are two points of the exterior then there exist polygonal segments in α which join A with A′ and others which join B with B ′ , none of which have any point in common with the polygon. By suitable labelling of the two regions there exist lines in α that always lie entirely in the exterior of the polygon. However, there are no lines that lie entirely in the interior of the polygon. In developing a formalised proof of this theorem which appeals only to properties of incidence and linear ordering, we needed automation and representations specific to geometry theorem proving, but general enough to cover the very weak

149

axiom system in which we are working. The only axioms we can appeal to govern two incidence relations among points, lines and planes, and a betweenness relation ordering three points on a line.

3

Linear Reasoning

Much of the proof relies on reasoning about ordering, and many of the difficult case-splits occur in particular with linear orders. To help solve these linear problems, we use as our main workhorse a discovery system tailored to reasoning about incidence and which we describe elsewhere [12, 13]. In this section, we describe how we can automatically reduce the problems to a decision procedure for linear arithmetic. The reduction is justified by our formalisation of Hilbert’s sixth theorem: THEOREM 6 (generalisation of Theorem 5). Given any finite number of points on a line it is always possible to label them A, B, C, D, E,. . ., K in such a way that the point labelled B lies between A and C, D, E, . . ., K, the point labelled C lies between A, B, and D, E, K, D lies between A, B, C and E, . . ., K, etc. Besides this order of labelling there is only the reverse one that has the same property. The term “labelling” here is not a primitive in Hilbert’s theory. It is metatheoretical. So to formally verify the theorem over all possible labellings, we need to bring this notion down to the object level, and so we define an “ordering” as follows (Hilbert’s primitives and some other derived terms are given in Table 1). ordering f X ←→f (X) = {n| finite X −→ n < |X|} ∧ ∀n n′ n′′ . (finite X −→ n < |X| ∧ n′ < |X| ∧ n′′ < |X|) ∧ n < n′ ∧ n′ < n′′ −→ between (f n) (f n′ ) (f n′′ )

Primitive Meaning A online a The point A lies on the line a between A B C The point B lies between A and C ordering f X The function f orders the points of X P intriangle (A, B, C) The point P lies in the interior of △ABC. P ontriangle (A, B, C) The point P lies on the sides of △ABC. connected P Q The points P and Q can be connected by a polygonal segment. Table 1. Primitive relations

We have formalised Theorem 6 as follows: ∀X. finite X ∧ (∃a.∀P. P ∈ X −→ P online a) −→ ∃f. ordering f X

150

and from this, we obtain the corollary concerning the inverse of the “labelling”: ∀X. finite X ∧ (∃a. ∀P.P ∈ X −→ P online a) −→ ∃g. ∀A B C. A ∈ X ∧ B ∈ X ∧ C ∈ X

(1)

−→ (between A B C ←→ (g A < g B ∧ g B < g C) ∨ (g C < g B ∧ g B < g A)) ∧ ∀A B. A ∈ X ∧ B ∈ X −→ (A = B ←→ g A = g B) We have implemented a tactic which converts goals involving betweenness into goals involving linear arithmetic. The tactic takes a concrete enumerated set of points as a parameter and tries to apply it to corollary 1. To do so, it first proves that the enumerated set is collinear, using our incidence discoverer. After this, all formulas involving betweenness of points can be rewritten to inequalities, and any equations and inequations of points can be lifted into equations and inequations of the image under g. Provided that the original goal is solvable entirely by linear reasoning on the chosen set, the proof can be solved by decision procedures for linear arithmetic. We have applied this tactic routinely during our ongoing formalisation of the proof of the Polygonal Jordan Curve Theorem. Part of this proof follows Veblen’s idea of decomposing a polygon into triangles, where the argument that a polygon separates the plane into at least two regions reduces to the claim that a triangle separates the plane into at least two regions. This can be proven by showing that if a segment crosses a triangle at a single point between two of its vertices, then one of those points must lie in the interior of the triangle (see Figure 1):1 : ¬(∃a.A online a ∧ B online a ∧ C online a) ∧ ¬P ontriangle (A, B, C) ∧ ¬Q ontriangle (A, B, C) between A R B ∧ between P R Q ∧ (∀X.X ontriangle (A, B, C) ∧ between P X Q −→ R = X) −→ P intriangle (A, B, C) ∨ Q intriangle (A, B, C) The proof runs to 18 steps (excluding steps for reasoning about planes) and 3 of these use the linear ordering tactic. We start by considering the case that C lies on the line P Q. To use our linear reasoning tactic, we must first prove the following: ¬between P C Q P 6= C ∧ Q 6= C ∧ R 6= C

(2) (3)

The first condition follows because we assume that P Q intersects the triangle only once and at R. The second condition follows because we assume that P and Q are not on the triangle. 1

For space, we have omitted assumptions about all points being planar.

151

C b

b

b

b b

A b

R

Q Q

X

b

b b

R

B

P

Fig. 1. Crossing a Triangle

We now set as our goal the conclusion between C P R ∨ between C Q R, and apply our linear reasoning tactic. The tactic solves the goal, and allows us to conclude from either case that one of P or Q is inside the triangle. Next, we consider the possibility that C is not on P Q. Our plan here is to apply Pasch’s Axiom to the triangle and the line of P Q, and so obtain a point at which the line P Q exits the triangle. But to do this, we must show that the vertices A and B do not lie on the line P Q. We do this by contradiction. Supposing that one of the vertices lies on P Q, it follows that P Q is the line AB. But we know that P and Q do not lie on the triangle, so we must have: P 6= A ∧ P 6= B ∧ Q 6= A ∧ Q 6= B ∧ ¬between P A Q ∧ ¬between P B Q At this point, a contradiction must follow by linear reasoning alone, and is deduced using a tactic. We can now apply Pasch’s axiom to find a point X where the line P Q emerges from the triangle. In other words, we obtain a point X that is either between B and C or between A and C. Now we prove the following ¬between P X Q

(4)

P 6= X ∧ Q 6= X

(5)

Again, the first condition follows because we assume that P Q intersects the triangle only once. The second follows because P and Q are not on the triangle. We set as our goal the conclusion between R P X ∨ between R Q X, and then

152

apply our linear reasoning tactic. The first disjunct tells us that P is inside the triangle. The second tells us that Q is inside. This concludes all the cases of the theorem.

4

Triangle Symmetry

In our proof of the Polygonal Jordan Curve Theorem, we have found a need to exploit symmetries in the argument. Our proof of the theorem relies on triangulating a polygon, and the properties of triangles in which we are interested (indeed, the properties that we can define in the weak setting of Hilbert’s early axioms) are invariant up to any permutation of the vertices of a triangle. One way to proceed is therefore to repeat every formal proof for each symmetry. This however, is inefficient when running the proofs, and is not robust to later refactoring. This was an issue when trying to route between any two points in the exterior of a triangle. The interior of a triangle △ABC is defined as the intersection of three half-planes on the lines AB, AC and BC. Any exterior point is then defined with respect to one or more half-planes, and proving that we can navigate between these points requires reasoning carefully about the betweenness relation when applied to the relevant half-planes. There is a great deal of symmetry in the proofs, and to abstract over this, we introduced a notation to describe the position of a point relative to the three half-planes defining a triangle. For example, the line AB divides the plane into two half-planes. One halfplane contains the interior of the triangle and the other contains the exterior. We will use the notation IAB (P ) to say that the point P lies on the same side of AB as the interior of the triangle. We use the notation XAB (P ) to say that P lies on the same side as the exterior of the triangle. Finally, we use the notation SAB (P ) to say that the point P lies on on the line AB but not on the triangle’s edge. Since a triangle is defined by three lines, every point on the plane which is not on the edge of the triangle is defined by a triple. For instance, a point can be stated to lie in the interior with IAB (P ) ∧ IAC (P ) ∧ IBC (P ), which we abbreviate to IAB IAC IBC (P ). We now have the following theorems which completely characterise these triples (we use x, y, z and w to denote variables ranging over I, X , S):

153

⊢ ∀A B C. ¬(IAB xAC yBC (P ) ∧ SAB xAC yBC (P )) ⊢ ∀A B C. ¬(IAB xAC yBC (P ) ∧ XAB xAC yBC (P ))

(6) (7)

⊢ ∀A B C. ¬(SAB xAC yBC (P ) ∧ XAB xAC yBC (P )) ⊢ ∀A B C. P intriangle (A, B, C) ←→ IAB IAC IBC (P )

(8) (9)

⊢ ∀A B C. XAB XAC xBC (P ) −→ XAB XAC IBC (P ) ⊢ ∀A B C. SAB IAC xBC (P ) −→ SAB IAC XBC (P )

(10) (11)

⊢ ∀A B C. ¬SAB SAC xBC (P ) ⊢ ∀A B C. XAB xAC yBC (P ) ∧ XAB zAC wBC (Q) −→ connected P Q

(12) (13)

⊢ ∀A B C. XAB xAC yBC (P ) −→ ∃Q. connected P Q ∧ XAB XAC IBC (Q) (14) Theorems (6)–(8) are injectivity lemmas for the notation. Together with (9)– (12), they allow us to narrow down the possible triples from 27 to 13, while theorems (13) and (14) allow us to navigate from any of the 12 exterior regions to any other exterior region.

IX X

IX S

b

ISX

Q b

C

b

IX I

R

IIX b

P III

SX I b

b

B

SIX

A XXI X SI

X II

X IX X IS

Fig. 2. Regions of a Triangle

Consider the points P and R in Figure 2. The point P is notated by IAB XAC IBC (P ). We want to apply 14, but to do so we must permute the first two symbols. To do this, we can rotate the triangle clockwise and notate the

154

point by XCA ICB IAB (P ). This done, we can find a connecting point Q notated by XCA XCB IAB (P ). We apply a similar argument to R which is notated by IAB IAC XBC (P ). We first apply a reflection and notate the point by XCB ICA IBA (R). We now use 14 to find a connection point Q′ notated by XCB ICA IBA . Applying a second reflection gives us the representation XCA ICB IAB . Finally, we apply Theorem (13) to show that Q and Q′ are connected, and thus that P and R are connected by transitivity.

5

Conclusion

The Jordan Curve Theorem for polygons is challenging. When we restrict ourselves to a weak subset of Hilbert’s synthetic axioms from the Foundations of Geometry, its proof is particularly difficult, and Hilbert did not even provide an informal one. To aid our formalised proof, we need a repertoire of automated tools and convenient representations to handle the symmetries involved. We have harnessed decision procedures for arithmetic to handle linear reasoning, based on our formalisation of one of Hilbert’s theorems and a tactic we have implemented to rewrite goals. We have also formalised a succinct notation to completely abstract over the complex details of navigating around the exterior of a triangle, allowing us to push the symmetries of triangles into the symmetries of a simple notation.

References 1. Garrett Birkhoff and Mary Bennett. Hilbert’s Grundlagen der Geometrie. Rendiconti del Circolo Matematico di Palermo, 36:343–389, 1987. 2. Camille Jordan. Science and Method. Paris, Gauthier-Villars et fils, 1894. 3. N.G. de Bruijn. The Mathematical Vernacular, a language for Mathematics with typed sets. In P. Dybjer et al, editor, Proceedings from the Workshop on Programming Logic, volume 37, 1987. 4. Christophe Dehlinger, Jean-Fran¸cois Dufourd, and Pascal Schreck. Higher-Order Intuitionistic Formalization and Proofs in Hilbert’s Elementary Geometry. In Automated Deduction in Geometry: Revised Papers from the Third International Workshop on Automated Deduction in Geometry, volume 2061, pages 306–324, London, UK, 2001. Springer-Verlag. 5. Solomon Feferman. Mathematical intuition vs. mathematical monsters. Synthese, 125(3):317–332, 2000. 6. Thomas C. Hales. Jordan’s Proof of the Jordan Curve Theorem. Studies in Logic, Grammar and Rhetoric, 10(23), 2007. 7. John Harrison. HOL Light: a Tutorial Introduction. In Proceedings of the First International Conference on Formal Methods in Computer-Aided Design, volume 1166, pages 265–269. Springer-Verlag, 1996. 8. David Hilbert. Foundations of Geometry. Open Court Classics, 10th edition, 1971. 9. Vladimir Kanovei and Michael Reeken. A nonstandard proof of the Jordan curve theorem. Pacific Journal of Mathematics, 36(1):219–229, 1971.

155 10. Laura I. Meikle and Jacques D. Fleuriot. Formalizing Hilbert’s Grundlagen in Isabelle/Isar. In Theorem Proving in Higher Order Logics, volume 2758, pages 319–334. Springer, 2003. 11. Lawrence C. Paulson. Isabelle: a Generic Theorem Prover. Number 828 in Lecture Notes in Computer Science. Springer – Berlin, 1994. 12. Phil Scott and Jacques D. Fleuriot. An Investigation of Hilbert’s Implicit Reasoning through Proof Discovery in Idle-Time. In Automated Deduction in Geometry, Lecture Notes in Computer Science, pages 182–200. Springer, 2010. 13. Phil Scott and Jacques D. Fleuriot. Composable discovery engines for interactive theorem proving. In Interactive Theorem Proving, volume 6898 of Lecture Notes in Computer Science, pages 370–375. Springer, 2011. 14. Oswald Veblen. Theory on Plane Curves in Non-Metrical Analysis Situs. Transactions of the American Mathematical Society, 6(1):83–98, 1905. 15. Pierre Cast´eran Yves Bertot. Interactive Theorem Proving and Program Development. Springer, 2004.

A New Method of Automatic Geometric Theorem Proving and Discovery by Comprehensive Gr¨ obner Systems Yao Sun1,2 , Dingkang Wang1 , and Jie Zhou1? 1

KLMM, Academy of Mathematics and Systems Science, CAS, Beijing, China 2 SKLOIS, Institute of Information Engineering, CAS, Beijing, China

Abstract. In this paper, a new method is presented for proving and discovering geometric theorems automatically. Many geometric theorem can be formulated in term of parametric polynomials. This method is based on using the generalization of Rabinovitch’s trick and computing a comprehensive Gr¨ obner system (CGS) for a given parametric polynomial system. Through computing the CGS of these parametric polynomials, this method can decide whether geometric statements are true, true on component, complete false or generic false. Keywords: Rabinovitch’s trick, Comprehensive Gr¨ obner basis, Automatic theorem proving, Automatic theorem discovery.

1

Introduction

Automatic theorem proving has been studied for several decades, and it can be traced back to the excellent work of H.Gelernter, A.Tarski, Wu Wen-Ts¨ un and so on. Automatic theorem proving is the proving of mathematical theorems by a computer program (from wikipedia), and automatic theorem discovery is finding complementary conditions for a given mathematical theorems to become true [Dalzotto, Recio, 2009]. Many related works have been done on these topics, which include [Chou, 1988], [Recio and Velez, 1999], [Chen et al., 2005], [Montes and Recio, 2007], [Dalzotto, Recio, 2009]. The notations of comprehensive Gr¨obner systems (CGS) and comprehensive Gr¨ obner bases (CGB) were proposed by weispfenning in 1992 [Weispfenning, 1992]. After CGS and CGB were proposed, many algorithms have been developed for computing CGS and CGB efficiently, including [Kapur, 1995], [Kapur et al., 2010], [Kapur et al., 2011a], [Kapur et al., 2011b], [Montes, 2002], [Nabeshima, 2007], [Suzuki and Sato, 2003], [Suzuki and Sato, 2004], [Suzuki and Sato, 2006], [Weispfenning, 2003]. Chen. et al. proposed a method to prove geometric theorem mechanically by using parametric Gr¨obner bases [Chen et al., 2005]. In fact, this method also can be used for discovering geometric theorems automatically ?

The authors are supported by NKBRPC 2011CB302400, NSFC 10971217, 60970152 and 61121062.

158

[Wang and Lin, 2005]. Manuberns-Montes proposed minimal canonical comprehensive Gr¨ obner systems [Manubens and Montes, 2006], which can be used in mechanical proving [Montes and Recio, 2007]. A geometric statement contains some hypotheses and a conclusion. Typically, the hypotheses are composed of following parametric polynomials   f1 (u1 , · · · , um , x1 , · · · , xn ) = 0, ···  fs (u1 , · · · , um , x1 , · · · , xn ) = 0, and the conclusion is f (u1 , · · · , um , x1 , · · · , xn ) = 0, where {u1 , · · · , um } are parameters and {x1 , · · · , xn } are variables. In [Chen et al., 2005], a PPGB of ideal hf1 , · · · , fs , f y − 1i is computed. This PPGB can not only decide whether the geometric theorem is generic truth, but also provide complementary hypotheses for the statements to become true in some degenerate cases. Moreover, in [Manubens and Montes, 2006], by computing the MCCGS of hf1 , · · · , fs , f y − 1i and hf1 , · · · , fs , f i, it can decide whether the geometric statement is complete false. In this paper, we generalize the Rabinovitch’s trick and study the radical member, the zero divisor and invertibility about an ideal. Given an ideal I = hf1 , · · · , fs i ⊂ k[x1 , · · · , xn ] and a polynomial f ∈ k[x1 , · · · , xn ], G is a Gr¨ obner basis of ideal J = hf1 , · · · , fs , f y1 − y2 i ⊂ k[y1 , y2 , x1 , · · · , xn ] with some special order. We can decide whether f is the radical member, the zero divisor in k[x1 , · · · , xn ]/I or invertible under k[x1 , · · · , xn ]/I from the result of G. Using the above properties in geometric theorem proving, we can get the sufficient conditions for deciding whether a geometric theorem is true, component true, generic false or complete false. The main difference of our work from Montes’ [Manubens and Montes, 2006] is that we only need to compute one CGS, which will be more simple and efficient. Moreover, we can decide whether a geometric statement is true on component in some cases. In the next section, the concepts of a geometric statement is true, true on component, complete false and generic false are defined. In addition, the notations of comprehensive Gr¨ obner system are introduced. In section 3, the main results and the new method are presented. In section 4, some examples are given to illustrate the new method. Finally, section 5 summarizes this paper.

2

Preliminaries

In this section, we will give some basic results about automatic geometric theorem proving and comprehensive Gr¨obner system. 2.1

Results about automatic geometric theorem proving

First, we give some definitions about automatic geometric theorem proving.

159

Let k[X] be a polynomial ring with indeterminates X = {x1 , · · · , xn } over the algebraic closed field k. Given a geometric statement, we always assume that the hypotheses are represented by f1 = 0, · · · , fs = 0 and the conclusion is represented by f = 0. In the following, let I be the ideal generated by f1 , · · · , fs in k[X], and V = V(I) be the set of the common zeros of I. For an algebraic variety V , which has an irredundant irreducible decomposition V = V1 ∪ · · · ∪ Vs . Each Vi is called a component of V . We say the geometric statement is true if f vanishes on every point of the variety V . From the Hilbert’s Strong Nullstellensatz, we have a geometric statement is true if and only if f is a member of the radical of I. We say the geometric statement is true on component if f does not vanish on V but vanishes on some components of V . If the geometric statement is neither true nor true on component, we say the geometric statement is false. If a geometric statement is false, and further more, f does not vanish on any points of V , we say the geometric statement is complete false; otherwise, the geometric statement is generic false. We assume the readers are familiar with algebraic variety and its decomposition. Please see [Cox et al., 1997] for details. We will give three lemmas and the proofs are omitted. Lemma 1. Given a geometric statement, the hypotheses are represented by f1 = 0, · · · , fs = 0 and the conclusion is represented by f = 0. Let I be the ideal generated by f1 , · · · , fs , V = √ V(I) and V has an irredundant √ irreducible decomposition V = V1 ∪ · · · ∪ √ Vs , and I be the radical of I and I has an irredundant prime decomposition I = J1 ∩ · · · ∩ Js . Then the following assertions are equivalent: 1. The statement f = 0 is true on component. 2. f does not vanish on V , but√vanishes on some Vi . 3. f is a zero divisor in k[X]/ I. Lemma 2. Suppose that f is a √ polynomial and I is √ a zero dimension ideal in k[X], f is a zero divisor of k[X]/ I if and only if f ∈ / I and f is a zero divisor of k[X]/I. √ For an ideal I, a zero divisor of k[X]/ I must be a zero divisor of √ k[X]/I. However, a zero divisor of k[X]/I may not be a zero divisor of k[X]/ √ I. If I is radical, the zero √ divisors of k[X]/I and the zero divisors of k[X]/ I are the same, since I = I. Lemma 3. Given an ideal I = hf1 , · · · , fs i in k[X], a polynomial f ∈ k[X]. If polynomial f is invertible under k[X]/I, then f vanishes on no point of the variety V = V(f1 , · · · , fs ). Remark : If f is not invertible under k[X]/I, f must vanish on some points of the variety V = V(f1 , · · · , fs ). Given a geometric statement, f1 = 0, · · · , fs = 0 be the hypotheses, I = hf1 , · · · , fs i, and f = 0 be the conclusion. If f is a member of the radical of I,

160

√ the geometric statement is true. From lemma 1, if f is a zero divisor of k[X]/ I, the geometric statement is true on component. From lemma 3, if f is invertible under k[X]/I, then the geometric statement is complete false. In other case, the geometric statement is generic false. 2.2

Basic notations on Comprehensive Gr¨ obner System

Now, we give some notations about CGS. The following definitions are given in [Kapur et al., 2011a], and [Kapur et al., 2011b]. Let k be a field, R be the polynomial ring k[U ] in the parameters U = {u1 , · · · , um }, and R[X] be the polynomial ring over R in the variables X = {x1 , · · · , xn } and X ∩ U = ∅. Given a field L, a specialization of R is a homomorphism σ : R −→ L. In this paper, we assume L to be the algebraic closure of k, and consider the specializations induced by the elements in Lm . That is, for a ¯ ∈ Lm , the induced homomorphism σa¯ is denoted as σa¯ : f −→ f (¯ a), where f ∈ R. Every specialization σ : R −→ L extends canonically to a homomorphism σ : R[X] −→ L[X] by applying σ coefficient-wise. Next, we give the definitions of comprehensive Gr¨obner systems and minimal CGS. Definition 1. For E, N ⊂ R = k[U ], a pair (E, N ) is called a parametric constraint. A constructible set A is defined as a pair of finite sets of polynomials (E, N ) such that A = V (E) \ V (N ) where E, N are subsets of k[U ]. Definition 2. Let F be a subset of R[X], A1 , · · · , Al be algebraically constructible subsets of Lm and G1 , · · · , Gl be subsets of R[X], and S be a subset of Lm such that S ⊆ A1 ∪ · · · ∪ Al . A finite set G = {(A1 , G1 ), · · · , (Al , Gl )} is called a comprehensive Gr¨ obner system on S for F if σa¯ (Gi ) is a Gr¨ obner basis of the ideal hσa¯ (F )i ⊂ L[X] for a ¯ ∈ Ai and i = 1, · · · , l. Each (Ai , Gi ) is called a branch of G. Particularly, if S = Lm , then G is called, simply, a comprehensive Gr¨ obner system for F . Definition 3. A comprehensive Gr¨ obner system G = {(A1 , G1 ), · · ·, (Al , Gl )} on S for F is said to be minimal if for every i = 1, · · · , l, 1. Ai 6= ∅, and furthermore, for each i, j = 1 · · · l, Ai ∩ Aj = ∅ whenever i 6= j, and 2. σa¯ (Gi ) is a minimal Gr¨ obner basis of the ideal hσa¯ (F )i ⊂ L[X] for a ¯ ∈ Ai , and 3. for each g ∈ Gi , σa¯ (lc(g)) 6= 0 for any a ¯ ∈ Ai .

3 3.1

The Theory and The New Method The Theory

The Rabinovitch’s trick is an ingenious and important trick in algebraic geometry. It has been used in proving the famous Hilbert’s Nullstellensatz theorem and

161

solving radical membership problem. In the following theorem, we generalize the Rabinovitch’s trick and get some good properties. Theorem 1. Let I = hf1 , · · · , fs i = 6 h1i be an ideal in k[X] where X = {x1 , · · · , xn }, and G be a Gr¨ obner basis of the ideal J = I + hf y1 − y2 i ⊂ k[X, y1 , y2 ] w.r.t. a block order “ ≺ ” with y1  y2  X, where f ∈ k[X], y1 and y2 are two new variables different from {x1 , · · · , xn }. We have the following assertions: √ 1. f is a member of radical ideal I, if and only if there exists g in G such that lm(g) = y2m , where m is a positive integer. 2. f is a zero divisor in k[X]/I, if and only if there exists g in G such that lm(g) = xβ y2 , where xβ is a monomial in k[X] and xβ ∈ / hlm(I)i. 3. f is invertible under k[X]/I, if and only if there exists g in G, such that lm(g) = y1 . 4. G|y1 =1,y2 =0 = {g(X, 1, 0) | g(X, y1 , y2 ) ∈ G} is a Gr¨ obner basis of ideal hI, f i. √ Proof. 1. “ ⇒ ”: Since f is a member of radical ideal I, there exists a positive integer t such that f t ∈ I. Then y2t = (f y1 − (f y1 − y2 ))t = f t y1t + p(f y1 − y2 ) ∈ J, where p ∈ k[X, y1 , y2 ]. As G is a Gr¨obner basis of J, there exists g ∈ G, such that lm(g) | y2t , which indicates that lm(g) = y2m where 1 ≤ m ≤ t. “ ⇐ ”: If there exists g in G, such that lm(g) = y2m ∈ G. Assume g as follow g = cy2m + hm−1 y2m−1 + · · · + h1 y2 + h0 , where 0 6= c ∈ k and hi ∈ k[X], i = 0, · · · , m − 1. From following√Lemma 4, we know cf m ∈ I, so f m ∈ I and f is a member of radical ideal I. 2. “ ⇒ ”: If f is a zero divisor in k[X]/I, then there exists h ∈ k[X] such that h ∈ / I and f h ∈ I. Without loss of generality, we can assume such h is reduced module I, and assume lm(h) = xα . It is obvious that I = J ∩ k[X], hence h is also reduced module J. By the construction of the ideal J, we have hy2 = f hy1 − h(f y1 − y2 ) ∈ J. Combining with the fact that G is a Gr¨obner basis of J, so there exists g ∈ G such that lm(g) divides lm(h)y2 = xα y2 . Note that I = J ∩ k[X] 6= h1i, so g 6= 1. Because h is reduced module J, then we must have lm(g) = xβ y2 where xβ divides xα and xβ ∈ / hlm(I)i. “ ⇐ ”: By hypothesis, there exists g ∈ G such that lm(g) = xβ y2 . Assume g = h1 y2 + h0 , where lm(h1 ) = xβ and h0 ∈ k[X]. From lemma 4, we know h1 f ∈ I. Since lm(h1 ) = xβ ∈ / hlm(I)i, then h1 ∈ / I and f is a zero divisor in k[X]/I. 3. “ ⇒ ”: If f is invertible under k[X]/I, then there exists h ∈ k[X] such that f h − 1 ∈ I. Note that y1 − hy2 = h(f y1 − y2 ) − (f h − 1)y1 ∈ J. Since G is a Gr¨ obner basis of J, there exists g ∈ G such that lm(g) divides lm(y1 − hy2 ) = y1 . Since I = J ∩ k[X] 6= h1i, so g 6= 1 (If g = 1, then

162

1 ∈ J ∩ k[X] = I , which contradict to the condition I 6= h1i). We must have lm(g) = y1 . “ ⇐ ”: If there exists g ∈ G such that lm(g) = y1 . Assume g as follow g = cy1 + · · · + ht y2t + · · · + h1 y2 + h0 , where 0 6= c ∈ k and hi ∈ k[X], i = 0, · · · , m − 1. From lemma 4, we know c + h1 f ∈ I. So f (− hc1 ) − 1 ∈ I, that is, f is invertible under k[X]/I. 4. First, we show that hG|y1 =1,y2 =0 i ⊂ hI, f i. For each g ∈ G ⊂ J, there exist a1 , · · · , as+1 ∈ k[X, y1 , y2 ] such that g = a1 f1 + a2 f2 + · · · + as fs + as+1 (f y1 − y2 ), Now setting y1 = 1 and y2 = 0 in the above equation, we can see g|y1 =1,y2 =f ∈ hI, f i, so hG|y1 =1,y2 =0 i ⊂ hI, f i. Second, we show that G|y1 =1,y2 =0 is a Gr¨obner basis of the ideal hI, f i. For this purpose, it suffices to show that for each h ∈ hI, f i, there exists g ∈ G such that lm(g|y1 =1,y2 =0 ) | lm(h). Given 0 6= h ∈ hI, f i, there exist a1 , · · · , as+1 ∈ k[x, y1 , y2 ] such that h = a1 f1 + · · · + as fs + as+1 f. Consider the polynomial s s X X b h=( ai fi )yi +as+1 (f y1 −y2 ) = ( ai fi +as+1 f )y1 −as+1 y2 = hy1 −as+1 y2 . i=1

i=1

Clearly, we have b h ∈ J. So there exists g ∈ G such that lm(g) divides lm(b h) = lm(h)y1 . Since h ∈ hI, f i, then lm(b h) = lm(h)y1 ∈ k[X, y1 ]. – If lm(g) ∈ k[X], then lm(g) divides lm(h). Since “ ≺ ” is a block order with y1  y2  x, so g ∈ k[X]. Thus g|y1 =1,y2 =0 = g, and lm(g|y1 =1,y2 =0 ) divides lm(h). – If lm(g) ∈ / k[X], then lm(g) = xβ y1 , where xβ divides lm(h). Then lm(g|y1 =1,y2 =0 ) = xβ divides lm(h). Finally, we have proved that G|y1 =1,y2 =0 is a Gr¨obner basis of the ideal hI, f i. In above proof, we need the following lemma. Lemma 4. Let I = hf1 , · · · , fs i = 6 h1i be an ideal in k[X] where X = {x1 , · · · , xn }, and G be a Gr¨ obner basis of the ideal J = I + hf y1 − y2 i ⊂ k[X, y1 , y2 ] w.r.t. a block order “ ≺ ” with y1  y2  x, where f ∈ k[X], y1 and y2 are two new variables different from {x1 , · · · , xn }. If a polynomial g ∈ J has the following form: g = hy1 + hm y2m + hm−1 y2m−1 + · · · + h1 y2 + h0 , (1) where h, hi ∈ k[X] for i = 0, 1, · · · , m, then we have h + h1 f ∈ I and hi f i ∈ I for i 6= 1.

163

Proof. Since g ∈ J, there exist a1 , · · · , as+1 ∈ k[X, y1 , y2 ], such that g = a1 f1 + · · · + as fs + as+1 (f y1 − y2 ). By hypothesis, we have hy1 + hm y2m + hm−1 y2m−1 + · · · + h1 y2 + h0 = a1 f1 + · · · + as fs + as+1 (f y1 − y2 ). Now setting y2 = f y1 in the above equation gives hy1 + hm (f y1 )m + hm−1 (f y1 )m−1 + · · · + h1 (f y1 ) + h0 = a1 0 f1 + · · · + as 0 fs , where ai 0 ∈ k[x, y1 ] for i = 1, . . . , s. Regarding the right side of the above equation as a polynomial in k[X][y1 ] and reforming it, we obtain a1 0 f1 + · · · + as 0 fs = bk y1k + · · · + b1 y1 + bo where b0 , . . . , bk ∈ k[X]. Furthermore, each bj has an expression of the form bj = c1 f1 + · · · + cs fs for some c1 , . . . , cs ∈ k[X], so b0 , . . . , bk ∈ I. Thus, hm f m y1m + hm−1 f m−1 y1m−1 + · · · + (h + h1 f )y1 + h0 = bk y1k + · · · + b1 y1 + b0 , Comparing each coefficient of y1i for i = 0, . . . , k, we have  0, i>m  hi f i , i 6= 1 and i ≤ m , bi =  h + h1 f, i=1 so h + h1 f = b1 ∈ I, and hi f i = bi ∈ I for i 6= 1. Extending Theorem 1 into parametric ideal, we will get a more general result. In following, lm(h) is the leading monomial of h about X, Y, U , and lmX,Y (h) is the leading monomial of h about X and Y , where X = {x1 , · · · , xn }, Y = {y1 , y2 }, and U = {u1 , · · · , um }. From the definition of minimal comprehensive Gr¨ obner system, we have direct conclusions as follow. Corollary 1. Let F = {f1 , · · · , fs } be a subset of k[U, X], where U = {u1 , · · · , um } are parameters, X = {x1 , · · · , xn } are variables, and G = {(A1 , G1 ), · · · , (Al , Gl )} be a minimal CGS of J = F ∪ {f y1 − y2 } ⊂ k[U, X, y1 , y2 ] w.r.t. a block order with y1  y2  X  U , where f ∈ k[U, X], y1 and y2 are two new variables different from U ∪ X. Let L be the algebraic closure of k and σ is a specialization defined as in section 2. Then for each branch (A, G) in G, we have the following assertions: 1. σa¯ (f ) is a member of radical ideal hσa¯ (F )i, if and only if there exists g in G, such that lmX,Y (g) = y2m , where a ¯ ∈ A, 2. σa¯ (f ) is a zero divisor in L[X]/hσa¯ (F )i, if and only if there exists g in G, such that lmX,Y (g) = hy2 , where h is a monomial in k[X] and h ∈ / hlmX,Y (I)i, and a ¯ ∈ A, 3. σa¯ (f ) is invertible under L[X]/hσa¯ (F )i, if and only if there exists g in G, such that lmX,Y (g) = y1 , where a ¯ ∈ A,

164

4. σa¯ (G) |y1 =1,y2 =0 = {σa¯ (g(x, 1, 0)) | g(x, y1 , y2 ) ∈ G} is a Gr¨ obner basis of ideal hσa¯ (I), σa¯ (f )i, where lmX,Y (g) is the leading monomial of g about X and Y , where Y = {y1 , y2 }. Proof. For any a ¯ ∈ A, from the definition of minimal CGS, σa¯ (G) is the Gr¨obner basis of ideal σa¯ (J) and for any polynomial p ∈ G, σa¯ (lc(p)) 6= 0. 1. “ ⇐ ”: Suppose there exists g ∈ G such that lmX,Y (g) = y2m . Since G is the minimal CGS, so σa¯ (lc(g)) 6= 0 and lm(σa¯ (g)) = y2m . From Theorem 1, σa¯ (f ) is a member of radical ideal hσa¯ (F )i. “ ⇒ ”: If σa¯ (f ) is a member of radical ideal hσa¯ (F )i, from Theorem 1, there exists g 0 ∈ σa¯ (G) such that lm(g 0 ) = y2m . Assume g 0 = σa¯ (g), since G is minimal CGS, so σa¯ (lc(g)) 6= 0 and lmX,Y (g) = y2m . 2. The proof is similar with 1. 3. The proof is similar with 1. 4. Since σa¯ (G) is the Gr¨ obner basis of ideal σa¯ (J), from Theorem 1, it is obvious that σa¯ (G) |y1 =1,y2 =0 = {σa¯ (g(x, 1, 0)) | g(x, y1 , y2 ) ∈ G} is a Gr¨obner basis of ideal hσa¯ (I), σa¯ (f )i. Remark : From 4 of Corollary 1, we can get the CGS of ideal hI, f i, which is {(A1 , G1 |y1 =1,y2 =0 ), · · · , (Al , Gl |y1 =1,y2 =0 )}. Applying the above Corollary 1, Lemma 1, Lemma 2 and Lemma 3 into geometric theorem proving and discovery, we have the following results. Theorem 2. Given a geometric statement, the hypotheses are represented by f1 = 0, · · · , fs = 0 and the conclusion is represented by f = 0, where f1 , · · · , fs , f are polynomials in C[U, X]. Let G = {(A1 , G1 ), · · ·, (Al , Gl )} be a minimal comprehensive system of J = F ∪ {f y1 − y2 } w.r.t. a block order y1  y2  X  U where F = {f1 , · · · , fs }. Then for each branch (A, G) in G, we have the following results: 1. The geometric statement is true under the specialization of A, if and only if there exists g in G, such that lmX,Y (g) = y2m . 2. The geometric statement is complete false under the specialization of A, if and only if there exists g in G, such that lmX,Y (g) = y1 . 3. The geometric statement is generic false under the specialization of A, if there does not exist g in G, such that lmX,Y (g) = y2m or lmX,Y (g) = hy2 , or lmX,Y (g) = y1 , where h is a monomial in k[X]. 4. The geometric statement is true on component under the specialization by a ¯, if (A, G) satisfys following three conditions: (a) there exists g in G, such that lmX,Y (g) = hy2 , where h is a monomial in k[X], (b) there does not exist p in G, such that lmX,Y (p) = y2m , (c) the ideal hσa¯ (G |y1 =1,y2 =0 )i is a radical ideal or a zero dimensional ideal in L[X], where a ¯ ∈ A. where lmX,Y (g) is the leading monomial of g about X and Y , where Y = {y1 , y2 }.

165

Remark1 : For the last item of the above theorem, the condition (c) it is easy to check whether hσa¯ (G |y1 =1,y2 =0 )i is a zero dimensional ideal in L[x], since σa¯ (G) itself is a Gr¨ obner basis, but it is usually hard to check whether hσa¯ (G |y1 =1,y2 =0 )i is a radical ideal in practical problems. Remark2 : In order to decide whether a geometric statement is true on com√ ponent, from Lemma 1, we should know whether f is a zero divisor in k[X]/ I. From Theorem 1 and Theorem 2, it is easy to decide whether f is a zero divisor √ in k[X]/I. Note that, even if f is a zero f is not in I, √ divisor in k[X]/I and f may not be a zero divisor√in k[X]/ I. For example, I = hx2 , xyi, y√ is a zero divisor of k[x, y]/I and y ∈ / I, but y is not a zero divisor in k[x, y]/ I. Given a parametric ideal I in k[U, X], it is √ hard to decide whether a zero divisor in k[U, X]/I is a zero divisor in k[U, X]/ I after the parameters are specialized. From Theorem 2, we can get some sufficient conditions for deciding whether a geometric statement is true, true on component, generic false, or complete false. 3.2

The New Method

Given a geometric statement, assume the hypotheses are composed of following parametric polynomials   f1 (u1 , · · · , um , x1 , · · · , xn ) = 0, ···  fs (u1 , · · · , um , x1 , · · · , xn ) = 0, and the conclusion is f (u1 , · · · , um , x1 , · · · , xn ) = 0, where {u1 , · · · , um } are parameters and {x1 , · · · , xn } are variables. In [Chen et al., 2005], it computes the reduced partitioned parametric Gr¨obner basis(PPGB) of ideal hf1 , · · · , fs , f y − 1i. Assume G = {(C1 , G1 ), · · · , (Cs , Gs )} be the reduced PPGB. If Gi = 1, then the geometric statement is true on the constraint Ci . Using this method, besides proving the generic truth of a geometric theorem, it can give some extra conditions about the parameters to make the geometric theorem, which decided by above polynomials, become true. In [Manubens and Montes, 2006], similaring to [Chen et al., 2005], it first computes the MCCGS of hf1 , · · · , fs , f y − 1i to decide whether the geometric statement is generic true. If it is not generic true, then it computes the MCCGS ofhf1 , · · · , fs , f i. In each segment, if the Gr¨obner basis is 1, then the geometric is complete false on the constraint of this segment. Our new method is as follow: Step1. Computing a minimal CGS of J = hf1 , · · · , fs , f y1 − y2 i, return G = {(A1 , G1 ), · · · , (Al , Gl )}. Step2. For any branch (A, G) ∈ G, decide the result of the geometric statement in this branch from following:

166

1. If there exists g in G, such that lmX,Y (g) = y2m , then the geometric statement is true on this branch. 2. If there exists g in G, such that lmX,Y (g) = y1 , then the geometric statement is complete false on this branch. 3. If there does exist g in G, such that lmX,Y (g) = y2m or lmX,Y (g) = hy2 , or lmX,Y (g) = y1 , where h is a monomial in k[X], then the geometric statement is generic false under the specialization of A. 4. If (1) there exists g in G, such that lmX,Y (g) = hy2 , where h is a monomial in k[X], (2) there does not exist g in G, such that lmX,Y (g) = y2m , and (3) the ideal hσa¯ (G |y1 =1,y2 =0 )i, where a ¯ ∈ A, is a radical ideal or a zero dimensional ideal in L[X], then the geometric statement is true on component under the specialization by a ¯. Using this method, it can not only prove whether the geometric statement is true on non-degenerate case, but also can discover some degenerate cases which the geometric statement is true.

4

Examples

We use some examples to illustrate our new method of automatic geometric theorem proving and discovery. First, we give an example to illustrate the new method when the geometric statement is true in general. Example 1. ([Cox et al., 1997]) Let A, B, C, D be the vertices of a parallelogram in the plane, and the two diagonals line AD and BC intersect at a point N , as in the figure below. Show that N bisects both diagonals.(See Figure 1)

Fig. 1.

We set the coordinates of the points A, B, C, D, N as A(0, 0), B(u1 , 0), C(u2 , u3 ), D(x1 , x2 ), N (x3 , x4 ), where U = {u1 , u2 , u3 } are parameters and X =

167

{x1 , x2 , x3 , x4 } are variables. The hypotheses of the statement are expressed as: f1 f2 f3 f4

= x2 − u3 = 0, (ABkCD) = (x1 − u1 )u3 − x2 u2 = 0, (ABkCD) = x4 x1 − x3 x2 = 0, (A, N, D are collinear) = x4 (u2 − u1 ) − (x3 − u1 )u3 = 0. (B, N, C are collinear)

The conclusions to be proved is g1 = x21 − 2x1 x3 − 2x4 x2 + x22 = 0, (AN = N D) g2 = 2x3 u1 − 2x3 u2 − 2x4 u3 − u21 + u22 + u23 = 0. (BN = N C) We only prove the conclusion g1 , since the g2 is similar to it. Computing a minimal CGS of {f1 , f2 , f3 , f4 , g1 y1 −y2 } with respect to a block order y1  y2  X  U , we get: G = {(A1 , G1 ), (A2 , G2 ), (A3 , G3 ), (A4 , G4 ), (A5 , G5 ), (A6 , G6 )}, where Ai , Gi as in Table 1. Table 1. Example 1 Branch N umber

Constraints Corres. to Ai

the Gr¨ obner basis Gi

Conclusion

{y2 u1 u3 , x3 u3 + x4 u1 − x4 u2 − u1 u3 , true x1 u3 − u1 u3 − u2 u3 , 2x4 u1 u3 − u1 u23 } {2y1 x4 u22 + 2y1 x4 u23 − y1 u22 u3 − y1 u33 + y2 u3 , generic 2 {u1 = 0, u3 6= 0} x3 u3 − x4 u2 , x2 − u3 , x1 u3 − u2 u3 } f alse {u3 = 0, u1 = 0, generic 3 {x4 u2 , x2 , y1 x21 − 2y1 x1 x3 − y2 } u2 6= 0} f alse {u3 = 0, u2 = 0, generic 2 4 {x2 , x1 x4 , y2 x4 , y1 x1 − 2y1 x1 x3 − y2 } u1 = 0} f alse {u3 = 0, u1 6= 0, generic 2 5 {x4 u1 − x4 u2 , x2 , y1 x1 − 2y1 x1 x3 − y2 } u1 − u2 6= 0} f alse {u3 = 0, u2 6= 0, 2 6 {x2 , x1 x4 , y2 x4 , y1 x1 − 2y1 x1 x3 − y2 } – u1 − u2 = 0} In Table 1, the first column stands for the branch number. The second column gives the parametric constraints corresponding to algebraic constructible set Ai . The third column Gi stands for the Gr¨ obner basis of branch i. The last column stands for the conclusion of the geometric statement in corresponding branch. The notation of below Table 2,3 is same with Table 1. 1

{u1 6= 0, u3 6= 0}

For a normal parallelogram, it always has u1 6= 0, u3 6= 0, so the branch (A1 , G1 ) is non-degenerate case. In G1 , there is a polynomial g = y2 u1 u3 . From above Theorem 2, we know the conclusion is true on the corresponding parametric constraint of A1 . Note that, in branch (A6 , G6 ), although there is a polynomial y2 x4 ∈ G6 , hσa¯ (G6 |y1 =1,y2 =0 )i is not a zero dimension ideal in k[X], where a ¯ ∈ A6 . So we can not decide the conclusion in this branch from Theorem 2. For branch 2, 3, 4, and 5, from Theorem 2, we know the geometric statement is generic false on corresponding parametric constraint.

168

In order to understand a geometric statement is true on component well, we give the following visualized example. Example 2. Let points A, P, B be collinear, and the distance from A to B be twice of the distance from A to P . Show that P is the midpoint of line segment AB. (See Figure 2)

Fig. 2.

We set the coordinates of the points A, B, P as A(0, 0), B(u1 , u2 ), P (x1 , x2 ), where U = {u1 , u2 } are parameters and X = {x1 , x2 } are variables. The hypothese of the statement are expressed as: f1 = 4x21 + 4x22 − u21 − u22 = 0, (|AB| = 2|AP |) f2 = u1 x2 − u2 x1 = 0. (A, P, B are collinear) The conclusion to be proved is f = x21 + x22 − (x1 − u1 )2 − (x2 − u2 )2 = 0. It is obvious that there are two points (P and P 0 ) in plane satisfying the hypothesis, but only one (P ) is the midpoint of AB. So the conclusion is true on component under the hypothesis condition. Computing a minimal CGS of {f1 , f2 , f y1 −y2 } with respect to a block order y1  y2  X  U , we get G = {(A1 , G1 ), (A2 , G2 ), (A3 , G3 )}, where Ai , Gi as in table 2. Table 2. Example 2 Branch N umber 1 2 3

Constraints Corres. to Ai

the Gr¨ obner basis Gi

Conclusion

{2y2 x2 + y2 u2 , 4x22 u21 + 4x22 u22 − u21 u22 − u42 , true on {u2 6= 0} x1 u2 − x2 u1 , 2y1 y2 u21 + 2y1 y2 u22 + y22 , component 2 2 2 3 2y1 x2 u1 + 2y1 x2 u2 − y1 u1 u2 − y1 u2 − y2 u2 } {x2 u1 , 4x21 + 4x22 − u21 , 2y2 x1 + y2 u1 , true on {u2 = 0, u1 6= 0} component 2y1 x1 u1 − y1 u21 − y2 , 2y1 y2 u21 + y22 } {u2 = 0, u1 = 0} {x21 + x22 , y2 } true

169

In the first branch (A1 , G1 ), there is a polynomial g1 = (2x2 + u2 )y2 in G1 . Further, hσa¯ (G1 |y1 =1,y2 =0 )i is a zero dimension ideal in k[X], where a ¯ ∈ A1 . From above Theorem 2, we know the conclusion is true on component on the corresponding parametric constraint of A1 under the hypothesis condition. Note that, in previous work, it can not decide whether a geometric statement is true on component using Gr¨ obner basis method. For the second branch (A2 , G2 ), the analysis is similar to the first branch, so the conclusion is true on component on the corresponding parametric constraint of A2 . For the third branch (A3 , G3 ), there is a polynomial y2 in G3 . From above Theorem 2, we know the conclusion is true on the corresponding parametric constraint of A3 . The parametric constraint of A3 indicates that points A, P, B degenerate into one point. It is obvious that the conclusion is true in this case. In the last, we give a complicated example which the geometric statement is true on component in general. Example 3. ([Chou, 1988]) On the two sides AC and BC of triangle ABC, two square ACDE and BCF G are drawn. M is the midpoint of AB. Show that DF = 2CM . (See Figure 3)

Fig. 3.

Let A = (u1 , 0), B = (u2 , u3 ), C = (0, 0), D = (0, u1 ), F = (x1 , x2 ), M = (x3 , x4 ), where U = {u1 , u2 , u3 } are parameters and X = {x1 , x2 , x3 , x4 } are variables. The hypotheses of the statement are expressed as: f1 f2 f3 f4

= x22 + x21 − u23 − u22 = 0, (CF = BC) = u3 x2 + u2 x1 = 0, (CF ⊥BC) = 2x3 − u2 − u1 = 0, (M is the midpoint of A and B) = 2x4 − u3 = 0.

The conclusion to be proved is f = x21 + x22 − (x1 − u1 )2 − (x2 − u2 )2 = 0, (DF = 2CM ).

170

Computing a minimal CGS of {f1 , f2 , f3 , f4 , f y1 −y2 } with respect to a block order y1  y2  X  U , we get G = {(A1 , G1 ), (A2 , G2 ), (A3 , G3 ), (A4 , G4 ), (A5 , G5 )}, where Ai , Gi as in table 3. Table 3. Example 3 No.

1 2 3 4 5

Constraints Corres. to Ai

the Gr¨ obner basis Gi

Con.

{y2 x2 u22 + y2 x2 u23 − y2 u32 − y2 u2 u23 , 2x4 − u3 , true on 4y1 y2 u1 u32 + 4y1 y2 u1 u2 u23 − y22 u22 − y22 u23 , {u2 6= 0, u1 6= 0} component 2x3 − u1 − u2 , x22 u22 + x22 u23 − u42 − u22 u23 , x1 u2 + x2 u3 , 2y1 x2 u1 + 2y1 u1 u2 − y2 } {u2 = 0, u3 6= 0} {2x4 − u3 , 2x3 − u1 , x2 u3 , x21 + x22 − u23 , y2 u3 } true generic 2 2 {u3 = 0, u2 = 0, u1 6= 0} {x4 , 2x3 − u1 , x1 + x2 , 2y1 x2 u1 − y2 } f alse {u3 = 0, u2 = 0, u1 = 0} {x4 , x3 , x21 + x22 , y2 } true {2x4 − u3 , 2x3 − u2 , x1 u2 + x2 u3 , y2 , {u1 = 0, u2 6= 0} true x22 u22 + x22 u23 − u42 − u22 u23 }

In the first branch (A1 , G1 ), there is a polynomial g1 = (x2 u22 + x2 u23 − u32 − u2 u23 )y2 in G1 . Further, hσa¯ (G1 |y1 =1,y2 =0 )i is a zero dimension ideal in k[X], where a ¯ ∈ A1 . From Theorem 2, we know the conclusion is true on component on the corresponding parametric constraint of A1 . For a normal triangle, it always has u1 6= 0, u3 6= 0, so the branches (A2 , G2 ), (A3 , G3 ), (A4 , G4 ), and (A5 , G5 ) are degenerate cases. For the second branch (A2 , G2 ), there is a polynomial p1 = y2 u3 . From Theorem 2, we know the conclusion is true on the corresponding parametric constraint of A2 . For branch (A3 , G3 ), it is easy to know the conclusion is generic false on the corresponding parametric constraint of A4 . For branches (A4 , G4 ), (A5 , G5 ), there is a polynomial p2 = y2 . So the conclusion is true on the corresponding parametric constraint of A4 or A5 under the hypothesis condition.

5

Conclusion

In this paper, we generalize the Rabinovitch’s trick to decide whether a polynomial is radical membership, zero divisor or invertible about an ideal. Using the Rabinovitch’s trick and the properties of comprehensive Gr¨obner system in automatic geometric theorem proving, we can decide whether a geometric statement is true, true on component, generic false or complete false on non-degenerate case. What’s more, from the result of CGS, we can discover some degenerate cases, which the geometric statement determined by hypothesis polynomials and conclusion polynomial, are true, true on component, generic false or complete false. However, using this method, we only decide whether a geometric statement is true on component in some cases, there are many work need to do.

171

In order to decide whether a geometric statement is true on component, we √ should know whether f is a zero divisor in k[X]/ I. Given a parametric ideal I in k[U, X], √ how to decide whether a zero divisor in k[U, X]/I is a zero divisor in k[U, X]/ I after the parameters are specialized? We have solved this problem when I is radical or zero dimensional after specialization. For other cases, the problem still remains open. This is what we will investigate in the future. If the problem is solved, we can get the necessary and sufficient conditions to decide whether a geometric statement is true, true on component, generic false or complete false. Acknowledgement: We would like to thank Professor Deepak Kapur for helpful discussions.

References Chen et al., 2005. Chen,X.F., Li,P., Lin, L., Wang,D.K: Proving geometric theorems by partitioned-parametric Gr¨ obner bases. In: Hong,H., Wang,D.(eds.) ADG2004. LNCS(LNAI), vol.3763, Springer, Heidelberg,33-44 (2005). Chou, 1988. Chou,S-C.: Mechanical Geometry Theorem Proving. Mathematics and its Application, D.Reidel Publ.Comp (1988). Cox et al., 1997. Cox,D., Little,J., O’Shea,D.: Ideal, Varieties, and Algorithems. Second Edition, Springer-Verlag, New York (1997). Dalzotto, Recio, 2009. Dalzotto,G., Recio,T.: On protocols for the automated discovery of theorems in elementary geometry. J.Automated Reasoning (2009). Kapur, 1995. Kapur, D.: An approach for solving systems of parametric polynomial equations. Principles and Practice of Constraint Programming (eds. Saraswat and Van Hentenryck). MIT Press, Cambridge (1995). Kapur et al., 2010. Kapur, D., Sun, Y., and Wang, D.K.: A new algorithm for computing comprehensive Gr¨ obner systems. In Proceedings of ISSAC’2010, ACM Press, New York, 29–36 (2010). Kapur et al., 2011a. Kapur,.D., Y. Sun and D.K. Wang.: An efficient algorithm for computing a comprehensive Gr¨ obner system of a parametric polynomial system. J. Symb. Comput 2011(in press). Kapur et al., 2011b. Kapur, D., Sun, Y., and Wang, D.K.:. Computing Comprehensive Gr¨ obner Systems and Comprehensive Gr¨ obner Bases Simultaneously. Proceedings of ISSAC 2011, 193–200. June 8–11, San Jose, USA (2011). Montes, 2002. Montes,A.: New Algorithm for Discussing Gr¨ obner Bases with Parameters. J. Symb. Comput., 33(1-2), 183–208 (2002). Manubens and Montes, 2006. Manubens,M., Montes,A.:Minimal Canomical Comprehensive Groebner system. J. Symb. Comput., vol.44, 463–478 (2006). Montes and Recio, 2007. Montes, A. and Recio, T.: Automatic discovery of geometry theorems using minimal canonical comprehensive Gr¨ obner systems. In Proceeding of Automated Deduction in Geometry (ADG) 2006, Lecture Notes in Artificial Intelligence, Springer, Berlin, Heidelberg, vol. 4869, 113–138 (2007). Nabeshima, 2007. Nabeshima, K.: A speed-up of the algorithm for computing comprehensive Gr¨ obner systems. In Proceedings of ISSAC’2007, ACM Press, New York, 299–306, (2007). Recio and Velez, 1999. Recio.T, Velez.M: Automatic Discovery of Theorems in Elementary Geometry. J.Automat.Reason.23,63–82 (1999).

172 Suzuki and Sato, 2003. Suzuki, A. and Sato, Y.: An alternative approach to Comprehensive Gr¨ obner bases. J. Symb. Comp., vol. 36, no. 3–4, 649-667 (2003). Suzuki and Sato, 2004. Suzuki, A. and Sato, Y.: Comprehensive Gr¨ obner bases via ACGB. In Tran, Q-N.,editor, ACA2004, 65–73 (2004). Suzuki and Sato, 2006. Suzuki, A. and Sato, Y.: A simple algorithm to compute comprehensive Gr¨ obner bases using Gr¨ obner bases. In Proceedings of ISSAC’2006, ACM Press, New York, 326–331 (2006). Wang and Lin, 2005. Wang, D.K. and Lin, L.: Automatic discovery of geometric theorem by computing Gr¨ obner bases with parameters. In Abstracts of Presentations of ACA2005, Japan. 32 (2005) Weispfenning, 1992. Weispfenning, V.: Comprehensive Gr¨ obner bases. J. Symb. Comp., vol. 14, no. 1, 1–29 (1992). Weispfenning, 2003. Weispfenning, V.: Canonical comprehensive Gr¨ obner bases. J. Symb. Comp., vol. 36, no. 3–4, 669–683 (2003).

Extending the Descartes Circle Theorem for Steiner n-cycles ⋆ Shuichi Moritsugu University of Tsukuba, Tsukuba 305-8550, Ibaraki, JAPAN [email protected]

Abstract. This paper describes the extension of the Descartes circle theorem for Steiner n-cycles. Instead of inversion method, we compute the Gr¨ obner bases or resultants for the equations of inscribed or circumscribed circles. As a result, we deduced several relations that could be called the Descartes circle theorem for n ≥ 4. We succeeded in computing the defining polynomials of circumradius with degrees 4, 24, and 48, for n = 4, 5, and 6, respectively.

1

Introduction

Given a circle O with radius R, and a circle I with radius r in the interior of O, if there exists a closed chain of n mutually tangent circles with radii r1 , . . . , rn between O(R) and I(r), it is called a Steiner n-cycle or a Steiner chain. For example, Fig. 1 shows the case for n = 4. The purpose of this paper is to find unknown identities among radii R, r, and ri ’s for a Steiner n-cycle when n ≥ 4, extending the Descartes circle theorem well-known for n = 3. Namely, we consider the following problem. Problem 1 Given the radii r1 , r2 , . . . , rn in a Steiner n-cycle, compute the radii R and r, or compute the relations among R, r, and ri ’s. The classical proofs are given to the formulae for Steiner chains using inversion of circles [2][3][4]. In contrast, we tried to find new formulae for a Steiner ncycle (n ≥ 4) by coordinates computation, instead of inversion methods. Hence, we applied Gr¨obner basis or resultant methods to the equations of circles that touch mutually. Consequently, we succeeded in computing the defining polynomial ϕn (R, ri ) of radius R for n = 4, 5, 6. Anther direction of extension to m-dimensional Euclidean spaces [8][10][6] have been studied, for example, Soddy’s hexlet in 3-dimensional case. However, it seems that formulae for n ≥ 4 in 2-dimensional plane have been seldom discussed before. Hence, we believe that our results contain some relations that are unknown so far. ⋆

This work was supported by a Grant-in-Aid for Scientific Research (22500004) from the Japan Society for the Promotion of Science (JSPS).

174

Fig. 1. a Steiner n-cycle (n = 4)

2

Previously known results

2.1

Descartes Circle Theorem

Problem 1 for the case n = 3 was solved by Apollonius of Perga in the third century B.C., and the following formulae are nowadays called Descartes circle theorem, based on his letters of 1643: µ ¶ µ ¶2 1 1 1 1 1 1 1 1 2 , (1) + 2+ 2+ 2 = + + − R2 r1 r2 r3 r1 r2 r3 R ¶ µ ¶2 µ 1 1 1 1 1 1 1 1 = + + . (2) + + + + 2 r2 r12 r22 r32 r1 r2 r3 r In these equations, we let the reciprocal of each radius be the curvature of each circle, that is, we put K = 1/R, κ = 1/r, κ1 = 1/r1 , κ2 = 1/r2 , and κ3 = 1/r3 . Then, Equations (1)(2) are expressed as follows: K 2 + 2 (κ1 + κ2 + κ3 ) K + κ21 + κ22 + κ23 − 2 (κ1 κ2 + κ2 κ3 + κ3 κ1 ) = 0,

(3)

κ2 − 2 (κ1 + κ2 + κ3 ) κ + κ21 + κ22 + κ23 − 2 (κ1 κ2 + κ2 κ3 + κ3 κ1 ) = 0.

(4)

In the setting of this paper, we note that κ1 , κ2 , κ3 are given and K, κ are unknown. If we solve Equations (3)(4) with K, κ and adopt suitable solutions, we obtain √ K = − (κ1 + κ2 + κ3 ) + 2 κ1 κ2 + κ2 κ3 + κ3 κ1 , (5)

175

√ κ = (κ1 + κ2 + κ3 ) + 2 κ1 κ2 + κ2 κ3 + κ3 κ1 ,

(6)

which are called Steiner’s formulae. Straightforwardly, computing κ − K = 2 (κ1 + κ2 + κ3 ), we obtain the identity µ ¶ 1 1 1 1 1 1 . (7) + + = − r1 r2 r3 2 r R If we transform Equations (3)(4) into polynomials in R and r, we have (r12 r22 + r22 r32 + r32 r12 − 2r1 r2 r3 (r1 + r2 + r3 ))R2 +2r1 r2 r3 (r1 r2 + r2 r3 + r3 r1 )R + r12 r22 r32 = 0,

(8)

(r12 r22 + r22 r32 + r32 r12 − 2r1 r2 r3 (r1 + r2 + r3 ))r2 −2r1 r2 r3 (r1 r2 + r2 r3 + r3 r1 )r + r12 r22 r32 = 0.

(9)

In the following, we let the polynomial in each left hand side of Equations (3) (4) (8) (9), respectively, be Φ3 (K, κ1 , κ2 , κ3 ), Ψ3 (κ, κ1 , κ2 , κ3 ), ϕ3 (R, r1 , r2 , r3 ), and ψ3 (r, r1 , r2 , r3 ). We should note that these polynomials satisfy Ψ3 (κ, κi ) = Φ3 (−κ, κi ) and ψ3 (r, ri ) = ϕ3 (−r, ri ). Therefore, the objective of this paper is to compute and clarify the polynomials ϕn (R, r1 , . . . , rn ) and Φn (K, κ1 , . . . , κn ) for n ≥ 4, using the relations among coordinates and radii of the circles. 2.2

Steiner’s porism

We assume that a circle O(R) and a circle I(r) in its interior are given and we let the distance d between their centers. If there exists a closed chain of n mutually tangent circles that form a Steiner n-cycle, we have the following relation: π (R − r)2 − 4Rr tan2 = d2 . (10) n It is well-known that if this closed chain exists once, it will always happen, whatever be the position of the first circle of the chain. For example, Equation (10) for n = 3, 4 are written as follows: (R − r)2 − 12Rr = d2 , 2

2

(R − r) − 4Rr = d .

(11) (12)

For the case n = 4, it seems unknown whether any identities correspondent to Descartes circle theorem (1)(2) exist. Instead, the following relation that corresponds to Equation (7) is well-known: 1 1 1 1 1 1 + = + = − . r1 r3 r2 r4 r R

(13)

Moreover, this can be extended to the cases for general even number n(= 2k), 1 1 1 1 1 1 4(R − r) . + = + = ··· = + = r1 rk+1 r2 rk+2 rk r2k (R − r)2 − d2

(14)

When n = 4, if we apply Equation (12) to the above, Equation (13) is obtained. When n(≥ 5) is odd, relations equivalent to Equation (7) seem to be unknown.

176

3 3.1

Computation by Gr¨ obner bases Formalization

We try to derive the identities shown in the previous section, by computing the Gr¨obner basis from the equations of circles and their tangent conditions [1]. First, we assume that circles O(R) : x2 + y 2 = R2 and I(r) : x2 + (y − d)2 = r2 are given. Next, we draw the inner circles x2i + yi2 = ri2 (i = 1, . . . , n) touching one another successively. The circumscribing or inscribing relation is translated into the distance of the centers of each pair of circles: fi := x2i + yi2 − (R − ri )2 ,

(15)

gi := x2i + (yi − d)2 − (r + ri )2 ,

(16)

hi := (xi+1 − xi )2 + (yi+1 − yi )2 − (ri+1 + ri )2 ,

(17)

for i = 1, . . . , n, where we read xn+1 = x1 , yn+1 = y1 , and rn+1 = r1 . Note that these polynomial representations contain both the cases where the two circles are tangent internally and externally. 3.2

Computation for n = 3

We compute the Gr¨obner basis for the ideal {fi , gi , hi } using Maple14. We apply “lexdeg” group ordering in Maple Gr¨obner package so that the variables are eliminated in appropriate order. We note that Equations (1)(2) in Descartes circle theorem are independently computed. Hence, we consider the following three polynomial ideals using each monomial ordering. (i) JR = (f1 , f2 , f3 , h1 , h2 , h3 ) , [x1 , x2 , x3 , y1 , y2 , y3 ] ≻ [R, r1 , r2 , r3 ] Its Gr¨obner basis contains a polynomial ϕ3 (R, r1 , r2 , r3 ) which appears in Equation (8). (ii) Jr = (g1 , g2 , g3 , h1 , h2 , h3 ) , [x1 , x2 , x3 , y1 , y2 , y3 , d] ≻ [r, r1 , r2 , r3 ] Its Gr¨obner basis contains a polynomial ψ3 (r, r1 , r2 , r3 ) which appears in Equation (9). (iii) J = (f1 , f2 , f3 , g1 , g2 , g3 , h1 , h2 , h3 ) , [x1 , x2 , x3 , y1 , y2 , y3 , r1 , r2 , r3 ] ≻ [r, R, d] Its Gr¨obner basis contains a polynomial which is divisible by R2 − 14Rr + r2 − d2 in Equation (11). These results show that Descartes circle theorem and Steiner’s porism for n = 3 are confirmed by Gr¨obner basis computation. Here we have ψ3 (r, r1 , r2 , r3 ) = ϕ3 (−r, r1 , r2 , r3 ) as stated before. This relation is obvious from the fact that polynomials gi in Equation (16) have the same forms as fi in Equation (15) if we substitute yi′ = yi − d, r′ = −r. Under these substitutions, polynomials hi in Equation (17) remain the same. Therefore, we need only to compute ϕn (R, ri ) considering the ideal JR = (fi , hi ) for n ≥ 4 hereafter.

177

3.3

Computation for n = 4

Computing the ideal J = (f1 , f2 , f3 , f4 , g1 , g2 , g3 , g4 , h1 , h2 , h3 , h4 ) gives several relations such as R2 − 6Rr + r2 − d2 in Equation (12), r2 r3 r4 + r1 r2 r4 − r1 r3 r4 − r1 r2 r3 in Equation (13) by the polynomials in the Gr¨obner basis and their factors. We omit the details here, and focus on the computation of ϕ4 (R, r1 , r2 , r3 , r4 ). Letting JR = (f1 , f2 , f3 , f4 , h1 , h2 , h3 , h4 ), we compute its Gr¨obner basis using the ordering [x1 , x2 , x3 , x4 , y1 , y2 , y3 , y4 ] ≻ [R, r1 , r2 , r3 , r4 ]. Then, the basis contains a polynomial of the form R2 (r2 − r4 )(r1 − r3 ) × ϕ4 (R, ri ), where ϕ4 (R, ri ) = ((r1 r2 − r2 r3 + r3 r4 − r4 r1 )2 − 16r1 r2 r3 r4 )R4 +16(r1 + r2 + r3 + r4 )r1 r2 r3 r4 R3 −8(2r1 r3 + 2r2 r4 + r1 r2 + r2 r3 + r3 r4 + r4 r1 )r1 r2 r3 r4 R2 +16r12 r22 r32 r42 = 0.

(18)

If we let ψ4 (r, ri ) = ϕ4 (−r, ri ), then, quartic equations ϕ4 (R, ri ) = 0 and ψ4 (r, ri ) = 0 could be equivalent to ϕ3 (R, ri ) = 0 and ψ3 (r, ri ) = 0 in Equations (8)(9), and we investigate them in the following subsection. 3.4

Discussion on the formulae for n = 4

First, we transform the equations ϕ4 (R, ri ) = 0 and ψ4 (r, ri ) = 0 into such equations with K, κ, and κi , substituting K = 1/R, κ = 1/r, and κi = 1/ri . Then we have polynomial relations among the curvatures: Φ4 (K, κi ) = 16K 4 − 8 (2κ1 κ3 + 2κ2 κ4 + κ1 κ2 + κ2 κ3 + κ3 κ4 + κ4 κ1 ) K 2 +16 (κ1 κ2 κ3 + κ1 κ2 κ4 + κ1 κ3 κ4 + κ2 κ3 κ4 ) K 2

+ (κ1 κ2 − κ2 κ3 + κ3 κ4 − κ4 κ1 ) − 16κ1 κ2 κ3 κ4 = 0,

(19)

Ψ4 (κ, κi ) = 16κ4 − 8 (2κ1 κ3 + 2κ2 κ4 + κ1 κ2 + κ2 κ3 + κ3 κ4 + κ4 κ1 ) κ2 −16 (κ1 κ2 κ3 + κ1 κ2 κ4 + κ1 κ3 κ4 + κ2 κ3 κ4 ) κ 2

+ (κ1 κ2 − κ2 κ3 + κ3 κ4 − κ4 κ1 ) − 16κ1 κ2 κ3 κ4 = 0.

(20)

Second, we eliminate, for example, κ4 in Equations (19)(20), because we have κ1 + κ3 = κ2 + κ4 from Equation (13). If we substitute κ4 = κ1 + κ3 − κ2 into Φ4 (K, κi ) and Ψ4 (κ, κi ), we obtain (2K−(κ1 +κ3 ))2 (4K 2 +4(κ1 +κ3 )K+κ21 +4κ22 +κ23 −2(2κ1 κ2 +2κ2 κ3 +κ3 κ1 )) = 0, (21) (2k +(κ1 +κ3 ))2 (4k 2 −4(κ1 +κ3 )k +κ21 +4κ22 +κ23 −2(2κ1 κ2 +2κ2 κ3 +κ3 κ1 )) = 0. (22)

178

Since κ = −(κ1 + κ3 )/2 (< 0) is a spurious solution, essential parts of these equations are given by 4K 2 + 4(κ1 + κ3 )K + κ21 + 4κ22 + κ23 − 2(2κ1 κ2 + 2κ2 κ3 + κ3 κ1 ) = 0,

(23)

4k 2 − 4(κ1 + κ3 )k + κ21 + 4κ22 + κ23 − 2(2κ1 κ2 + 2κ2 κ3 + κ3 κ1 ) = 0,

(24)

which correspond to Equations (3)(4) in the case n = 3. Finally, if we solve Equations (23)(24) with K, κ and adopt suitable solutions, we obtain q κ1 + κ3 + κ1 κ2 + κ2 κ3 + κ3 κ1 − κ22 , K=− (25) 2 q κ1 + κ3 + κ1 κ2 + κ2 κ3 + κ3 κ1 − κ22 , (26) k= 2 where κ − K = κ1 + κ3 satisfies Equation (13). These results are rather simple but do not seem to have been explicitly introduced before. Hence, we could call Equations (25)(26) Steiner’s formulae in the case n = 4, correspondently to Equations (5)(6) in the case n = 3. Example 1 We let r1 = r2 = r3 = 1, then, we have r4 =©1. Equations (23)(24) √ √ ª give such solutions, if we write them in the radii, as R = 1 − 2, 1 + 2 and √ ª √ √ © r = −1 − 2, −1 + 2 . Therefore, we have the solutions R = 1 + 2 and √ r = −1 + 2, which forms a congruent Steiner 4-cycle. Example 2 Assume that we are given r1 = 3, r2 = 2, r3 = 1. Then we have r4 = 6/5 by Equation (13). If we solve Equations (23)(24) and compute their reciprocals, we have R = {−0.6524, 5.0161} and r = {−5.0161, 0.6524}. Therefore, we have the solutions R = 5.0161 and r = 0.6524. Remark 1 The above Example 2 is the problem solved by Zen Hodoji, a mathematician in the 19th century in Japan [5][9]. After getting r4 = 1.2, he solved the following equation: © ª (r4 − r2 )2 r1 2 − 4(r2 + r4 )r1 r2 r4 + 4r2 2 r4 2 R2 +4(r2 + r4 )r1 2 r2 r4 R + 4r1 2 r2 2 r4 2 = 0,

(27)

which gives R = {−0.6524, 5.0161}. Namely, Equation (27) is equivalent to (23), but it has not been clarified yet how Hodoji derived this equation.

4 4.1

Computation by resultants Computation for n = 5

For the cases of n ≥ 5, it seems impossible to compute the Gr¨obner basis directly, using our present computational environment (Maple14 in Win64, Xeon(2.93 GHz)×2, 96 GB RAM). Since Maple15 and Maple16 behaved somehow inefficiently to our problems, we show the timing data by Maple14 in the following.

179

Instead of Gr¨obner basis, resultant methods are often more useful for computational geometry problems. Analogously with our previous paper [7], we try to eliminate xi , yi in the system of Equations (15)(17) by resultants. Actually, we consider the following system with ten polynomials:  f1 = x21 + y12 − (R − r1 )2     f2 = x22 + y22 − (R − r2 )2     f3 = x23 + y32 − (R − r3 )2     f4 = x24 + y42 − (R − r4 )2    f5 = x25 + y52 − (R − r5 )2 (28) h1 = (x2 − x1 )2 + (y2 − y1 )2 − (r2 − r1 )2     h2 = (x3 − x2 )2 + (y3 − y2 )2 − (r3 − r2 )2     h3 = (x4 − x3 )2 + (y4 − y3 )2 − (r4 − r3 )2     h4 = (x5 − x4 )2 + (y5 − y4 )2 − (r5 − r4 )2    h5 = (x1 − x5 )2 + (y1 − y5 )2 − (r1 − r5 )2 ,

whose variables are eliminated as follows.

(i) Without loss of generality, we can fix the center of the first inner circle as x1 = 0 and y1 = R − r1 . If we substitute them to the polynomials f1 , h1 , and h5 , all x1 and y1 in the system are eliminated and we obtain f1 → 0. (ii) Computing h1 − f2 yields a linear equation with y2 . Hence, we substitute (1) the solution y2 to f2 and h2 , cancel the denominators, and we let them f2 (1) and h2 , respectively. In this step, we have h1 → 0. (iii) Computing h5 − f5 yields a linear equation with y5 . Hence, we substitute (1) the solution y5 to f5 and h4 , cancel the denominators, and we let them f5 (1) and h4 , respectively. In this step, we have h5 → 0. (iv) At this point, the following seven polynomials are left non-zero: (1)

(1)

f2 (x2 , R, ri ), f3 (x3 , y3 , R, ri ), f4 (x4 , y4 , R, ri ), f5 (x5 , R, ri ), (1)

(1)

h2 (x2 , x3 , y3 , R, ri ), h3 (x3 , x4 , y3 , y4 , R, ri ), h4 (x4 , x5 , y4 , R, ri ). (v) We compute the resultants to eliminate each variable in order. Factoring the resultants, we pick up only the essential factors: (1)

(2)

(1)

h2 (x3 , y3 , R, ri ) ← Resx2 (h2 , f2 ),

(2)

(3)

h2 (y3 , R, ri ) ← Resx3 (h2 , f3 ).

(vi) Analogously, we compute (1)

h3 (x4 , y3 , y4 , R, ri ) ← Resx3 (h3 , f3 ),

(1)

(2)

h3 (y3 , y4 , R, ri ) ← Resx4 (h3 , f4 ).

(vii) Analogously, we compute (2)

(2)

(1)

(1)

h4 (y4 , R, ri ) ← Resx4 (h4 , f4 ).

(3)

(2)

ϕ5 (R, ri ) ← Resy4 (h3 , h4 ),

h4 (x4 , y4 , R, ri ) ← Resx5 (h4 , f5 ),

(3)

(viii) Moreover, we compute (3)

h3 (y4 , R, ri ) ← Resy3 (h2 , h3 ),

(3)

(3)

180

which finally gives the relation among R, r1 , . . . , r5 : ϕ5 (R, ri ) = a24 (ri )R24 + · · · + a1 (ri )R + a0 (ri ) = 0 (aj (ri ) ∈ Q[r1 , . . . , r5 ]). (29) We can apply these steps to the cases n = 3 and 4, and we obtained the same polynomials ϕ3 (R, ri ) and ϕ4 (R, ri ) as what were derived from Gr¨obner basis computation. Therefore, we believe that the above polynomial ϕ5 (R, ri ) is surely the defining polynomial of R in the case n = 5. The CPU time was about 17 seconds for the whole process to compute ϕ5 (R, ri ) and to confirm its irreducibility. As discussed in the previous section, Equation (29) can be transformed into the expression by curvatures: Φ5 (K, κi ) = a ˜24 (κi )K 24 + · · · + a ˜1 (κi )K + a ˜0 (κi ) = 0

(˜ aj (κi ) ∈ Q[κ1 , . . . , κ5 ]). (30) However, it is impossible yet to analyze Φ5 (K, κi ) further, because we do not have any relations among κ1 , . . . , κ5 like Equations (7) (13). Example 3 If we let r1 = r2 = r3 = r4 = r5 = 1, then the equation ϕ5 (R, ri ) = 0 is factored as follows, and the solutions are divided into four cases:

(i) (ii)

(iii)

(iv)

4.2

1 1 (31) (R − 1)10 (R2 − 2R − )5 (R4 − 4R3 + 2R2 + 4R + ) = 0. 3 5 R = 1, r = −1. All the circles coincide at the only one center. √ with radius 1 √ R = 1 + 2/ 3, r = −1 + 2/ 3. Five circles are degenerated into a congruent Steiner 3-cycle, that is, three circles are form a regular triangle. q qlocated√so that their centers √ R = 1 + 2 + 2/ 5, r = −1 + 2 + 2/ 5. Five circles forms really a congruent Steiner 5-cycle, that is, five circles are located soqthat their centers form pentagon. qa regular √ √ R = 1 + 2 − 2/ 5, r = −1 + 2 − 2/ 5. Five circles are located so that their centers form a regular pentagram, which could be called a congruent Steiner 5-cycle with 2-revolutions. In general, a Steiner n-cycle with m-revolutions satisfies, extended from Equation (10), mπ (R − r)2 − 4Rr tan2 = d2 , (32) n and this is the case where n = 5 and m = 2. Computation for n = 6

Since Equations (15)(17) have systematic structure, we can also prospect the order of elimination of variables for the case n = 6. Actually, we succeeded in computing the polynomial ϕ6 (R, ri ), which has degree 48 in R: ϕ6 (R, ri ) = b48 (ri )R48 + · · · + b1 (ri )R + b0 (ri ) = 0

(bj (ri ) ∈ Q[r1 , . . . , r6 ]). (33)

181

The CPU time was 7 hours and 40 minutes, but the elapsed time was about 1 hour and 6 minutes because of multithreaded computation. Next, we found that this polynomial ϕ6 (R, ri ) is factored as (1)

(2)

ϕ6 (R, ri ) = ϕ6 (R, ri ) · ϕ6 (R, ri ), (1)

(2)

(1)

(2)

(34)

where the degrees in R of ϕ6 (R, ri ) and ϕ6 (R, ri ) are 16 and 32, respectively. This step took 34 hours and 27 minutes of the CPU time (22 hours and 35 minutes of the elapsed time) and 77 GB of RAM. In order to compute the polynomial equation in the curvatures, we substitute (1) (2) K = 1/R, κ = 1/r, and κi = 1/ri to ϕ6 (R, ri ) and ϕ6 (R, ri ). Moreover, two of six κi ’s are supposed to be eliminated, for example, by substituting κ6 = κ1 + κ4 − κ3 and κ5 = κ1 + κ4 − κ2 from Equation (13). After simplifying the two polynomials in K and κi ’s, we obtained the following equations in a factored form: ( (1) (2K − (κ1 + κ4 ))4 · Φ6 (K, κi ) = 0 (35) (2) Φ6 (K, κi ) = 0, where the degrees in K of Φ6 (K, κi ) and Φ6 (K, κi ) are 12 and 32, respectively. (1)

Example 4 If we let κ1 = κ2 = κ3 = κ4 = 1, then equation Φ6 (K, κi ) = 0 is factored as follows: (3K − 1)(K + 1)(2K − 1)4 (K − 1)6 = 0.

(36)

The case K = 1/3, that is, R = 3 means a congruent Steiner’s 6-cycles, and other roots R = ±1 and R = 2 correspond to degenerated cases. (2) Similarly, equation Φ6 (K, κi ) = 0 is factored if κi = 1, (K 2 + 6K − 3)(K 2 + 2K − 1)6 (K − 1)18 = 0.

(37)

The solutions other than K = 1 are correspondent to the following cases. √ √ √ (i) R = 1 + 2/ 3, r = −1 + 2/ 3 (from K = −3 ± 2 3). Three circles are located so that their centers form a regular triangle (a congruent Steiner 3-cycle). √ √ √ (ii) R = 1 + 2, r = 1 − 2 (from K = −1 ± 2). Four circles are located so that their centers form a regular square (a congruent Steiner 4-cycle).

5

Concluding remarks

In this study, we tried to find some new formulae for a Steiner n-cycle using Gr¨obner basis and resultant method for the equations of coordinates of circles. For the case n = 3, the Descartes circle theorem is deduced by Gr¨obner basis computation, which means that another proof without inversion for the theorem is given.

182 n Degree in R No. of terms 3 2 10 4 20 4 24 30,645 5 6 16 271,828 32 310,935 Table 1. Defining polynomial ϕn (R, ri ) of radius R for a Steiner n-cycle

For the case n = 4, we have obtained two quartic equations (19)(20), which can be regarded as the extension of Descartes circle theorem to n = 4. However, using the relation κ1 + κ3 = κ2 + κ4 , solutions K and κ are simply expressed by Equations (25)(26). It seems rather peculiar if these results have not been pointed out before. For the case n = 5 and n = 6, it was impossible to compute the Gr¨obner bases. Instead, using resultant method, we have succeeded in computing the final (1) (2) relations ϕ5 (R, ri ) = 0 and ϕ6 (R, ri ) · ϕ6 (R, ri ) = 0. These formulae are also (1) expressed by the polynomials in the curvatures, as Φ5 (K, κi ) = 0, Φ6 (K, κi ) = (2) 0, and Φ6 (K, κi ) = 0. Apparently, the size of the polynomial ϕ6 (R, ri ) reaches the limit of the present computational resources (Xeon(2.93 GHz)×2, 96 GB RAM). We summarize the shapes of ϕn (R, ri ) for n = 3, 4, 5, 6 in Table 1. Hence, it might be difficult to compute the case n = 7. To the best of our knowledge, there exist no other reports in which these formulae are explicitly given. However, it is not enough elucidated yet whether Equations (30)(35) have more geometrical meaning, except for congruent Steiner n-cycle cases. Therefore, they should be clarified in the future study for generic cases.

References 1. Chou, S.-C.: Mechanical Geometry Theorem Proving, D.Reidel, Dordrecht, 1988. 2. Coxeter, H. S. M.: The Problem of Apollonius, American Mathematical Monthly, 75(1), 1968, 5–15. 3. Coxeter, H. S. M. and Greitzer, S. L.: Geometry Revisited , MAA, Washington,D.C., 1967. 4. Forder, H. G.: Geometry, Hutchinson, London, 1960. 5. Fukagawa, H. and Rothman, T.: Sacred Mathematics: Japanese Temple Geometry, Princeton, Princeton, 2008. 6. Lagarias, J. C., Mallows, C. L., and Wilks, A. R.: Beyond the Descartes Circle Theorem, American Mathematical Monthly, 109(4), 2002, 338–361. 7. Moritsugu, S.: Computing Explicit Formulae for the Radius of Cyclic Hexagons and Heptagons, Bulletin of Japan Soc. Symbolic and Algebraic Computation, 18(1), 2011, 3–9.

183 8. Pedoe, D.: On a Theorem in Geometry, American Mathematical Monthly, 74(6), 1967, 627–640. 9. Tanaka, M., Kobayashi, M., Tanaka, M., and Ohtani, T.: On Hodohji’s Sanhenpou Method: Inversion Theorem Formulated by Traveling Mathematician in Old Japan, J. of Education for History of Technology, 7(2), 2006, 28–33. (in Japanese). 10. Wilker, J. B.: Proofs of a Generalization of the Descartes Circle Theorem, American Mathematical Monthly, 76(3), 1969, 278–282.

Higher-Order Logic Formalization of Geometrical Optics Umair Siddique, Vincent Aravantinos and Sofi`ene Tahar Department of Electrical and Computer Engineering, Concordia University, Montreal, Canada {muh sidd,vincent,tahar}@ece.concordia.ca

Abstract. Geometrical optics, in which light is characterized as rays, provides an efficient and scalable formalism for the modeling and analysis of optical and laser systems. The main applications of geometrical optics are in stability analysis of optical resonators, laser mode locking and micro opto-electro-mechanical systems. Traditionally, the analysis of such applications has been carried out by informal techniques like paper-and-pencil proof methods, simulation and computer algebra systems. These traditional techniques cannot provide 100% accurate results and thus cannot be recommended for safety-critical applications, such as corneal surgery, process industry and inertial confinement fusion. On the other hand, higher-order logic theorem proving does not exhibit the above limitations, thus we propose a higher-order logic formalization of geometrical optics. Our formalization is mainly based on existing higherorder logic theories of geometry and multivariate analysis in the HOL Light theorem prover. In order to demonstrate the practical effectiveness of our formalization, we present the formal stability analysis of optical and laser resonators.

1

Introduction

Different characterizations of light lead to different fields of optics such as quantum optics, electromagnetic optics, wave optics and geometrical optics. The latter describes light as rays which obey geometrical rules. The theory of geometrical optics can be applied for the modeling and analysis of physical objects with dimensions greater than the wavelength of light. Geometrical optics is based on a set of postulates which are used to derive the rules for the propagation of light through an optical medium. These postulates can be summed up as follows: Light travels in the form of rays emitted by a source; an optical medium is characterized by its refractive index; light rays follow Fermat’s principle of least time [17]. Optical components, such as thin lenses, thick lenses and prisms are usually centered about an optical axis, around which rays travel at small inclinations (angle with the optical axis). Such rays are called paraxial rays and this assumption provides the basis of paraxial optics which is the simplest framework of geometrical optics. The paraxial approximation explains how light propagates through a

186

series of optical components and provides diffraction-free description of complex optical systems. The change in the position and inclination of a paraxial ray as it travels through an optical system can be efficiently described by the use of a matrix algebra [10]. This matrix formalism (called ray-transfer matrices) of geometrical optics provides accurate, scalable and systematic analysis of realworld complex optical and laser systems. This fact has led to the widespread usage of ray-transfer matrices in the modeling and analysis of critical physical systems. Typical applications of ray-transfer matrices include analysis of a laser beam propagation through some optical setup [10], the stability analysis of laser or optical resonators [12], laser mode-locking, optical pulse transmission [14] and analysis of micro opto-electro-mechanical systems (MOEMS) [20]. Another promising feature of the matrix formalism of geometrical optics is the prediction of design parameters for physical experiments, e.g., recent dispersion-managed soliton transmission experiment [13] and invention of the first single-cell biological lasers [3]. Traditionally, the analysis of geometrical optics based models has been done using paper-and-pencil proof methods [10, 14, 13]. However, considering the complexity of present age optical and laser systems, such an analysis is very difficult if not impossible, and thus quite error-prone. Many examples of erroneous paperand-pencil based proofs are available in the open literature, a recent one can be found in [2] and its identification and correction is reported in [15]. One of the most commonly used computer-based analysis techniques for geometrical optics based models is numerical computation of complex ray-transfer matrices [19, 11]. Optical and laser systems involve complex and vector analysis and thus numerical computations cannot provide perfectly accurate results due to the inherent incomplete nature of the underlying numerical algorithms. Another alternative is computer algebra systems [16], which are very efficient for computing mathematical solutions symbolically, but are not 100% reliable due to their inability to deal with side conditions [5]. Another source of inaccuracy in computer algebra systems is the presence of unverified huge symbolic manipulation algorithms in their core, which are quite likely to contain bugs. Thus, these traditional techniques should not be relied upon for the analysis of critical laser and optical systems (e.g., corneal surgery [9]), where inaccuracies in the analysis may even result in the loss of human lives. In the past few years, higher-order logic theorem proving has been successfully used for the precise analysis of a few continuous physical systems [18, 8]. Developing a higher-order logic model for a physical system and analyzing this model formally is a very challenging task since it requires both a good mathematical and physical knowledge. However, it provides an effective way for identifying critical design errors that are often ignored by traditional analysis techniques like simulation and computer algebra systems. We believe that higher-order logic theorem proving [4] offers a promising solution for conducting formal analysis of such critical optical and laser systems. Most of the classical mathematical theories behind geometrical optics, such as Euclidean spaces, multivariate analysis and complex numbers, have been formalized in the HOL Light theorem prover

187

[6, 7]. To the best of our knowledge, the reported formalization of geometrical optics is the first of its kind.

2

Geometrical Optics

When a ray passes through optical components, it undergoes translation or refraction. In translation, the ray simply travels in a straight line from one component to the next and we only need to know the thickness of the translation. On the other hand, refraction takes place at the boundary of two regions with different refractive indices and the ray obeys the law of refraction, i.e., the angle of refraction relates to the angle of incidence by the relation n0 sin(φ0 ) = n1 sin(φ1 ), called Snell’s law [17], where n0 , n1 are the refractive indices of both regions and φ0 , φ1 are the angles of the incident and refracted rays, respectively, with the normal to the surface. In order to model refraction, we thus need the normal to the refracting surface and the refractive indices of both regions. In order to introduce the matrix formalism of geometrical optics, we consider the propagation of a ray through a spherical interface with radius of curvature R between two mediums of refractive indices n0 and n1 , as shown in Figure 1. Our goal is to express the relationship between the incident and refracted rays. The trajectory of a ray as it passes through various optical components can be specified by two parameters: its distance from the optical axis and its angle with the optical axis. Here, the distances of the incident and refracted rays are r1 and r0 , respectively, and r1 = r0 because the thickness of the surface is assumed to be very small. Here, φ0 and φ1 are the angles of the incident and refracted rays with the normal to the spherical surface, respectively. On the other hand, θ0 and θ1 are the angles of the incident and refracted rays with the optical axis.

Fig. 1. Spherical interface

Applying Snell’s law at the interface, we have n0 sin(φ0 ) = n1 sin(φ1 ), which, in the context of paraxial approximation, reduces to the form n0 φ0 = n1 φ1 since sin(φ) ' φ if φ is small. We also have θ0 = φ0 − ψ and θ1 = φ1 − ψ, where ψ

188

is the angle between the surface normal and the optical axis. Since sin(ψ) = rR0 , then ψ = rR0 by paraxial approximation. We can deduce that:     n0 − n1 n0 θ1 = r0 + θ0 (1) n1 R n1 So, for a spherical surface, we can relate the refracted ray with the incident ray by a matrix relationship using equation (1) as follows: " # " #" # 1 0 r1 r0 = n0 −n1 n0 θ1 θ0 n1 R n1 Thus the propagation of a ray through a spherical interface can be described by a 2 × 2 matrix generally called, in the literature, ABCD matrix. This can be generalized to many optical components [17] as follows: " # " #" # r1 A B r0 = θ1 C D θ0 where matrix elements are either real in the case of spatial domain analysis or complex in the case of time domain analysis [14]. If we have an optical system consisting of k optical components, then we can trace the input ray Ri through all optical components using composition of matrices of each optical component as follows: Ro = (Mk .Mk−1 ....M1 ).Ri (2) Q1 Simply, we can write Ro = Ms Ri where Ms = i=k Mi . Here, Ro is the output ray and Ri is the input ray. In the next section, we present a brief overview of our higher-order logic formalization of geometrical optics.

3

Formalization of Geometrical Optics

The formalization is two-fold: first, we model the geometry and physical parameters of an optical system; second, we model the physical behavior of a ray when it goes through an optical interface. Afterwards, we will be able to derive the ray-transfer matrices of the optical components, as explained in Section 2. An optical system is a sequence of optical interfaces, which are defined by an inductive data type enumerating their different kinds and their corresponding parameters: Definition 1 (Optical Interface and System). define type "optical interface = plane | spherical real" define type "interface kind = transmitted | reflected" new type abbrev("free space",‘:real # real‘) new type abbrev("optical system",‘:(free space # optical interface # interface kind) list # free space‘)

189

An optical system is made of a list of free spaces which are formalized by pairs of real numbers representing the refractive index and width of free space, and a list of optical interfaces along with their types describing the system itself. Optical interfaces themselves are of two kinds: plane or spherical interfaces, yielding the corresponding constructors as shown in Figure 2. Both plane and spherical interface are of two types, i.e., transmitted and reflected which characterize their behavior either the incident ray will pass through or reflects back. A spherical interface takes a real number representing its radius of curvature. Note that this datatype can easily be extended to many other optical components if needed. Here, we call (free space,optical interface,interface kind) an optical component.

θ

y1

n

yo

θ1

θo

yo

no (a) Ray in Free Space

θo

y0 = y1

Φi

n1

(b) Plane Interface (transmitted)

Φt

θo

θ1

θ1

y0 = y1

ψ no

y1

n1

(c) Spherical Interface (reflected)

no

n1

(d) Plane Interface (reflected)

Fig. 2. Behavior of ray at different interfaces

A value of the type free space does represent a real space only if the refractive index is greater than zero. In addition, in order to have a fixed order in the representation of an optical system, we impose that the distance of an optical interface relative to the previous interface is greater or equal to zero. We also need to assert the validity of a value of type optical interface by ensuring

190

that the radius of curvature of spherical interfaces is never equal to zero. This yields the following predicates: Definition 2 (Valid Free Space and Valid Optical Component). ` is valid free space ((n,d):free space) ⇔ 0 < n ∧ 0 ≤ d ` (is valid interface plane ⇔ T) ∧ (is valid interface (spherical interface R) ⇔ 0 R) Then, by ensuring that this predicate holds for every component of an optical system, we can characterize valid optical systems as follows: Definition 3 (Valid Optical System). ` ∀os fs. is valid optical system ((cs,fs):optical system) ⇔ is valid free space fs ∧ ALL (λ(fs,i,ik).is valid free space fs ∧ is valid interface i) cs where ALL is a HOL Light library function which checks that a predicate holds for all the elements of a list. We conclude our formalization of an optical system by defining the following helper function to retrieve the refractive index of the first free space in an optical system: Definition 4 (Refractive Index of First Free Space). ` (head index ([],(n,d)) = n) ∧ (head index (CONS ((n,d),i) cs, (nt,dt)) = n) We can now formalize the physical behavior of a ray when it passes through an optical system. We only model the points where a ray hits an optical interface (instead of all the points constituting the ray). So it is sufficient to just provide the distance of the hitting point to the axis and the angle taken by the ray at that point. Consequently, we should have a list of such pairs (distance, angle) for every component of a system. In addition, the same information should be provided for the source of the ray. For the sake of simplicity, we define a type for a pair (distance, angle) as ray at point. This yields the following definition: Definition 5 (Ray). new type abbrev ("ray at point", ‘:real # real‘) new type abbrev ("ray", ‘:ray at point # ray at point # (ray at point # ray at point) list‘) The first ray at point is the pair (distance, angle) for the source of the ray, the second one is the one after the first free space, and the list of ray at point represents the same information for all hitting points of an optical system. The reason behind the list of ray at point is because an optical system is modeled as a list of free space and interface. Once again, we specify what is a valid ray by using some predicates. First of all, we define what is the behavior of a ray when it is traveling through a free space. This requires the position and orientation of the ray at the previous and current point of observation, and the free space itself. This is shown in Figure 2(a).

191

Definition 6 (Behavior of a Ray in Free Space). ` is valid ray in free space (y0 ,θ0 ) (y1 ,θ1 ) ((n,d):free space) ⇔ y1 = y0 + d * θ0 ∧ θ0 = θ1 Next, we define what is the valid behavior of a ray when hitting a particular interface. This requires the position and orientation of the ray at the previous and current interface, and the refractive index before and after the component. Then the predicate is defined by case analysis on the interface and its type as follows: Definition 7 (Behavior of a Ray at Given Interface). ` (is valid ray at interface (y0 ,θ0 ) (y1 ,θ1 ) n0 n1 plane transmitted ⇔ y1 = y0 ∧ n0 * θ0 = n1 * θ1 ) ∧ (is valid ray at interface (y0 ,θ0 ) (y1,θ1 ) n0 n1 (spherical R) transmitted ⇔ let φi = θ0 + yR1 and φt = θ1 + yR1 in y1 = y0 ∧ n0 * φi = n1 * φt ) ∧ (is valid ray at interface (y0 ,θ0 ) (y1 ,θ1 ) n0 n1 plane reflected ⇔ y1 = y0 ∧ n0 * θ0 = n0 * θ1 ) ∧ (is valid ray at interface (y0 ,θ0 ) (y1 ,θ1 ) n0 n1 (spherical R) reflected ⇔ let φi = y1 R - θ0 in y1 = y0 ∧ θ1 = -(θ0 + 2 * φi )) The above definition states some basic geometrical facts about the distance to the axis, and applies Snell’s law to the orientation of the ray as shown in Figures 1 and 2. Note that, both to compute the distance and to apply Snell’s law, we assumed the paraxial approximation in order to turn sin(θ) into θ. Finally, we can recursively apply these predicates to all the components of a system as follows: Definition 8 (Behavior of a Ray in an Optical System). ` ∀ sr1 sr2 h h’ fs cs rs i ik y0 θ0 y1 θ1 y2 θ2 y3 θ3 n d n’ d’. (is valid ray in system (sr1 ,sr2 ,[]) (CONS h cs,fs) ⇔ F) ∧ (is valid ray in system (sr1 ,sr2 ,CONS h’ rs) ([],fs) ⇔F)∧ (is valid ray in system ((y0 ,θ0 ),(y1 ,θ1 ),[]) ([],n,d) ⇔ is valid ray in free space (y0 ,θ0 ) (y1 ,θ1 ) (n,d)) ∧ (is valid ray in system ((y0 ,θ0 ),(y1 ,θ1 ), CONS ((y2 ,θ2 ),y3 ,θ3 ) rs) (CONS ((n’,d’),i,ik) cs,n,d) ⇔ (is valid ray in free space (y0 ,θ0 ) (y1 ,θ1 ) (n’,d’) ∧ is valid ray at interface (y1 ,θ1 ) (y2 ,θ2 ) n’ (head index (cs,n,d)) i ik)) ∧ (is valid ray in system ((y2 ,θ2 ),(y3 ,θ3 ),rs) (cs,n,d)) The behavior of a ray going through a series of optical components is thus completely defined. Using this formalization, we verify the ray-transfer matrices as presented in Section 2. In order to facilitate formal reasoning, we define the following matrix relations for free spaces and interfaces. Definition 9 (Free Space Matrix).   1d ` ∀ d. free space matrix d ⇔ 01

192

Definition 10 (Interface Matrix). ` ∀ n0 n1 R. interface matrix n0 n1 plane transmitted ⇔

  1 0 ∧ 0 nn01 

1

interface matrix n0 n1 (spherical R) transmitted ⇔ n0 −n1 n0 ∗R   10 ∧ interface matrix n0 n1 plane reflected ⇔ 01   1 0 interface matrix n0 n1 (spherical R) reflected −2 R 1

0 n0 n1

 ∧

In the above definition, n0 and n1 represent the refractive indices before and after an optical interface. We use the traditional mathematical notation of matrices for the sake of clarity, whereas we define these matrices using the HOL Light Vectors library. For example, a simple 2 x 2 matrix can be defined as follows: Definition 11 (Matrix in HOL Light). ` ∀ A B C D. matrix abcd A B C D ⇔ vector[vector[A;B];vector[C;D]] Next, we verify the ray-transfer-matrix relation for free space: Theorem 1 (Ray-Transfer-Matrix for Free Space). ` ∀ n d y0 θ0 y1 θ1 . is valid free space (n,d) ∧ is ray in free space (y0 ,θ  0 ) (y1 ,θ1 ) (n,d)) =⇒  valid  y0 y1 = free space matrix d * θ0 θ1 Here, the first assumption ensures the validity of free space and the second assumption ensures the valid behavior of ray in free space. The proof of this theorem requires some properties of vectors and matrices along with some arithmetic reasoning. Next, we verify an important theorem describing general ray-transfermatrix relation for any interface as follows: Theorem 2 (Ray-Transfer-Matrix any Interface). ` ∀ n0 n1 y0 θ0 y1 θ1 i ik. is valid interface i ∧ is valid ray at interface     (y0 ,θ0 ) (y1 ,θ1 ) n0 n1 i ik ∧ y0 y1 0 < n0 ∧ 0 < n1 =⇒ = interface matrix n0 n1 i ik * θ0 θ1 In the above theorem, both assumptions ensure the validity of interface and behavior of ray at the interface, respectively. This theorem is easily proved by case splitting on i and ik. Now, equipped with the above theorem, the next step is to formally verify the ray-transfer-matrix relation for an optical system as given in Equation (2). It is important to note that in Equation (2), individual matrices of optical components are composed in reverse order. We formalize this fact with the following recursive definition:

193

Definition 12 (System Composition). ` system composition ([],n,d) ⇔ free space matrix d ∧ system composition (CONS ((nt,dt),i,ik) cs,n,d) ⇔ (system composition (cs,n,d) * interface matrix nt (head index (cs,n,d)) i ik) * free space matrix dt The general ray-transfer-matrix relation is then given by the following theorem: Theorem 3 (Ray-Transfer-Matrix for Optical System). ` ∀ sys ray. is valid optical system sys ∧ is valid ray in system ray sys =⇒ let (y0 ,θ0 ),(y1 ,θ1 ),rs = ray in let  yn ,θn = last ray at point ray in   yn y0 = system composition sys * θn θ0 Here, the parameters sys and ray represent the optical system and the ray respectively. The function last ray at point returns the last ray at point in system. Both assumptions in the above theorem ensure the validity of the optical system and the good behavior of the ray in the system. The theorem is easily proved by induction on the length of the system and by using previous results and definitions. This concludes our formalization of geometrical optics and verification of important properties of optical components and optical systems. The formal verification of the above theorems not only ensures the effectiveness of our formalization but also shows the correctness of our formal definitions related to optical systems. Now, we present the formal verification of the ray-transfer matrix relationship of Thin Lenses [17], which is one of the most widely used components in optical and laser systems. Generally, lenses are determined by their refractive indices and thickness. In thin lens approximation, a lens is considered as the composition of two transmitted spherical interfaces and any variation of ray parameters (position y and orientation θ) is neglected between both interfaces, as shown in Figure 3. So, a thin lens is the composition of two spherical interfaces with a null width free space in between. Now, we present the formal verification of the thin lens matrix.

Theorem 4 (Thin Lens Matrix). ` ∀ R1 R2 n0 n1 . R1 0 ∧ R2 0 ∧ 0 < n1 ∧ 0 < n2 ∧ =⇒ system composition ([(n1 ,0),spherical  R1 ,transmitted ; (n2 ,0), 1 0 spherical R2 ,transmitted], n1 ,0) ⇔ n2 −n1 1 1 ( − ) 1 n1 R2 R1 In the next section, we sketch the formal stability analysis of an optical resonator using our formalization.

194

Fig. 3. Thin Lens

4

Applications

In order to illustrate the use and effectiveness of the proposed formalization, we apply it to formally analyze the stability of optical resonators which are very important for various operations of lasers, e.g., alignment sensitivity and beam quality. An optical resonator is a special arrangement of optical components which allows the beam of light to be confined in closed path (Figure 4(a)). The main step to formally analyze a given optical resonator is to construct its formal model using already formalized optical components. We then use our library of formally verified matrices of individual interfaces (plane and spherical) to formally verify the matrix relation of a Z-cavity as shown in Figure 4(b).

Fig. 4. (a) Simple two mirror resonator (b) The Z-cavity

Theorem 5 (Z-Cavity Matrix). ` ∀ R d1 d2 . R 0 ∧ 0 < d1 ∧ 0 < d2 ∧ =⇒ system composition ([(n,0), plane, reflected; (n,d1 ), spherical R1 , reflected; (n,d2 ), spherical R2 , reflected; (n,d1 ), plane,reflected ], n,0) ⇔ " # R2 −4d1 R−2d2 R+4d1 d2 (−2d1 −R)(−2d1 d2 +Rd2 +Rd2 +2d1 R) R2 R2 4(d2 −R) R2 −4d1 R−2d2 R+4d1 d2 R2 R2

195

Now, we sketch the stability analysis of an optical and laser resonator which is an ongoing work. The stability of the resonator means that, after n round trips, beam of light should be confined within the resonator. The last step is to formally derive the stability condition under which the resonator remains stable. The generalized stability condition of a two-mirror optical resonator is given as follows: M1,1 + M2,2 ≤1 (3) ∀M. − 1 ≤ 2 where M is the matrix of the optical resonator obtained by the multiplication of the matrices of each optical component which is part of the resonator configuration [10]. The above expression looks very simple, but its formal verification involves rather complex mathematics, e.g., trigonometry and eigenvalue problem solving. A direct application of the above result is in determining the minimum radius of curvature of two mirrors to ensure that a Z-cavity (shown in Figure 4(b)) is stable. It is given as follows: 2 R − (4d1 − 2d2 )R + 4d1 d2 ≤1 (4) ∀R, d1 , d2 . R2

5

Conclusion

In this extended abstract, we report a novel application of formal methods in analyzing optical and laser systems which is based on geometrical optics. We provided a brief introduction of the current state-of-the-art and highlighted their limitations. Next, we presented an overview of geometrical optics followed by some highlights of our higher-order logic formalization. In order to show the practical effectiveness of our formalization, we presented a sketch of the formal stability analysis of a two-mirror resonator. Our plan is to extend this work in order to obtain an extensive library of verified optical components, along with their ray-transfer matrices, which would allow a practical use of our formalization in industry. In the current formalization, we use paraxial approximation, i.e., sin(θ) is treated as θ. In the future, we plan to formally take into account this paraxial approximation using asymptotic notations [1]. We also plan to formally verify Snell’s law from the Fermat’s principle of least time [17].

References 1. J. Avigad and K. Donnelly. Formalizing O Notation in Isabelle/HOL. In Automated Reasoning, volume 3097 of Lecture Notes in Computer Science, pages 357–371. Springer Berlin Heidelberg, 2004. 2. Q. Cheng , T. J. Cui and C. Zhang. Waves in Planar Waveguide Containing Chiral Nihility Metamaterial. Optics and Communication, 274:317–321, 2007. 3. M. C. Gather and S. H. Yun. Single-cell Biological Lasers. Nature Photonics, 5(7):406–410, 2011.

196 4. M. J. C. Gordon and T. F. Melham. Introduction to HOL: A Theorem Proving Environment for Higher-Order Logic. Cambridge University Press, 1993. 5. J. Harrison. Theorem Proving with the Real Numbers. Springer-Verlag, 1998. 6. J. Harrison. A HOL Theory of Euclidean space. In Theorem Proving in Higher Order Logics, 18th International Conference, TPHOLs 2005, volume 3603 of Lecture Notes in Computer Science. Springer, 2005. 7. J. Harrison. Formalizing Basic Complex Analysis. In From Insight to Proof: Festschrift in Honour of Andrzej Trybulec, volume 10(23) of Studies in Logic, Grammar and Rhetoric, pages 151–165. University of Bialystok, 2007. 8. O. Hasan, S. K. Afshar, and S. Tahar. Formal Analysis of Optical Waveguides in HOL. In TPHOLs, volume 5674 of Lecture Notes in Computer Science, pages 228–243. Springer, 2009. 9. T. Juhasz, G. Djotyan, F. H. Loesel, R. M. Kurtz, C. Horvath, J. F. Bille, and G. Mourou. Applications of Femtosecond Lasers in Corneal Surgery. Laser Physics, 10(2):495 – 500, 2011. 10. H. Kogelnik and T. Li. Laser Beams and Resonators. Appl. Opt., 5(10):1550–1567, 1966. 11. LASCAD. http://www.las-cad.com/, 2012. 12. M. Malak, N. Pavy, F. Marty, Y. Peter, A.Q. Liu, and T. Bourouina. Stable, High-Q Fabry-Perot Resonators with Long Cavity Based on Curved, All-Silicon, High Reflectance Mirrors. In IEEE 24th International Conference on Micro Electro Mechanical Systems (MEMS), pages 720 –723, 2011. 13. S. Mookherjea. Analysis of Optical Pulse Propagation with Two-by-Two (ABCD) Matrices. Physical Review E, 64(016611):1–10, 2001. 14. M. Nakazawa, H. Kubota, A. Sahara, and K. Tamura. Time-domain ABCD Matrix Formalism for Laser Mode-Locking and Optical Pulse Transmission. IEEE Journal of Quantum Electronics, 34(7):1075 –1081, 1998. 15. A. Naqvi. Comments on Waves in Planar Waveguide Containing Chiral Nihility Metamaterial. Optics and Communication, 284:215–216, Elsevier, 2011. 16. OpticaSoftware. http://www.opticasoftware.com/, 2012. 17. B. E. A. Saleh and M. C. Teich. Fundamentals of Photonics. John Wiley & Sons, Inc., 1991. 18. U. Siddique and O. Hasan. Formal Analysis of Fractional Order Systems in HOL. In Proceedings of the International Conference on Formal Methods in ComputerAided Design, pages 163–170, Austin, TX, USA, 2011. 19. B. Su, J. Xue, L. Sun, H. Zhao, and X. Pei. Generalised ABCD Matrix Treatment for Laser Resonators and Beam Propagation. Optics & Laser Technology, 43(7):1318 – 1320, 2011. 20. W. C Wilson and G. M. Atkinson. MOEMS Modeling Using the Geometrical Matrix Toolbox. Technical report, NASA, Langley Research Center, 2005.

Realizations of Volume Frameworks Ciprian S. Borcea1,? and Ileana Streinu2,?? 1

2

Department of Mathematics, Rider University, Lawrenceville, NJ 08648, USA. [email protected] Department of Computer Science, Smith College, Northampton, MA 01063, USA. [email protected], [email protected]

Abstract. A volume framework is a d-uniform hypergraph together with real numbers associated to its edges. A realization is a labeled point set in Rd for which the volumes of the d-dimensional simplices corresponding to the hypergraph edges have the pre-assigned values. A framework realization (shortly, a framework) is rigid if its underlying point set is determined locally up to affine volume-preserving transformations. If it ceases to be rigid when any volume constraint is removed, it is called minimally rigid. We present a number of results on volume frameworks: a counterexample to a conjectured combinatorial characterization, special cases of area frameworks with unique realizations, as well as the first non-trivial lower bound. We also give upper bounds for the number of realizations of a generic minimally rigid volume framework, based on degrees of a naturally associated Grassmann variety.

Introduction In this paper we study volume frameworks and their complex analogues. They are generalizations of the classical notion of bar-and-joint frameworks from Rigidity Theory. They inherit and thereby expand a central issue in rigidity theory: the characterization of all minimally rigid structures. In the classical case, these would be redundancy-free graphs of bars which, for generic lengths, determine locally the whole structure up to Euclidean motions; in our versions they are redundancy-free hypergraphs of simplices which, for generic volume constraints, determine locally the whole structure up to real, respectively complex affine volume-preserving transformations. In other words, these rigid structures cannot deform locally in a non-trivial way, while respecting the length or volume constraints prescribed on the edges of the graph or hypergraph. The classical bar-and-joint case has a complete answer only in dimension two. The Maxwell count [7] says that such a minimally rigid structure should have no more than 2n0 − 3 bars on any subset of n0 vertices, while Laman’s theorem asserts that, for n vertices, a graph with 2n−3 bars respecting Maxwell’s sparsity ? ??

Research supported by a DARPA “23 Mathematical Challenges” grant. Research supported by NSF CCF-1016988 and a DARPA “23 Mathematical Challenges” grant.

198

condition will be rigid, for generic edge length prescriptions. In dimension d ≥ 3, the corresponding (d, (d + 1)d/2)-sparsity condition remains necessary but is no longer sufficient and the problem of a combinatorial characterization of minimally rigid graphs is open. For volume frameworks, there are necessary sparsity conditions as well: (d, d2 + d − 1) in the real case and (2d, 2(d2 + d − 1)) for its complex analogue. In the complex scenario, the marked real simplices are half the real dimension of the space R2d = C d and simplices are permitted multiplicity one or two3 . Again, sparsity alone is not sufficient for minimal rigidity. Nevertheless, absence of specific information about the implicated minimally rigid structures does not preclude finding upper bounds for the number of their different realizations for some fixed (but otherwise generic) values of the constraints. This question was addressed, for bar-and-joint frameworks, in our earlier paper [4]. Upper bounds were obtained there from degrees of naturally associated symmetric determinantal varieties called Cayley-Menger varieties [3]. In the same vein, the upper bounds obtained here for realizations of minimally rigid volume frameworks, are derived from degrees of naturally associated Grassmann varieties.

1

Volume frameworks

We consider n > d points pi ∈ Rd , i = 1, ..., n. For certain ordered subsets pI = (pi0 , ..., pid ) of d + 1 points, to be called marked simplices, we consider the volume:     1 1 ... 1 VI (p) = det = det pi1 − pi0 ... pid − pi0 (1) pi0 pi1 ... pid The collection of all marked simplices is envisaged as a (d + 1)-uniform hypergraph G on n vertices. The number of hyperedges is denoted by |G|. When I = (i0 , ..., id ) are the indices of a marked simplex, we may simply write I ∈ G. With these notational conventions we define: FG : (Rd )n → R|G| FG (p) = (VI (p))I∈G

(2)

This polynomial function is invariant under the group Γ of affine volume-preserving transformations: 3

This, of course, is in keeping with the fact that, from the real point of view, there are two basic polynomial invariants of SL(d, C) on d vectors: the real and the imaginary part of their complex determinant.

199

T ∈ Γ ⇔ T x = M x + t, t ∈ Rd , M ∈ SL(d, R) Thus, Γ is described via the short exact sequence: Rd → Γ → SL(d, R) and has dimension d + (d2 − 1) = d2 + d − 1. Transformations T ∈ Γ will also be called trivial transformations. When the affine span of pi ∈ Rd , i + 1, ..., n is the whole space, the orbit of p ∈ (Rd )n = Rdn under Γ , that is Γ p = {T p = (T pi )1≤i≤n : T ∈ Γ } ⊂ Rdn defines in a neighborhood of p a submanifold of dimension d2 + d − 1, hence one needs at least dn − (d2 + d − 1) volume constraints in order to make p the only local solution for such constraints, up to trivial transformations. For a fixed p, let us put νI = VI (p), so that p satisfies the constraints: FG (p) = (νI )I∈G for any hypergraph G. The weighted hypergraph (G, (νI )I∈G ) will be called a volume framework for dimension d, and p ∈ (Rd )n will be called a realization of that framework. Sometimes this is emphasized by using the notation G(p) for the configuration of points. The set of all realizations is the fiber of FG over (νI )I∈G : FG−1 ((νI )I∈G ) = FG−1 (FG (p)) This set-up clearly resembles the one in use for bar-and-joint frameworks [1]. The differential dFG (p) of the vector-constraint function FG at p, conceived as a |G| × dn matrix, is called the rigidity matrix at p. The realization p is called infinitesimally rigid when the rigidity matrix at p has the largest rank possible, namely dn − (d2 + d − 1). Remark: The differential of a single constraint gives: dVI (p) · u =

d X k=0

 det

1 1 ... 0 ... 1 pi0 pi1 ... uik ... pid

 (3)

Definition 1 A uniform (d + 1)-hypergraph G on n vertices will be called minimally rigid for volume frameworks in Rd when it has exactly dn − (d2 + d + 1) hyperedges and, for some constraint values (νI )I∈G , allows an infinitesimally rigid realization.

200

2

Examples and counter-examples

We illustrate here the notion of volume framework by considering area frameworks in the Euclidean plane. Hypergraphs are simply referred to as graphs. Examples of minimally rigid graphs are provided by triangulated triangles. We present different (global) realizations for some configurations of this type. Then, ‘counter-examples’ in arbitrary dimension d ≥ 2 will show that sparsity is not sufficient for minimal rigidity. At least one other ‘vertex separation’ condition must hold for n ≥ d + 2, namely, no two vertices can be implicated in exactly the same set of marked simplices: there must be one marked simplex containing one vertex, but not the other. 2.1

Triangulated triangles

Let p1 , p2 , p3 be the vertices of a triangle in R2 , and let p4 , ..., pn be the remaining vertices used in some triangulation of this triangle. Since one may think in terms of a triangulated sphere (with a point ‘at infinity’ added to the planar complement of the triangle), Euler’s formula shows that our triangle is covered by exactly 2n − 5 triangles. We are going to prove that generically this gives an infinitesimally rigid area framework, hence the graph of the triangulation is a minimally rigid graph. This statement and a sketch of the argument, based on ‘vertex splitting’, appeared in a lecture of W. Whiteley in Oberwolfach [2]. We provide here the necessary details. Definition 2 Let A = pi be a vertex and let us consider a sequence of k ≥ 1 adjacent triangles with vertex p, relabelled Av1 v2 , Av2 v3 , ..., Avk vk+1 , where all vi , 1 ≤ i ≤ k + 1 are distinct. By vertex splitting with respect to this data, we’ll mean the graph obtained by introducing one new vertex B and replacing the indicated sequence of triangles with the following list: ABv1 , Bv1 v2 , Bv2 v3 , ..., Bvk vk+1 , ABvk+1 Remark: In realizations, B may be imagined close enough to A. Our argument will use in fact the differential of the constraint function, that is the rigidity matrix, for A = B. ˜ the graph resulting Proposition 3 The G be a graph for area frameworks and G from a vertex splitting construction as described above. If G is minimally rigid, ˜ so is G. Proof: We start with an infinitesimally rigid realization p of G for some general values of the area constrains. Thus, the rank of the rigidity matrix dFG (p) is |G|.

201

(a)

(b)

Fig. 1. A vertex splitting.

The labels for vertex splitting being as above, it will be enough to prove that ˜ = |G| + 2 for generic B ∈ R2 . In fact, it will be enough dFG˜ (p, B) has rank |G| to show that dFG˜ (p, A) has rank |G| + 2. ˜ as having the disposition of the rigidity We’ll think of the rigidity matrix for G matrix for G, with two columns added at the end for the new vertex B, and two rows added at the bottom, corresponding to triangles ABv1 and ABvk+1 . Unchanged constraints determine matching rows and the row for Bvi vi+1 will match the row for Avi vi+1 . With V standing for area, we have: V (Bvi vi+1 ) = V (Avi vi+1 ) + V (ABvi+1 ) − V (ABvi ) Considering the differential formula (3) for our case A = B, we see that adding the columns under B to the respective columns under A results in a upper-left corner identical with dFG (p) and a lower-right corner of the form       a2 − v1,2 v1,1 − a1 a1 vi,1 , for A = , vi = a2 − vk+1,2 vk+1,1 − a1 a2 vi,2 with zero elsewhere in the last two rows. Since p is a generic realization for G, the lower-right corner is non-singular and the overall rank is |G| + 2. Corollary 4 Triangulations of a triangle define minimally rigid graphs for area frameworks. Indeed, induction on the number of vertices shows that any triangulation of a triangle can be obtained as some sequence of vertex splitting. 2.2

Different realizations

A planar example with two realizations is described here for six points A,B,C,A’,B’,C’. We have seven marked triangles, namely: ABC, A’BC, AB’C, ABC’, A’B’C,

202

AB’C’, A’BC’. With triangle ABC ‘pinned’, vertices A’,B’ and C’ are constrained by areas of type ∗0 ∗∗ to a line running parallel to one of the sides. The remaining constraints of type ∗0 ∗0 ∗ give equations of multi-degree (1, 1, 0), (0, 1, 1) and (1, 0, 1) on (P1 )3 . It follows that, in the generic case, there are two complex solutions. Thus, when one starts with a real solution, the other one will be real as well. For a simple illustration, one may take triangles ABC and A0 B 0 C 0 equilateral and with the same center.

(a)

(b)

Fig. 2. Two realizations of an area framework on six vertices. The interior triangles have all been assigned area equal to one.

An iteration of this construction yields examples of area frameworks with n = 3m n vertices and 2m−1 = 2 3 −1 realizations. 2.3

Sparsity is not enough

A graph on n vertices is (k, `)-sparse when for any n0 ≤ n vertices, the induced graph has at most kn0 − ` edges. In the case of volume frameworks in Rd , a necessary condition for the linear independence of the rows in the rigidity matrix is (d, d2 + d − 1)-sparsity. However, this sparsity condition on graphs with dn − (d2 + d − 1) edges is not sufficient for minimal rigidity. One can construct counter-examples as follows. Start with a minimally rigid graph with sufficiently many vertices. Add two more vertices and mark 2d new simplices, respecting sparsity but with all of them containing the two new vertices. When these two vertices slide on the same line while maintaining the distance between them, all volumes of the new simplices are preserved. Thus, the new sparse graph is not rigid.

3

Complex volume frameworks

We consider n > d points pi ∈ C d , i = 1, ..., n. For certain ordered subsets pI = (pi0 , ..., pid ) of d + 1 points, to be called marked simplices, we consider the complex volume:

203



1 1 ... 1 VI (p) = det pi0 pi1 ... pid



  = det pi1 − pi0 ... pid − pi0

(4)

The real and imaginary part of this complex volume provide two real valued functions which are polynomial in the real coordinates of pik ∈ R2d = C d and invariant under translations and volume-preserving complex linear transformations. Any real linear combination of these two functions can be used to impose a volume condition or constraint on the marked simplex: aI , bI , cI ∈ R

aI Re(VI (p)) + bI Im(VI (p)) = cI ,

(5)

As noted, if a configuration p ∈ (C d )n = (R2d )n satisfies any number of such constraints, the configuration T p = (T pi )i obtained by applying the same complex affine volume-preserving transformation T to all points pi will satisfy the given constraints as well. For this reason, we are going to consider as equivalent two configurations obtained in this manner and refer to complex affine volumepreserving transformations simply as trivial transformations. We denote this group of trivial transformations by ΓC , and recall the short exact sequence C d → ΓC → SL(d, C) which gives its complex dimension as: dimC (ΓC ) = d + (d2 − 1). The real dimension is therefore: dimR (ΓC ) = 2(d2 + d − 1) The topological quotient (C d )n /ΓC is not apt to carry the structure of a complex algebraic variety, but a ‘categorical quotient’ (C d )n //ΓC exists and gives a complex algebraic variety of complex dimension dn − (d2 + d − 1), defined up to birational equivalence [9, 5, 8]. We shall consider a particular birational model for (C d )n //ΓC in our discussion of upper bounds for the number of realizations. We retain here the fact that in order to obtain isolated points in the orbit space, one has to impose at least 2dn − 2(d2 + d − 1) real constraints. Of course, this necessary condition is also apparent when reasoning on the ‘big’ configuration space (C d )n = R2dn : for a generic configuration p ∈ C dn , its trivial transforms T p, T ∈ ΓC define near p a submanifold of real codimension 2dn − 2(d2 + d − 1). When as many constraints of the form (5) are imposed on configurations, with marked simplices recorded as a (possibly multi-) hypergraph G, we have a polynomial function: 2

FG : R2dn → R2dn−2(d

+d−1)

FG (p) = (aI Re(VI (p)) + bI Im(VI (p)))I∈G

(6)

204

If the differential dFG (p) is of maximal rank, that is 2dn − 2(d2 + d − 1), the fiber FG−1 (FG (p)) of FG through p must coincide locally with the submanifold of trivial transforms of p and one obtains the desired isolation of p among configurations with prescribed volumes (cI )I∈G = FG (p) modulo ΓC . Under these conditions, p is called an infinitesimally rigid realization of the hypergraph G for prescribed constraints (aI , bI , cI )I∈G . Definition 5 A uniform (d + 1)-hypergraph G on n vertices will be called minimally rigid for complex volume frameworks in C d = R2d when it has exactly 2dn − 2(d2 + d + 1) hyperedges and, for some constraints (aI , bI , cI )I∈G , allows an infinitesimally rigid realization.

4

Grassmann varieties and upper bounds

Volume frameworks in Rd . We consider first the case of a minimally rigid volume framework with n ≥ d + 1 vertices and generic values for the volume constraints. A ‘blunt’ upper bound on the number of realizations can be obtained directly from the B´ezout theorem applied as follows. Pin down one of the marked simplices with the prescribed (non-zero) volume. The remaining n−(d+1) points in Rd ⊂ Pd are determined by dn − d(d + 1) equations of degree at most d, hence the bound Bd,n = dd(n−d−1) . We’ll obtain a more refined upper bound by observing that the determinants of all (d + 1) × (d + 1) minors in the matrix:   1 1 ... 1 (7) p1 p2 ... pn define the Pl¨ ucker coordinates of the (d + 1) vector subspace spanned by its rows in Rn . This point of the Grassmannian G(d + 1, n) ⊂ P( n )−1 contains the d+1

vector (1, 1, ..., 1) and belongs therefore to a projective cone in P(n−1) over the d Grassmannian G(d, n−1). Indeed, over the complex field, this cone has dimension d(n − d − 1) + 1 and offers a birational model for the quotient (C d )n //ΓC . Since each constraint becomes a hyperplane section in Pl¨ ucker coordinates, we obtain the bound: bd,n = deg G(d, n − 1) = [d(n − d − 1)]!

1!2!...(n − d − 2)! d!(d + 1)!...(n − 2)!

from the known degree of the Grassmannian [6]. The fact that bd,n is a better bound than Bd,n is easily verified by induction on n ≥ d + 2: bd,d+2 = 1 < Bd,d+2 = d2

205

bd,n+1 = (dn − d2 )(dn − d2 − 1)...(dn − d2 − d + 1)