Discovering Geometric Inequalities: The Concourse of GeoGebra Discovery, Dynamic Coloring and Maple Tools

: Recently developed GeoGebra tools for the automated deduction and discovery of geometric statements combine in a unique way computational (real and complex) algebraic geometry algorithms and graphic features for the introduction and visualization of geometric statements. In our paper we will explore the capabilities and limitations of these new tools, through the case study of a classic geometric inequality, showing how to overcome, by means of a double approach, the difﬁculties that might arise attempting to ‘discover’ it automatically. On the one hand, through the introduction of the dynamic color scanning method, which allows to visualize on GeoGebra the set of real solutions of a given equation and to shed light on its geometry. On the other hand, via a symbolic computation approach which currently requires the (tricky) use of a variety of real geometry concepts (determining the real roots of a bivariate polynomial p ( x , y ) by reducing it to a univariate case through discriminants and Sturm sequences, etc.), which leads to a complete resolution of the initial problem. As the algorithmic basis for both instruments (scanning, real solving) are already internally available in GeoGebra (e.g., via the Tarski package), we conclude proposing the development and merging of such features in the future progress of GeoGebra automated reasoning tools.


Introduction
In recent years we are witnessing a rich interaction between two geometric instruments which were initially born with different intentions in mind, but are converging and joining forces nowadays to create a new generation of software for doing Geometry. On the one hand there were the Geometric Automatic Theorem Provers (GATPs), which can be traced back to the seminal work by Wu [1], with an increasing variety of methods and approaches developed along the years, such as the Gröbner Basis Method, the Area Method, the Full-Angle Method. . . . These methods have succeeded to automatically prove a large collection of geometric statements, as can be seen for instance [2].
On the other hand, there were the Dynamic Geometry Software (DGS) programs (some of the pioneers being The Geometric Supposer, Cabri, The Geometer's Sketchpad, Geometry Inventor or Thales) which initially were conceived as a tool for teaching Geometry in schools, as a kind of digital assistant for the constructions traditionally made by ruler and compass on the blackboard.
The GATPs based on algebraic techniques, such as Wu's Method ( [1,3]) or the Gröbner Basis method ( [4,5]), require frequently the manipulation of a large set of polynomials, which represents a given geometric construction. Unfortunately, this translation of geometric properties into algebraic equations can be a tedious process. Dynamic Geometry programs turned out to be an ideal interface to introduce geometric information, and the extension of this software with convenient algebraic tools allowed the creation of a natural environment to work on automated proving in Geometry. This fruitful cooperation was put into practice in several DGS programs such as Geometry Expert, GDI or GCLC, with GeoGebra joining this list in recent years. Since its inception, GeoGebra put special emphasis on becoming something more than a DGS, but a Mathematical Software where not only the geometrical objects, but their algebraic counterparts, could be accessible and visualized simultaneously. This, together with its increasing worldwide popularity ( [6][7][8]) and free access for non-commercial use, makes GeoGebra a top choice for carrying out this integration process with algebraic proving tools.
At present, GeoGebra is actively developing a set of new Geometric Automated Reasoning Tools (GARTs) which not only are capable of proving geometric equalities or inequalities, but allow the user to explore and discover facts about geometric figures. The present work is aimed at showing some of these new tools, implemented in recent versions of GeoGebra Discovery (an experimental version of GeoGebra), emphasizing their ability to handle geometric inequalities. We also comment on its current strengths and limitations, and how the visualization possibilities that offer the graphic view of GeoGebra can illuminate the automatic resolution of geometric problems which involve certain difficulties, due to the high complexity of some elements appearing along the process (see [9] for an unpublished paper with a similar approach). To that end, we will focus our attention on re-discovering and proving by computational means the geometric inequality 5.3 of the collection [10]: Proposition 1. If the lengths of the sides of a triangle are a, b, c, and the length of its circumradius is R, then a + b + c ≤ 3 Equality holds if and only if a = b = c.
In summary, our research goal is to show how to approach this Proposition through the combination of a dynamic color scanning method and (real algebra) symbolic computations, exemplifying the need to automatize this combination of tools, to address and to solve some automated reasoning challenging issues that arise in the current GeoGebra Discovery version.
In Section 2, we briefly describe the tools that are already available in the official releases of GeoGebra, and which allow proving and discovering geometric equalities in a given construction. In Section 3, we present new tools for dealing with geometric inequalities, currently implemented in GeoGebra Discovery, an experimental version of GeoGebra maintained by the first author where GARTs are first checked before official release. In Section 4, we introduce the Dynamic Color Scanning Method, a powerful and flexible visualization technique devised by the second author on GeoGebra that can be helpful when symbolic computations or other visualization methods fail. To illustrate how the previous tools can be employed and combined, in Section 5, we approach the task of automatically proving the classical geometric inequality in Proposition 1, highlighting the accomplishments that the new symbolic tools in GeoGebra Discovery achieve when investigating geometric relations and inequalities, but commenting also on the current limitations that hinder a full resolution of the problem. Section 6 combines the visualization power of the dynamic color scanning method, together with the algebraic capabilities of the software Maple to definitely settle Proposition 1. Finally, in Section 7, we include some conclusions and propose lines of research to improve the performance and versatility of GeoGebra in future versions.
We are using here six variables, and there is one polynomial relation among them. Intuitively speaking, our construction has five degrees of freedom (four for the coordinates of the points A, B, plus one more that decides the height of the point P on the bisector). Of course, for more complex constructions we would get not just one, but a collection of polynomials H = {H 1 , . . . , H m }. The points in L n satisfying the polynomials in H form the hypothesis variety V(H), and each of these points correspond to a particular instance of the figure under study. Now, after having settled our construction we would like to prove something. Let us suppose we want to prove the following thesis (see Figure 1): The distances from P to A and B are equal. This thesis can also be expressed as a polynomial: and the set of its solutions in L 6 is called the thesis variety V(T). Now, the proposition If P is a point on the perpendicular bisector of the segment AB, then the distances from P to A and B are equal.
Would be proved if we check that, for each possible configuration u := (u 1 , . . . , u 6 ) ∈ L 6 satisfying the relation H 1 (u) = 0, then T(u) = 0 also holds. In other words, if we check that {H 1 (u) = 0 =⇒ T(u) = 0}. Using the language of algebraic geometry, this amounts to say that the hypothesis variety V(H) is contained in the thesis variety V(T). Now, in this new algebraic setting, we can take advantage of all the machinery related to varieties, polynomial rings and ideals (with coefficients in the algebraically closed field L). Since proving that V(H) ⊂ V(T) is equivalent to show that V(H) ∩ (L n \ V(T)) = ∅, by adding an extra variable t and considering all our polynomials in L[u 1 , . . . , u n , t] we are led to show that V(H) ∩ V(Tt − 1) = ∅ ⊂ L n+1 . By the Nullstellensatz Theorem, this is the case if the ideal H + Tt − 1 ⊂ L[u 1 , . . . , u n , t] is 1 . However, checking that 1 belongs to an ideal given by a set of generators can be algorithmically decided by checking whether a Gröbner basis of the ideal reduces to {1} ( [16], (Chapter 2)).

Remark 1.
Notice that in the example above we actually have V(H 1 ) = V(T), since T = 2H 1 . In other words, the hypothesis and the thesis are equivalent.
Unfortunately, working in a Euclidean Geometry environment introduces certain complications in the description given above, due to several reasons: (i) The use of complex versus real geometry tools: Points in the Euclidean plane have real coordinates, while the algebraic algorithms used within this framework are designed for algebraically closed fields. Therefore, when we state that V(H) ⊂ V(T) we are including points in V(H) with complex coordinates, which is more than what we actually need. We could be missing valid theses which hold for all real points in V(H), but not on the whole complex variety (see [17,18]). For example, let us consider the following statement, usually called Clough's conjecture [19], namely, the equality of -the sum of segments l = EC, m = FB, and n = GA, where E, F, G are the feet of the perpendiculars to the sides of an equilateral triangle from an arbitrary point D, -and 3p/2, where p is the length of side AB, i.e., 3p/2 is half the perimeter 3p of the equilateral triangle ABC.
See [20] for detailed synthetic and algebraic proofs. Now, the algorithms we have implemented in GeoGebra, if asked about the Relation between l + m + n and 3/2 · p, proceed, first, checking the numerically approximate equality of both quantities and, if it holds, starting a symbolic protocol by considering the ideal generated by all the polynomial equations describing the hypotheses. We emphasize here the terms polynomial equations, because all the lengths l, m, n, p are described by expressing l 2 , m 2 , n 2 , p 2 as the sum of the squares of the differences of the coordinates of the extremes of the corresponding segments, say, l 2 = (c 1 − e 1 ) 2 + (c 2 − e 2 ) 2 , etc. There are neither square roots nor choice of positive signs for defining l, m, n, p, as this approach would require real algebraic geometry methods. Thus, our hypotheses ideal includes much more cases (in the complex geometry context) than intuitively expected, and the thesis l + m + n = 3/2 · p, holds only on some of them (for example, on those cases where l, m, n, p are positive). Accordingly, GeoGebra Discovery declares that the formulated statement is "true on parts, false on parts", see Figure 2. This means that the underlying algorithm detects, without having to compute a primary decomposition of the involved hypotheses ideal, that the statement holds true on some components and is false on some others, see item iii) below. On the other hand, asking directly for the proof of Clough's statement, see Figure 3, an affirmative answer is obtained, together with a list (too long in this case to be fully displayed in the Figure) of construction instances that should be avoided for the truth of the statement: degenerate cases such as when the triangle collapses and, also, variants of the thesis statement that hold just on the primary components of the hypotheses where the given thesis is false. This is related to the possibility, in this case, to modify the thesis so that it collects all possible sign choices for l, m, n, p, by multiplying (l + m + n) − 3/2 · p by all possible variants of such formula, changing signs for l, m, n, p, such as ((l − m + n) − 3/2 · p), ((l − m + n) + 3/2 · p), etc. See [21] for a detailed study of this way of understanding real statements in a complex geometry context.  Of course, the reason for choosing a complex algebraic geometry approach for GeoGebra automated reasoning tools is because algorithms based on complex geometry are generally much more efficient than their real counterparts, and this aspect is of special relevance for the implementation of GARTs in software with educational purposes. (ii) Non-degeneracy conditions: In Geometry statements, whenever we mention objects such as line segments, polygons, circles. . . , we implicitly assume certain conditions on the points that are used to define those figures and render a theorem as true. As an example, in a theorem on triangles we always assume that its vertices are non-collinear points of the plane. These conditions are not easy to interpret by the GATPs and require special care when dealing with them. The problem of non-degeneracy conditions, which depends upon the choice of independent variables in the construction, the way the construction itself is carried out, or the interpretation we can give to what a degenerate construction is, has been studied extensively in the literature and the reader is referred to [12,[22][23][24][25] or [26] to gain a better understanding of the intricacies surrounding it. (iii) True on parts, false on parts statements: As already explained in item i), quite often the hypothesis variety that is obtained from the algebraization process (via complex geometry algorithms which avoid the computationally costly decomposition of the hypothesis variety into irreducible components) can have irreducible, non-degenerate components of maximal dimension, such that the thesis holds on some of the components, while not on others. This situation was thoroughly treated in [27], and gave rise to a new category of true on parts, false on parts geometric statements.
However, our latest developments want to go further, providing tools that actually discover geometric theorems, not just prove them. Some of the strategies behind the algebraic approach to this endeavor (see also [12,24,28]) are briefly described below: Strategy 1. We want to show the implication {H =⇒ T}. As seen before, we proceed to check that the ideal H + Tt − 1 = 1 = K[u 1 , . . . , u n , t]. What if we do not get 1 as response to our query? Let us assume that our CAS system produces an output such as this: H + Tt − 1 = g 1 (u 1 , . . . , u n , t), . . . , g l (u 1 , . . . , u n , t) =: J.
If we set J = J ∩ K[u 1 , . . . , u d ] = 0, where the variables {u 1 , . . . , u d } form a maximal set of independent variables in H , it is easy to see that the points in the variety V(J ) ⊂ L n cannot satisfy the thesis condition, and must be excluded from the hypothesis variety in order to obtain a valid statement, which would take the form Of course, a new check should be made to confirm the validity and interest of this new formulation.
In other words, an algorithm has provided us automatically with the missing hypothesis that turn our initial statement into a true one. Depending on the form and complexity that the polynomials g i take, the interpretation of these new conditions in geometric terms can be more or less affordable. In fact, some of them are closely related to the non-degeneracy conditions we already mentioned.

Strategy 2.
We have obtained from a geometric construction our hypothesis ideal H, and we are curious about when a certain property holds among some of its elements. If we express this property through an algebraic relation f (u 1 , . . . , u n ) = 0, then we can think of the ideal and if the variables {u 1 , . . . , u d } form a maximal set of independent variables in H we can eliminate the variables {u d+1 , . . . , u n } to obtain an ideal that provides the conditions that the independent variables must fulfill in the construction in order to obtain the wanted property.

Strategy 3.
Another possibility for implementing discovering tools which combine a numerical and a symbolic approach can proceed as follows: Given a geometric configuration, proceed firstly to search (by using fast performing numerical computations) for properties held among the elements of the construction (parallelism, concurrency, collinearity, concyclicity,. . . ) and set them as possible conjectures. In a second stage, these conjectures will be handled by the algebraic prover to decide whether they can be settled as true statements or rejected.
GeoGebra makes use of these techniques in several commands, some of them already implemented in the official releases of GeoGebra (for technical details concerning their inner workings, see [28,29]): • Relation(<list of objects>): This higher level command performs two distinct operations: In the first place it proceeds to make a numerical comparison of the objects, and outputs an answer concerning geometric properties such as equality/inequality, parallelism, collinearity, concurrency, etc. Together with this numerical output, the user finds a "More..." button that, when clicked, gives way to a deeper, symbolic analysis of the numerical result previously obtained, resorting to the commands that mention below and proving or rejecting its truthfulness. See Figure 2. • Prove(<Boolean Expression>): This command is the basic symbolic automatic theorem prover in GeoGebra, and its output can be (generally) true, (generally) false or undefined/? (when GeoGebra cannot decide the question). In order to introduce easily the Boolean expressions of geometric nature, GeoGebra offers a number of different commands such as AreParallel(<line>,<line>), AreCollinear(<Point>,<Point>, <Point>), AreConcyclic(<Point>,<Point>,<Point>,<Point>), etc. • ProveDetails(<Boolean Expression>): Improved version of the previous command, offering as output more information on degeneracy conditions whenever they are easy to translate into a simple statement. See Figure 3. • LocusEquation(<Arguments>): This command offers the possibility of finding the algebraic equation for a geometric locus, obtained also by symbolic means. Besides, the command shows on the graphic window the curve corresponding to the equation. Among the several options for choosing the arguments, one which will be useful later to our purposes is LocusEquation(<Boolean expression>, <Point>); this command will find the equation for the locus of points satisfying the given Boolean expression. • Discover(<Point>): This command, one of the latest additions in GeoGebra Discovery, provides as output from a geometric construction a whole set of geometric statements concerning properties about the lines, segments and other geometric ele-ments related to the point provided as argument. The inner workings of the command follow the idea exposed in Strategies 1 and 3 above.

New Tools in GeoGebra Discovery: Handling Geometric Inequalities
In the previous paragraphs we summarily described how automated reasoning tools have been implemented in GeoGebra for proving geometric equalities. However, many classic theorems and results in Geometry are not stated in the form of an equality, but through the use of inequalities-and immediately comes to mind as an essential example the triangle inequality. However, working with inequalities forces us to enter into the realm of Real Algebraic Geometry and its corresponding set of instruments, so that the methods based on polynomials in closed algebraic fields do not suffice to cover this interesting family of geometric results.
In this respect, we believe that at present GeoGebra is pioneering the implementation of automated reasoning tools for proving and discovering geometric inequalities in a DGS environment, and aims at being able to produce proofs in a reasonable timeframe for a wide collection of results.
These new tools are currently in the development stage, and have not yet been implemented in official releases of GeoGebra. Nevertheless, they can be accessed through an experimental version of GeoGebra denominated GeoGebra Discovery ( [30]). The (real) algebraic methods that are at the root of dealing with this new set of geometric propositions are based on real quantifier elimination and a derived technique denominated Cylindrical Algebraic Decomposition (CAD). The following is a brief description of the basic ideas involved when performing a CAD.
We start with a given geometric construction that, in a similar way as in the previous case when considering geometric equalities, is defined by a collection of polynomial relations. However, now we introduce two main differences: On the one hand, we restrict our variables to take values in the field R, so that we focus our attention in the real plane. On the other hand, we allow them to be only positive or negative, or to hold inequality relations among them. In this way, we obtain a better, more precise description of the set of instances available for our Euclidean construction. Therefore, instead of working with complex varieties, our set of constructions can be represented by a subset of R n of a type that generalizes that of a variety, called a semialgebraic set. These sets can be expressed (see [31]), (Chapter 3) as a union of sets of the form The possibility of working in a real geometry environment allows us to consider details that escaped our previous complex geometry approach. To see how naturally semialgebraic sets appear in geometric constructions, let us translate into algebraic form the statement Given two points in the plane, take a point P in the interior of the line segment AB.
If we set coordinates A(u 1 , u 2 ), B(v 1 , v 2 ) and P(x, y), then the algebraic translation would give the following semialgebraic set of points (u 1 , u 2 , v 1 , v 2 , x, y) ∈ R 6 defined by the following equations and inequalities: Here is where a CAD becomes handy. A CAD is a partition of R n in semialgebraic sets. Let us consider first the projections π k : R n → R k , (u 1 , . . . , u n ) → (u 1 , . . . , u k ), 1 ≤ k ≤ n − 1. Given a set S ⊂ R n−1 , a cylinder is a set of the form S × R, and a stack is a partition of a cylinder of the form S × R = 2k+1 j=1 S j , induced by a sequence of continuous Notice that we have π n−1 (S j ) = S for each j. Now we can define a CAD inductively as follows: j=1 S ij , whose elements are semialgebraic sets, and such that the collection {T i }, i = 1, . . . , r is a CAD of R n−1 (here we have renamed and reindexed the elements of the (n − 1)−dimensional CAD to avoid accumulation of subindices).
Besides, π n−1 (S ij ) = T i and, by the recursive nature of the construction, the collection of sets {π k (S ij )} (with repeated elements) forms a CAD of R k . Now, given a finite set of polynomials P = {p i }, there are algorithms whose output is a CAD, together with a sample point in each of its elements, and so that for all the points in each of the elements of the partition and each p i ∈ P only one of the relations p < 0, p = 0, p > 0 holds. We then say that the CAD is compatible with P (see Figure 4 for an example). Therefore, if we describe a geometric construction by the hypothesis semialgebraic set H ⊂ R n and our thesis is represented by an inequality T = {T(u 1 , . . . , u n ) ≥ 0} ⊂ R n , we can construct a CAD for the collection of all polynomials defining the hypothesis and thesis sets. For each set S ij in the resulting partition, either S ij ⊂ H or S ij ∩ H = ∅. Since the CAD provides also a complete sample of points {q ij } for all the pieces S ij and the sign of T on each piece does not change on each of them, we can verify whether the inequality T ≥ 0 is satisfied on all the sets S ij that constitute H by verifying that T(q ij ) ≥ 0 for each of them, and this would mean that our geometric statement is true. Unfortunately, the computational complexity of performing a CAD is very high, being doubly exponential on the number of variables (see [32]), and this renders the process unpractical in complex configurations. Nonetheless, some clever implementations, combined with other algebraic techniques that simplify the process, have been already successful, time ago, to automatically prove a wide number of classic, non-trivial results ( [33][34][35]).
However, we can take advantage of the semialgebraic set H in order to discover new inequalities as well. Let us assume that we want to investigate the relationship between two quantities u > 0, v > 0 that have a geometric meaning in our construction, and find out whether there is a constant p such that an inequality of the form u ≤ pv (or a similar one) holds. Then we can include {p, u, v} in the space of variables where our Hypothesis semialgebraic set lies (p as first coordinate), together with the defining polynomials for u and v and the equation u − pv = 0 that defines p as the ratio of the quantities u, v. Thus, we obtain a hypothesis set in some R n which also contains as coordinates the variables {p, u, v}. Recall that each point of H corresponds to an instance of our geometric construction. Now, if we proceed to construct a CAD and use it to project H on the coordinate p-axis we will get a semialgebraic subset in this axis, which is the collection of intervals or points for which there exists geometric constructions providing the corresponding value p. The CAD algorithm facilitates the computation of this projection set, and if we obtain, for example, an interval of the form 0 ≤ p ≤ M, this leads to a proof of the inequality u ≤ Mv. Thus, this algorithm turns out to be a suitable tool for the discovery of new geometric facts.
A detailed description of the algebraic and geometric aspects of the construction of a CAD can be found in [36,37]. There are implementations of the corresponding algorithms in several software programs such as Mathematica, Maple, Reduce or QEPCAD, and GeoGebra Discovery, in its most recent versions, has incorporated them through its realgeom extension, see [38]. In its most recent release, GeoGebra Discovery embeds the Tarski/QEPCAD B program (see [39][40][41]) to perform these CADs, opening the possibility of proving geometric inequalities without resorting to external programs. The commands in GeoGebra that put in action this new set of tools are the following: • Compare(<Expression, Expression>): This command performs a sequence of tasks that can be briefly described as follows (see [40]): 1.
The first two points of the construction are identified with (0,0) and (1,0). This reduces the number of variables required, and avoids some degenerate configurations.

2.
By using only the equalities defining the hypothesis, there is a first trial to check for an equality relation between the input expressions. This is handled by the Giac CAS embedded in GeoGebra.

3.
If equality relations are not found, the set of equations in the hypothesis is processed, eliminating unnecessary variables and generating a quantified formula. 4. Now, via the Tarski/QEPCAD B software, this quantified formula is converted into a quantifier-free formula, by means of a CAD algorithm that outputs an inequality for the quotient of the input expressions.

5.
This inequality is translated and displayed into a simple form, easy to understand by the user.
See Well, in these lines, working with the same software, we show an example that is totally functional (lines 327 to 330) and one example, very similar -apparently-that is not functional at all (lines 330 to 333).
The whole sentence "Pioneer work in the use of this technique in the GeoGebra environment can be attributed to the second author [55], who has a nice collection of applications in [46] (see Figure 4)." is a simple advertising and unlike an unreviewed material (such [46], [47], ...) here for Figure 4 you must provide some math.
There is a clear mistake here, since by "the second author" we refer to • Relation(<list of objects>): As mentioned before, this higher level command performs two distinct operations ( [28]): first, proceeds to make a numerical comparison of the objects, and outputs an answer concerning geometric properties, includingthis is the more recent improvement-inequalities, etc. Then the user finds a "More..." button that, if clicked, starts a deeper, symbolic analysis of the numerical result previously obtained, proving or rejecting its truthfulness. A detailed example is developed in Section 5, and shown in Figures 10 and 11.

Visualization of Real Curves and the Dynamic Color Scanning Method
Nowadays, computer visualization of mathematical objects is an active area of research, which finds applications in a great variety of disciplines. In particular, the graphic representation of real algebraic curves (especially in the neighborhood of a singularity) poses a number of challenges that, although have been faced by numerical and also by symbolic methods (see [42] and its many references, as well as [43] as a more recent contribution), still lack accuracy in current computer software implementations, even in apparently innocent-looking examples.

Example 1. Within GeoGebra, introduce in the input line the command
ImplicitCurve((x-1)^2+y^2), whose output corresponds to the curve C with equation (x − 1) 2 + y 2 = 0. It is obvious that the real part of C contains only the point (1, 0). GeoGebra will display correctly the curve, as shown in Figure 6a. If we want to visualize now the curve C given by (x − 1) 4 + y 4 = 0, whose real part coincides with that of C, and introduce ImplicitCurve((x-1)^4+y^4), GeoGebra will display nothing on its graphic view, as shown in Figure 6b. These issues can also affect the command LocusEquation(), since it makes use of ImplicitCurve() to represent loci graphically.  will miss the real point (0, 0) that belongs to this cubic curve, see Figure 7a. This is due to the fact that the implicitplot command uses a sample-based method which is not able to detect accurately isolated points. However, Maple includes other representation options that allow a more precise output for the case of real algebraic curves, by means of the package algcurves. Executing now with(algcurves); plot_real_curve(x^2+y^2-x^3, x, y); our previous missing point will appear on screen, as shown in Figure 7b. Being the case that important characteristics of algebraic curves can be lost when making use of these plotting commands, it is interesting to explore other ways to approach the problem of visualizing (real) algebraic curves. This is the moment to take a closer look at some of GeoGebra's special functionalities. Since this program was mainly designed as a software to be used for the teaching and learning of Mathematics, it incorporates a set of tools that facilitates the visualization of geometric constructions and their properties, making them more attractive and comprehensible to students. It turns out that these tools can also be employed as a powerful resource to explore diverse problems where complex geometric configurations arise. In particular, the combined use of the properties Show Trace and Dynamic color that can be assigned to objects in the graphic window of GeoGebra creates a scanning tool capable of showing hidden relations among the elements of a given construction. We refer to this technique as the dynamic color scanning method.
The basic idea behind this method lies in the ability to assign a color to each point in the plane depending on its position in relation to a geometric construction, element or property we have to deal with. Whether working with distances and other measures, with operations performed on a set of these quantities, or with equations corresponding to geometric loci, the scanning method in GeoGebra is easy to implement, reasonably fast and reliable, and produces outstanding visual information that can provide insight in a complex scenario. Pioneer work in the use of this technique in the GeoGebra environment can be attributed to the second author, who has a nice collection of applications in [44] (see Figure 8). Let us describe briefly how this visual method works by showing a simple example (for those unacquainted with GeoGebra, its reference manual can be found at [45]). Let us assume that we have three given points A, B, C on the plane, that we can display in the graphic window of GeoGebra. Let us denote the distance between two points P and Q by d(P, Q).

Problem 1. Find the geometric locus of points P such that d(P, C) = d(P, A) + d(P, B).
This locus is easy to display with the ImplicitCurve command in GeoGebra, see Figure 9a. Now, in order to exemplify how to visualize this locus through our dynamic color scanning method approach, let us start associating some colors to point P(x, y), as follows. First, we remark that GeoGebra allows to set independently dynamic values of the three color channels RGB that colorize an object in GeoGebra. The numeric value for each channel ranges between 0 (no color) and 1 (full color), and for other values z outside this range GeoGebra applies a periodic pattern given by In particular, if we set the values (R,G,B) to integers of the form (even, even, even) we get black, and by setting them to integers (odd, odd, odd) we obtain white. Besides, if all three channels have equal values, a color in the scale of greys is produced. Now, for instance, let us set dynamic values for the point P as follows: Red : c/s Green : 1− abs ( s −c ) Blue : s/c , where c = Distance(P,C) and s = Distance(P,A)+Distance(P,B). Observe that we will get for the point P the white color only when c = s, since values assigned to red and blue channels are positive and mutually inverse, and all three channels will give odd numbers (in fact, 1) only in this case. Now, if we activate the trace for the point P and drag it, after covering the region we are interested in, we obtain the color scanning of the area, and we will have a visualization of the locus (the set of points white-colored) we are looking for. It is interesting to make here several remarks concerning the output image: • The periodic patterns that frequently arise in form of concentric rings of similar colors are due to the periodic behavior of the dynamic colors when the values introduced in the RGB channels move outside the [0, 1] range, as previously mentioned (see Figure 9b). • A way to restrict the values for the dynamic color channels in the range [0, 1] is obtained by using exponential expressions of the form Red : e^( − abs ( f ( P ) ) ) Green : e^( − abs ( g ( P ) ) ) Blue : e^( − abs ( h ( P ) ) ) , so that only when simultaneously the functions f , g, h, depending on point P, are equal to 0 the white color will be assigned to P. In our example, by assigning to the color channels the values Red : e^( − abs (1 − c/s ) ) Green : e^( − abs ( s −c ) ) Blue : e^( − abs (1 − s/c ) ) , we obtain Figure 9c. Besides, if we substitute in a given RGB channel, for instance the red one, the expression in the exponent abs( f (P)) by (abs(k f (P)) − floor(k abs( f (P))), where k is a convenient positive constant, we get the mantissa of k abs( f (P)), which drops abruptly to zero when f (P) crosses integer values, producing distinct lines because of the sudden color change in the red channel. This trick leads to the appearance of level curves connecting points P with the same f (P) value, which will be more densely distributed by choosing a greater value for the constant k. We will make use of this technique later in Section 6.1. • Since we have three different channels that can hold independent values, by playing wisely with them, we have at our disposal up to three different properties to visualize in our scanning method. An illustration of how to take advantage of this feature is shown in Figure 8b, where an investigation on the Fermat's Point is carried out (see the section on "Escáner del Punto Fermat" in [44], for details on the construction). Now, to improve the output of the process and avoid the cumbersome dragging of point P all over the graphic view we can benefit from other resources included in GeoGebra and proceed as follows: 1.
Set a rectangular region to be scanned. Let us say it has as upper left corner the point (x 0 , y 0 ), and dimensions w × h.

2.
Shrink the size of the radius for the point P to its minimum size.

3.
Create a slider t that will be used as the x-coordinate of P, and runs from x 0 to x 0 + w.

4.
Set the coordinates of P to (t, y 0 ) and rename the point to A1. This trick allows us to automatically assign the point P to the cell A1 of the GeoGebra spreadsheet. Now we can create a list of points Ai, 1 ≤ i ≤ n, by taking advantage of the spreadsheet features, starting first by adding the point A2 = A1 − (0, ), with the same properties as A1, and dragging downwards (as it is usually done when working with spreadsheets) the cell A2. This column of points (all of them inheriting the properties we set up for A1) translates in the graphic window into a scanning vertical segment, which will sweep the region as the slider t runs through its defined range. A recommended value for is 0.02 in order to obtain a good quality of the scanning image. Therefore, for covering our rectangular region of height h we should create around n ≈ 50 h points.
(a) (b) (c) We will see below how this method proves useful when trying to understand geometric configurations that lead to demanding computational tasks that cannot be handled by the GeoGebra CAS. Other variations of these dynamic coloring methods in GeoGebra that show their flexibility and visualization potential can be found in [46] (see also [44,47]).

Remark 2.
Similar visualization techniques to those presented here can be also employed in other DGS programs such as Cinderella [48] and its companion open project CindyJS [49], some of them inspired in Losada's scanning method for GeoGebra (see for instance [50]).

A Case Study: Relation between the Perimeter and Circumradius of a Triangle
Now we center our attention on Proposition 1, and let us see how GeoGebra can help us discover this proposition automatically, without having to provide any clue whatsoever as an input, apart from the basic construction required to set the scenario for our investigation.
We start by constructing the three vertices A, B, C of a triangle. Without loss of generality, we can assume A and B to be the points A(0, 0) and B(1, 0). The third vertex C has free coordinates (x, y). Now we draw the segments BC, CA and AB, with respective lengths a, b, c, and the perpendicular bisectors l and m to CA and AB respectively. Let us denote by D(d 1 , d 2 ) the point of intersection of the two previous bisectors. The segment AD of length R is the circumradius of the triangle ABC. Our construction is all set. Now we introduce in the GeoGebra input line the command Relation(a + b + c, R) and we obtain (see Figure 10) an initial, numerical output indicating that the quantities a + b + c and R do not coincide. Not very informative indeed, but if we press the "More..." button (see Figure 11) the realgeom extension enters in action and quickly shows that the relation  However, Proposition 1 not only asserts that this inequality holds. It also states that the corresponding equality a + b + c = 3 √ 3 R is true if and only if the triangle ABC is equilateral. How can we prove this with our set of tools? Well, for this task the command LocusEquation(<Boolean Condition>, <Point>) becomes handy, since if we ask GeoGebra to provide us with the geometric locus of the points in the plane satisfying the equality relation a + b + c = 3 √ 3 R we should obtain an algebraic curve giving us information on the set of points we are looking for. Were Proposition 1 correct, this locus should reduce to the points C 1 ( 1 2 , √ 3 2 ) and C 2 ( 1 2 , √ 3 2 ), which are the only ones producing equilateral triangles together with A and B.

The Visual Approach Using the Dynamic Color Scanning Method
After the difficulties that we have encountered when trying to study the algebraic curve P(x, y) = 0 by means of the LocusEquation() command, let us approach the problem from a more visual strategy, by using the dynamic color scanning method described in Section 4. Let us choose as scanning area the rectangle R with two opposite vertices located at (−2, −2) and (3,2), which contains points A, B of our construction. We have to assign dynamic values to the three RGB color channels of the scanning points, and these values should depend on some kind of measure of the "distance" of the point to the curve P(x, y) = 0. As an initial choice, we could just choose the values (e −|P(x,y)| , e −|P(x,y)| , e −|P(x,y)| ) for each point (x, y), but the high values that the polynomial P attains on the considered region (for instance, P(2, 2) = 448988778496) produces undesirable effects in the visualization process, so that it is better to adjust these values in order to obtain a better display. A good choice to get a neat output is obtained by assigning to each point Ci of the scanning segment the following values (see Figures 13 and 14):  Here, recommended values for the values k, Bi are k = 10 and Bi = log(1 + log(1 + abs(P(Ci)))).
As already seen, the "curve" of white points in the scanned region would represent the part of the geometric locus a + b + c = 3 √ 3 R contained in R. However, instead of a curve we perceive four whitened areas: two of them, more visible, with centers located around (0, 0) and (1, 0), and two smaller ones (these ones are trickier to spot, and the technique described in Section 4 for producing isolines, applied to the red and blue channels, helps detecting them) with centers lying on the line x = 1 2 . This leads us to state the following conjecture: Conjecture 1. The number of real points of the curve P(x, y) = 0 is finite and equal to four. Besides, two of them have as x-coordinate the value x = 1 2 , while the two others have x-coordinates x = 0 and x = 1 respectively.
So, the dynamic color scanning method has helped us approach the solution to our question on the conditions that correspond to the equality case in Proposition 1. Of course, this cannot be considered a formal proof, but the information that we have obtained from this visual exploration allows us to return to a symbolic approach, this time with a conjecture in mind, and with Maple and its algebraic toolkit as auxiliary assistant.

The Symbolic Approach Using Maple Commands
Thanks to the previous section we now have a better intuition about the geometric locus corresponding to the equality a + b + c = 3 √ 3 R, and we can try to resort to more powerful tools in order to definitely settle the question that has resisted our analysis so far. From now on, we will use Maple and a variety of its available tools to perform a thorough algebraic study of the situation in order to completely elucidate the set of real points in P(x, y) = 0.
In the first place, since we already have some familiarity with CADs, we will use higher level commands implemented in recent versions of Maple to quickly settle down Proposition 1. To achieve this, we need the RegularChains package and its commands to perform CADs: Here, P represents the polynomial detailed in the precedent Equation (5). Executing this group of instructions we get which graphically corresponds to the CAD shown in Figure 15. This confirms at once our Conjecture 1, as well as the equality case in Proposition 1, and we are done.
However... what kind of symbolic calculations lie behind performing a CAD compatible with a set of given polynomials? In order to gain a better understanding of how Maple is capable of completing these tasks related to working with polynomials in real coefficients, in the sequel, we proceed to give a more guided, step-by-step treatment of the problem, by using lower level Maple commands that can also be translated to other software packages such as the Xcas/Giac environment.
We start by translating into algebraic form our initial construction (see Table 1).

Construction Element Variables Polynomial Equation
Points Notice that we take care of expressing all our relations concerning distances and other measures in polynomial form. This allows the use of the algebraic tools implemented in Maple. We define now the ideal containing our hypothesis, which we denote by Hypo: The Hilbert dimension of this ideal gives us information on the number of maximal independent variables, giving us the degrees of freedom of the construction: Therefore, the variables {x, y} are not free anymore, and a polynomial relation among them must hold. If we type now > P : = E l i m i n a t i o n I d e a l ( T , { x , y } ) ; we obtain the same polynomial P(x, y) appearing in Equation (5) (with a different order of terms), confirming the good job done by GeoGebra when computing the locus equation for the equality a + b + c = 3 √ 3 R. Our intuition, reinforced through our visualization approach in Section 6.1, invites us to think that this algebraic curve should have only two real points (apart from degenerate cases that already have been considered). Therefore, our mission consists now in finding all the real points belonging to the curve P(x, y) = 0. Since Maple also includes graphic tools to plot real algebraic curves, in the same spirit as we tried with GeoGebra we can see whether Maple outputs (see Figure 16) successfully the real set of points for this curve: > with ( a l g c u r v e s ) : p l o t _ r e a l _ c u r v e ( P ( x , y ) , x , y ) ; Indeed, it seems that this time the picture looks complete: The graphic output shows four points that certainly could correspond to the degenerate cases C 1 (0, 0) and C 2 (1, 0), together with the elusive points C 3 ( 1 2 , √ 3 2 ) ≈ (0.5, 0.866) and C 4 ( 1 2 , − √ 3 2 ) ≈ (0.5, −0.866), which correspond to the two possible equilateral triangle configurations. We are getting closer to our goal, but we have learned that, even though the visual approach has provided us with clues to settle the problem, at the same time it can be an inaccurate technique. Now, in order to verify rigorously that these are the only real points of our curve, we will proceed as follows: Step 1: Check that P(x, y) = 0 for x ∈ {0, 1 2 , 1} has real solutions in y, and determine them all.
These two facts will lead to a full determination of the set of real points in our geometric locus.
Step 1: We first set x = 0 and compute P(0, y), factorizing the result. > s i m p l i f y ( subs ( x =0 ,P ( x , y ) ) ) ; f a c t o r ( % ) ; 88209y 16 + 204228y 14 + 236134y 12 + 204228y 10 + 88209y 8 y 8 297y 4 + 432y 3 + 658y 2 + 432y + 297 297y 4 − 432y 3 + 658y 2 − 432y + 297 From the first factor it follows that there exists the real solution y = 0, and to exclude any other possibilities it is enough to count real roots by using the Sturm sequence of the second factor (since the third factor has symmetric real roots, being obtained from the second through the substitution y → −y).
The output is a factorized polynomial F(x) in R[x] that we can express in the form F(x) = F 0 (x) · F 1 (x) · F 2 2 (x). The first factor F 0 (x) is a monomial containing x 72 , which gives the real root x = 0. The two other factors F 1 (x), F 2 (x) (one of them squared) need a more careful examination. Let us see first whether they can be further factorized.
Certainly, there are still people loving human-made proofs. If the reader is among them and is curious about a more classical approach, see [10] or [52].

Conclusions and Further Research
We have seen that the current graphic and symbolic tools available in diverse mathematical software packages, due to high complexity issues, present some limitations for visualizing appropriately geometric objects such as loci defined by algebraic curves. In order to gain some insight on the geometry of these objects we have resorted to an alternative visualization technique, the dynamic color scanning method, which takes advantage of the possibility of working with dynamic colors in the GeoGebra graphic view. The visual guidance provided by this method allows us to approach the extreme case of a geometric inequality more effectively, this time using symbolic tools available in external software such as Maple.
The authors consider that future releases of GeoGebra could benefit from the inclusion of new commands that: (i) perform straightforwardly a dynamic color scanning, avoiding the setup process which is needed at present and improving its performance; (ii) utilize the Giac and Tarski/QEPCAD embedded systems to increase the power of the GART's tools present in GeoGebra, rendering unnecessary to make use of external software to visualize and study certain geometric problems (see for instance [53]) which can involve equalities or inequalities in their formulation.
We hope to accomplish these tasks in a near future, with the help of the many colleagues already involved in the development of the GeoGebra automated reasoning tools project.
Author Contributions: Writing-original draft, T.R., R.L., Z.K. and C.U. All authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.
Funding: First and third authors were partially supported by a grant PID2020-113192GB-I00 (Mathematical Visualization: Foundations, Algorithms and Applications) from the Spanish MICINN.