arXiv:2610.26467cs.LOOct 2026

Manuscript Offprint

arXiv:2610.26467

Rózsa: Certified Equational Reasoning

Georgios Kissas

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

When does one equation imply another? Stage 2 of the SAIR Mathematics Distillation Challenge required teams to submit solvers to answer this question for sets equipped with a binary operation. For these sets, associativity, commutativity, or any other algebraic property was not assumed. Each answer required a proof or counterexample that could be verified by Lean. Programs also had to respect fixed resource limits. We present Rózsa, a Python solver that searches for both kinds of evidence. It begins with simple tests and considers more extensive searches when those fail. To find a proof, it applies a given equation and derives any further equations as needed, keeping a record of each step. To find a counterexample, it searches for operations on finite sets. It also tests one fixed infinite model. The given equation must hold for every assignment, while the target equation must fail for at least one. In either case, Rózsa turns the evidence into a Lean certificate. The submitted solver solved 199/200 problems (99.5%) in the official main evaluation getting the 6th overall position. Additional tests show that the solver can prove many implications linked by long chains of known results, but has limited success with infinite counterexamples. We explain the search methods, how they fit together, and what the unsolved cases reveal about their limits.

1 Introduction

An equation such as x⋄x=xx \diamond x = x is easy to write, but its properties can be hard to discover. A magma is a set with a binary operation ⋄\diamond: a rule that takes two elements and returns an element of the same set. We assume neither associativity nor commutativity. Given a starting law HH, called the hypothesis, and a law TT, called the target, we ask whether TT holds in every magma that satisfies HH. A solver must justify either answer: derive TT from HH, or give a set and operation for which HH holds and TT fails. The Equational Theories Project organized formally checked implications between 4,694 small magma laws [1]. The SAIR Mathematics Distillation Challenge, Stage 2, asked submitted programs to solve problems of this kind. Each answer needed a certificate, a proof written in Lean [10]. The challenge uses a judge that creates a proposition for the chosen answer and checks that the submitted code proves it.

Rózsa separates the search for an answer from the correctness checks. For each proof, it records the equations and steps used in the derivation. For each counterexample, it records the set, its operation, and an assignment where the target fails. Then it expresses this evidence in Lean code. Simpler strategies are run first, and the solver considers more extensive searches for harder cases. The methods complement each other. Proving an intermediate law can make a complicated target easy to derive. Searching formulas with a few coefficients can find a counterexample without examining every operation table. The same derivation machinery can prove the target equation or establish that an infinite model satisfies the hypothesis. The paper explains these connections and the reasons for the search order.

Relation to existing systems. The proving methods are based on rewriting, which applies equations to parts of expressions, and completion, which derives new equations to use as rules [2, 3]. Recording completion also keeps the origin of each rule so that a proof can be reconstructed [5]. Counterexample search draws on finite model finding [8] and methods that repair violated constraints [9]. Experiments with Vampire provide a broader reference for proving implications in the Equational Theories Project [12]. Two recent systems offer useful comparisons. Janota, Rawson, and Schulz extract models, possibly infinite, from fully processed equation systems. They certify termination and confluence for 261 resulting rewrite systems: rewriting stops, and competing reductions can be joined [6]. Those certificates establish properties of the rewrite systems. SAIR acceptance requires a Lean certificate for the requested implication. Another SAIR solver uses ordered unit superposition, a method for deriving consequences of equations, together with systematic finite-model search and several infinite constructions [13]. Rózsa uses several bounded proof searches. Its counterexample methods include repairing finite tables, filling their entries subject to constraints, and testing one infinite construction and its reverse.

The presentation follows a problem through the system. Section 2 explains its mathematical meaning and tree representation. Section 3 explains the schedule. Sections 4 and 5 describe proof and countermodel discovery, Section 6 shows how both become checked certificates. Execution limits follow in Section 7. Results, reproducibility, and discussion complete the main text. Exact parameters, additional implementation details, and post-evaluation failure analysis are in the appendices.

The implementation being described. The paper describes the mathematical search methods in the unchanged 175,375-byte submission. Appendix C.4 gives the hash that identifies this file. Appendix C.5 describes the optional language-model fallback, and Section 8 states which features were enabled in the measured runs.