Skip to Content
MathematicsMathematics
  • Article
  • Open Access

4 November 2026

25 Pages

An Efficient Automated Geometry Reasoning Method via Knowledge Merging and Semi-Conditional Rules

,
,
,
and
1
Institute of Computing Science and Technology, Guangzhou University, Guangzhou 510006, China
2
Guangzhou University of Software, Guangzhou 510990, China
*
Author to whom correspondence should be addressed.

Abstract

This paper presents KM-SCR, a deductive-database system for automated geometry reasoning that aims to reduce redundant knowledge representation and inference overhead. First, a geometric-object merging mechanism consolidates collinear or coplanar objects and updates their associated relations, reducing redundant representations in the knowledge base. Second, a chain-of-equalities representation facilitates quantitative inference and supports algebraic reasoning through matrix-column compression and equation-system simplification. Third, semi-conditional rules divide rule-matching conditions into base conditions and remaining constraints, enabling staged candidate generation and constraint verification to reduce unnecessary matching operations. We establish the equivalence between semi-conditional rules and their original formulations at the rule-instance level and integrate the three mechanisms into an iterative reasoning workflow. Experiments on all 293 problems in FormalGeo7k-L6 show that KM-SCR solves 288 instances (98.29%), with a mean solving time of 4.06 s among successfully solved instances. On 40 sampled problems from each of levels L1–L5, the success rates range from 97.50% to 100.00%. Further analyses of theoretical inference space, actual rule instantiations, memory consumption, and solving time assess the effects of the proposed mechanisms on knowledge redundancy and inference efficiency.

1. Introduction

Geometry Automated Theorem Proving (GATP) has long been an important research topic in artificial intelligence and mathematical mechanization. Since the emergence of the field in the twentieth century, plane geometry theorem proving has served as a benchmark for evaluating machine reasoning capabilities [1]. Major approaches to GATP include algebraic, semi-algebraic, and synthetic methods. Algebraic methods, such as Wu’s method [2] and Gröbner basis methods [3], encode geometric constraints as polynomial equations and establish conclusions through algebraic computation. These methods are powerful, although their computational steps can be difficult to interpret in geometric terms. Semi-algebraic methods, such as the area method [4], the full-angle method [5], and invariant-algebra and point-geometry approaches [6,7,8], use geometric quantities to retain geometric meaning within algebraic derivations. Synthetic methods reason directly about geometric objects and their relations by applying geometric definitions, axioms, and theorems. Their explicit intermediate deductions make it easier to inspect the logical dependencies between geometric facts and understand how a conclusion is reached. This property is valuable in mathematics education, where step-by-step proofs can help students follow and understand geometric arguments. Interactive educational tools thus provide one potential application for efficient synthetic reasoning, as timely generation of understandable proofs could support explanations and feedback during geometric exploration. These considerations motivate the development of deductive systems that combine explicit geometric reasoning with efficient inference.
Among synthetic approaches, the geometry deductive database method (GDDM) [9] and subsequent systems [10] use forward reasoning to derive geometric facts by repeatedly applying inference rules until a target is established or a reasoning fixed point is reached. Their explicit deductions support readable proofs in mathematics-education systems such as Java Geometry Expert (JGEX) [11] and NetPad [12]. Automated theorem proving has also been integrated into interactive geometry environments such as GeoGebra [13], where geometric conjectures can be explored and formally verified, and GeoGebra Discovery [14], which further extends this capability for automated discovery and verification of geometric properties. Dynamic extensions of predicates and inference rules further improve the flexibility of deductive systems [15]. Alongside these developments in deductive reasoning, learning-based approaches have increasingly been explored to guide theorem selection and proof search.
In this direction, Inter-GPS [16] combines formalized geometric representations with theorem prediction to guide symbolic reasoning. E-GPS [17] further improves search efficiency through learned problem-solving and problem-generation strategies, while Pi-GPS [18] incorporates diagrammatic information to enhance geometric problem formalization. Together, these studies explore how learned models can support symbolic geometric reasoning through improved problem representations and search guidance.
A more systematic formal foundation is provided by FormalGeo [19], which establishes a unified formal language, a geometric theorem system, a formal solver, and the FormalGeo7k benchmark. The FGeo series builds on this formalized problem-solving setting to study learned guidance for symbolic proof search. For example, FGeo-TP [20] employs language models to predict theorem sequences and prune the search space, FGeo-HyperGNet [21] models structured reasoning states as a hypertree and uses a hypergraph neural network to guide theorem selection, and FGeo-ISRL [22] further integrates inverse search, deep reinforcement learning, and Monte Carlo tree search to improve proof search on complex geometry problems. More recently, FGeo-NSS [23] continues this neuro-symbolic direction by integrating learned guidance with formal geometric deduction.
With the rise of large language models (LLMs), their strong semantic understanding and generation capabilities have opened up new research directions for geometric reasoning. Early attempts to apply LLMs to mathematical proof generation revealed challenges in maintaining rigorous logical consistency and verifiability [24]. Consequently, recent research has gradually shifted toward a neuro-symbolic collaborative reasoning paradigm, in which LLMs are used for semantic understanding, candidate-strategy generation, or search guidance, while symbolic reasoning systems are responsible for formal verification. For example, AlphaGeometry [25] combines a language model that proposes auxiliary constructions with a symbolic reasoning engine, and AlphaGeometry2 [26] further improves geometric-language representation and search strategies, achieving performance comparable to that of top human solvers on Olympiad-level geometry problems. These advances show that learning-based guidance can significantly enhance geometric problem solving, but rigorous symbolic inference remains indispensable for producing verifiable proofs.
Nevertheless, even when neural methods are used to guide theorem prediction or search, the efficiency of the underlying symbolic inference engine remains a critical bottleneck. GDDM-style forward reasoning still faces the combinatorial-explosion problem. As the number of geometric entities grows, the number of intermediate facts generated during reasoning increases rapidly, and the space of possible rule instantiations expands continuously. This can significantly increase the computational cost of solving complex problems and may even prevent a valid proof from being found within a reasonable time [27]. In particular, forward-search symbolic systems may suffer from redundant geometric knowledge representations, excessive rule-matching combinations, and repeated knowledge generation across inference iterations. Such issues are not fully eliminated by learned search guidance, because neural prediction mainly affects which directions are explored, whereas the symbolic engine still determines how knowledge is stored, how rules are matched, and how new facts are efficiently generated.
Related work in geometry and automated reasoning explores heuristic auxiliary construction [28], property-invariant embedding [29], search control and pruning mechanisms [30,31], and rule-engine optimization based on the Rete algorithm [32]. Other studies address formal knowledge representation [33] and the integration of text and diagram information [34], while evaluation frameworks support systematic assessment of geometry-solving systems [35]. These approaches address complementary aspects of geometry reasoning, including search control, knowledge organization, and matching efficiency [15,36].
To address these challenges, we present KM-SCR, a forward-reasoning geometry solver that integrates geometric-object merging, semi-conditional rule matching, and chains of equalities for algebraic processing. In particular, semi-conditional rule matching retains a partially matched rule instance as a pending constraint–conclusion record once its base conditions have been matched. Each record is indexed by its unsatisfied conditions and revisited in subsequent inference rounds as new facts become available; the rule conclusions are derived when all remaining conditions are satisfied. Together, these mechanisms coordinate the organization of geometric knowledge, the construction and verification of rule instances, and the propagation and simplification of quantitative relations. The main contributions are as follows:
(1)
Geometric-object merging with relation propagation. We introduce type-specific merging operations that consolidate collinear or coplanar geometric objects and propagate the resulting changes to their associated relations. By reducing redundant object representations while preserving consistent object references, the merged knowledge base provides a more compact space for subsequent rule matching and inference.
(2)
Semi-conditional rules with persistent pending instances. We introduce semi-conditional rules that separate the binding of candidate objects and their correspondences from the verification of remaining constraints. Unverified instances are retained as pending records and indexed by their missing conditions, allowing them to be revisited when new facts are derived in subsequent inference rounds. A conclusion is generated only when all required constraints are satisfied, while the equivalence with the corresponding original rule is preserved at the rule-instance level.
(3)
Shared equality chains for quantitative inference and algebraic simplification. We introduce a unified equality-chain representation for propagating value and ratio relations. The same representation is used to compress redundant columns in linear and product matrices and to simplify local equation systems, thereby connecting quantitative knowledge discovery with algebraic processing in the iterative reasoning workflow.
Section 2, Section 3 and Section 4 describe the proposed knowledge representations and reasoning mechanisms, and Section 5 evaluates the integrated solver, representation compression, and the effects of the two chain-based algebraic operations.

2. Representation of Geometric Knowledge

In forward reasoning based on production rules, knowledge explosion is manifested as a combinatorial explosion in the rule-instantiation space. The potential matching space in forward-search methods can be characterized by the Maximum Rule Instantiations (MRI), which is expressed as Equation (1):
M R I = ∑ i = 1 n ∏ j = 1 m i p j i ,
where n is the total number of production rules, m i is the total number of antecedents of the i-th production rule, and p j i is the total number of predicate instantiations of the predicate type corresponding to the j-th condition of the i-th production rule. Equation (1) counts the Cartesian-product upper bound on potential antecedent matches before shared-variable and geometric compatibility checks. In practice, object merging, structural matching, deferred condition verification, duplicate suppression, inference order, and early termination can substantially reduce the realized number of candidates. Since reducing the number of rules is generally undesirable, this section focuses on reducing redundant predicate representations and organizing the associated reasoning operations.

2.1. Knowledge-Merging Representation of Geometric Objects

Definition 1 
(Geometric object). A geometric object has the form
G ( A 1 , A 2 , … , A n ) , n ∈ N + .
The predicate G indicates the type of the object, such as a point, line segment, line, or triangle. The argument sequence A 1 , A 2 , … , A n is finite, and each argument A i can be a point, edge, plane, etc., i = 1 , 2 , … , n .
This definition establishes a unified way of describing geometric objects. For example, a point A can be written as P o i n t ( A ) ; a triangle is determined by three distinct points and written as T r i a n g l e ( A , B , C ) ; and a dihedral angle is composed of two non-coincident planes and written as D i h e d r a l ( p l a n e 1 , p l a n e 2 ) .
Definition 2 
(Geometric relation). A geometric relation R describes a spatial constraint or semantic relationship involving one or more geometric objects. It is denoted by
R ( G 1 , G 2 , … , G n ) , n ∈ N + .
Here, R denotes the relation type, such as parallelism, incenter relations, or triangle similarity; the arguments G i are geometric objects, and ( G 1 , G 2 , … , G n ) denotes the finite geometric-object sequence participating in this geometric relation.
Geometric relations are used to formally express the positional or constructive properties between geometric objects. For example, that point E is the midpoint of segment A B is written as M i d p o i n t ( E , S e g ( A B ) ) ; that line A B is the angle bisector of ∠ C A D is written as A n g u l a r B i s e c t o r ( A n g l e ( C , A , D ) , L i n e ( A B ) ) .
To alleviate combinatorial explosion in geometric reasoning, this paper proposes a merged representation for geometric objects such as lines, planes, and angles, which reduces the number of predicate instantiations required to represent the same geometric knowledge and extends the representation form of geometric objects. Table 1 and Figure 1 summarize the four categories of mergeable geometric objects. Taking collinear points as an example, the traditional representation requires separate predicates L i n e ( A , B ) , L i n e ( B , C ) , and L i n e ( A , C ) for the same geometric line, whereas the merging representation unifies them into a single L i n e ( A , B , C ) , eliminating semantic-equivalence redundancy at the representation level. This representation can uniformly characterize structural information such as collinearity, coplanarity, concyclicity, and same-angle edge sets. The general goal of this operation is related to earlier efforts on structured geometric knowledge representation and redundancy control [9]; Table 1 summarizes the object types and merged representations, and Section 4.2 describes the merging procedure.
Table 1. Merging representation of geometric objects.
Figure 1. Geometric objects supporting merged representations: (a) collinear points merged into a line; (b) coplanar points merged into a plane; (c) angle with merged edge sets; (d) circle with multiple points on it. Uppercase letters denote geometric points.
The merged representation of geometric objects not only effectively reduces the number of geometric objects during reasoning but also further reduces the number of geometric relations. Take the mutually perpendicular diagonals of a square as an example, as illustrated in Figure 2. Under the traditional knowledge representation, the diagonals are usually split into A C , A O , C O and B D , B O , D O . To represent the perpendicular relations between these segments, 3 × 3 = 9 pieces of knowledge must be constructed; after adopting the merged representation of lines, these redundant expressions can be unified into a single piece of knowledge, thereby reducing the overhead of knowledge storage and subsequent rule matching.
Figure 2. Illustration of how the line-merging representation compresses redundant perpendicularity relations: (a) traditional representation with nine perpendicularity relations; (b) merged representation with a single perpendicularity relation. Uppercase letters denote geometric points.
The knowledge-merging representation reduces redundant object and relation representations and the associated potential matching space. Rules that compare lines or planes as whole objects can operate directly on the merged representatives; rules requiring individual points or segments can access them through the merged objects.
For example, consider the planar rule “two distinct lines perpendicular to the same line are parallel”. A naive matcher that pairs the nine perpendicularity representations in Figure 2 can enumerate up to C 9 2 = 36 raw unordered predicate pairs before shared-variable and geometric compatibility checks. This count is a bound for that pairing strategy. The merged representation removes the redundant predicate pairs at their source. In addition, the merged representation can also reduce the generation of duplicate knowledge among different rule instantiations. As shown in Figure 3, for “line C D E is the perpendicular bisector of segment A B ”, in the production reasoning regarding “points on the perpendicular bisector are equidistant from the two endpoints”, the traditional representation needs to perform rule instantiation three times for the multiple segment forms on the line and produces six pieces of knowledge, three of which are duplicates; with the merged representation, the rule can directly match the merged line object as a whole, thereby avoiding repeated instantiation for different representations of the same line.
Figure 3. Difference in reasoning for the perpendicular-bisector theorem between the traditional and merged representations: (a) separate matching of segments C D , C E , and D E produces six equality conclusions, three of which are duplicates; (b) matching the merged line object L i n e ( C , D , E ) and iterating over its points yields the three distinct equalities A C = B C , A D = B D , and A E = B E . Uppercase letters denote geometric points.

2.2. Representation of Geometric-Quantity Equality Relations

Geometric reasoning combines deductions about objects and their structural relations with equations for lengths, angles, areas, and ratios. Repeatedly storing equivalent quantitative relations increases both the knowledge-base size and the cost of algebraic solving. This section defines the quantities and equalities used by KM-SCR and introduces a chain representation for their frequent value and ratio relations.
Definition 3 
(Geometric quantity). A geometric quantity is a measurable numerical attribute associated with one or more geometric objects, describing either the intrinsic numerical feature of a single geometric object or the measurable numerical relation among multiple geometric objects. Its formal definition is
Q ( G 1 , … , G n , t y p e ) , n ∈ N + .
Here, G 1 , … , G n are geometric objects, such as triangles, lines, and planes, and t y p e is the specific category of the geometric quantity, such as lengths, distances, angles, and their trigonometric functions.
Geometric quantities are used during reasoning to represent the numerical constraints of geometric objects and to participate in subsequent algebraic computation. For example, the magnitude of ∠ A B C and the distance from point D to line E F can be formally expressed as ( ∠ A B C , magnitude ) and ( D , E F , distance ) , respectively, as shown in Figure 4a,b.
Figure 4. Examples of the formal representation of geometric quantities: (a) magnitude of an angle; (b) distance from a point to a line. Uppercase letters denote geometric points.
Definition 4 
(Geometric-quantity equality). A geometric-quantity equality is a formal statement used to express an equality relation among one or more geometric quantities. Its general form is
E : E x p r 1 ( Q 1 , Q 2 , … , Q n ) = E x p r 2 ( Q 1 , Q 2 , … , Q n ) , n ∈ N + .
Here, Q 1 , Q 2 , … , Q n are geometric quantities, and E x p r 1 ( · ) and E x p r 2 ( · ) are algebraic expressions constructed from these geometric quantities as arguments.
Geometric-quantity equalities provide a basic representation for geometric reasoning and algebraic computation. They are used to describe geometric theorems, constraints, and deduced conclusions, and play a key role in transmitting and generating numerical information during automated reasoning. Geometric-quantity equalities can be classified into the following four special types for differentiated processing; the specific classification and mathematical expressions are shown in Table 2 (for brevity, in the following formulas, a line segment symbol denotes its length, and an angle symbol denotes its measure, unless otherwise specified):
Table 2. Classification of geometric equalities.
In the process of automated geometry reasoning, the system continuously generates a large number of geometric-quantity equalities. Knowledge discovery on the L6 problems (the highest difficulty level) of the FormalGeo dataset shows that equalities of type Q v and Q r account for 71.62%, occupying the dominant proportion among all geometric-quantity equalities. If these equalities directly participate in reasoning and algebraic computation in discrete form, the representation scale of geometric-quantity relations will grow rapidly and the complexity of equation construction and solving will increase significantly, thereby affecting the overall reasoning efficiency.
To reduce the redundancy of geometric-quantity equalities at the representation layer, this paper introduces the chain-of-equalities structure, which merges the proportional relations and numerical constraints among multiple geometric quantities into one compact unified representation, so as to reduce the number of equalities and improve the efficiency of subsequent reasoning and computation. The update operations of chains of equalities for different types of newly derived relations are illustrated in Figure 5.
Figure 5. Update operations for chains of equalities for Q v and Q r relations: (a–d) Q v (quantity–value) updates: creating a new chain, extending a chain with an explicit value, assigning a value to an existing chain, and merging chains through an explicit value, respectively; (e–g) Q r (quantity–ratio) updates: creating a new chain, extending an existing chain, and merging two chains, respectively. Q 1 – Q 4 denote geometric quantities, E x p r denotes an explicit numerical expression, and C E denotes a chain of equalities.
Definition 5 
(Geometric chain of equalities). A chain of equalities is used to simultaneously represent the proportional relations among multiple geometric quantities. Its formal definition is
C E = ( Q 1 , C 1 ) , … , ( Q i , C i ) , e x p r ,
where ( Q i , C i ) denotes an ordered pair formed by a geometric quantity and its corresponding coefficient, and e x p r is an optional explicit numerical expression (which may be empty), whose semantics, for nonzero coefficients, are:
e x p r = C 1 · Q 1 = … = C i · Q i .
The chain of equalities can directly support the inference of Q v - and Q r -type geometric-quantity relations. It is also used by the algebraic-reasoning procedures to compress matrix representations, simplify equation systems, and avoid constructing a matrix or equation system for every simple equality combination. Thus, CE is an inference structure as well as a compact representation: its derived equalities can be used as new knowledge in subsequent reasoning, while selected relations can be passed to matrix-based or joint equation-system solving.
In automated geometry reasoning, newly derived geometric-quantity relations are incorporated into the existing chain-of-equalities set to avoid redundant representation and maintain a consistent representation of value and ratio relations. According to the type of the newly generated relation, the update procedure for the chain of equalities also differs.
When a new Q v (quantity–value) relation is derived, the following four cases may occur:
(1)
No existing chain of equalities contains both an explicit value and the geometric quantity in question; in this case, a new chain of equalities containing the explicit value is created, e.g., C E : A B = 5 .
(2)
A chain of equalities containing an explicit value already exists, but no chain of equalities contains the geometric quantity in question, and the newly derived geometric quantity also has an explicit value. In this case, it can be merged into the existing chain of equalities according to the numerical ratio. For example, the system already has C E : C D = 6 , and now derives A B = 2 ; the chain of equalities is updated to C E : 3 A B = C D = 6 .
(3)
A chain of equalities containing the geometric quantity but not an explicit value already exists; the new value is merged into this chain of equalities. For example, the system already has C E : A B = C D , and now derives A B = 5 ; the value 5 is incorporated into the original chain of equalities: C E : A B = C D = 5 .
(4)
A chain of equalities containing an explicit value exists, and another chain of equalities contains the geometric quantity, indicating that the two describe the same group of numerical relations; in this case, the chain-merging operation is performed. C E 1 : A B = C D = 5 , C E 2 : E F = G H , and now E F = 10 is derived; the chains of equalities are merged into C E : A B = C D = 1 2 E F = 1 2 G H = 5 .
When a new Q r is derived, the chain-of-equalities update process is relatively simple, and the following three cases may occur:
(1)
Neither geometric quantity appears in any existing chain of equalities; a new chain of equalities is created, e.g., C E : A B = 2 C D .
(2)
Only one geometric quantity already exists in a chain of equalities; the other geometric quantity is added to that chain of equalities. For example, the system already has C E : C D = E F , and now derives 2 A B = C D ; the chain of equalities is updated to C E : 2 A B = C D = E F .
(3)
The two geometric quantities exist in different chains of equalities, indicating that a mergeable relation exists between the two chains; in this case, the chain-merging operation is performed. For example, the system already has C E 1 : A B = C D and C E 2 : E F = 2 G H , and now derives C D = E F ; they are merged into C E : A B = C D = E F = 2 G H .
Each chain maintains proportional quantities and at most one explicit value. Traversing it yields further Q v and Q r relations for subsequent reasoning. If a new relation involves quantities already in the same chain, it is checked against the existing coefficients; a consistent relation leaves the chain unchanged. Zero-valued quantities require direct value handling whenever a merge would involve division by zero.

3. Semi-Conditional Rule Representation

Rules with many antecedents can have large Cartesian-product matching spaces. Figure 6 summarizes the MRI values computed by Equation (1) from knowledge accumulated to the reasoning fixed point on FormalGeo7k-L6. The orders-of-magnitude differences motivate separating conditions that determine a candidate from conditions that verify it.
Figure 6. Maximum possible number of rule instantiations (MRI) computed by Equation (1) for each rule category on the FormalGeo7k-L6 dataset. The x-axis denotes the number of rule parameters, and the y-axis uses a logarithmic scale due to the large range of instantiation counts.
In a full-antecedent formulation, each antecedent contributes to the potential matching combinations. Many geometric rules admit a smaller set of base conditions that determines the candidate objects and their correspondences. The remaining predicates can then be checked for that candidate. Semi-conditional rules formalize this separation and retain pending candidates across inference rounds. A candidate whose remaining constraints are not yet established is maintained as a pending instance for verification when relevant facts become available.
Definition 6 
(Rule). A rule is a logical statement that specifies relationships among predicates or defines how predicate conditions imply new facts, such as a geometric theorem, axiom, definition, lemma, formula, law, or corollary. Formally, a rule is denoted by r (and a rule set by R ), written as
r : p 1 ∧ … ∧ p n → c 1 , … , c m , n , m ∈ N .
Here, p 1 , … , p n are the antecedent conditions of the rule, and c 1 , … , c m are the conclusions of the rule. A rule is usually described in the form “if…, then…”, where the “if” part corresponds to the conditions and the “then” part corresponds to the conclusions, which are logically derived from the conditions. For example, the transitivity of line parallelism can be represented by the rule:
P a r a l l e l ( l 1 , l 2 ) ∧ P a r a l l e l ( l 2 , l 3 ) → P a r a l l e l ( l 1 , l 3 ) .
Definition 7 
(Semi-conditional rule). Consider a multi-condition rule containing two or more antecedent conditions:
r : p 1 ∧ … ∧ p N → H , N ≥ 2 ,
if its antecedent conditions can be partitioned into base conditions B and constraint conditions C, where
B = p 1 ∧ … ∧ p k ,
C = p k + 1 ∧ p k + 2 ∧ … ∧ p N , 1 ≤ k < N ,
then the corresponding semi-conditional rule is written as:
r s : B ⇝ C , H .
Here, B denotes the base conditions used to generate candidate rule instances, whereas C denotes the constraint conditions that are verified after a candidate has been generated. The base match must bind every variable in C and H, including any explicitly enumerated object correspondences. This requirement makes each pending constraint a fully instantiated predicate. The conclusion H is derived when all predicates in C are satisfied.
Proposition 1 
(Per-application equivalence). Let an admissible rule be written as B ∧ C → H , and let its semi-conditional form be B ⇝ ⟨ C , H ⟩ . For any knowledge base K and variable substitution θ, the original rule is applicable under θ if and only if the candidate generated from B θ is accepted after all predicates in C θ have been verified against K .
Proof. 
The original rule is applicable under θ exactly when B θ ⊆ K and C θ ⊆ K . The semi-conditional procedure generates a candidate from B θ and accepts it only when every predicate in C θ is present in K . Hence,
r is applicable under θ ⇔ B θ ⊆ K ∧ C θ ⊆ K ⇔ r s accepts the candidate under θ .
Once accepted, both representations derive the same conclusion H θ . Thus, the semi-conditional representation preserves the applicability and conclusion of each individual rule instance.    □
Proposition 1 establishes equivalence at the rule-instance level. At the inference-process level, this equivalence is preserved provided that object merging maintains the geometric facts represented by the affected objects, and that pending rule instances are rechecked when their remaining conditions become available. Thus, although merging may replace previously represented objects with their merged representatives, it does not change the logical content of the corresponding facts. Consequently, each accepted semi-conditional instance satisfies the premises of the original rule.
For example, the side–side–side ( S S S ) triangle-congruence rule can be written as B ∧ C → H , with the two triangle objects as base conditions and the three corresponding side equalities as constraints:
B = T r i ( A , B , C ) ∧ T r i ( D , E , F ) ,
C = S e g E q ( A B , D E ) ∧ S e g E q ( B C , E F ) ∧ S e g E q ( A C , D F ) ,
H = T C E ( A B C , D E F ) .
Accordingly, the rule instantiation under the semi-conditional rule representation is:
r s C o n g S S S : T r i ( A , B , C ) ∧ T r i ( D , E , F ) ⇝ C , T C E ( A B C , D E F ) .
When the system matches the base conditions T r i ( A , B , C ) and T r i ( D , E , F ) , it does not immediately derive the triangle-congruence conclusion, but instead generates and records the corresponding “constraint-condition–candidate-conclusion” pair:
S e g E q ( A B , D E ) ∧ S e g E q ( B C , E F ) ∧ S e g E q ( A C , D F ) → T C E ( A B C , D E F ) ,
as well as the remaining symmetric cases generated by the point correspondences. During reasoning, when the corresponding constraint conditions are gradually satisfied, the system marks their status as satisfied; when all the constraint conditions in the group are satisfied, the corresponding conclusion is added to the knowledge base.
Semi-conditional rules can be applied to the rewriting of geometric theorems containing multiple categories of antecedent conditions. Typical examples include the judgments of special quadrilaterals (parallelogram, rectangle, rhombus), the congruence and similarity judgments of triangles, and the properties of angle bisectors (i.e., points on an angle bisector are equidistant from the two sides of the angle).
Example 1. 
As shown in Figure 7, A C = 10 , B D = 6 , E is the midpoint of segment A D , F is the midpoint of segment A B , G is the midpoint of segment B C , H is the midpoint of segment C D , A O ⊥ B O , B O ⊥ C O , C O ⊥ D O , and D O ⊥ A O . Find the area of quadrilateral E H G F .
Figure 7. Reference diagram for problem 3616 from the FormalGeo7k dataset.
Under the traditional knowledge-representation framework, the system can discover, through deductive reasoning, 34 groups of segment-equality relations, 20 triangle objects, and 2072 angle-equality predicate instantiations. If the Angle-Angle-Side (AAS) congruence judgment rule is applied directly, the maximum instantiation search space can reach 20 × 20 × 2072 × 2072 × 34 = 5.84 × 10 10 before shared-variable and geometric compatibility checks.
With semi-conditional rules, the two triangle predicates contribute 20 × 20 = 400 base-object pairs. Enumerating six vertex correspondences for each pair gives 2400 candidate constraint–conclusion records. The backward index retrieves these records as their required equalities become available. This example illustrates the reduction from a full-antecedent Cartesian-product bound to a base-pair candidate space; Section 5 separately reports measured inference costs.

4. KM-SCR: An Automated Geometry Reasoning System

The preceding sections introduced three complementary mechanisms: geometric-object merging, chains of equalities, and semi-conditional rules. Geometric-object merging reduces redundant object and relation representations, semi-conditional rules defer the verification of remaining conditions until necessary, and chains of equalities facilitate quantitative inference and provide algebraic relations for equation-system reasoning.
We integrate these mechanisms into an iterative deductive-database reasoning algorithm and develop KM-SCR (Knowledge Merging and Semi-Conditional Rules), an automated geometry reasoning system. The system aims to improve inference efficiency by reducing redundant representations and unnecessary rule-matching operations while preserving the geometric and algebraic information required for subsequent reasoning.

4.1. System Architecture of KM-SCR

As illustrated in Figure 8, KM-SCR first constructs an initial knowledge base by parsing the given geometric conditions. It then identifies and merges equivalent geometric objects to obtain a more compact representation. The reasoning process proceeds iteratively, applying production rules, semi-conditional rules, chains of equalities, and equation-system reasoning to derive new geometric knowledge. Newly discovered knowledge is incorporated into the knowledge base, and the process continues until the target is established or no further knowledge can be derived. Once the target is established, the system traces the recorded dependencies backward and topologically orders the corresponding deductions to generate a readable solution. Complete reconstruction of matrix-derived reasoning paths remains a direction for future work.
Figure 8. Overall workflow of the KM-SCR automated geometry reasoning system, including knowledge-base construction, geometric-object merging, iterative logical and algebraic inference, and solution generation. Diagram coordinates support structural checks, such as point ordering; metric lengths are derived from the symbolic premises rather than measured from the diagram. Ellipses indicate additional geometric objects, relations, equations, or derived knowledge omitted for visual clarity.

4.2. Geometric-Object Mining and Merging Algorithm

To improve the efficiency and consistency of geometric knowledge representation, we propose a geometric-object mining and merging algorithm (Algorithm 1). The algorithm identifies mergeable objects as new geometric knowledge is derived and propagates each merge to the affected relations. When a new object is introduced, the algorithm searches the current knowledge base for objects that can be represented by the same normalized object, constructs the merged representation, and updates the associated relations accordingly. This process preserves the represented geometric information while reducing redundant objects and relations, thereby providing a more compact knowledge base for subsequent logical and algebraic reasoning.
Definition 8. 
A knowledge base ( K ) is represented as a triple ( K = ⟨ G , F , E ⟩ ), where G = { G 1 , G 2 , … , G n 1 } is the set of geometric objects (such as points, lines, faces, circles, etc.); F = { F 1 , F 2 , … , F n 2 } is the set of geometric relations (such as collinearity, coplanarity, parallelism, etc.); and E = { E 1 , E 2 , … , E n 3 } is the set of algebraic equalities of geometric quantities.
Algorithm 1 Geometric-Object Mining and Merging
Require: 
Current knowledge base K , mining rule set R d i g .
Ensure: 
Updated knowledge base K ′ .
  1:
K ′ ← K
  2:
for all  ⟨ r , K m a t c h ⟩ ∈ M a t c h ( K , R d i g )  do
  3:
       F d e r ← r . E x e c u t e ( K m a t c h )
  4:
      for all  f ∈ F d e r  do
  5:
             ⟨ g n e w , G b a s e ⟩ ← F i n d A n d M e r g e O b j e c t s ( K ′ , f )
  6:
             ⟨ F n e w , F b a s e ⟩ ← F i n d R e l a t i o n s ( K ′ , g n e w , G b a s e )
  7:
            Mark G b a s e and F b a s e as inactive
  8:
            Add g n e w and F n e w to K ′
  9:
      end for
10:
end for
11:
return  K ′
The algorithms use three generic engine operations: M a t c h returns rule substitutions satisfying the matched antecedents, E x e c u t e constructs the instantiated conclusions or pending records, and I s S a t i s f i e d tests all instantiated constraints against the current knowledge. For semi-conditional rules, M a t c h operates on the base conditions. The representation-specific operations are described alongside their use below.
First, the algorithm uses the matching function M a t c h to instantiate the mining rule set R d i g against the current knowledge base K and execute rule deduction (lines 2–3). The mining rules aim to capture implicit geometric objects from the existing geometric constraint structure; for example, from the fact that A is the midpoint of B C , the system can deduce that A, B, and C are collinear and generate a new L i n e ( A , B , C ) geometric object.
For each candidate object, F i n d A n d M e r g e O b j e c t s returns the merged representation and its base objects (lines 4–5). Given the candidate object f, this function searches the current geometric-object set for all objects that can be merged with f according to the corresponding object-type and normalization rules, and collects them into G b a s e . It then constructs the normalized merged object g n e w from { f } ∪ G b a s e . For example, when a newly derived line L i n e ( A , C , M ) overlaps an existing line L i n e ( C , M , D ) , the two objects can be represented by the merged line g n e w representing L i n e ( A , C , M , D ) , while the original objects are retained as the base-object set G b a s e . For a line, two distinct common points establish identity and the point sets are united. Angle merging preserves the vertex and the two edges; circle merging preserves the defining circle. A merge can expose further equivalent objects, so the search continues until no further object joins the merged representation.
Finally, the state-update stage applies the merge to the knowledge base (lines 7–9). The base objects G b a s e and their associated relations F b a s e are marked as inactive, while the merged object g n e w is added as an active object and the updated relations F n e w are added to K ′ . Each updated relation is obtained by replacing references to objects in G b a s e with the merged representative g n e w . This update preserves the represented geometric facts while maintaining consistent references to the merged objects. The resulting knowledge base K ′ provides a more compact representation for subsequent deductive-database reasoning. The relation replacement step is formalized in Algorithm 2.
Algorithm 2 Relation propagation during object merging
Require: 
Knowledge base K , merged object g n e w , base-object set G b a s e .
Ensure: 
Updated relation set F n e w and replaced relation set F b a s e .
  1:
F b a s e ← { f ∈ K . F ∣ O b j e c t s ( f ) ∩ G b a s e ≠ ∅ }
  2:
F n e w ← ∅
  3:
for all  f ∈ F b a s e  do
  4:
       F n e w ← F n e w ∪ { R e p l a c e ( f , G b a s e , g n e w ) }
  5:
end for
  6:
return  F n e w , F b a s e

4.3. Deductive-Database Reasoning Algorithm

Algorithm 3 implements the deductive-reasoning block in the lower-left panel of Figure 8. Its five inputs describe the inference state: K holds the current facts; R and R s e m i supply ordinary and semi-conditional rules; D i n v stores pending candidates; and Δ K p r e v carries the preceding round’s discoveries. In the figure, Δ K n e w becomes the next round’s increment. Each index entry D i n v [ c ] contains records ⟨ C , H ⟩ awaiting the instantiated predicate c, with C retaining the complete deferred-condition set.
Algorithm 3 Deductive-Database Reasoning
Require: 
Current knowledge base K , rule set R , semi-conditional rule set R s e m i , backward index D i n v , previous-round new knowledge Δ K p r e v .
Ensure: 
New knowledge set Δ K n e w , updated backward index D i n v ′ .
  1:
K ′ ← K ∪ Δ K p r e v , D i n v ′ ← D i n v , Δ K n e w ← ∅
  2:
for all  ⟨ r , K m a t c h ⟩ ∈ M a t c h ( K ′ , R )  do
  3:
       F n e w ← r . E x e c u t e ( K m a t c h )
  4:
       Δ K n e w ← Δ K n e w ∪ F n e w
  5:
end for
  6:
for all  ⟨ r , K m a t c h ⟩ ∈ M a t c h ( K ′ , R s e m i )  do
  7:
       ⟨ C , H ⟩ ← r . E x e c u t e ( K m a t c h )
  8:
      if  I s S a t i s f i e d ( C , K ′ )  then
  9:
             Δ K n e w ← Δ K n e w ∪ { H }
10:
      else
11:
            for all  c ∈ C ∖ K ′  do
12:
                   D i n v ′ [ c ] ← D i n v ′ [ c ] ∪ { ⟨ C , H ⟩ }
13:
            end for
14:
      end if
15:
end for
16:
for all  f p r e v ∈ Δ K p r e v  do
17:
      for all  ⟨ C , H ⟩ ∈ D i n v ′ [ f p r e v ]  do
18:
            if  I s S a t i s f i e d ( C , K ′ )  then
19:
                   Δ K n e w ← Δ K n e w ∪ { H }
20:
            end if
21:
      end for
22:
end for
23:
return  Δ K n e w ∖ K ′ , D i n v ′
The algorithm first forms the current snapshot K ′ = K ∪ Δ K p r e v . Ordinary rules add their instantiated conclusions to the output set. Semi-conditional rules generate ⟨ C , H ⟩ records: a fully satisfied record contributes H immediately, while a pending record is indexed under each missing predicate. The preceding round’s new facts also retrieve existing records for verification against the same snapshot. Set-valued outputs suppress duplicate conclusions, and facts already in K ′ are excluded from the returned increment.
Consider Problem in Figure 8. From the properties of the inscribed square D G F E and the perpendicular relations, the system derives D E = E F , identifies M H F E as a rectangle, and obtains E F = H M , hence D E = H M . The parallel relation D E ‖ B C , together with the common angle ∠ D A E = ∠ B A C , provides the basis for establishing ▵ A D E ∼ ▵ A B C once the required corresponding-angle condition is verified. The similarity relation then yields A M / A H = D E / B C , which, combined with A H = 8 , B C = 12 , and D E = H M , gives A M = 2 3 H M . Using A M + H M = A H , the system obtains D E = H M = 24 5 .
This example also illustrates the role of semi-conditional rules. During rule matching, the common-angle relation and the parallelism-derived angle relation can satisfy part of the similarity rule’s antecedent, while the remaining required condition may not yet be available. The corresponding rule instance is retained in the backward index and reconsidered when new knowledge is derived. The similarity conclusion is produced only after the complete antecedent is verified. Thus, semi-conditional matching preserves potentially useful partial matches without treating them as established geometric conclusions.

4.4. Product-Matrix Representation and Implicit-Knowledge Extraction Mechanism

For positive quantities and a positive right-hand side, a product equality ∏ i Q i e i = c becomes ∑ i e i log Q i = log c . This transformation permits linear elimination; related algebraic reasoning is used in AlphaGeometry2 [26]. KM-SCR uses an explicit product matrix ( P m ) to expose the resulting value and ratio relations to subsequent deductive reasoning. Equations outside the positive domain are retained for equation-system solving.
The C o m p a s s B y C E operation substitutes the representative quantity of each equality chain and combines the corresponding matrix columns. If C i Q i = C r Q r , the substitution is Q i = ( C r / C i ) Q r . For a linear matrix, coefficients are rescaled and added; for a product matrix, exponents are added and the proportional factors are transferred to the right-hand side. Known values are substituted directly. Thus, compression reduces the matrix dimension while preserving the represented equations on their admissible domain.
M a t r i x . D i s c o v e r ( M ) takes the compressed augmented matrix and returns Q v and Q r facts after row reduction. For P m , the reduced rows are interpreted as equations in logarithmic variables. The extraction uses two operations:
  • Intra-row scanning: traverse the simplified matrix row vectors and directly extract basic geometric relations according to the distribution of non-zero elements. For a product-matrix row a log Q i = d , emit Q i = exp ( d / a ) . For a row a log Q i − a log Q j = d , emit Q i = exp ( d / a ) Q j . For L m , the corresponding patterns are a Q i = d and a Q i + b Q j = 0 , yielding Q i = d / a and Q i = − ( b / a ) Q j , respectively. All divisions require nonzero divisors.
  • Inter-row computation: compare reduced rows and cancel proportional coefficient patterns on their shared variables. Apply the same value/ratio tests to the residual equation and emit the resulting relations. This extracts ratios exposed by cancellation, as illustrated below.
In Figure 9, merging the A B and B C columns removes a redundant value equation. Intra-row extraction gives C D / E F = 1 / 2 , D E / E F = 1 , and B C = 5 . Subtracting the two logarithmic ratio rows eliminates log E F and yields C D / D E = 1 / 2 . These extracted relations return to the deductive knowledge base.
Figure 9. Product-matrix compression using A B = B C . Columns contain exponents; RHS displays the original multiplicative constants (their logarithms enter linear elimination). The compressed matrix yields C D / E F = 1 / 2 , D E / E F = 1 , and B C = 5 .

4.5. Geometric-Quantity Equality Reasoning Algorithm

Building on the product-matrix representation and implicit-knowledge extraction mechanism described above, this section integrates the algebraic representations into a unified geometric-quantity equality reasoning algorithm. Q v and Q r relations are maintained in the chain-of-equalities set ( C E ) and can directly generate further quantitative knowledge. Linear equalities ( E l i n ) and product equalities ( E p r o d ) are maintained in the linear matrix ( L m ) and product matrix ( P m ), respectively. The C E relations are used to compress matrix columns and to simplify candidate equation systems. Equalities that cannot be directly incorporated into these matrix representations are maintained in the equation-system set ( E S ) for subsequent joint solving. Let E S = { ε 1 , ε 2 , … , ε n } be the maintained set of candidate equation systems, where each ε i is formed by pairing one or two geometric-quantity equalities.
Algorithm 4 first inserts new equalities by type and constructs candidate local systems. It then extracts chain relations, compresses the matrices, and simplifies the local systems before solving.
Algorithm 4 Geometric-Quantity Equality Reasoning
Require: 
Current knowledge base K , previous-round new knowledge Δ K p r e v , linear matrix L m , product matrix P m , chain-of-equalities set C E , equation-system set E S .
Ensure: 
New knowledge set Δ K n e w , new linear matrix L m ′ , new product matrix P m ′ , new chain-of-equalities set C E ′ , new equation-system set E S ′ .
  1:
Δ K n e w ← ∅ , L m ′ ← L m , P m ′ ← P m , C E ′ ← C E , E S ′ ← E S
  2:
for all  e ∈ Δ K p r e v ∣ e ∈ Q v ∪ Q r  do
  3:
       C E ′ ← U p d a t e C E ( C E ′ , e )
  4:
end for
  5:
for all  e ∈ Δ K p r e v ∣ e ∈ E l i n  do
  6:
       L m ′ ← L m ′ ∪ { e }
  7:
       E S ′ ← E S ′ ∪ { { e , p } ∣ p ∈ K . E ∖ E l i n } ∪ { { e } }
  8:
end for
  9:
for all  e ∈ Δ K p r e v ∣ e ∈ E p r o d  do
10:
       P m ′ ← P m ′ ∪ { e }
11:
       E S ′ ← E S ′ ∪ { { e , p } ∣ p ∈ K . E ∖ E p r o d } ∪ { { e } }
12:
end for
13:
for all  e ∈ Δ K p r e v . E ∖ ( Q v ∪ Q r ∪ E l i n ∪ E p r o d )  do
14:
       E S ′ ← E S ′ ∪ { { e , p } ∣ p ∈ K . E } ∪ { { e } }
15:
end for
16:
Δ K n e w ← Δ K n e w ∪ C E ′ . D i s c o v e r ( )
17:
L m ′ ← L m ′ . C o m p a s s B y C E ( C E ′ ) , P m ′ ← P m ′ . C o m p a s s B y C E ( C E ′ )
18:
Δ K n e w ← Δ K n e w ∪ M a t r i x . D i s c o v e r ( L m ′ ) ∪ M a t r i x . D i s c o v e r ( P m ′ )
19:
for all  ε ∈ E S ′  do
20:
       ε ← ε . S i m p l i f y B y C E ( C E ′ )
21:
       Δ K n e w ← Δ K n e w ∪ ε . S o l v e ( )
22:
end for
23:
return  Δ K n e w ∖ ( K ∪ Δ K p r e v ) , L m ′ , P m ′ , C E ′ , E S ′
Insertion and pairing.  U p d a t e C E applies the chain-update cases of Section 2.2 to each new Q v or Q r fact. Linear and product equations are inserted into their respective matrices. Local systems contain a single equation or a pair; new linear equations are paired with existing non-linear-type equations, and new product equations with existing non-product-type equations. The matrices handle combinations within their respective classes, reducing redundant local solving.
Chain discovery.  C E . D i s c o v e r takes the updated chains and returns their implied value and ratio facts. For a chain C 1 Q 1 = ⋯ = C k Q k = v , it emits Q i = v / C i when v is known and Q i = ( C j / C i ) Q j for pairs of quantities. Without an explicit value, only the ratio relations are emitted. Relations are normalized and deduplicated before insertion into the knowledge base.
Matrix discovery.  C o m p a s s B y C E returns the compressed L m and P m matrices using the substitutions described in Section 4.4. M a t r i x . D i s c o v e r then performs the row reduction and value/ratio extraction specified there.
Equation-system simplification.  ε . S i m p l i f y B y C E ( C E ) takes a candidate equation system and the current chains, and returns an equivalent system under those chain relations. It identifies quantities in the equations, selects a representative from each relevant chain, substitutes proportional quantities and known values, and simplifies the resulting expressions. Where the solver requires explicit equations, representative-to-member equalities encode the same substitutions. S o l v e processes the reduced system and returns quantitative relations valid under the geometric domain constraints; ambiguous solution branches require further constraints. The representative mappings translate derived results back to the original quantities.
Figure 10 summarizes the exchange between the logical and algebraic modules. Rule conclusions update the chains, matrices, and local equation systems; extracted quantitative relations return as facts for subsequent rule matching. These modules share the same incremental knowledge-base update cycle.
Figure 10. Knowledge-flow relationships between the logical-reasoning level (predicate knowledge, semi-conditional rules, object merging) and the algebraic-computation level (chains of equalities, linear matrix, product matrix, equation systems) in the KM-SCR system.

5. Experimental Results and Analysis

To evaluate KM-SCR across different problem difficulties, we construct an evaluation set of 493 FormalGeo7k instances. We randomly sample 40 problems from each of levels L1–L5 using a fixed random seed (42) and include all 293 problems from L6, which comprises problems with reasoning-path lengths of at least 11. This design provides cross-level evaluation and a comprehensive stress test on the highest difficulty level. FormalGeo7k offers broad plane-geometry coverage, while its longer-path problems require deeper combinations of intermediate deductions and inference rules. All KM-SCR experiments use a timeout of 600 s per problem. The experiments were conducted on a computing platform equipped with an AMD Ryzen 9 9950X processor.

5.1. Comparison of Problem-Solving Performance

Table 3 reports the problem-solving success rate (PSSR) on L6 and the source of each result. KM-SCR solves 288 of 293 instances (98.29%), the locally reproduced FormalGeo FW-BFS baseline solves 17 (5.80%), and the locally reproduced FGeo-NSS achieves 60.41%. KM-SCR and the locally reproduced baselines were evaluated on the same computing platform, using the same 293 L6 problems, a 600 s timeout per problem, and the same success criterion. For the baselines, modifications were confined to the evaluation code; their inference procedures, rule sets, and reasoning-related preprocessing were retained. The local comparison evaluates the systems with their respective rule coverage and implementations; the observed performance differences therefore reflect system-level performance.
Table 3. L6 problem-solving success rates and background references. Local runs use the complete 293-instance subset and a 600 s timeout. Published reference values retain the evaluation protocols of the cited source.
The published FGeo-DRL and FGeo-HyperGNet results are included as contextual references and retain the evaluation protocols of their original sources.

5.2. Cross-Level Performance and Computational Cost

We report four realized-cost measures. Solving success counts the problems whose target is derived within the timeout. Solving time is measured from the start of inference on a loaded problem instance until the target knowledge is first derived; a run that reaches the 600 s timeout before the target is derived is recorded as a timeout. Peak memory records the maximum memory occupied during the inference process. Actual rule-instantiation calls are accumulated over all inference rounds. For problem p, let a p , t denote the number of rule-instantiation calls recorded in round t; the cumulative count is
A p = ∑ t = 1 T p a p , t ,
where T p is the final inference round of the run, and repeated calls across rounds are included. The level-wise values reported below are the means of these per-problem quantities over the successfully solved instances; solving time, peak memory, and rule-instantiation calls are all averaged over the same instances.
Table 4 summarizes solving success, solving time, peak memory, and actual rule instantiations for the sampled L1–L5 subsets and the complete L6 subset. KM-SCR solves 39/40 problems at each of L1–L3, all 40 problems at L4 and L5, and 288/293 problems at L6. The corresponding success rates are 97.50%, 97.50%, 97.50%, 100.00%, 100.00%, and 98.29%. The mean solving time increases from 0.53 s at L1 to 4.06 s at L6, while the mean number of rule-instantiation calls grows from 2284.95 to 75,117.56, reflecting the deeper reasoning chains required at higher difficulty levels. The L1–L5 results describe the selected samples and provide preliminary evidence across difficulty levels; the L6 result covers the complete level.
Table 4. Cross-level solving success and resource statistics. Resource metrics are averaged over successfully solved instances; rule-instantiation calls are cumulative across inference rounds.
Table 5 details the cumulative solving-time distribution for the complete L6 subset. On L6, 70 problems (24.31%) are solved within 1 s, 263 (91.32%) within 10 s, and 284 (98.61%) within 30 s, with the ratios computed over the 288 successfully solved instances. All 288 successfully solved instances were solved within 60 s, while the remaining five instances could not be solved by the current reasoning system.
Table 5. Cumulative distribution of solving time for the successfully solved FormalGeo7k-L6 instances. Ratios are computed over the 288 successfully solved instances.
Together, these results characterize the realized computational cost of KM-SCR across difficulty levels. The following subsection analyzes the structural compression that reduces the underlying representation and potential matching space.

5.3. Solved-State Compression Analysis

This subsection examines structural compression, that is, how much the representation scale and the potential matching space are reduced at the solved state. These structural measures describe reduced representations and potential matching spaces; they do not directly quantify realized runtime savings, which have been reported separately in the previous subsection.
All statistics in this subsection are evaluated at the state in which the target is first derived. For a single problem, the compression rate of predicates or potential rule instantiations is defined as R a t e = 1 − ( N c o m p / N o r g ) , and the global compression rate is defined as R a t e G l o b a l = 1 − ( N c o m p + N u n r e l a t e d ) / ( N o r g + N u n r e l a t e d ) , where N o r g and N c o m p denote the corresponding counts before and after the mechanism under comparison, and N u n r e l a t e d denotes unaffected counts. Whereas the MRI in Equation (1) can be evaluated at any knowledge state, the solved-state MRI (SMRI) fixes this evaluation state to the first target-derived state: it is the Cartesian-product upper bound of potential rule instantiations estimated from the solved-state knowledge and the rule templates.
Figure 11 shows the distributions of compression rates across difficulty levels L1–L6, evaluated at the state in which the target is first derived. The six measures characterize compression at the geometric-object, relation, and global-predicate levels, together with reductions in the potential matching spaces associated with object merging, semi-conditional rules, and their combined effect.
Figure 11. Distributions of compression-related measures across FormalGeo7k difficulty levels in the solved-state setting. Each panel corresponds to one level from L1 to L6.
Across the evaluated difficulty levels, the compression-rate distributions exhibit an overall upward trend, particularly for Semi-MRI and Global MRI, whose central values approach one at L5–L6. Compression at the geometric-object and relation levels also generally increases, while global-predicate compression remains comparatively modest because it includes predicates unaffected by object merging. These observations are consistent with the expectation that more complex geometric configurations and longer reasoning chains can introduce additional equivalent object representations, redundant relations, and potential antecedent combinations, thereby providing greater opportunities for knowledge merging and semi-conditional matching. The results thus suggest that the proposed mechanisms offer greater structural compression benefits on more demanding instances.
A local reversal is observed between L3 and L4. In particular, the L4 sample exhibits lower compression than L3 on several measures, including geometric-object, relation, and global-MRI compression. This result suggests that compression depends not only on reasoning-path length but also on the geometric structures and redundancy patterns present in each subset. Since only 40 problems were sampled from each of L1–L5, the observed reversal may also reflect differences in sample composition. Evaluation on larger samples with repeated sampling within each level would help assess the stability of this pattern. Overall, the results show that compression varies across difficulty levels, with a local reversal between L3 and L4.
Figure 12 then compares, at the same solved state, the counts before and after compression for each mechanism, covering frequent predicates, semi-conditional rule pairs, and merged rule pairs.
Figure 12. Solved-state compression comparison on the L6 subset of FormalGeo7k. Orange and blue bars denote the counts before and after the corresponding compression operations, respectively. Panel (a) shows the counts of five predicate categories with high occurrence frequencies. Panel (b) compares the potential matching counts of semi-conditional rule pairs for different congruence and similarity criteria. Panel (c) shows the potential matching counts of rule pairs affected by geometric-object merging. All counts are measured in the knowledge state at which the target is first derived.
Figure 12a shows reductions in all five displayed predicate categories. The relative decreases are more pronounced for angle-ratio, angle-equality, and line-intersection predicates than for angle objects and angle-size predicates, indicating that compression benefits vary with the redundancy of the represented knowledge. In Figure 12b, the full-antecedent potential matching counts exceed the corresponding semi-conditional candidate counts by several orders of magnitude, with particularly large reductions for ASA and AAS congruence. This pattern is consistent with constructing candidates from base-object matches and checking the remaining instantiated constraints, thereby avoiding their participation in the full antecedent product. Figure 12c also shows substantial reductions in the potential matching counts of rules affected by object merging, with the segment-ratio category exhibiting the largest relative decrease among the displayed categories. Since antecedent counts enter the MRI multiplicatively, reductions in redundant representations can produce much larger reductions in potential rule combinations. Together, these results illustrate how compression at the knowledge-representation and rule-matching levels contributes to the overall structural reduction.
Geometric-object merging primarily reduces redundant object and relation representations and the resulting candidate space. Semi-conditional rules primarily reduce the cost of full-antecedent matching and deferred-condition verification.

5.4. Ablation Study of Chain-of-Equalities Processing

To verify the effectiveness of the chain-of-equalities matrix simplification and equation-system simplification strategies, this paper designs an ablation study that compares the full method with the variants obtained by removing the above two modules; the results are shown in Table 6. All ablation variants use the same revised implementation and rule set as the full system, with only the corresponding CE operation disabled.
Table 6. Ablation of CE processing on all 293 L6 instances. Mean and median times are calculated over each variant’s successful runs.
Removing matrix-column compression preserves the L6 success rate of 98.29%, while increasing mean solving time from 4.06 to 9.41 s and median time from 2.18 to 3.68 s. This result indicates that column compression reduces algebraic-solving overhead on this test set.
Removing equation-system simplification reduces the number of successfully solved problems from 288 to 273, indicating that this component contributes to solution coverage. Under the local strategy that processes one or two equations at a time, CE substitutions integrate variable relations distributed across multiple equalities, enabling the solution of geometric quantities that would otherwise remain unresolved. The ablated variant has a mean solving time of 3.39 s across its 273 successful runs, compared with 4.06 s across 288 successful runs for the full system. However, these means are conditioned on successful runs over different sets of problems and therefore do not establish a runtime advantage for the ablated variant. A paired comparison on the common subset of successfully solved problems is needed to isolate the runtime effect.
The two CE operations play complementary roles. Matrix-column compression reduces solving time on the tested instances without changing the number of solved problems, whereas equation-system simplification improves solving coverage under the adopted local-solving strategy.

6. Conclusions

KM-SCR integrates geometric-object merging, semi-conditional rules, and chain-of-equalities reasoning in a forward deductive system. Object merging consolidates equivalent geometric representations and their associated relations. The rule-instance equivalence proof shows that semi-conditional rules preserve the original applicability conditions and conclusion while separating candidate generation from constraint verification. Chains of equalities support direct quantitative inference and reduce the algebraic state passed to matrix and local equation solving.
The system solves 288 of the 293 FormalGeo7k-L6 problems (98.29%), with a mean solving time of 4.06 s over successful runs. The sampled L1–L5 subsets yield success rates of 97.50–100.00%. The compression analysis characterizes the reduction in represented knowledge and potential matching space, while the ablations identify complementary contributions of matrix compression to efficiency and equation simplification to solving coverage.
Future work will extend rule coverage, improve extraction of implicit problem conditions, and develop provenance tracking through matrix compression and elimination. The current workflow supports dependency-based reconstruction of recorded deductions; complete recovery of matrix-derived reasoning paths requires further work. Additional directions include three-dimensional geometry and integration with learned search guidance, where a compact symbolic state can support both inference and structured training data.

Author Contributions

Conceptualization, Q.Z. and S.L.; methodology, Q.Z. and S.L.; software, Q.Z.; validation, Q.Z., H.G. and Y.W.; formal analysis, Q.Z. and S.L.; investigation, Q.Z.; resources, Y.R.; data curation, Q.Z.; writing—original draft preparation, Q.Z.; writing—review and editing, S.L., H.G., Y.W. and Y.R.; visualization, Q.Z.; supervision, S.L. and Y.R.; project administration, S.L.; funding acquisition, Y.R. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Natural Science Foundation of China (62407011), 2026 Special Project for High-quality Development of Primary and Secondary Mathematics Education in Guangdong Province (GDJY-2026SX-A025), 2025 Research Start-up Fund for High-Level Talents of Guangdong Mechanical & Electrical Polytechnic (Gccrcxm-202506), the Higher Education Science Research Planning Project (25SX0201), and the Guangzhou Academician and Expert Workstation (2024-D003).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The source code of KM-SCR, the test problems, and the experimental data presented in this study are openly available in the GeoInference repository at https://github.com/dt792/GeoInference (accessed on 22 October 2026).

Acknowledgments

The authors thank the developers of FormalGeo for providing the open-source dataset and evaluation framework.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Gelernter, H.; Hansen, J.R.; Loveland, D.W. Empirical explorations of the geometry theorem machine. In Proceedings of the 1960 Western Joint IRE-AIEE-ACM Computer Conference, San Francisco, CA, USA, 3–5 May 1960; pp. 143–149. [Google Scholar]
  2. Wu, W.T. On the decision problem and the mechanization of theorem-proving in elementary geometry. Sci. Sin. 1978, 21, 157–179. [Google Scholar]
  3. Buchberger, B. Bruno Buchberger’s PhD thesis 1965: An algorithm for finding the basis elements of the residue class ring of a zero-dimensional polynomial ideal. J. Symb. Comput. 2006, 41, 475–511. [Google Scholar] [CrossRef] [Scilit]
  4. Chou, S.C.; Gao, X.S.; Zhang, J.Z. Machine Proofs in Geometry: Automated Production of Readable Proofs for Geometry Theorems; World Scientific: Singapore, 1994. [Google Scholar]
  5. Chou, S.C.; Gao, X.S.; Zhang, J.Z. Automated generation of readable proofs with geometric invariants: II. Theorem proving with full-angles. J. Autom. Reason. 1996, 17, 349–370. [Google Scholar]
  6. Li, H. Invariant Algebras and Geometric Reasoning; World Scientific: Singapore, 2008. [Google Scholar]
  7. Zhang, J.Z. Outlines of point geometry. Stud. Coll. Math. 2018, 21, 1–8. (In Chinese) [Google Scholar] [CrossRef] [Scilit]
  8. Hu, X.L.; Jiang, J.G.; Zhang, Y. Research progress of automated particle geometry theorems proving. Adv. Appl. Math. 2018, 7, 1490–1499. (In Chinese) [Google Scholar]
  9. Chou, S.C.; Gao, X.S.; Zhang, J.Z. A deductive database approach to automated geometry theorem proving and discovering. J. Autom. Reason. 2000, 25, 219–246. [Google Scholar] [CrossRef] [Scilit]
  10. Baeta, N.; Quaresma, P. Towards a geometry deductive database prover. Ann. Math. Artif. Intell. 2023, 91, 851–863. [Google Scholar] [CrossRef] [Scilit]
  11. Ye, Z.; Chou, S.C.; Gao, X.S. An introduction to Java Geometry Expert. In Automated Deduction in Geometry; Sturm, T., Zengler, C., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6301, pp. 189–195. [Google Scholar]
  12. Wang, Y.; Rao, J.S.; Guan, H.; Zou, Y. NetPad: An online DGS for mathematics education. In Proceedings of the 2017 12th International Conference on Computer Science and Education (ICCSE), Houston, TX, USA, 22–25 August 2017; pp. 305–309. [Google Scholar]
  13. Botana, F.; Hohenwarter, M.; Janičić, P.; Kovács, Z.; Petrović, I.; Recio, T.; Weitzhofer, S. Automated theorem proving in GeoGebra: Current achievements. J. Autom. Reason. 2015, 55, 39–59. [Google Scholar] [CrossRef] [Scilit]
  14. Vélez, M.P. Automated reasoning for teaching and learning geometry: An open discussion. In Proceedings of the International Congress of Mathematicians 2026—Volume 7: Invited Lectures (Sections 15–20); Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2026; pp. 566–578. [Google Scholar] [CrossRef] [Scilit]
  15. Rao, Y.; Xie, L.; Guan, H.; Li, J.; Zhou, Q. A method for expanding predicates and rules in automated geometry reasoning system. Mathematics 2022, 10, 1177. [Google Scholar] [CrossRef] [Scilit]
  16. Lu, P.; Gong, R.; Jiang, S.B.; Qiu, L.; Liang, X.D.; Zhu, S.C. Inter-GPS: Interpretable geometry problem solving with formal language and symbolic reasoning. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics (ACL), Bangkok, Thailand, 1–6 August 2021; pp. 6774–6786. [Google Scholar]
  17. Wu, W.; Zhang, L.; Liu, J.; Tang, X.; Wang, Y.; Wang, S.; Wang, Q. E-GPS: Explainable geometry problem solving via top-down solver and bottom-up generator. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 17–21 June 2024; pp. 13828–13837. [Google Scholar]
  18. Zhao, J.; Zhang, T.; Sun, J.; Tian, M.; Huang, H. Pi-GPS: Enhancing geometry problem solving by unleashing the power of diagrammatic information. In Proceedings of the 2025 IEEE/CVF International Conference on Computer Vision (ICCV), Honolulu, HI, USA, 19–23 October 2025; pp. 1526–1536. [Google Scholar]
  19. Zhang, X.; Zhu, N.; He, Y.; Zou, J.; Huang, Q.; Jin, X.; Guo, Y.; Mao, C.; Li, Y.; Zhu, Z.; et al. FormalGeo: An extensible formalized framework for olympiad geometric problem solving. arXiv 2023, arXiv:2310.18021. [Google Scholar]
  20. He, Y.; Zou, J.; Zhang, X.; Zhu, N.; Leng, T. FGeo-TP: A language model-enhanced solver for Euclidean geometry problems. Symmetry 2024, 16, 421. [Google Scholar] [CrossRef] [Scilit]
  21. Zhang, X.; Li, Y.; Zhu, N.; Qin, C.; Zeng, Z.; Leng, T. FGeo-HyperGNet: Geometric problem solving integrating FormalGeo symbolic system and hypergraph neural network. In Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence (IJCAI), Montreal, QC, Canada, 16–22 August 2025; pp. 4733–4741. [Google Scholar]
  22. Li, Y.; Zhang, X.; Qin, C.; Hu, Z.; Leng, T. FGeo-ISRL: A MCTS-enhanced deep reinforcement learning system for plane geometry problem-solving via inverse search. Symmetry 2026, 18, 628. [Google Scholar] [CrossRef] [Scilit]
  23. Hu, Z.; Zhang, X.; Qin, C.; Li, Y.; Leng, T. A hybrid framework for automated geometric problem-solving by integrating formal symbolic systems and deep learning. Symmetry 2026, 18, 592. [Google Scholar] [CrossRef] [Scilit]
  24. Zhang, C.; Song, J.; Li, S.; Liang, Y.; Ma, Y.; Wang, W.; Zhu, Y.; Zhu, S.-C. Proposing and solving olympiad geometry with guided tree search. Nat. Mach. Intell. 2026, 8, 84–95. [Google Scholar] [CrossRef] [Scilit]
  25. Trinh, T.H.; Wu, Y.; Le, Q.V.; He, H.; Luong, T. Solving olympiad geometry without human demonstrations. Nature 2024, 625, 476–482, Correction in Nature 2024, 627, E8. https://doi.org/10.1038/s41586-024-07115-7. [Google Scholar] [CrossRef] [Scilit]
  26. Chervonyi, Y.; Trinh, T.H.; Olšák, M.; Yang, X.; Nguyen, H.H.; Menegali, M.; Jung, J.; Kim, J.; Verma, V.; Le, Q.V.; et al. Gold-medalist performance in solving olympiad geometry with AlphaGeometry2. J. Mach. Learn. Res. 2025, 26, 1–39. [Google Scholar]
  27. Nevins, A.J. A relaxation approach to splitting in an automatic theorem prover. Artif. Intell. 1975, 6, 25–39. [Google Scholar] [CrossRef] [Scilit]
  28. Duan, B.; Liang, X.; Lu, S.; Wang, Y.; Shen, Y.; Chang, K.-W.; Wu, Y.N.; Yang, M.; Chen, W.; Gong, Y. Gold-medal-level olympiad geometry solving with efficient heuristic auxiliary constructions. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers); Association for Computational Linguistics: San Diego, CA, USA, 2026; pp. 21725–21747. [Google Scholar]
  29. Olšák, M.; Kaliszyk, C.; Urban, J. Property invariant embedding for automated reasoning. In Proceedings of the ECAI 2020: 24th European Conference on Artificial Intelligence, Santiago de Compostela, Spain, 29 August–8 September 2020; pp. 1395–1402. [Google Scholar]
  30. Wang, D. GEOTHER 1.1: Handling and proving geometric theorems automatically. In Automated Deduction in Geometry (ADG 2002); Winkler, F., Ed.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2004; Volume 2930, pp. 194–215. [Google Scholar]
  31. Wang, K.; Su, Z.D. Automated geometry theorem proving for human-readable proofs. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence (IJCAI), Buenos Aires, Argentina, 20–31 July 2015; pp. 3133–3139. [Google Scholar]
  32. Liu, D.; Gu, T.; Xue, J.P. Rule engine based on improvement rete algorithm. In Proceedings of the 2010 International Conference on Apperceiving Computing and Intelligence Analysis (ICACIA), Chengdu, China, 17–19 December 2010; pp. 346–349. [Google Scholar]
  33. Zhang, X.; Zhu, N.; Qin, C.; Li, Y.; Zeng, Z.; Leng, T. Formal representation and solution of plane geometric problems. In Proceedings of the NeurIPS 2024 Workshop on Mathematical Reasoning and AI (MATH-AI), Vancouver, BC, Canada, 14 December 2024. [Google Scholar]
  34. Gan, W.; Yu, X.; Zhang, T.; Wang, M. Automatically proving plane geometry theorems stated by text and diagram. Int. J. Pattern Recognit. Artif. Intell. 2019, 33, 1940003. [Google Scholar] [CrossRef] [Scilit]
  35. Huang, Q.; Zhang, X.; Zhu, N.; Zhu, F.; Leng, T. FGeo-eval: Evaluation system for plane geometry problem solving. Symmetry 2025, 17, 902. [Google Scholar] [CrossRef] [Scilit]
  36. Zhang, X.; Zhu, N.; He, Y.; Zou, J.; Qin, C.; Li, Y.; Leng, T. FGeo-SSS: A search-based symbolic solver for human-like automated geometric reasoning. Symmetry 2024, 16, 404. [Google Scholar] [CrossRef] [Scilit]
  37. Zou, J.; Zhang, X.; He, Y.; Zhu, N.; Leng, T. FGeo-DRL: Deductive reasoning for geometric problems through deep reinforcement learning. Symmetry 2024, 16, 437. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.