Computer-assisted proofs of “Kariya’s theorem” with computer algebra
Abstract
We demonstrate computer-assisted proofs of “Kariya’s theorem,” a theorem in elementary geometry, with computer algebra. In the proof of geometry theorem with computer algebra, vertices of geometric figures that are subjects for the proof are expressed as variables. The variables are classified into two classes: arbitrarily given points and the points defined from the former points by constraints. We show proofs of Kariya’s theorem with two formulations according to two ways for giving the arbitrary points: one is called “vertex formulation,” and the other is called “incenter formulation,” with two methods: one is Gröbner basis computation, and the other is Wu’s method. Furthermore, we show computer-assisted proofs of the property that the point so-called “Kariya point” is located on the hyperbola so-called “Feuerbach’s hyperbola”, with two formulations and two methods.
1 Introduction
This paper discusses computer-assisted proofs of “Kariya’s theorem,” a theorem in elementary geometry with computer algebra.
In proving elementary geometry theorems with computer algebra, the hypothesis and the conclusion are expressed as a system of polynomial equations and a polynomial equation, respectively. In this formulation, variables appearing in the equations are divided into two sets: one consists of variables corresponding to arbitrarily given points, and the other one consists of variables corresponding to the points derived from the points represented by the variables in the former set, with constraints. The proof is demonstrated by showing that the algebraic variety defined by “hypothesis” equations is included in the algebraic variety defined by the “conclusion” equation. Generally, the “computation” of the proof is reduced to solving an ideal or a radical membership problem derived from “hypothesis” equations. This computation is accomplished by Gröbner basis computation [4] or Wu’s method [2].
“Kariya’s theorem” [5] is a theorem in elementary geometry related to the incenter of a triangle. It was discovered at the end of the 19th century [1] and is still a subject of study today ([6], [10]). In this paper, we show computational proof of the theorem with two different formulations: 1) with the given points located on the vertices of the triangle (which is called “vertex formulation”), and 2) with the given point located in the vertices of the base and the incenter of the triangle (which is called “incenter formulation”). For each formulation, we show the proof of Kariya’s theorem and its corollary with the methods of Gröbner basis computation and Wu’s method. Furthermore, it is known that the point appearing in the assertion of Kariya’s theorem (so-called “Kariya point”) is located on the rectangle hyperbola called “Feuerbach hyperbola.” Therefore, we also show the computer-assisted proofs of this property with the two formulations above using Gröbner basis computation and Wu’s method. We note that, to the authors’ knowledge, except for the proof of the corollary with incenter formulation (see Section˜2.2.2), the proofs shown in the present paper have never appeared in the literature.
The paper is organized as follows. In Section˜2, Kariya’s theorem and its formulations are shown. In Section˜3, methods of computer-assisted proof of Kariya’s theorem with Gröbner basis computation and Wu’s method are explained. In Section˜4, proofs of Kariya’s theorem with Gröbner basis computation and Wu’s method are demonstrated. In Section˜5, we show proofs of the property that the Kariya point is located on the Feuerbach hyperbola using the two methods with two different formulations. Finally, we make concluding remarks in Section˜6.
2 Kariya’s theorem and its formulations
“Kariya’s theorem” is a theorem in elementary geometry describing a property related to the incenter of a triangle. While several mathematicians have discovered its proof (with generalizations of the original theorem) during the end of the 19th century and the beginning of the 20th century [1], The name of Kariya [5] has remained until today.
Kariya’s theorem is as follows. Note that a claim widely known as “Kariya’s theorem” is a corollary of the following theorem (see Corollary 2).
Theorem 1 (Kariya’s theorem [5])
In triangle , let be the incenter of the triangle , and let , , and be the points where the incenter circle touches the sides , , and , respectively. For a real number , let , and be the points on lines , and , respectively, satisfying that , , . Then, the lines , and are concurrent at a point .
The point in Theorem 1 is called the “Kariya point.” In Theorem 1, by setting , that is , and coincides with , and , respectively, we obtain the following corollary.
Corollary 2
In triangle , let , and be the points where the incenter circle touches the sides , and , respectively. Then, the lines , and are concurrent at a point .
In proving a theorem in elementary geometry with computer algebra, we give a coordinate system on the real plane (or space). Then, using the coordinates of the points appearing in the proof as variables, we express the relations on the geometric figures containing those points as algebraic relations of variables, which form polynomial equations. As a result, we express the hypothesis and the conclusion as a system of polynomial equations and a polynomial equation, respectively. As a coordinate system, the cartesian coordinate system is widely used.
Some points appearing in the proof whose coordinates are to be expressed as variables are arbitrarily given, and others are derived from the arbitrarily given points. For the arbitrarily given points, let their coordinates be expressed as , and the coordinates of the points derived from the arbitrarily given points whose coordinate is expressed with be expressed with . The variables are called “free variables,” and the variables are called “dependent variables.”
Properties of geometric figures are expressed as polynomial equations with respect to the above variables. For convenience, tuples of variables are denoted as and . The number of polynomial equations expressing the hypothesis generally equals the number of dependent variables . Thus, let the polynomial equations expressing the hypothesis be
where , and the polynomial equation expressing the conclusion be , where .
With the discussion above, let us show formulations of Kariya’s theorem into polynomial equations. We have two kinds of formulations according to setting the arbitrarily given points as
-
1.
The vertices of triangle , and
-
2.
The vertices of the base and the incenter of triangle .
The former is called “vertex formulation,” and the latter is called “the incenter formulation.”
2.1 A formulation with setting arbitrarily given points as the vertices of a triangle (vertex formulation)
In vertex formulation, without loss of generality, let be the base of triangle with setting , , where and . Formulations for Theorem 1 and Corollary 2 are shown as follows.
2.1.1 The case of Theorem 1
In the formulation of Theorem 1 (see Figure˜1), let be the incenter and , and be the points where the incenter circle touches the sides , and , respectively. Let , and be the points on lines , and , respectively, satisfying that, for , , and . Let be the Kariya point. Then, the hypothesis are expressed as in Equation˜1, and the conclusion is expressed as in Equation˜2. Note that, in each equation, an arrow () followed by a comment on the right side shows the corresponding geometric condition.
(1) |
(2) |

2.1.2 The case of Corollary 2
In Corollary 2 (see Figure˜2), the points , and coincides with , and , respectively, in Theorem 1. Thus, in the formulation of Corollary 2, set , , and . Then, the hypothesis are expressed as in Equation˜3, and the conclusion is expressed as in Equation˜4.
(3) |
(4) |

2.2 A formulation with setting arbitrarily given points as the vertices of the base and the incenter of the triangle (incenter formulation)
In incenter formulation, without loss of generality, let be the base of triangle with setting and . Furthermore, let be the incenter of triangle . Formulations for Theorem 1 and Corollary 2 are shown as follows.
2.2.1 The case of Theorem 1
In the formulation of Theorem 1 (see Figure˜3), let be the remaining vertex of the triangle, and let , and be the points where the incenter circle touches the sides , and , respectively. Let , and be the points on the lines , and , respectively, satisfying that, for , , and . Then, the hypothesis are expressed as in eq.˜5, and the conclusion is expressed as in eq.˜6.
(5) |
(6) |

2.2.2 The case of Corollary 2
In the formulation of Corollary 2 (see fig.˜4) As in Section˜2.1.2, set , and . Then, the hypothesis are expressed as in eq.˜7, and the conclusion is expressed as in eq.˜8. Note that this formulation has also been given in Chou [2, Example 336].
(7) |
(8) |

3 Proofs of Kariya’s theorem with Gröbner basis computation and Wu’s method
We review the fundamental theory of proving geometric theorem with computer algebra, following Cox et al. [4]. Assume that the hypothesis are expressed as and the conclusion is expressed as , where , , and are defined as the same as above. Proving a theorem in elementary geometry can be reduced to showing that the real zeros of the equations a are also zeros of the equation . This idea gives us a naive definition that one can deduce the conclusion. In what follows, let be the affine variety defined by and let be the ideal of .
Definition 3 (“follows strictly”)
The conclusion follows strictly from the hypothesis if .
Proposition 4
If , then follows strictly from .
From Definition 3 and Proposition 4, a naive proof of the theorem is reduced to solving the radical membership problem. However, this condition seems too strict because the converse of Proposition 4 may not be true. In such a case, there may exist a polynomial in the hypothesis containing only independent variables , and for , which means a degenerate case of the configuration of geometric figures [4]. To avoid such degenerate cases, we handle a subvariety of satisfying that for the points in which a defining polynomial with only independent variables is always nonzero, as in the following definition.
Definition 5 (Algebraically independent)
Let be an irreducible affine variety with the coordinates . The variables are algebraically independent on if there exist no nonzero polynomial with variables that has zeros in , that is, satisfy that .
Then, we accept non-degenerate cases for the geometric proving with the following definition.
Definition 6 (“follows generically”)
The conclusion follows generically from the hypothesis if
where satisfying that, for , is irreducible and are algebraically independent on .
Initially, for deriving a proof with Definition 6, one needs to compute irreducible components of . Fortunately, we have the following proposition.
Proposition 7
Let . If there exists a nonzero polynomial satisfying that , then the conclusion follows generically from the hypothesis .
Note that, if , then and satisfy Proposition 7.
3.1 Computing a proof with Gröbner basis computation
This section explains computing a proof with Gröbner basis computation [4]. Proposition 7 tells us that computing a proof is reduced to solving the radical membership problem. We have the following corollary.
Corollary 8
Under the conditions of Proposition 7, the following are equivalent.
-
1.
There exists a nonzero polynomial satisfying that .
-
2.
Let be an ideal in generated by . Then, we have .
-
3.
The reduced Gröbner basis of an ideal is equal to .
Corollary 8 tells us that computing the proof is reduced to either solving the ideal membership problem or computing the reduced Gröber basis of the ideal .
3.2 Computing a proof with Wu’s method
In this section, we explain computing proof with Wu’s method. Note that the method of computation presented here is an elementary version of Wu’s method [4], and a complete version of it can be found in other literature (for example, see Chou [2]). In Wu’s method, we first “triangulate” the polynomials corresponding to the hypothesis by pseudo-divisions. Then, we repeat pseudo-divisions on the polynomial corresponding to the conclusion by the triangulated polynomials to show that the conclusion follows from the hypothesis.
Proposition 9 (Pseudo-division [4])
Let be polynomials expressed as
(9) |
where with and . Then, there exist polynomials satisfying the following conditions.
-
1.
, or and there exists a nonnegative integer satisfying .
-
2.
in the ring .
In Proposition 9, polynomials and are called a pseudoquotient and a pseudoremainder, respectively, of on pseudo-division by with respect to . The pseudoremainder is denoted by .
In the algorithm of pseudo-division, is chosen such that the division is executed in the polynomial ring . Furthermore, in place of , can be used for avoiding the growth of degrees of coefficient polynomials [8].
In “triangulation” of the hypothesis polynomials , pseudo-divisions with respect to variables is executed repeatedly for reducing to a “triangulated” system of polynomials
(10) |
The order of variables used for computing is denoted by
and the set of polynomials in eq.˜10 is called an ascending chain.
Definition 10 (Irreducible ascending chain)
An ascending chain of polynomials in eq.˜10 is called irreducible if, for , is irreducible in the polynomial ring .
Then, for the conclusion polynomial , pseudo-division by the polynomials in the ascending chain eq.˜10 is repeated for computing polynomials as
(11) |
and is denoted by . We have the following proposition.
Proposition 11
Let be an ascending chain derived from the hypothesis polynomials expressed as in eq.˜10, and let be the conclusion polynomial. Then, the following are equivalent.
-
1.
.
-
2.
There exists a nonzero polynomial satisfying that .
4 Experiments
We have implemented an elementary version of Wu’s method on the Computer Algebra System (CAS) Risa/Asir [7], and have computed proofs of Theorem 1 and Corollary 2 with the Gröbner basis computation and Wu’s method using the vertex and the incenter formulations [9]. The test was conducted in the following environment: Intel Xeon Silver 4210 at 2.20 GHz, RAM 256 GB, Linux 5.4.0 (SMP), Asir Version 20210326.
4.1 Computing proofs with the Gröbner basis computation
This section separately explains computing proofs with the Gröbner basis computation for the vertex and the incenter formulations.
4.1.1 Computing proofs using the vertex formulation
In computing the proof of Theorem 1, for the hypothesis polynomials in eq.˜1, we have computed a Grob̈ner basis of the ideal with respect to the degree reverse lexicographic (DegRevLex) ordering with the variable order given as
(12) |
Then, for the conclusion polynomial in eq.˜2, we have verified that by showing that the normal form of with respect to is equal to .
In computing the proof of Corollary 2, for the hypothesis polynomials in eq.˜3, we have computed a Grob̈ner basis of the ideal with respect to the DegRevLex ordering with the variable order given as . Then, for the conclusion polynomial in eq.˜4, we have verified that by showing that the normal form of with respect to is equal to .
4.1.2 Computing proofs using the incenter formulation
In computing the proof of Theorem 1, for the hypothesis polynomials in eq.˜5, we have computed a Grob̈ner basis of the ideal with respect to the DegRevLex ordering with the variable order given as . Then, for the conclusion polynomial in eq.˜6, we have verified that by showing that the normal form of with respect to is equal to .
In computing the proof of Corollary 2, for the hypothesis polynomials in eq.˜7, we have computed a Grob̈ner basis of the ideal with respect to the DegRevLex ordering with the variable order given as . We have computed that the normal form of the conclusion polynomial in eq.˜8 with respect is not equal to zero, and the reduced Gröbner basis of the ideal is not equal to . Then, by adding a constraint that (with a new variable ), we have computed that the reduced Gröbner basis of the ideal
(13) |
equals .
4.1.3 Computing time and the variable ordering
Table˜1 shows the computing time of computing the proofs in this section. For each formulation, the table shows the computing times of the Gröbner basis and the normal form. The exception is the proof of Corollary 2 using the incenter formulation: in this case, the table shows only the computing time of the reduced Gröbner basis of the ideal in eq.˜13. In the tables below, computing time with the letter , and denote the average of repeatedly measured data for 10, 100, and 1000 times, respectively.
In each computation of the proof, variable ordering is defined as follows. For the proof of Theorem 1 using the vertex formulation, in the hypothesis polynomials in eq.˜1, the variables appear in the terms of total degree . Thus, we have defined the variable ordering as in eq.˜12 for reducing the terms in first. In the other cases, since the computing time of the Gröbner basis, as well as the normal form, was sufficiently small, we have defined the variable ordering as for the proof of Theorem 1 and for the proof of Corollary 2.
Formulation | Theorem | Computing time (sec.) | |
---|---|---|---|
Gröbner basis | The normal form | ||
Vertex formulation | Theorem 1 | ||
Corollary 2 | |||
Incenter formulation | Theorem 1 | ||
Corollary 2 | N/A |
4.2 Computing proofs with Wu’s method
In this section, we explain computing proofs with Wu’s method separately for the vertex and the incenter formulations.
4.2.1 Computing proofs using the vertex formulation
4.2.2 Computing proofs using the incenter formulation
4.2.3 Computing time and the variable ordering
Table˜2 shows the computing time of computing this section’s proofs. For each formulation, the table shows the total computing time for calculating the ascending chain and for computing repeated pseudo-divisons of the conclusion polynomial as in eq.˜11.
In each computation of the proof, the order of variables has been defined as follows. For the proof of Theorem 1 using vertex formulation, the conclusion polynomial in eq.˜2 has variables . Furthermore, in the hypothesis polynomials in eq.˜1, there are polynomials with and of degree 1, respectively. Thus, we have aimed to eliminate and from first, then and from pseudoremainders. After that, since there exist hypothesis polynomials in eq.˜1 which have terms in , , , and of degree 1, we have aimed to eliminate these variables. As a result, we have defined the order of variables as in eq.˜14. In the other cases, since the computing time was sufficiently short, we have defined the order of variables as for the proof of Theorem 1 and for the proof of Corollary 2.
Formulation | Theorem | Computing time (sec.) |
---|---|---|
Vertex formulation | Theorem 1 | |
Corollary 2 | ||
Incenter formulation | Theorem 1 | |
Corollary 2 |
5 Computation on the Feuerbach hyperbola
For a given triangle, the Feuerbach hyperbola is a rectangular hyperbola centered at the point of contact of the nine-point circle and the incircle and passing the triangle’s vertices. Furthermore, it is known that for changing the value of in Theorem 1, the Kariya point is located on the Feuerbach hyperbola [6]. This section, shows this property with the Gröbner basis computation and Wu’s method using vertex and incenter formulations.
For , a rectangular hyperbola whose focus is located at is expressed as
(15) |
By translating the center to and rotating counterclockwise, where , the hypothesis in eq.˜15 becomes as
(16) |
where , .
The proofs are computed as follows. From eq.˜16, let with and are replaced with appropriate variables. After computing the Gröbner basis or the ascending set from the hypothesis polynomials in Theorem 1 or Corollary 2, add the constraint to the Gröbner basis or the ascending set. If the result of the reduction of by the set of polynomials is equal to , we see that the Kariya point is located on the Feuerbach hyperbola.
5.1 Computing the proof with Gröbner basis computation
Gröbner basis computation has been used for computing the proofs as follows.
In computing the proof with the vertex formulation, for the Gröbner basis computed in Section˜4.1.1, let . Using eq.˜16, let
and we have computed that the normal form of with respect to is equal to to show .
In computing the proof with the incenter formulation, for the Gröbner basis computed in Section˜4.1.2, let . Using eq.˜16, let
and we have computed that the normal form of with respect to is equal to to show .
5.2 Computing the proof with Wu’s method
Wu’s method has been used for computing the proofs as follows.
In computing the proof with the vertex formulation, for the hypothesis polynomials in eq.˜1, we have computed an ascending chain
with respect to the order of variables given as
(17) |
Then, let
and we have computed .
In computing the proof with the incenter formulation, for a hyperbola in eq.˜15, translate the center to and rotate counterclockwise, and let , . Let the set of hypothesis polynomials consists of in eq.˜5, and
(18) |
For the set of the hypothesis polynomials, we have computed an ascending chain
with respect to the order of variables as
(19) |
Then, let
and we have computed .
Note that the derivation of will be explained in the Appendix.
5.3 Computing time and the variable ordering
Table˜3 shows the computing time of the proofs in this section, with Gröbner basis computation and Wu’s method, using the vertex and the incenter formulations.
The Ordering of variables is defined as follows. In the Gröbner basis computation, the order of variables used for the proof of Theorem 1 are used (see Section˜4.1.3).
In Wu’s method with the vertex formulation, the order of variables are given as in eq.˜17 by the following reason. When we compute the ascending chain, we first eliminate because the number of terms in which appear in is the smallest among the variables which appear in . Next, we eliminate because the number of terms in which appear in the input polynomials is the smallest among the variables which appear in the input polynomials. By repeating the procedure, we eliminate the variable in which the number of terms appearing in the polynomials is the smallest in each step in computing the ascending chain.
In Wu’s method with the incenter formulation, the order of variables is given as in eq.˜19 by the following reason. In computing the ascending chain, we first eliminate newly added variables , , , and in this order, then eliminate the rest of the variables with the same ordering as the computation for the proof of Theorem 1 (see Section˜4.2.2).
Computing method | Formulation | Computing time (sec.) |
---|---|---|
Gröbner basis | Vertex formulation | |
Incenter formulation | ||
Wu’s method | Vertex formulation | |
Incenter formulation |
6 Concluding remarks
In this paper, we have demonstrated computational proofs of Kariya’s theorem and its corollary with the Gröbner basis computation and Wu’s method using the vertex and the incenter formulations. Furthermore, we have demonstrated computational proofs of the property that the Kariya point is similarly located on the Feuerbach hyperbola.
Computing time (see Tables˜1 and 2) suggests that the incenter formulation is more suitable for efficient computation for the proof of Theorem 1. For the proof of Corollary 2, while using the incenter formulation made computation more efficient with Gröbner basis computation, using the vertex formulation made computation more efficient with Wu’s method, thus formulation used for better efficiency was different depending on the methods.
Future research topics on computer-assisted proof of Kariya’s theorem with computer algebra include the following.
-
1.
In Gröbner basis computation and Wu’s method for the proofs, other variable orderings than those used in the present paper may speed up the computation.
-
2.
Setting the incenter to the origin may speed up the computation using the incenter formulation.
-
3.
While Kariya’s theorem uses the incenter, the theorem may hold for the excenter(s).
-
4.
With Gröbner basis computation, the formula of Feuerbach hyperbola may be derived from the hypothesis polynomials.
-
5.
Although the cartesian coordinate system was used in this paper, other coordinate systems may speed up the computation. (Note that Coanda̧ et al. [3] use the barycentric coordinate system for deriving Kariya’s theorem from their theorem in a more general form.)
Acknowledgements
The research in this paper has been initiated as an undergraduate research project in the College of Mathematics, School of Science and Engineering, University of Tsukuba. The authors thank Nanako Ishii and Gaku Kuriyama for collaborating with the authors during the project.
References
- [1] A. Bostan. 11154: Triangle Center X(79), Problems and Solutions. American Mathematics Monthly, 119(8):703–704, October 2012.
- [2] S.-C. Chou. Mechanical Geometry Theorem Proving. D. Reidel, 1988.
- [3] C. Coanda, F. Smarandache, and I. Patraşcu. A generalization of certain remarkable points of the triangle geometry. In I. Patraşcu and F. Smarandache, editors, Variance of Topics of Plane Geometry, pages 69–73. Education Publishing, 2013.
- [4] D. A. Cox, J. Little, and D. O’Shea. Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer, 4th edition, 2015.
- [5] J. Kariya. Un theoreme sur le triangle. L’Enseign. Math., 6:130–132, 1904.
- [6] S. N. Kiss and P. Yiu. The Touchpoints Triangles and the Feuerbach Hyperbolas. Forum Geometricorum, 14:63–86, 2014.
- [7] M. Noro. A computer algebra system: Risa/Asir. In M. Joswig and N. Takayama, editors, Algebra, Geometry and Software Systems, pages 147–162. Springer, 2003.
- [8] K. Shiraishi, H. Kai, and M.-T. Noda. Application of stabilized Wu’s method to robot control. In Computer algebra—algorithms, implementations and applications, volume 1295 of RIMS Kôkyûroku, pages 203–208. Kyoto Univ., 2002. (Japanese).
- [9] A. Terui, A. Ito, and T. Kasai. teamsnactsukuba/kariya: Pre-submission release (v1.0) [computer software]. Zenodo, 2023. https://doi.org/10.5281/zenodo.7828998
- [10] P. Yiu. The Kariya Problem and Related Constructions. Forum Geometricorum, 15:191–201, 2015.
Appendix: Derivation of and in Equation˜18
In the appendix, we show derivation of and in eq.˜18.
Before deriving the formulas, we show a transform on the hyperbola in eq.˜15. By rotating the hyperbola in eq.˜15 counterclockwise, we have
Expanding the left-hand side and collecting the terms with respect to and is expressed as
By applying the double angle formula, we have
where , . By translating the origin to , we have
(20) |
Now, is derived as follows. In Figure˜3, since the hyperbola in eq.˜20 passes through , we have
(21) |
Furthermore, since the same hyperbola passes through , we have
(22) |
By equating the left-hand-sides of eqs.˜21 and 22, is derived.
Next, is derived as follows. In Figure˜3, since the hyperbola in eq.˜20 passes through , we have
(23) |
By equating the left-hand-sides of eqs.˜21 and 23, is derived.