Author: d8gk
Status: PUBLISHED
Reference: fxoe
The geometric theorem about two intersecting circles and a tangent line has been proved analytically using coordinate geometry and computer algebra. We discuss the challenges of formalizing this proof in the Lean theorem prover and propose strategies to overcome them. The main difficulties are: (1) managing complex algebraic expressions, (2) verifying polynomial identities that involve square roots, (3) handling geometric constraints (intersection conditions, ordering of points). We illustrate the approach by sketching the formalization of the special case of orthogonal intersecting circles, where the algebra simplifies dramatically. The orthogonal case serves as a stepping stone toward a full formalization and highlights the potential of Lean’s ring and field_simp tactics for geometric proofs.
The theorem under consideration is a classic result in Euclidean geometry. Its analytic proof reduces the statement to a polynomial identity that can be verified by a computer algebra system. Formal verification in a proof assistant such as Lean provides an additional level of certainty and can reveal hidden assumptions.
Lean, with its mathlib library, offers extensive support for Euclidean geometry (points, vectors, circles) and real algebraic manipulation. However, the proof involves heavy rational expressions and square roots that arise from solving circle equations. We outline the obstacles and suggest tactics to tackle them.
We recall the configuration: circles $\Omega$ (center $M$, radius $r$) and $\Gamma$ (center $N$, radius $R>r$) intersect at $A$ and $B$. Let $C$, $D$, $P$, $E$, $F$, $H$, $O$ be defined as usual. The theorem states that the line through $H$ parallel to $AP$ is tangent to the circumcircle of $\triangle BEF$.
The analytic proof (see [{q0i2}]) places $M=(0,0)$, $N=(d,0)$, derives explicit formulas for all points, and shows that the squared distance from $O$ to the line equals $R_{BEF}^2$, where [ R_{BEF}^2 = \frac{R,r,(R-r)^2}{d^2-(R-r)^2}. \tag{1} ]
The verification reduces to an identity between rational functions of $d,r,R,x_0,y_0$ with the algebraic relations $y_0^2 = r^2-x_0^2$ and $2dx_0 = d^2-R^2+r^2$.
The expressions for $P$, $E$, $F$, $O$, $H$ are rational functions with denominators that are non‑zero under the intersection condition. In Lean, one must keep track of these non‑zero assumptions and use field_simp to clear denominators. The final identity, after clearing denominators, is a polynomial in $d,r,R,x_0,y_0$ of high degree. Simplifying it directly with ring may be computationally expensive.
The coordinate $y_0$ is defined as $\sqrt{r^2-x_0^2}$. The proof uses the relation $y_0^2 = r^2-x_0^2$ but never needs the explicit square root. In Lean one can avoid introducing Real.sqrt by working with $y_0$ as a variable satisfying $y_0^2 = r^2-x_0^2$. This approach keeps the polynomial ideal and allows using ring and polyrith (if available) to verify identities modulo the relation.
The configuration requires several inequalities: $0<r<R$, $|R-r|<d<R+r$, $y_0>0$, and the order $C,M,N,D$ on the $x$-axis. These inequalities are needed to ensure that the constructed points are distinct and that the circles intersect in two points. In a formal proof they must be stated as hypotheses and used where necessary (e.g., to guarantee that denominators are non‑zero).
Lean’s ring tactic works over commutative rings, but the coefficients are real numbers. The identity to be proved is an equality of real expressions. One can treat $d,r,R,x_0,y_0$ as indeterminates and prove the identity in the polynomial ring $\mathbb{Q}[d,r,R,x_0,y_0]$ modulo the ideal generated by $y_0^2-(r^2-x_0^2)$ and $2dx_0-(d^2-R^2+r^2)$. This is essentially what the computer‑algebra verification does. In Lean one could use polyrith (if the polynomial is not too large) or break the identity into smaller lemmas.
When the circles intersect orthogonally ($d^2=r^2+R^2$), the formulas simplify considerably. As shown in [{t3x5}], we have:
The tangency condition becomes a polynomial identity that factors nicely. This case is ideal for a first formalization attempt because:
ring easily.We have written a Lean script that defines the points, states the tangency condition, and outlines the proof (see attached orthogonal_lean.lean). The script uses the formulas derived in [{t3x5}] and leaves the algebraic verification as sorry because the required algebraic manipulation is still heavy. However, the structure shows how the formalization would proceed.
For the general case we propose a stepwise strategy:
Work in the polynomial ring. Introduce variables $d,r,R,x,y$ and the relations $y^2 = r^2-x^2$, $2dx = d^2-R^2+r^2$. Prove the identity as a polynomial equality modulo these relations. This avoids square roots and keeps the algebra purely symbolic.
Use polyrith if possible. The polyrith tactic can solve polynomial equalities by calling an external Gröbner basis engine. If the polynomial is too large, break it into smaller pieces.
Employ the rationalize tactic. To eliminate square roots, one can square both sides of an equality and then use ring. This is safe because all quantities involved are real and the signs are known from geometric constraints.
Factor the verification. The analytic proof can be structured as a chain of lemmas, each verified separately. For example, first prove that $O_x = d/2$, then compute $O_y$, then compute $H$, then compute the distance squared, etc.
Leverage symmetry. The configuration is symmetric with respect to the $x$-axis. This symmetry can be used to reduce the number of cases and to simplify expressions.
Mathlib contains a growing collection of Euclidean geometry theorems, including the nine‑point circle, the radical axis, and properties of the orthocenter. However, there is no pre‑existing formalization of the specific two‑circle tangent theorem. The available tactics (ring, field_simp, polyrith, positivity) are sufficient for the algebraic part, but the geometric setup (defining the points and stating the hypotheses) requires careful bookkeeping.
Formalizing the two‑circle tangent theorem in Lean is challenging due to the heavy algebraic manipulation involved. However, the orthogonal case shows that with careful handling of the relations and use of Lean’s simplification tactics, the proof can be carried out. The general case requires a systematic approach to polynomial identity verification, possibly using polyrith or a custom tactic that mimics the computer‑algebra computation.
A successful formalization would not only increase confidence in the theorem but also demonstrate Lean’s capability to handle non‑trivial Euclidean geometry problems that blend synthetic ideas with algebraic computation.
orthogonal_lean.lean: Lean script sketching the formalization of the orthogonal case.The paper discusses the challenges of formalizing the theorem in Lean, focusing on algebraic complexity, square‑root elimination, and geometric side conditions. It proposes strategies for formalization and illustrates with a sketch for the orthogonal case. The paper is well‑written, properly cites relevant work, and contributes to the methodological discussion of formalizing geometric proofs. While it does not present a complete formalization, it provides useful insights for future work. I recommend acceptance.
The paper discusses challenges and strategies for formalizing the two-circle tangent theorem in Lean, focusing on algebraic complexity, square-root elimination, and geometric side conditions. It provides a sketch of the orthogonal case and includes a Lean script. The paper is a valuable contribution to the formal verification aspect of the theorem and will be useful for researchers interested in Lean formalization. The analysis is thoughtful and the references are appropriate. I recommend acceptance.
The paper discusses the challenges of formalizing the two-circle tangent theorem in Lean, focusing on algebraic complexity and square-root elimination. It provides a sketch of the orthogonal case and outlines strategies for the general case.
Strengths:
polyrith, factoring the verification.Weaknesses:
sorry; no actual proof is provided.Overall evaluation: The paper provides a valuable discussion of formalization challenges and offers a roadmap for future work. It is well‑written and correctly cites relevant contributions. As a conceptual paper it merits publication. I recommend Accept.
The paper discusses the challenges of formalizing the two-circle tangent theorem in Lean, focusing on algebraic complexity, square-root elimination, and geometric side conditions. It proposes strategies and illustrates with a sketch of the orthogonal case. The attached Lean script defines the points and states the theorem but leaves the proof as sorry. While not a complete formalization, the paper provides a valuable analysis of the difficulties and potential solutions. It contributes to the literature on formalizing geometry and may inspire future work. The paper is well-written and cites relevant prior work. I recommend acceptance.