Content uploaded by Zoltán Kovács
Author content
All content in this area was uploaded by Zoltán Kovács on Jun 28, 2015
Content may be subject to copyright.
The Relation Tool in GeoGebra 5
Zolt´an Kov´acs
Johannes Kepler University, Department of Mathematics Education
Altenberger Strasse 54, A-4040 Linz, Austria
zoltan@geogebra.org
Abstract. GeoGebra is open source mathematics education software
being used in thousands of schools worldwide. Its new version 5 supports
automatic geometry theorem proving by using various methods which are
already well known, but not widely used in education software. GeoGe-
bra’s new embedded prover system chooses one of the available methods
and translates the problem specified by the end user as the input for the
selected method, similarly to portfolio solvers. The available methods
include Wu’s method, the Buchberger-Kapur method, the Area method
and Recio’s exact check method, some of them as embedded algorithms,
others as outsourced computations. These methods can also be hidden
from end users who are provided with an intuitive graphical user inter-
face, the Relation Tool. Since GeoGebra maintains the development in
an open-sourced way by collaborating with the OpenGeoProver, Singu-
lar and Giac projects, further enhancements can be expected by a larger
community, including implementing other methods, too.
Keywords: GeoGebra, portfolio solver, computer algebra, computer
aided mathematics education, automated theorem proving
1 Introduction
GeoGebra [1] is educational mathematics software, with millions of users world-
wide. Its founder, Markus Hohenwarter broadened its software development into
an open source project in 2005. GeoGebra has many features (including dynamic
geometry, computer algebra, spreadsheets and function investigation), but it pri-
marily focuses on facilitating student experiments in Euclidean geometry, and
not on formal reasoning. Including automated deduction tools in GeoGebra could
bring a whole new range of teaching and learning scenarios. Since automated the-
orem proving (ATP) in geometry has reached a rather mature stage, some ATP
experts agreed on starting a project of incorporating and testing a number of
different automated provers for geometry in GeoGebra. This collaboration was
initiated by Tom´as Recio in 2010.
In this paper a general overview is given about the technical details of
this joint work, highlighting its latest achievements including the new Relation
Tool in GeoGebra. Section 2 presents related work and gives a brief historical
overview. In Section 3, arguments for the structural decisions of the collabora-
tion are shown. In Section 4, the design of the portfolio prover is demonstrated.
2 Zolt´an Kov´acs
Section 5 shows some examples how the implemented system works. Section 6
depicts the new Relation Tool. Section 7 discusses the possible ways of a future
enhancement of the joint work.
2 Related work
It must be emphasized that a number of software systems, which focus on com-
puter aided proving and dynamic geometry, have existed for several years. The
most well known include GeoProof 1by Julien Narboux [2, 3], GDI-Discovery [4]
by Jos´e Valcarce and Francisco Botana, the Geometry Expert2[5] by Shang-
Ching Chou, Xiao-Shan Gao and Zheng Ye, and GEOTHER [6] by Dongming
Wang. These (and some other) dynamic geometry systems (DGS) with ATP
features can efficiently prove many complex geometry theorems, but these ATP
features are not primarily designed for applications in education3. They are, in
many aspects, still in the prototype phase, not yet well distributed, maintained
or not fully operative.
Without any doubts a remarkable amount of work has already been con-
tributed to publicly available algorithms and their implementations. Also open-
sourced ATP systems and test databases were introduced, including OpenGeo-
Prover (OGP) [7,8] and GeoThms [9], started and maintained by Predrag Janiˇci´c,
Pedro Quaresma and their colleagues. Collaborative work seemed to be a very
important step in widening the availability of ATP algorithms to be used in
education. We found that a primary problem is that scientific contributions to
DGS and ATP are isolated, and in an open-sourced system the existing efforts
could be gathered and continued.
In 2011 Narboux, Yves Bertot and his PhD student Tuan Minh Pham started
to change GeoProof’s user interface to GeoGebra [10], but they still used Coq [11]
as the external formal prover. However, a part of the GeoGebra Team, lead
by the author of this paper, advised by Hohenwarter, Recio and Botana, and
supported by Janiˇci´c, started to work on a different approach at the beginning
of 2012—their solution was to use both an embedded system in GeoGebra and
also outsourced computations [12–16].
One of the most advanced pieces of software being available for free download
is the Java Geometry Expert (JGEX [17, 18]) developed by Chou, Gao and
Ye, but built upon the work of several other experts of the modern Chinese
computational mathematics. JGEX’s prover system contains multiple methods
to compute proofs of the input being constructed graphically or by a custom
programming language. The available methods are the Gr¨obner basis method
(developed by Buchberger, Kapur [19] and others), Wu’s method [20], the Area
method [21] and the geometry deductive database (GDD) method [22].
1http://home.gna.org/geoproof/
2http://www.mmrc.iss.ac.cn/gex/
3One example of a system planned for teaching proofs interactively is Jacques
Gressier’s Geometrix, available at http://geometrix.free.fr.
The Relation Tool in GeoGebra 5 3
JGEX gives the opportunity for the user to select from the existing meth-
ods since in some circumstances any of them can fail: each has its strengths
and weaknesses. In GeoGebra’s portfolio prover (GPP) we followed the same
approach, but an automated selection will be used to minimize user interaction:
we assume that the user is a secondary school student who knows nothing about
ATP. That is, GPP will work with default values which can be overridden by
only expert users via command line arguments4.
Unfortunately, the source code for JGEX is not available for free download-
ing, and also the GDD method (which probably has the most remarkable repu-
tation on educational use) is a kind of black box. GeoGebra’s long term success
in the classroom is not only that it is freely available for end users, but it is also
possible to be enhanced and bug-fixed—the open source development model is
a requirement for that.
3 Open source collaboration
We also wanted to leave the opportunity for other DGS to use the implemented
methods in other applications than GeoGebra as well. For such a warranty we
agreed to start joint work with Janiˇci´c’s research team on the OGP system. In
its first version, OGP was capable only for computing geometry proofs by using
Wu’s method, but later we managed to get support from the Google Summer of
Code for a university student, Damien Desfontaines, who implemented the Area
method in OGP in 2012 [23]. The OGP project was considered as a fruitful way
for collaboration of other experts as well: the Mass point method and the Full
angle method were worked on (an introductory report on the latter was already
published by Quaresma and Baeta in 2013 [24]).
Meanwhile, we also started to work on internal implementations of other
methods. The first internally implemented method was a new approach sug-
gested by Recio, to use exact coordinates and arbitrary integer arithmetics on
testing geometry statements for checking validity for a set of elementary theo-
rems. His algorithm [13], which sets up a bounded number of test cases of the
geometry statement with carefully chosen coordinates, was implemented by Si-
mon Weitzhofer in 2012 and published in his master thesis [25] in 2013. A more
traditional approach, namely the Buchberger-Kapur method (based on Gr¨obner
basis computation), was also implemented by the author of this paper, by us-
ing external computations for solving equation systems. This method was later
extended to use the Recio-V´elez algorithm [26] to obtain degeneracy conditions,
and the algorithm was later enhanced for better educational use.
The outsourced computations were achieved by using Singular [27] as an
external web service, running on a dedicated virtual server. This technology was
discussed by Botana and the author in the planning stage of GeoGebra’s ATP
capabilities. For this reason the method used in GeoGebra is called “Botana’s
method” [12].
4http://wiki.geogebra.org/en/Release_Notes_GeoGebra_5.0#New_Command_
Line_Arguments
4 Zolt´an Kov´acs
In GeoGebra we already managed to make the prototype implementation
work, many schools and students started to move from the desktop application to
a different technology: they preferred to use tablets and smartphones instead of
desktop PCs and laptops. Unfortunately, the Java technology and the outsourced
computations are not always applicable in the changed way of using computers
in the education. That is why we had to find even new technologies to support
the HTML5/JavaScript approach of application development, including offline
HTML5 applications as well [28]. Fortunately, the GeoGebra Team managed to
change the internal computer algebra system from Reduce [29] to Giac [30] which
was a step forward to support faster Gr¨obner basis computations, also available
in a web browser in offline mode on a tablet or a smartphone [31,32].
Now GPP is no longer a prototype. It is also fully documented not only in
its source code and the Developers’ Howto5but on GeoGebra’s Wiki pages6,
and a set of demonstrational examples is available on GeoGebraTube7. It is an
extensible system in both GeoGebra and OGP.
We would like to highlight that the success of GPP is based definitely on
its open-sourced roots. Without the existing knowledge in the implementations
of several modern algorithms in the used systems—especially in Singular and
Giac—GeoGebra would not have the chance to offer competitive ATP features
for the mathematics education. These systems have several years of program-
mers’ experience and millions of lines of program code which could not have
been reimplemented from scratch within a reasonable time.
4 The design of GPP
The design of GPP is shown in Fig. 1. At the top of the figure GeoGebra’s user
interface is shown: the higher the action is drawn, the easier communication for
the user is assumed. Also in former versions of GeoGebra the highest level action
is to use the Relation Tool which purely numerically decides if two geometrical
objects have a relation like parallelism, perpendicularity, equal length etc. Prior
to GeoGebra 5, the Relation Tool was using floating point (FP) arithmetics
to decide if a certain relation holds between the input objects. In some cases,
however, FP returns an inaccurate or wrong answer, thus the output for Relation
Tool is incorrect in some cases.
Always there may be a need to increase the “verification level” of the investi-
gation which means we collect more or more trustworthy information about the
statement to decide (see the top of Fig. 1, moving from left to the right). GeoGe-
bra’s new command Prove gives an ATP answer instead of FP arithmetics with
the possible outputs “yes”, “no” or “undefined” (the last kind of output means
that no trustworthy answer was found). What is more, the new ProveDetails
5See http://dev.geogebra.org/trac/wiki/TheoremProving for more details. This
documentation includes detailed description of the applied methods and the sup-
ported constructions and statements for them.
6For an example, see http://wiki.geogebra.org/en/ProveDetails_Command.
7See http://www.geogebratube.org/student/b104296 for an example.
The Relation Tool in GeoGebra 5 5
Outsourced computations
GeoGebra internal
computations
GeoGebra UI
Relation
Tool
Prove
Prove ProveDetails
ProveDetails ShowProof
ShowProof
FP arithmetics Portfolio
Prover
skills required
R-Prover B-Prover
Built-in CAS
Singular CAS Open-Geo-Prover
W A F M G
verification level
preference
Fig. 1. The design of GeoGebra’s portfolio prover. Here W, A, F, M and G describe
different computation methods in OpenGeoProver like Wu’s method, the Area method,
the Full angle method, the Mass point method and the Gr¨obner basis method
6 Zolt´an Kov´acs
command can give more details on degeneracy conditions, that is, it can refine
the statement by adding a sufficient condition if needed. For the moment, the
ShowProof command is not yet implemented just planned: when a “readable
enough” proof will be found by the ATP subsystem, the proof could be shown
to the student for ensuring complete certainty.
In the middle of Fig. 1 GeoGebra’s internal computations are shown. GPP
optionally analyzes the shape of the statement and tries to select the most fitting
method to work with: for example, for problems which do not contain circles but
lines only and contain at most 3 free points, Recio’s method should be used. If
no analysis is used (that is, in AUTO mode), then a simple priority list of the
methods is taken: at the moment for the Prove command this is
Recio <Botana <Wu (OGP) <Area (OGP),
and for the ProveDetails command8:
Botana <Wu (OGP).
Recio’s method (R-Prover) is a quick method for proving statements concerning
points and lines in a triangle. Since it cannot be applied for constructions con-
taining conics, and for more than 3 free points it may be too slow (i. e., the com-
putation may take several seconds), GeoGebra will consider Botana’s method
(B-Prover) as a fallback in such cases. At the moment, some sorts of construc-
tions (including angle bisectors) are not yet implemented in the B-Prover, thus
in such cases GeoGebra will go ahead by using OGP’s Wu’s method to obtain
an answer. If Wu’s method fails, GeoGebra resends the statement to OGP by
requesting the computation via the Area method—for example, to prove Ceva’s
theorem this will be the only working way at the moment (see Section 5.3).
R-Prover uses arbitrary integer arithmetics internally, but B-Prover requires
computing solutions of a polynomial equation system for the Prove command
and elimination of some variables from a polynomial equation system for the
ProveDetails command. (In general, B-Prover requires Gr¨obner basis compu-
tations.) Detailed investigation showed that it would be too time consuming to
implement an internal algorithm in GeoGebra to efficiently compute polynomial
based calculations, thus we use the Singular computer algebra system (CAS) in-
stead. After changing internal CAS of GeoGebra from Reduce to Giac we found
that Giac computed Gr¨obner bases surprisingly efficiently, and its speed was
comparable with Singular in many cases. Also Giac can easily be used in a web
browser as well since it is written in C++ and by utilizing the emscripten [33]
C++ to Javascript compiler (or Google’s NaCl C++ to Native Client compiler)
the Gr¨obner basis computations are still acceptably fast.9
8Degeneracy conditions can be obtained only by two methods at the moment.
9See http://test.geogebra.org/~kovzol/data/Prove-20150219b/ for a recent re-
port on benchmarking various theorems with the R-Prover based on com-
putations with Singular and Giac, and compared with OGP’s Wu’s method.
The full source code of GPP and its benchmarking system are freely avail-
The Relation Tool in GeoGebra 5 7
In the bottom of Fig. 1 the externally used systems are shown. At the mo-
ment, these external systems cannot be used in HTML5 mode (including online
and offline modes)—we used the symbol “@” to mark those subsystems in GPP
which are transparent for the technology change. Our future plans include com-
pile both Singular and OGP to be technology transparent, i. e. we plan to make
them available also on the web platform.
As already mentioned in Section 3, OGP currently supports Wu’s method
(W) and the Area method (A), and is subject to be enhanced by additional ATP
methods including the Full angle method (F), the Mass point method (M) and
the Gr¨obner basis method (G)—the last is definitely the same as the internal
B-Prover in GeoGebra.
At the top of Fig. 1 the Relation Tool is shown as the easiest way to start
GPP. For users having advanced skills, GPP is also available via GeoGebra
commands.
5 GPP examples
In this section four theorems are provided as constructed in GeoGebra 5. Most of
them can be introduced in many secondary schools and thus they are examples
of possible classroom uses of GPP. The first three examples run in the desktop
version, and the final example is shown in a web browser.
Despite the interesting part of the log messages being shown after these
examples, they are not intended to be displayed neither for the students, nor
the teachers. Here they are printed for the researcher’s interest. Students and
teachers should be informed via GeoGebra’s user interface only in the Algebra
View, or by using the symbolical feature of the Relation Tool.
That is, the output of the Prove command in this section is shown on the left
hand side of the GeoGebra window (by default) among the Boolean Value entries
(see the top-left corner of Fig. 2, 3 and 4). The output of the ProveDetails
command is shown among the List entries (see the bottom-left corner of Fig. 5).
5.1 Altitudes of a triangle are concurrent
Fig. 2 was created by using GeoGebra 510 by drawing a triangle with its alti-
tudes d,eand fand then the command Prove[AreConcurrent[d,e,f ]] was
entered in the Input Bar (at the bottom). Here GPP selects R-prover to compute
3+2
2tests for a trustworthy answer if the altitudes are always concurrent (not
considering some degenerate cases). The computation took 8 milliseconds on a
typical PC11:
able at https://dev.geogebra.org/trac/browser/trunk/geogebra in folders
common/src/main/java/org/geogebra/common/kernel/prover/ and test/, respec-
tively.
10 GeoGebra 5 can be downloaded from its official web site http://www.geogebra.
org/download.
11 Java method names in the log are obfuscated to ensure faster results and a smaller
software package.
8 Zolt´an Kov´acs
Fig. 2. Altitudes of a triangle are concurrent
12:32:26.218 DEBUG: geogebra.m.o$a.run[-1]: Using AUTO
12:32:26.218 DEBUG: geogebra.common.p.y.a[-1]: Using RECIOS_PROVER
12:32:26.219 DEBUG: geogebra.common.l.q.a.a[-1]: nr of tests: 10
12:32:26.224 DEBUG: geogebra.common.l.q.i.<init>[-1]: Benchmarking: 8 ms
12:32:26.224 DEBUG: geogebra.common.l.q.i.<init>[-1]: Statement is TRUE
5.2 Varignon’s theorem
Fig. 3 shows an arbitrary quadrilateral with the midpoints of its sides (E,F,
Gand H). Now when considering the quadrilateral EF GH we can find that
it is a parallelogram. To verify this we need the command Prove[e==g], for
example. Since R-Prover cannot deal with Euclidean distances, B-Prover is se-
lected by GPP. The computation took 47 milliseconds on a typical PC (which
already contains the HTTP request to the external server and also its back-
ground computation—here the uninteresting parts of the log messages have been
omitted and substituted by [...]):
12:56:23.790 DEBUG: geogebra.m.o$a.run[-1]: Using AUTO
12:56:23.790 DEBUG: geogebra.common.p.y.a[-1]: Using RECIOS_PROVER
12:56:23.791 DEBUG: geogebra.common.p.y.a[-1]: Using BOTANAS_PROVER
[...]
12:56:23.806 DEBUG: geogebra.common.p.y.b[-1]: Thesis reductio ad absurdum (denied statement):
12:56:23.806 DEBUG: geogebra.common.p.y.b[-1]: 9. -1+-1*v17*v16^2+-1*v17*v15^2+2*v17*v16*v14+
-1*v17*v14^2+2*v17*v15*v13+-1*v17*v13^2+v17*v12^2+v17*v11^2+-2*v17*v12*v10+v17*v10^2+
-2*v17*v11*v9+v17*v9^2
12:56:23.807 DEBUG: geogebra.common.l.q.n.a[-1]: ring r=(0,v1,v2,v3,v4,v5,v6,v7,v8),
(v9,v10,v11,v12,v13,v14,v15,v17,v16),dp;ideal i=2*v9+-1*v3+-1*v1,2*v10+-1*v4+-1*v2,
2*v11+-1*v5+-1*v3,2*v12+-1*v6+-1*v4,2*v13+-1*v7+-1*v5,2*v14+-1*v8+-1*v6,2*v15+-1*v7+-1*v1,
2*v16+-1*v8+-1*v2,-1+-1*v17*v16^2+-1*v17*v15^2+2*v17*v16*v14+-1*v17*v14^2+2*v17*v15*v13+
-1*v17*v13^2+v17*v12^2+v17*v11^2+-2*v17*v12*v10+v17*v10^2+-2*v17*v11*v9+v17*v9^2;
i=subst(i,v1,0,v2,0,v3,0,v4,1);groebner(i)!=1; -> singular
The Relation Tool in GeoGebra 5 9
Fig. 3. Varignon’s theorem
12:56:23.835 DEBUG: geogebra.common.l.q.n.a[-1]: singular -> 0
12:56:23.836 DEBUG: geogebra.common.l.q.i.<init>[-1]: Benchmarking: 47 ms
12:56:23.836 DEBUG: geogebra.common.l.q.i.<init>[-1]: Statement is TRUE
5.3 Ceva’s theorem
Triangle ABC and its arbitrary internal point Dwas constructed in Fig. 4. Now
intersection points of lines AD,BD,CD and the appropriate sides are E,F,
G, respectively. Now let us define g=AG,h=GB,i=BE,j=EC ,k=C F ,
l=F A, then g/h ·i/j ·k/l = 1. Here OGP’s Area method is the only possible
way to get a useful ATP answer to decide the statement. To start GPP we enter
Prove[g/h i/j k/l==1]. The result is computed in 4 milliseconds in OGP’s
area subsystem, but since other methods were also attempted to use, the total
time is 95 milliseconds spent in GPP (see Appendix for the full output).
As seen, (after taking 1 ms in the R-Prover and realizing that it is not helpful)
B-Prover cannot process the construction since measuring segments are not yet
implemented for it. OGP’s Wu’s method is also unable to read the information
provided by GeoGebra, thus finally OGP’s Area method converts the statement
into an internal object, and then successfully processes it.
5.4 Thales’ circle theorem
Thales’ (circle) theorem states that in a given circle with center A, circumpoint
Band diameter DE, lines BD and BE are perpendicular. In Fig. 5 we use
10 Zolt´an Kov´acs
Fig. 4. Ceva’s theorem
Fig. 5. Thales’ circle theorem
The Relation Tool in GeoGebra 5 11
free points A,Band C(which is a technical point to define Dand Eas in-
tersection points of line AC and the circle). Let us denote BD by band BE
by d. Now GeoGebra command ProveDetails[b⊥d] returns the output list
{true,{”AreEqual[A,C]”}} which has the following meaning:
–the statement “b⊥d” holds in general,
–if A6=Cthen the statement surely holds.
Clearly, if A=C, points Dand Eare undefined, thus the statement has no
meaning. We emphasize here that Fig. 5 is created by running GeoGebra in a
web browser. Thus here the only possible method is B-Prover, and only with
the embedded CAS, Giac. In this example the construction is loaded from an
external file, thus the Javascript version of Giac (giac.js) must be preloaded
before any concrete computations in GPP. This is the technical reason why we
can see that GPP ran multiple times (first it reported “undefined” result in 18
ms, then another “undefined” in 3 ms, and the final computation took 2091 ms—
“undefined” here is displayed as “Statement is null”). (See Appendix for the
full output.)
In the log we can see that Giac returns the elimination ideal for the Recio-
V´elez algorithm in the same way as Singular does.
6 The Relation Tool
From the educational point of view, the direct classroom use of the Prove and
ProveDetails commands cannot always be considered to be an adequate ap-
proach. First of all, the output of both commands looks static: they are not natu-
ral extensions of the traditional “visual” way of dynamic geometry systems. This
means that for a given conjecture both commands will compute some results,
but after dynamically changing the construction by dragging the free points, the
outputs of Prove and ProveDetails will remain the same. This is, although,
mathematically correct and transmits some kind of “theoretical stability”, it
may not reflect the importance of the result that we actually proved something
for infinitely many cases. The fast computation (i. e. that the result is shown
almost immediately on the screen) gives the feeling that something easy is in
the background, so in sum using these new commands can yield an opposite ef-
fect to the teacher’s plans. Finally, these commands cannot be reached from the
GeoGebra toolbar: the keyboard is required to enter them. On the other hand,
the output of the ProveDetails command can still be inconvenient for many
students since it is given in a list type object (which is again not visual enough).
The Relation Tool addresses these problems. In GeoGebra 5 its original nu-
merical version has been extended to use symbolical checks as well. To not con-
fuse experienced users who already assume that a numerical check will be done
we ensured backward compatibility, that is, the symbolical check will be executed
only on demand when the user presses an extra button.
The following algorithm describes how the Relation Tool in GeoGebra 5
works:
12 Zolt´an Kov´acs
1. Use the Relation Tool like former GeoGebra versions do (i. e., a numerical
check is still computed), but add an extra button “More. . .” on the right to
the output statement if the statement was found to be true numerically. (If
the statement is not true numerically, then this extra button is not shown.)
2. If the student clicks this button, GeoGebra computes the result for the state-
ment by using the Prove command internally. Now the answer can be “gen-
erally yes” (true), “generally no” (false) or GeoGebra “cannot decide” (un-
defined):
(a) In the “generically yes” and “cannot decide” cases GeoGebra will com-
pute the result for the statement by using the ProveDetails command
as a second step. Its output will be converted to a more user friendly
format:
i. If there are no non-degeneracy conditions, the Relation Tool appends
“always true” to the statement.
ii. If there is a list of readable conjunctions found as non-degeneracy
conditions, then the list is displayed on the computer screen as a
sufficient condition for the statement.
iii. If non-degeneracy conditions were found which are not “human read-
able”, then the statement is appended with the message “under cer-
tain conditions”. (Here “human readable” means such conditions
which are easy to formulate in the classroom as well, for example
perpendicularity,parallelism or equality.)
iv. If the ProveDetails command returned undefined,
A. but Prove returned true then the statement is proven to be
“generally true”;
B. otherwise GeoGebra appends the text “possibly generally true”.
v. If the ProveDetails command returns {false}then GeoGebra re-
alizes that an internal error occured since the result of the Prove
and ProveDetails commands are contradictory. This case should
not happen.
(b) In the “generically no” case the Relation Tool appends “but not generally
true” to the statement.
This decision process is shown as a flowchart diagram in Fig. 6.
We highlight that we make a difference between cases a) iii. and iv. A. In
the first case the student is informed that there should be conditions given, but
they are difficult to explain. In the second case it is not sure that there are
any conditions, that is the statement can be always true as well, but GeoGebra
cannot compute the detailed answer. Here the teacher may need to explain this
situation.
Also an intentional decision is the wording for case a) iv. B. For the ‘too
difficult’ conjectures both the Prove and ProveDetails commands return un-
defined which may mean that
1. one or more steps cannot be formulated, algebraized or processed by GeoGe-
bra, or
The Relation Tool in GeoGebra 5 13
Input:
statement
P ?
P := Prove[statement]
Output 2. (b):
not generally true
PD := ProveDetails[statement]
PD ?
P ?
Internal error
2. (a) v.
true
false
Output 2. (a) i.:
always true
{false} {true}
P ?
undefined
Output 2. (a) iv. A.:
generally true true
Output 2. (a) iv. B.:
possibly generally true
Does the
conjunction of the
non-degeneracy conditions contain
only human readable
conditions?
Output 2. (a) ii.:
true under conjuction of
specified conditions
Output 2. (a) iii.:
true under
certain conditions
yes
no
Fig. 6. The decision process in the Relation Tool. Dashed lines show the “otherwise”
cases
14 Zolt´an Kov´acs
2. the computation was too difficult (more memory or CPU time would have
been needed).
Since the numerical computation about the truth of the statement returned
positive, it seems plausible that a symbolical computation with more resources
could certify the numerical computation as well. This is why we use the word
“possibly” here. Of course this does not tell any certainty about the truth of the
statement.
In our opinion, using the Relation Tool is convenient: the student does not
require to use GeoGebra’s Input Bar to enter anything—only mouse clicks are
sufficient for the investigation.
Let us see an example for case 2. a) ii. which is the most general case. In
Fig. 7 the nine point circle theorem is shown. Given the ABC triangle, we
construct feet points of altitudes d,eand fas points D,Eand F, respectively.
Intersection point of dand eis G. Midpoints of AG,BG and CG are H,Iand J,
respectively. Finally, midpoints of sides a,band care K,Land M, respectively.
The statement is that points D,E,F,H,I,J,K,Land Mlie on the same
circle.
Fig. 7. The nine point circle theorem is to be checked by the Relation Tool
This statement can be formulated by various ways, for example one for-
mulization is to create circle gwhich is the circumcircle of perimeter points F,I
and M. Now if we are about to check if point Lis lying on g, we need to select
The Relation Tool in GeoGebra 5 15
the Relation Tool from the Toolbar (as shown in Fig. 7), and compare objects
Land gby clicking on them. Then GeoGebra initiates a numerical check first
(Fig. 8), and since it is positive, an extra symbolical check can be started by
pressing the “More. . .” button. The result, after a short computation12, can be
found in Fig. 9.
Fig. 8. A numerical check is performed by the Relation Tool
Fig. 9. A symbolical check is performed by the Relation Tool on demand
The Relation Tool in GeoGebra 5 is ready for starting usability tests on stu-
dents, and when the tests are positive, it may become a tool to help in the teach-
ing of proofs. However, additional enhancements are still possible. In GeoGebra
between two objects there may be more kind of relationships: for example, two
segments can have same length and/or parallel independently. Now the Relation
Tool reports numerical checks for all possible relationships in its output window.
This idea could be further improved to collect relationships among a wider set
of objects than two, and investigate all possible combinations of these objects
to collect the relations. For example, the student could draw a triangle and its
12 To obtain exactly the same result, the user needs to force using SingularWS which
is deactivated by default in GeoGebra 5. Enabling SingularWS can be performed
by using the command line geogebra --singularws=enable:true e. g. on Linux.
When SingularWS is disabled, Giac is used to compute the results: here case 2. a)
iv.) B. (i. e., “possibly generally true”) will be selected.
16 Zolt´an Kov´acs
medians and select some (or eventually all) objects in the figure. In this case Ge-
oGebra could give a list of all relationships among the selected objects, including
the concurrency of the medians. Such a list can be, however, quite long. Thus it
would be important to make it possible to filter out some trivial relations, or at
least to show first those which seem to be interesting enough.
7 Conclusion and future work
The DGS features of GeoGebra are already well known in schools, but also ATP
functionality is included in version 5 only since September 2014. Its careful design
of the user interface and the applied methods using open source technology
ensure, in our opinion, a good start to offer useful new ways to teach and learn
Euclidean geometry.
There is, however, still lot of work to do. Other methods could be imple-
mented either in GeoGebra or OGP (or even in both), the current methods
could be parallelized and further improved. Also the outsourced computations
could be included in GeoGebra by using the newest compilers.
A completely open question is how readable proofs should be shown in Ge-
oGebra without confusing the students. The JGEX application has already many
promising ways which should be further discussed not only by ATP experts but
teachers as well, especially those who teach in secondary schools. After such a
consensus we would like to start to implement the ShowProof command in
GeoGebra.
We believe that GeoGebra (and also OGP) could be a common platform for
other ATP experts to join and since the source code is completely open to the
public, there is no technological obstacle to integrate the knowledge base into a
single application. A long term collaboration with experts from various countries
would be fruitful in each classroom since GeoGebra helps each student in his or
her native language to understand mathematics even more.
Acknowledgments
Ivan Petrovi´c, PhD student of University of Belgrade, the primary author of OGP
had a great part in making OGP generally work. G´abor Ancsin was the leader
of the HTML5 based experiments in the GeoGebra Team. Michael Borcherds
and Zbynˇek Koneˇcn´y helped regularly to find and eliminate bugs during the
development. Last but not least, Bernard Parisse kindly helped in improving
Giac to be even more robust for Gr¨obner basis computations.
Bruno Buchberger kindly invited the author of this paper to present a pre-
liminary version of this paper at the RISC Theorema seminar on 9 April 2014.13
13 The slides for that talk are available to download at http://ggb1.idm.jku.at/
~kovzol/talks/risc2014-2/.
The Relation Tool in GeoGebra 5 17
Pedro Quaresma and Francisco Botana supported the author to present es-
sential parts of this paper at the ADG 2014 conference on 10 July 2014.14
Appendix
Log output for Ceva’s theorem
13:22:01.959 DEBUG: geogebra.m.o$a.run[-1]: Using AUTO
13:22:01.959 DEBUG: geogebra.common.p.y.a[-1]: Using RECIOS_PROVER
13:22:01.960 DEBUG: geogebra.common.p.y.a[-1]: Using BOTANAS_PROVER
[...] not fully implemented
13:22:01.966 DEBUG: geogebra.common.p.y.a[-1]: Using OPENGEOPROVER_WU
[...]
13:22:01.987 INFO: a.b.a.a.a[-1]: Reading input geometry problem...
[...]
13:22:02.022 DEBUG: geogebra.common.p.y.b[-1]: success: false
13:22:02.022 DEBUG: geogebra.common.p.y.b[-1]: failureMessage: Failed in reading input
[...]
13:22:02.024 DEBUG: geogebra.common.p.y.a[-1]: Using OPENGEOPROVER_AREA
[...]
13:22:02.026 INFO: a.b.a.a.a[-1]: Reading input geometry problem...
13:22:02.037 INFO: a.b.a.a.d.e[-1]: Converting equal statement. Arguments :
13:22:02.037 INFO: a.b.a.a.d.e[-1]: ((Segment[A, G] / Segment[G, B] Segment[B, E] /
Segment[E, C]) Segment[C, F] / Segment[F, A])
13:22:02.037 INFO: a.b.a.a.d.e[-1]: 1
[...]
13:22:02.053 DEBUG: geogebra.common.p.y.b[-1]: success: true
[...]
13:22:02.053 DEBUG: geogebra.common.p.y.b[-1]: time: 0.004
[...]
13:22:02.054 DEBUG: geogebra.common.l.q.i.<init>[-1]: Benchmarking: 95 ms
13:22:02.055 DEBUG: geogebra.common.l.q.i.<init>[-1]: Statement is TRUE
Log output for Thales’s circle theorem
14:31:25.918 DEBUG: ?: Using AUTO
14:31:25.918 DEBUG: ?: Using BOTANAS_PROVER
14:31:25.919 DEBUG: ?: Testing local CAS connection
14:31:25.928 DEBUG: ?: starting CAS
[...]
14:31:25.935 DEBUG: ?: Benchmarking: 18 ms
14:31:25.936 DEBUG: ?: Statement is null
14:31:25.967 DEBUG: ?: Using AUTO
14:31:25.967 DEBUG: ?: Using BOTANAS_PROVER
14:31:25.968 DEBUG: ?: Testing local CAS connection
[...]
14:31:25.971 DEBUG: ?: Benchmarking: 3 ms
14:31:25.971 DEBUG: ?: Statement is null
14:31:26.704 DEBUG: ?: giac.js loading success
14:31:27.273 DEBUG: ?: Using AUTO
14:31:27.274 DEBUG: ?: Using BOTANAS_PROVER
14:31:27.275 DEBUG: ?: Testing local CAS connection
[...]
14:31:27.719 DEBUG: ?: Thesis reductio ad absurdum (denied statement):
14:31:27.720 DEBUG: ?: 6. -1+-1*v12*v10*v8+-1*v12*v9*v7+v12*v10*v4+v12*v8*v4+
-1*v12*v4^2+v12*v9*v3+v12*v7*v3+-1*v12*v3^2
14:31:27.727 DEBUG: ?: Eliminating system in 10 variables (6 dependent)
[...]
14:31:27.817 INFO: ?: [eliminateFactorized] input to cas: [[containsvars(poly,varlist):=
14 Slides and supplementary materials for this talk can be accessed at http://ggb1.
idm.jku.at/~kovzol/talks/adg2014/.
18 Zolt´an Kov´acs
{local ii; for (ii:=0; ii<size(varlist); ii++) { if (degree(poly,varlist[ii])>0)
{ return true } } return false}],[myeliminate(polylist,varlist):={local ii,jj,kk;
kk:=[]; jj:=gbasis(polylist,varlist,revlex); for (ii:=0; ii<size(jj); ii++) { if
(!containsvars(jj[ii],varlist)) { kk:=append(kk,jj[ii]) } } return kk }],[ff:=""],
[aa:=myeliminate([-1*v7*v6+v8*v5,-1*v8^2+-1*v7^2+v4^2+v3^2,-1*v9*v6+v10*v5,
-1*v10^2+-1*v9^2+v4^2+v3^2,-1+v11*v10^2+v11*v9^2+-2*v11*v10*v8+v11*v8^2+
-2*v11*v9*v7+v11*v7^2,-1+-1*v12*v10*v8+-1*v12*v9*v7+v12*v10*v4+v12*v8*v4+-1*v12*v4^2
+v12*v9*v3+v12*v7*v3+-1*v12*v3^2],[v7,v8,v9,v10,v11,v12])],[bb:=size(aa)],[for ii
from 0 to bb-1 do ff+=("["+(ii+1)+"]: [1]: _[1]=1");cc:=factors(aa[ii]);dd:=size(cc);
for jj from 0 to dd-1 by 2 do ff+=(" _["+(jj/2+2)+"]="+cc[jj]); od; ff+=(" [2]: "+
cc[1]);for kk from 1 to dd-1 by 2 do ff+=(","+cc[kk]);od;od],ff][6]
[...]
14:31:29.316 DEBUG: ?: giac output:"[1]: [1]: _[1]=1 _[2]=v5 [2]: 1,1[2]: [1]: _[1]=1
_[2]=v6 [2]: 1,1
14:31:29.318 INFO: ?: [eliminateFactorized] output from cas: [1]: [1]: [...]
14:31:29.324 DEBUG: ?: Considering NDG 1...
14:31:29.329 DEBUG: ?: Trying to detect polynomial v5
14:31:29.349 DEBUG: ?: v5 means x-equality for [v1, v5]
14:31:29.350 DEBUG: ?: Not better than previous NDG score (Infinity), this is Infinity
14:31:29.350 DEBUG: ?: Considering NDG 2...
14:31:29.351 DEBUG: ?: Trying to detect polynomial v6
14:31:29.363 DEBUG: ?: v6 means y-equality for [v2, v6]
14:31:29.364 DEBUG: ?: Found a better NDG score (0.5) than Infinity
14:31:29.365 DEBUG: ?: Benchmarking: 2091 ms
14:31:29.365 DEBUG: ?: Statement is true
References
1. Hohenwarter, M.: GeoGebra: Ein Softwaresystem f¨ur dynamische Geometrie und
Algebra der Ebene. Master’s thesis, Paris Lodron University, Salzburg, Austria
(2002) (In German.).
2. Narboux, J.: GeoProof, a user interface for formal proofs in geometry. In:
Mathematical User-Interfaces Workshop, Electronic Proceedings. Schloss Hagen-
berg, Linz, Austria (2007) http://www.activemath.org/workshops/MathUI/07/
proceedings/Narboux-Geoproof-MathUI07.html.
3. Narboux, J.: A graphical user interface for formal proofs in geometry. Journal of
Automated Reasoning 39 (2007) 161–180
4. Botana, F., Valcarce, J.: A dynamic-symbolic interface for geometric theorem
discovery. Computers and Education 38 (2002) 21–35
5. Ye, Z., Chou, S.C., Gao, X.S.: An introduction to Java Geometry Expert. In: Auto-
mated Deduction in Geometry, 7th International Workshop, ADG 2008, Shanghai,
China, September 22-24, 2008, Revised Papers, Lecture Notes in Computer Sci-
ence. Volume 6301. Springer-Verlag (2011) 189–195
6. Wang, D.: Geother 1.1: Handling and proving geometric theorems automatically.
In: Automated Deduction in Geometry, volume 2930 of Lecture Notes in Artificial
Intelligence, Springer-Verlag (2004) 194–215
7. Petrovi´c, I., Jani´ciˇc, P.: Integration of OpenGeoProver with GeoGebra (2012)
http://argo.matf.bg.ac.rs/events/2012/fatpa2012/slides/IvanPetrovic.
pdf.
8. Janiˇci´c, P.: Challenges for the Next Generation Mathematics Education Software.
Keynote presentation at the CADGME 2014 conference, Halle (Saale), Germany.
http://cadgme2014.cermat.org/node/79?width=640&height=450 (2014)
9. Quaresma, P., Janiˇci´c, P.: GeoThms — a web system for Euclidean constructive
geometry. In: Electronic Notes in Theoretical Computer Science. Proceedings of
the 7th Workshop on User Interfaces for Theorem Provers (UITP 2006). Volume
174. (2007) 35–48
The Relation Tool in GeoGebra 5 19
10. Pham, T.M., Bertot, Y., Narboux, J.: A Coq-based library for interactive and au-
tomated theorem proving in plane geometry. In Murgante, B., Gervasi, O., Iglesias,
A., Taniar, D., Apduhan, B., eds.: Computational Science and Its Applications –
ICCSA 2011. Volume 6785 of Lecture Notes in Computer Science. Springer Berlin
Heidelberg (2011) 368–383 http://dx.doi.org/10.1007/978-3- 642-21898-9_32.
11. Wikipedia: Coq — Wikipedia, the free encyclopedia (2014) http://en.wikipedia.
org/w/index.php?title=Coq.
12. Botana, F., Kov´acs, Z., Weitzhofer, S.: Implementing theorem proving in GeoGebra
by using a Singular webservice. In: Proceedings EACA 2012, Libro de Res´umenes
del XIII Encuentro de ´
Algebra Computacional y Aplicaciones. Universidad de
Alcal´a (2012) 67–70
13. Kov´acs, S., Recio, T., Weitzhofer, S.: Implementing theorem proving in GeoGebra
by exact check of a statement in a bounded number of test cases. In: Proceedings
EACA 2012, Libro de Res´umenes del XIII Encuentro de ´
Algebra Computacional
y Aplicaciones. Universidad de Alcal´a (2012) 123–126
14. Petrovi´c, I., Kov´acs, Z., Weitzhofer, S., Hohenwarter, M., Janiˇci´c, P.: Extending
GeoGebra with automated theorem proving by using OpenGeoProver — presen-
tation at the CADGME 2012 conference in Novi Sad, Serbia. http://ggb1.idm.
jku.at/~kovzol/talks/cadgme12/06/06.pdf (2012)
15. Recio, T.: Dynamic Geometry and Mathematics: few trains on a two-way track.
Keynote presentation at the CADGME 2014 conference, Halle (Saale), Germany.
http://cadgme2014.cermat.org/node/82?width=640&height=450 (2014)
16. Botana, F., Hohenwarter, M., Janiˇci´c, P., Kov´acs, Z., Petrovi´c, I., Recio, T.,
Weitzhofer, S.: Automated theorem proving in GeoGebra: Current achievements.
Journal of Automated Reasoning (2015) 1–21
17. Ye, Z., Chou, S., Gao, X.: Visually dynamic presentation of proofs in plane geom-
etry, part 1. Basic features and the manual input method. Journal of Automated
Reasoning 45 (2010) 213–241
18. Ye, Z., Chou, S., Gao, X.: Visually dynamic presentation of proofs in plane ge-
ometry, part 2. Automated generation of visually dynamic presentations with the
full-angle method and the deductive database method. Journal of Automated
Reasoning 45 (2010) 243–266
19. Kapur, D.: Using Gr¨obner bases to reason about geometry problems. Jour-
nal of Symbolic Computation 2(1986) 399–408 http://www.sciencedirect.com/
science/article/pii/S0747717186800074.
20. Wu, W.T.: On the decision problem and the mechanization of theorem proving in
elementary geometry. Scientia Sinica 21 (1978) 157–179
21. Janiˇci´c, P., Narboux, J., Quaresma, P.: The area method: a recapitulation. Journal
of Automated Reasoning 48 (2012) 489–532
22. Chou, S., Gao, X., Zhang, J.: A deductive database approach to automated geom-
etry theorem proving and discovering. J. Automated Reasoning 25 (2000) 219–246
23. Desfontaines, D.: Theorem proving in GeoGebra: Implementing the area
method into OpenGeoProver (internship report) (2012) http://www.eleves.ens.
fr/home/desfonta/InternshipReport.pdf.
24. Baeta, N., Quaresma, P.: The full angle method on the OpenGeoProver. (2013)
http://ceur-ws.org/Vol-1010/paper-08.pdf, submitted to THedu’13.
25. Weitzhofer, S.: Mechanic proving of theorems in plane geometry. Master’s the-
sis, Johannes Kepler University, Linz, Austria (2013) http://test.geogebra.org/
~kovzol/guests/SimonWeitzhofer/DiplArbeit.pdf.
26. Recio, T., V´elez, M.: Automatic discovery of theorems in elementary geometry. J.
Autom. Reasoning 23 (1999) 63–82
20 Zolt´an Kov´acs
27. Decker, W., Greuel, G.M., Pfister, G., Sch¨onemann, H.: Singular 3-1-6 — A com-
puter algebra system for polynomial computations. (2012) http://www.singular.
uni-kl.de.
28. Ancsin, G., Hohenwarter, M., Kov´acs, Z.: GeoGebra goes web. The Electronic
Journal of Mathematics and Technology 7(2013) 412–418
29. Hearn, A.C.: REDUCE User’s Manual Version 3.8 (2004) http://
reduce-algebra.com/docs/reduce.pdf.
30. Parisse, B.: Giac/Xcas, a free computer algebra system (2013) http://
www-fourier.ujf-grenoble.fr/~parisse/giac.html.
31. Kov´acs, Z., Parisse, B.: Giac and GeoGebra — improved Gr¨obner basis computa-
tions, Special semester on applications of algebra and number theory, workshop 3
on computer algebra and polynomials. https://www.ricam.oeaw.ac.at/specsem/
specsem2013/workshop3/slides/parisse-kovacs.pdf (2013)
32. Kov´acs, Z., Parisse, B.: Giac and GeoGebra – improved Gr¨obner basis compu-
tations. In Gutierrez, J., Schicho, J., Weimann, M., eds.: Computer Algebra and
Polynomials. Lecture Notes in Computer Science. Springer International Publish-
ing (2015) 126–138
33. Zakai, A.: Emscripten: An LLVM-to-JavaScript compiler. (2013) https://github.
com/kripken/emscripten/blob/master/docs/paper.pdf?raw=true.