Learning Interestingness in Automated Mathematical Theory Formation
Authors: George Tsoukalas
Rahul Saha
Amitayush Thakur
Sabrina Reguyal
Swarat Chaudhuri
Venue: NeurIPS 2025 spotlight ()
Keywords: automated mathematics
AI for math
interestingness
reinforcement learning
scientific discovery
theory discovery
Primary area: machine_learning_for_sciences
TL;DR: We design an RL environment for automated mathematical theory formation and present an evolutionary synthesis methodology for interestingness measures to guide exploration in it

Abstract: We take two key steps in automating the open-ended discovery of new mathematical theories, a grand challenge in artificial intelligence. First, we introduce Fermat, a reinforcement learning (RL) environment that models concept discovery and theorem-proving using a set of symbolic actions, opening up a range of RL problems relevant to theory discovery. Second, we explore a specific problem through Fermat: automatically scoring the interestingness of mathematical objects. We investigate evolutionary algorithms for synthesizing nontrivial interestingness measures. In particular, we introduce an LLM-based evolutionary algorithm that features function abstraction, leading to notable improvements in discovering elementary number theory and finite fields over hard-coded baselines. We open-source the \fermat environment at github.com/trishullab/Fermat.

Learning Interestingness in Automated Mathematical Theory Formation
George Tsoukalas
Rahul Saha UT Austin rahul. saha edu
Amitayush Thakur UT Austin amitayush @ uduxas.edu
UT Austin george.tsoukalas uutesaasaaatexeaeeee
Sabrina Reguyal
Swarat Chaudhuri
Princeton University, Stanford University sreguyal stanford.edu
UT Austin
swarat@cs.uteet www.:eess.uxex.ccl..
Abstract
We take key steps in automating the open-ended discovery of mathe- matical theories, grand challenge in artificial intelligence. First, we introduce FERMAT, a reinforcement learning (RL) environment that models concept discov- ery and theorem- proving using set of symbolic actions, opening up range of RL problems relevant to theory discovery. Second, we explore specific prob- lem through FERMAT: automatically scoring the interestingness of mathematical objects. We investigate evolutionary algorithms for synthesizing nontrivial in- terestingness measures. In particular, we introduce an LLM-based evolutionary algorithm that features function abstraction, leading to notable improvements dis- covering elementary number theory and finite fields over hard-coded baselines. We open-source the FERMAT environment at at.github... http:bcccotttiiiiiii lab/erraat
1
Introduction
Al researchers have dreamed of building an "automated mathematician" since the 1950s 29]. Such system would allow human mathematicians to harness the vast processing capacity of computers to discover entirely new areas of mathematics [42]. An emerging body of work seeks to realize this dream using the tools of modern machine learning. In particular, the AI community has developed and search for programs discovering
wide range of systems that can prove formal theorems K 47
mathematical constructions [3 40
However, key limitation of much of this research that is focused on solving predefined problems. Mathematicians develop theories through an open-ended process of defining new concepts, studying their properties, making conjectures, and proving or finding counterexamples. While some work [35 has offered systems that construct new problems in addition to solving them, there is currently no framework that supports the full theory-formation process, including, for example, the synthesis of new definitions in addition to problems.
A central challenge in this open-ended process is guiding the search. The space of possible definitions and conjectures is combinatorially vast, and most paths lead to trivial or dull mathematics. Human mathematicians navigate this space using nuanced, intuitive sense of "'interestinnnes"" of scientific potential that directs their focus. An explicit formulation of this concept has long been debated, with different perspectives valuing properties such as the surprising connection between disparate fields (36), depth and generality [22), or its unexpected real-world applicability [49
judgment
In this paper, take two key steps towards addressing these challenges. First, provide reinforcement learning (RL) framework, called FERMAT (Figure I]. which can used to design and
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

evaluate new algorithms for automatic theory formation. The system generalizes the early symbolic computing-proot prover system HR [8, which used system of production rules to generate new concepts and conjectures, either symbolically or from explicit examples, and proof mechanismy for resolving conjectures. We model these symbolic steps as the actions of Markov Decision Process (MDP), and the mathematical knowledge available at a given point during exploration as an MDP state. This formulation opens up numerous RL problems relevant to theory formation.
Our second contribution is a solution to a particular algorithmic problem in FERMAT: learning an interestingness heuristic for selecting mathematical concepts to develop. To form theory, one must navigate a combinatorial search space of mathematical objects, most objects in which are not meaningful or worthy of study. Prior works were attentive this problem, but required hard-coded measures to formalize the concept of interestingness 88 26]. In contrast, we frame the discovery of this heuristic as a learning problem. We specifically learn interestingness measures as programmatic representations, as this makes them interpretable and allows to analyze what may contribute to fruitful discovery. To this end, we develop an LLM LLM--riven method, called EvoAbstract, for learning the intrinsic value of mathematical objects in the context of the current theory. EvoAbstract is an evolutionary program synthesis algorithm that extends the FunSearch [40] approach with a form of abstraction learning, allowing for interpretable abstractions to be discovered during function search. We experimentally show that EvoAbstract can automatically synthesize interestingness measures that lead to significant improvements in discovering concepts in elementary number theory and finite fields over hard-coded baselines.
2 Problem Formulation and Motivation
2.1 Mathematical Theory Formation Markov Decision Process (MDP)
To rigorously study automated mathematical theory formation using reinforcement learn- ing, we first formalize the process as MDP (S, A, R). This framework allows us to model the sequential nature of mathematical discovery, where an agent iteratively expands body of knowledge by making choices about definitions, conjectures, and proof attempts. Let M denote the universe of all well-formed math- ematical entities. The components of this MDP defined as follows:
State
Actions
Theory
Compose
Policy
Definitions
Specialize
π
Quantify
Conjectures
Prove
Theorems
Uptate
Theeey
Figure I: A high-level description of FERMAT, our environment for mathematical theory formation. At any given time, the current theory (state) is rep- resented as a knowledge graph consisting of the mathematical definitions, conjectures, and theo- rems discovered so far. each step, the policy inputs the current state and selects an action to apply, updating the theory with additional infor- mation. The action space allows the production of new definitions, conjectures, and proofs of theo- rems.
Mathematical State Space (S): A state S E S represents the current state of mathematical knowledge, represented as directed knowledge graph G (V, F), where:
V S M is the set of mathematical enti- ties, categorized into definitions D, conjec- tures C, and theorems 7.
E is the set of dependency edges, where an edge (u, v) exists if entity was used as direct input for the action that generated entity v, and is labeled with that action.
Action Space (A): An action a E A represents an operation that modifies the knowledge graph by introducing new entity or acting upon existing ones. Actions fall into the following categories:
Definition Production Actions (Adef): Introduces a new definition, adding node d' G and
connecting it to relevant entities via a function ddef S x Adel + S.
Conjecture Production Actions (Aom,)) Formulates a new conjecture based on existing entities and relationships, governed by a function 6yonj S x Aconj - S.
Proof Actions (Aproes (prove, disprove)) )): Verifies or refutes a conjecture e E C by invoking backend theorem prover, updating its status to theorem or disproven.

---

Transition Function (7): The transition function T: : x x S + |0, 1] models how applying an action updates the knowledge graph. T(S, a, S') denotes the probability of transitioning from state S to S" after applying action a. In particular,
Adding new definition or conjecture exxendds V and introduces edges emanating from the entities to which the production rule was applied: = V Ufc), 5² = L' {(e, c) v E Vinpute A successful prove action converts a conjecture into theorem and attaches a proof attribute: C" = C C {c), g' = g U }t} with proof structure тe. A successful disprove action refutes the conjecture e, marking as false and attaching counterexample as witness, where possible.
We design an extrinsic reward function Rg S A x S + I to incentivize the discovery of pre-defined set & of well-known mathematical entities. Let the application of action to state S produce state S' with new entity Mnew E EM. The reward is defined as:
Reward Function:
(
if mnew E
Re (S, a, S')
otherwise
reward is thus granted only when the agent's s action results in the discovery of specific ground- truth concept. A policy, denoted by (aass) defines a strategy by specifying the probability of taking action a in a given state s. rollout refers to a single episode of interaction used to evaluate this policy by generating a trajectory, T (So, do, ri, S1, 01, ....... -1, rT, ST). This sequence is formed by starting So and repeatedly sampling an action o, ~ T (-[St), after which the environment dictates the next state S T(S,, -) and the corresponding reward r = Re(S,, ax, S(+1).
The intrinsic reward Rı is a function Ri S X + RR that serves as a mechanism for the agent/policy to learn effectively in a sparse extrinsic reward setting. Such internal rewards can be critical for driving exploration and acquisition of general knowledge about the environment and discovery of useful subgoals, especially when external feedback is infrequent or absent, by promoting
behaviors like curiosity or novelty-seeking [ 32
2.2 Interestingness as Intrinsic Reward
Humans use intuition and are intrinsically motivated to define interesting mathematical goals. Cap- turing this notion for autonomous agent is key challenge. We approach this by modeling interestingness as a learnable intrinsic reward, guiding a policy to discover meaningful theory. In this work, wish to discover such interestingness measures autonomously. and view the synthesis of an effective interestingness measure as a problem of intrinsic reward oplimization.
Formally, we define the interestingness measure to be function M x + R. where I(m, S) provides an estimate the value of mathematical entity m in the context of the current theory S. We connect this entity-scoring function to our RL framework by defining the intrinsic reward Rz for a state transition as the interestingness score of the newly generated entity. If taking action a in state S produces new entity Mnew in state S", the intrinsic reward is Rr(S, a, S') I I(mnew S").
In this work, we search over the class of interestingness measures that can be represented as program- matic functions. The policy, Tz, is built using the measure I according to fixed template (detailed in Section 5), and designed leverage the function's scores to guide its selection of actions. While the policy лı acts based on this local, short-term measure, our learning problem is to discover an optimal function I" that maximizes the cumulative long-term extrinsic reward:
I arg max E BINTT T
Σ ('Re
where y E [0, 1] represents the discount factor. In Section 4 designed towards discovering an optimal I.
we detail our evolutionary algorithm
FERMAT: A Framework for Automated Theory Formation
In this section, we discuss FERMAT, our framework for automated mathematical theory formation built atop our MDP formulation of the theory discovery.
3

---

3.1 Mathematical Entities
The FERMAT framework, implemented in Python, provides the environment for automated theory formation. It is built upon structured representation of mathematical entities within an evolving knowledge graph. At its core formal domain specific language (DSL) to define these entities.
Each mathematical entity m within the knowledge graph G = (V, E) (where m E V) encapsulates its meaning through several key components:
(I) Symbolic Definition (ma This holds the formal representation of the entity m expressed in FERMAT'S 's DSL. It precisely defines the entity's 's logical structure. For an entity is is_prime, the symbolic definition might be the following expressed programmatically.
Magn. An. (n > 1) AVKEN. (JqEN.n-qxk = [k=1Vk-il
dividea((k.n
(2) Computational Interpretation (Meonap) This is an executable Python function that provides an efficient, concrete evaluation of the entity's 's symbolic definition magm- Let be the space of potential input instances for m. The interpretation is mapping Moomp (True, False, Unknown where, for an instance
function returns:
True (resp. False) if has been verified computationally (resp. not) to satisfy Maym:
Unknown when the evaluation of could not be determined computationally within resource limits (e.g. due to universal quantification over an infinite set).
As am example, for an entity m = square, its computational interpretation could be given by Mcomp lambda a, b: == a*a.
(3) Cached Instances X(m) (X' (m), X' X' (m)). These components store explicit input instances for the entity where X'+ (m) {i E 7 m(i) = True} stores examples, and X''(mm) (m) {i e I m(i) = False) } stores nonexamples. These instances ground the entity's semantics and can be used for various purposes. For m = divides:
x (m) = ((2, 4), (1, 3), (2.2), (3, .....
Xm = {(2, 3), (3, (5,
We write m;, m. for input and output arity of m, and size(m) m, + m. for size of the examples.
The construction history ((m) {ai,..., a, of an entity m is the ordered list of actions applied to produce it Definitions (m E D) are further classified as either predicates or functions. This informs which production rules in the action space A are applicable.
3.2 Production Rules
Following HR 8 FERMAT comes equipped with a set of production rules, consisting of composable actions for constructing new definitions and conjectures from prior ones. These rules define all construction actions in A S AA to produce new entities We divide the production rules by whether they produce definitions or conjectures. We include complete description of all the production rules present in FERMAT in Appendix A.1 and give two condensed examples:
Definition Production Rules.
(I) Exists: Let P(x Xn) be a predicate and / := fir.... i be a list of indices to existentially quantify over, and let J == Ji.....In-1 be the remaining indices in increasing order. Then the production rule outputs a new predicate as follows,
exists P
Xi_ Exi,
Xis
s.t.
P(x .......... Xn)
Example. Consider the predicate P(z, y) defined by P(x, y) - Ez., v= x x 2, which expresses that divides y. This can be constructed by applying the Exists production rule to the predicate product(1,, z, y), which holds when = x x z, with the index list = {1} corresponding to
variable to be existentially quantified. Formally,
exists product -
Q(x, y) = 3z s.t. product(r, 2,

---

(2) Specialize: Given an entity, this rule outputs a new definition by specializing a variable to fixed value. Let A(x),...,,. ..)),))) be the value to substitute. Then the rule outputs function (resp. predicate) B as follows,
be a function (resp. predicate), and let be the index specialize, and
specialize Aiv
B(x . X,
A(x X; U, X X,,
FERMAT contains 7 other definition production rules: (i) Compose, which composes definitions, (ii) Maplterate, which successively applies iterator function, (iii) ForAll, which universally quantifies over variables in definitions, (iv) Match, which asserts equality of chosen variables in definitions, (v) Negate, which outputs the negation of concept, (vi) Size, which outputs definition of the cardinality of the set of imputs satisfying a condition, and (vii) Constant, which creates constants from examples.
Conjecture Production Rules. FERMAT contains 4 production rules designed to construct conjec- tures. These are: (i) Implication, which asserts that one definition implies another over all inputs, (ii) Equivalence, which asserts that two definitions are equivalent, (iii) Nonexistence, which asserts that no examples of a definition exist, (iv) Exclusivity, which asserts that the only examples of given definition belong to given finite set.
3.3 Prover
To complete the action space, we require the ability to validate conjectures generated using FERMAT'S DSL. Critically, the generic DSL supports nested definitions, facilitating modular construction of definitions and conjectures. These conjectures, which may involve previously defined concepts, are automatically constructed by our framework and passed to backend theorem prover for verification. We instantiate this backend using the Z3 Theorem Prover [T], and provide it with SMT-LIB input generated from our DSL via custom-designn shelf black-box prover, the use of which enables us isolate the problem of synthesizing definitions and conjectures. We include examples of the 73 support available through our DSL., and compilation down SMT-LIB format Appendix A..3
compiler. We choose 73 as it is a powerful off-the-
Learning Interestingness
In this section, discuss ap- proach for automatically learn- ing interestingness measure I(m, S) that guides the agent in discovering human mathe- matical knowledge. Following HR R which developed simple programmatic representations of features of the state, we search in the space of Python programs that imple- ment interestingness measures. To this end, introduce EvoAb- stract (Figure 2). an evolution- ary search algorithm designed to optimize an objective function given a simple numerical evalu- ator function.
leu Influence influense, score (sncestors_comm) dercandants_eoomt actures)
sun_
Bralution
enero (a 38 Sofflannne, sooro + 8.56 cepth seore 0.28 ago score + 0.15 arity (2ore)
calculate, intereatingness()= weighted dopth_ ago_sesre 8.38 artty__coree
return score
def soleulate, Iafluence seare ka]: inf Lamoo, pcore (krrancatiors_nom Arrdczzandants count) me_concaptx: mesccm)
2 Abstraction
Populations
return toflomecx_xcore
measures
3. Policy Evaluation
Theary Environment
R
Scores
π
FERMAT
Figure 2: Overview of EvoAbstract, which aims discover op- timal interestingness measure for mathematical theory formation. It operates through three phases: (1) Evolution, where popula- tions of candidate programs are generated and refined through LLM-driven mutations; (2) Abstraction, where
LLM-Drrven Evolutionary Search. (EVOLUTIONSTEP) At its core, EvoAbstract an evolutionary algorithm, aimed synthesizing programs itera- tively. Each population consists of candidate interestingness programs. The generation of
programs are analyzed and reusable subroutines are extracted; and (3) Policy Evaluation, where the resulting programs are evaluated within the theory formation environment using FERMAT, produc- ing feedback that guides subsequent evolutionary steps.

---

new programs is primarily driven by an LLM, Lear, conditioned on a prompt instructing it to perform evolution. In each evolutionary step, Sear takes the program template T and a selection of high-performing parent programs from a population as input, and synthesizes new candidate solutions (fnew). fvar thus acts as an operator for exploration and exploitation, intended to perform complex mutations informed by successful prior programs. We employ an island model with k parallel populations (P:) to maintain diversity.
Abstraction Learning. (ABSTRACTIONSTEP) Our central innovation in EvoAbstract is its ab- straction learning mechanism. This component is designed to identify and reuse valuable subroutines from evolved programs. This system comprises two main parts:
Periodically EvoAbstrace enters an abstraction phase, where LLM Labs: analyzes set of high-scoring programs (S)) sampled from each population. Cabs is tasked with identifying abstractions - valuable, reusable subroutines with defined signatures and implementations
Discovering and Utilizing Abstractions:
within these successful programs and proposing them as new, generalized functions (Anew). These proposed abstractions are then filtered for criteria such as syntactic validity and uniqueness before being added the island's Lib;
The Abstraction Library (Lib,): Each island i maintains a dynamic Abstraction Library, Lib; This library serves as repository for functional abstractions that are identified as potentially useful during the search. Initially, these libraries are empty, After each abstraction phase, the generated abstractions are added to their respective libraries Lib,, The evolutionary LLM, Cear. is conditioned not only on the template T and sampled programs but, crucially, also given access to the current set of abstractions Lib, when generating new candidate programs. This encourages Lvar to compose solutions by utilizing these validated sub-components, thereby promoting modularity, facilitating the construction of more complex solutions, and guiding the search towards more promising regions of the program space.
In each iteration, candidate programs produced through evolution assessed via episodic rollouts within the theory-formation environment. During a rollout, a policy instantiated by an interestingness program interacts with FERMAT to guide the discovery process over multiple steps. The cumulative reward obtained across these rollouts determines each program's 's fitness, providing the signal that drives subsequent evolutionary and abstraction phases.
Policy Evaluation. (POLICY
The overall EvoAbstract algorithm, detailed in Algorithm T (Appendix). thus proceeds in generations. Within each generation, the evolutionary search driven by Lear refines the populations each island. Periodically, the abstraction phase mediated by Lake enriches the abstraction libraries, which in turn provide more powerful building blocks for subsequent evolutionary steps. This interplay between LLM-driven evolution and LLM-driven abstraction learning allows EvoAbstract to progressively discover and refine programmatic subroutines.
Experiments
In this section, we present empirical results evaluating the effectiveness of our approach. We aim to answer key questions about the ability of EvoAbstract to learn effective interestingness measures and the capability of FERMAT, guided by these measures, to generate meaningful mathematical theories.
Environment Configuration. FERMAT centrally supports exploration in elementary number theory and finite fields, as these areas are extremely rich while easily represented. The number theory environment is supported by the Z3 Theorem Prover, while finite field reasoning is handled by a custom prover implemented in Python. For number theory, the ground truth benchmark & used for the extrinsic reward function R comprises 180 concepts, conjectures, and theorems sourced from an introductory number theory textbook (2), constituting a set of interesting entities. We similarly curated 67 such ground truth entities over F27, the primary finite-field setting in our experiments. These concepts span range of theoretical sophistication, from the reflexive properties to the Goldbach conjecture. A detailed description of along with subsets of the ground truth knowledge graph is detailed in Appendix A.4. For our experiments, we use three different starting configurations: (i) succ_ cecc__ero__eee _eee__-e____ - The definitions of zero, successor function, and the equality predicate with arity 2; (ii) arithmetic base Containing zero, one, two, addition, multiplication, divides, S. and the

---

SINCE ZOTO
arithmetic base
27
214
10
Best Score
373
3.5
Taer alocn
Itaeatioon Am
Ilbeatl
Aporkcte
Weggh
Figure 3: A plot of the best program found per iteration for FunSearch and ExoAbstract, shown for the three different starting knowledge graphs, averaged over four runs. As can be seen, the EvoAbstract and FunSearch methods dominate performance universally across all baselines. On arithmetic_batt EvoAbstract slightly outperforms FunSearch, while on aucc_zero_ss _ee and ff_27 EvoAbstract optimizes the interestingness measures early on, but its performance plateaus sooner than FunSearch, which continues to improve.
- equality predicate; (iii) - Defining zero, one, and generators F2z. We include the policy template in Algorithm (Appendix).
Evaluation Metrics. To evaluate an interestingness measure, we instantiate the scoring function as extrinsic reward obtained through episodic rollouts of policy depending on the measure through FERMAT. We run 64 episodes with a timeout of 60 second and average the reward. This evaluation metric measures the ability of the given policy to reconstruct the curriculum of human- -ade ground truth mathematical entities E, We also provide qualitative analysis of the learned interestingness measures and the content of the generated theories.
Baselines. We compare EvoAbstract against the following baseline methods for generating or selecting interestingness measures:
Random Policy: Selects applicable actions uniformly random.
HR Measures: We re-implement number of interestingness measures manually defined in HR [8) which operate the state and the newly generated entity m (which can be extracted from the action a applied and the new state S'). particular, we include the following measures:
1. Novelty. Computes the fraction of entities with the same example classification: Mnowehy(( (m) = #(m' E ())(m) {mmm))/#S..
2. Parsimony. Rewards a concept with fewer inputs: Mparsimony(11 = size(m)
3. Productivity. Measures how many subsequent environment steps use that entity in produc- tion rule: Mproductivity (m) # (m' E S m is in action C(m'))##S
4. Applicability. Computes the fraction of all known instances that examples: Manplicatitity (m) = X (m)/(X** (m)) + X ++((m)).. (m)).
5. Comprehensibility. Rewards a concept which is more comprehensible, measured by the inverse of the number of construction steps: Muumprehensibiity (mn #C(m)-1
We evaluate these measures individually and when combined in equally weighted sum. Note that all of these measures are easily representable as Python programs.
One-shot LLM. Instead of evolving a program, we sample 64 programs from GPT-4o and
evaluate their performance through episodic roll-outs, averaging the result.
FunSearch: An ablation study where EvoAbstract is missing the abstraction component, which is equivalent to the FunSearch [40) algorithm without island crossover, ran at a scale afforded by our budget. We use the same hyperparameters in our EvoAbstract evaluation.
Evoobattact configuration. We configure EvoAbstract to employ = 4 islands and runs over N gen 64 iterations, with each interestingness function being evaluated in 16 i.i.d. rollouts. We
"We note that we run episodes for duration rather than a step count due to high variance in the time taken for Z3 resolve conjectures.

---

run every configuration of EvoAbstract & FunSearch 4 times and average the results. We instantiate both the evolution and abstraction samplers L Cabs to use GPT-4o-mini, and sample programs per iteration. We perform the abstraction phase every 8 iterations, sampling at most two abstractions per island. Lvar, Labs are conditioned through prompting: system-level instruction on generating interestingness measures is attached, as well as a description of a set of Python functions which return features of the state's knowledge graph representation as well as individual entities. These functions represent the base features for the interestingness measures to manipulate. We provide more detailed list of hyperparameters, the full prompts, and our computational resources for experiments in Appendix A.5
5.1
Experimental Results
We address the following research questions:
RQ1: Can EvoAbstract effectively learn interestingness measures that outperform baseline strate- gies in discovering ground-truth mathematical entities?
RQ2: What do the learned interestingness measures look like? Do they capture non-trivial patterns?
RQ3: Can we rediscover well-known concepts in elementary number theory and finite fields?
Performance Comparison (RQ1). We compare the cumulative extrinsic reward of policies guided by measures from EvoAbstract against baselines, with results summarized in Table 4 As expected, starting with a larger initial theory (ari parihhetic__bsee generally leads to greater rewards.
Among static HR measures, the random and novelty mea- sures perform worst, exhibiting roughly equivalent scores. Par- simony's ' inefficacy likely stems from its limited discriminative power, as most generated defini- tions involve few inputs, offering insufficient signal. Comprehen- sibility is the strongest HR mea- sure as it rewards simplicity of entities. However, it alone can- not scale to more complex enti- ties due to the combinatorial ex- pansion of the action space.
ari arithmeicc _base
Measure
succ_zero_aa
f1_27
Random
4.68 (2.25)
4.44 (2.23)
2.33 (1.20)
Novelty
4.50 (2.39)
5.14
2.26 (1.47)
Parsimony
4.94 (2.90)
4.85 4.85 (3.09)
2.56 (1.32)
Applicability
4.95 (2.25)
5.71 (3.05)
2.89 (1.69)
Comprehcnsibility
8.23 (2.84)
8.55 (3.22))
5.38 (1.89)
Equal Weight
6.57 (2.45)
(2.82)
3.93 (2.82)
GPT-4o
5.26 (1.11)
6.46 (1.98)
2.36 (0.40)
GP (best)
8.21 (4.09)
9.45 9.45 (3.44)
3.50 (1.87)
FunSearch EvoAbstract
10.23 (1.70)
22.41 (2.68)
11.34 (4.09)
9.62 (2.97)
23.98 (10.50)
9.82 (4.83)
Figure 4: Performance comparison of EvoAbstract against vari- ous baseline measures on three starting theories: succ_zero_eg ari priithetic_bbat basee, and ff__7. Each baseline receives 64 theory- formation evaluations. For FunSearch and EvoAbstract, we in- clude the average score (standard deviation) of the best found program over four independent runs.
Interestingly, the GPT-4o base- line performs only slighter better than even the random baseline (see Figure [4]. and is outper- formed by just the comprehensibility measure. Despite generating more complex measures, its emphasis on rewarding construction depth and connectivity often assigns disproportionately high interestingness to initial, but irrelevant, entities. This leads cascading effect away from the ground truth set &, explaining its suboptimal performance.
FunSearch 40 & EvoAbstract demonstrate the value of evolutionary search. In contrast to GPT-4o, where few generated measures surpassed the random baseline, evolutionary program synthesis yields significantly more performant measures, with the best measure discovered averaging (10.23, 22.41, 1 11.34) ground-truth entities per episodic roll-out on (succ_zero__e) _ee ari arithmetic_bart Incorporating the abstraction phase in EvoAbstract introduces slight gains on arithmetic_ban base, yielding measures that discover an average of 23.98 ground-truth entities, but with higher variance. Notably, on ff ff_27 27 and succ_ _er___er___eee __e EvoAbstract finds better solutions quicker, but the progress slows down and yields suboptimal performance at the end of the runs, on average. The abstractions are helpful in optimizing on known patterns, but produces an abstraction "lock-in" later on where it is difficult for the LLM to produce diverse samples that continue to increase the reward. Beyond improved discovery, this phase also develops interpretable modular components. Figure illustrates the performance trajectory of EvoAbstract & FunSearch compared to the baselines.
ff ff_27).

---

Analysis of Learned Interestingness Measures (RQ2). We also conduct a qualitative analysis of the measures that EvoAAstract synthesizes. Figures [5] presents an example of the best-performing eq task. A key characteristic of this program
program discovered by EvoAbstract on the its utilization of numerous abstractions and subroutines that were identified and refined during which we now analyze.
earlier abstraction phases. These abstractions are detailed in Figures To 18
First, Absttrtt rediscovers and often refines variants of the baseline HR measures. For instance, generates applicability-lic measures, such as compute _aapttteee_ppeeee_ee_ee l_balanceeeeeeeel which calculates the ra- tio of examples to nonexamples. Notably, EvoAbstract can refine previous abstractions, exemplified by v2, which generalizes prior uniqueness abstractions. Furthermore, measures distinct from the HR baselines are found, such as calculate httpatte___e_e__deiiiioea www.vviiiityscooo which weighs the diversity of rules in the construction history. Additionally, it produces abstractions which generalize known construction patterns, as seen from adjust_ sss___scr_________ bt___y___o___o _e___odd__typp
calculate calculate_uiiuuunsss
A comparison with the best program generated by FunSearch (detailed in Figure 19) is instructive. While the FunSearch program utilizes similar components to those found by EvoAbstract, they are fewer in number. FunSearch tends to integrate these functionalities more directly, resulting in a less modular structure. The distinct modularity evident in Figure 15iesds itself to quicker readability of the high-level operation of the interestingness function.
Analysis of Generated Theories (RQ3). EvoAbstract & FunSearch discover a notable portion of fundamental math concepts in our ground truth benchmark. When starting from the pocc_zero__ _eq base, the agent successfully develops the notion of addition, multiplication, divisibility, and the tau function. Furthermore, it makes progress towards conjecturing fundamental properties of divisibil- ity, such as the reflexivity of divisibility. When starting from ari arithmetic_base further - discovering the concepts of powers and primality along with more complex composi- tions of functions. In ff __77, the evolutionary methods are capable of discovering concepts such as ff_ _f__sm____ chree_times but cannot find the conjecture stating the characteristic of char(F27) = 3, which requires further rule applications to discover. Relevant samples of the evolved knowledge graphs are shown in Figure 20
the agent goes
We note that the berf-perno interestingness measures we find can still be suboptimal, upweight- ing entities are not particularly interesting to humans. For instance, we find that equals, which important for initial exploration, is assigned overly high interestingness, leading to an excess of redundant or vacuous statements during theory formation. While the agent generated conjectures, it had difficulty discovering many ground truth conjectures, which is likely due to the limited correct ways to correctly specify a conjecture compared to definition.
5.2 Discussion
We find that there are several avenues for further exploration towards discovering richer theories. Firstly, the policy template we employ, designed to manage combinatorial growth, exposes only subset of complete action space at any step. This choice, while pragmatic, limits scalability to more complex mathematical objects where lengthy list of actions must be applied in a specific order. Secondly, we observe that there are "bottleneck" entities, such as primality, which must be discovered in order to continue the development of an interesting theory (see Figure 8). In our experiments, when primality is discovered, the resultant knowledge graph is prohibitively large so as to obstruct valuable actions involving it. Finally, FERMAT does not yet exploit symmetries in entities leading to representational redundancy. For instance, while exhaustively checking for equivalences between definitions would reduce this redundancy, we found the approach to be computationally intractable with Z3 as theories grow. Further experimentation with FunSearch and EvoAbstract with heavy compute budgets will help to investigate the potential for significant discovery with evolutionary methods in these domains. Addressing these points will be crucial for advancing FERMAT'S ability to construct deeper and more sophisticated mathematical theories.
6 Related Works
Automated Theory Formation. AM (1977) on curated set of 243 heuristics to discover concepts and prove conjectures elementary set theory and number theory. Similarly, the Graph Theorist (1987) [17] performed conjecturing &
26 27 was theory formation program which relied

---

proving using an imput set of definitions. HR (2000) 8 introduces small set of production rules and manually curated heuristics to perform mathematical theory formation. Theorema (2006) [ theory exploration, leveraging computational tools in Mathematica and with an emphasis on producing human-readable proofs. Theory formation is less explored in the modern era. Notably, Minimo [5 trains a neural model to play game of conjecture and proof, but remains restricted to the initial axiomatic definitions. QuickSpec [44] is symbolic theory exploration tool that interleaves term generation and random testing for conjecturing. As final note, automated theory formation can be studied for domains other than mathematics - BACON (1983)
performed
25 represents program which aimed to rediscover empirical laws in chemistry.
Conjecturing. Many works have focused on the particular problem of synthesizing plausible conjectures. The PSLQ algorithm [19] was developed for identifying integer relations between mathematical constants. Graffiti TxGraffiti [8 produced conjectures in graph theory using several heuristics, given a large set of graphs and graph invariants. The Ramanujan Machine utilized several algorithms to conjecture relations between fundamental constants such as ι and ((3) Davies et al.
[ uses machine learning techniques to identify patterns that lead to conjectures.
Theorem-Provee The most significant attention in modern research has been applied towards the problem of theorem-proviin. Simon & Newell's ' Logic Theorist and Hao Wang's 's Program II
29 48
were early explorations into theorem-proving system. Recently, neural systems [15] 24
38
45
invoking interactive theorem provers like Lean [12] Isabelle [34]. and Coq [46 have seen great interest. AlphaProof [3] and AlphaGeometry
together attained silver medal at the International
Mathematical Olympiad. Another interesting angle for resolving conjectures comes from use of SAT& & SMT solvers- - notably, yielding resolution to the Boolean Pythagorean Triples problem Notably, the Four Colour Theorem was proved through computer-assisted case-checking [39]. Similarly, 7 used a combination of neural and symbolic techniques to disprove conjectures.
23
Program Synthesis & RL. FunSearch [40] and AlphaEvolve [31] are LLM-guided evolutionary algorithms used discover programs producing mathematical constructions. The closely related LaSR (1 algorithm uses LLM-guided evolution and learned textual abstraction library for symbolic regression. Eureka [28] uses iterative LLM refinement to produce extrinsic reward functions that outperform human- engineered rewards on suite of RL environments. Several efforts [6] 20 perform program synthesis in functional languages and develop abstraction libraries using symbolic abstraction algorithms. An interesting direction would be to develop separate explorative and exploitative policies, as in 30, for mathematical theory formation.
7 Conclusion
In this work, we targeted the problem of capturing the interestingness of concepts in the context of open-ended mathematical discovery. To support research, we introduced FERMAT, novel RL environment for theory formation. We introduced EvoAbstract, an LLM-based evolutionary procedure which abstracts and stores useful subroutines identified during search. We show that our learned interestingness measures outperforms several baselines when conducting theory formation using FERMAT, starting from basic definitions, in elementary number theory and finite fields.
Our investigation is a starting point for much broader research in automated theory formation. Integrating interactive theorem provers, like Lean [12), into FERMAT will allow exploration in more complex domains and enable studying the problem of learning to prove tabula rasa. It is also an open problem how to autonomously synthesize production rules. In future work, see that extensions of FERMAT could lead to the development new mathematics as envisioned in the early days of Artificial Intelligence.
Acknowledgement
This research was supported in part by NSF awards CCF-2212559 and CCF-2403211, a grant from Renaissance Philanthropy's ' AI for Math Fund, and the NSF AI Institute for Foundations of Machine Learning. We would also like to thank the anonymous reviewers for their insightful feedback, which helped improve the quality of this manuscript.
10

---

References
[1] Ferran Alet, Martin F. Schneider, Tomas Lozano-Perez. and Leslic Pack Kaclbling, Meta- learning curiosity algorithms, 2020. httpttt:e//aaa...o///aaaaaaa//
05325
[2] Titu Andreescu, Dorin Andrica, and Zumiing Feng. 104 Number Theory Problems: From the Truining of the USA IMO Team. Birkhäuser Boston, 2007. ISBN 978-0-8176-45274
[3] Mare G. Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Mumos. Unifying count based exploration and intrinsic motivation, 2016. URL https
//axxvv.rg//absa
01868
[4] Guy Ben-Aroya, Shahar Gottlieb, Ran J. Landsberg, and Ido Kaminer. The Ramanujan Machine: Automatically generated conjectures on fundamental constants. Nature, 589(7842):67-73, 2021.
doi: 10.1038/s41586. 0005:/44418800000000000000 020-03067.y.
[5] Matthew Bowers, Theo X. Olausson, Lionel Wong, Gabriel Grand, Joshua B. Tenenbaum, Kevin Ellis, and Armando Solar-Lezamm. Top-down synthesis for library learning. Proceedings of the ACM on Programming Languages, 7(P0PL): 1213, January 2023. ISSN 2475-1421. doi: 10.1 0,.144/3571234 URL.tttp:
doi org/ 10.
[6] Bruno Buchberger, Adrian Crăciun, Tudor Jebelean, Laura Kovács, Temur Kutsia, Koji Naka- gawa, Florina Piroi, Nikolaj Popov, Judit Robu, Markus Rosenkranz, and Wolfgang Windsteiger. Theorema: Towards computer-aided mathematical theory exploration. Journal of Applied Logic, 4(4):470-504 2006. ISSN 1570-8683. doi: http://ddo.oogg///...o///aa220.0
URL htttttt:t///atte sci enweeiieeet.t.... com wttp:///iiance/rtt.e///////////o
Towards Computer Aided Mathematics.
[7] François Charton, Jordan S. Ellenberg, Adam Zsolt Wagner, and Geordie Williamson. Pat- terbboost: Constructions in mathematics with a little help from ai, 2024. URL https //arxiv.
00566
[8] Simon Colton, Alan Bundy, and Toby Walsh. HR: Automatic Concept Formation in Pure Mathematics. Automated Software Engineering, 17(1):139-174, 2000. doi: 10.1023/A: 1008923120573.
[9] Alex Davies, Petar Veličković, Lars Buesing, Sam Blackwell, Daniel Zheng, Nenad Tomašev, Richard Tanburn, Peter Battaglia, Charles Blundell, András Juhász, Mare Lackenby, Geordie Williamson, Demis Hassabis, and Pushmeet Kohli. Advancing mathematics by guiding human intuition with ai. Nature, 600(7887):70-74, dec 2021. ISSN 1476-4687. doi: 10380
s41586-021-04000 -2660021-- URL httph:tp::/tt btttps://doi... org/10 1038/ s41586-166666 021-
[10] Randy Davila. Automated conjecturing in mathematics with TxGraffiti, 2024. URL https
//arxiv. org/ www.aag.//////oo//oo...oo.aaeere /b09 19379
[11) Leonardo De Moura and Nikolaj Bjørner. 73: An Efficient smt Solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the 08, pp. 337-340, Berlin, Heidelberg.
Construction and Analysis of Systems, 2008. Springer-Verlle Verlag. ISBN 3540787992.
[12] Leonardo de Moura, Soonho Kong, Jeremy Avigad, Floris Van Doorn, and Jakob von Raumer. The Lean theorem prover (system description). In Automated Deduction-CADD CADDE-25: 25th Inter- national Conference on Automated Deduction, Berlin, Germany, August 1-7, 2015, Proceedings
25, pp. 378-388 Springer, 2015.
[13] DeepMind. Al achieves silver-medal standard solving International Mathematical Olympiad problems. Google DeepMind Blog. July 2024. / google/disconve blog/aii-solves- imo problems- at -t--shl - www.lleer-edlllleeee
Accessed on 2025-0)4-22. Blog post announcing AlphaProof and AlphaGeometry results at IMO 2024. Technical details on AlphaProof were stated to be forthcoming.
[14] Igor Dejanović. Parglare: A Ir/gIr parser for python. Science of Computer Programming, pp. 102734, 2021. ISSN 0167-6423. doi: 10. 10.1006fjsciico2221..000 UtRttstss::/ww

---

[15] Kefan Dong and Tengyu Ma. STP: Seaf- Ilm theorem provers with iterative conjecturing and proving, 2025. URL https://axxi, wwwp://...ggaaa//......o /tt./ttte///arrrrooo///////.0//
00212
[16] Kevin Ellis, Catherine Wong, Maxwell Nye, Mathias Sable-Meyer, Lue Cary, Lucas Morales, Luke Hewitt Armando SozaraLezama, and Joshua B. Tenenbaum. Dreamcoder: Growing generalizable, interpretable knowledge with wake-sleep bayesian program learning, 2020. URL https://arxiv org/ abs/2006. 08381
[17] Susan Epstein. On the discovery of mathematical theorems. In Proceedings of the 10th International Joint Conference on Artificial Intelligence Volume 1, DCCAI887 pp. 194-197, San Francisco, CA, USA, 1987. Morgan Kaufmann Publishers Inc.
[18] Siemion Fajtlowicz. On conjectures of graffiti. In J. Akiyama, Y. Egawa, and H. Enomoto (eds.), Graph Theory and Applications, volume 38 of Annals of Discrete Mathematics, pp. 113-118. Elsevier, 1988. http:///b.ooggll..../o//ff////00
URL https
//www. www..accencedirect..oo www.com////ao/o
[19] Helaman Ferguson and David Bailey. polynomial time, numerically stable integer relation algorithm. 01 1992.
[20] Gabriel Grand, Lionel Wong, Maddy Bowers, Theo X. Olausson, Muxin Liu, Joshua B. Tenen- baum, and Jacob Andreas. Lilo: Learning interpretable libraries by compressing and document- ing code, 2024.
[21] Arya Grayeli, Atharva Schgal, Omar Costilla-Reyes, Miles Crammer, and Swarat Chaudhuri. Symbolic regression with learned concept library, 2024. URL Utthhttss:// //axxiv org /bss/ 2409. 09359
[22] G. H. Hardy. A mathematician's apology. Philosophy, 16(63):323-326, 1941.
[23] Marijn J. H. Heule, Oliver Kullmann, and Victor W. Marek. Solving and Verifying the Boolean Pythagorean Triples Problem via Cube-and- Conquer, pp. 228-245. Springer International Publishing, 2016. ISBN 9783319409702. doi: 10.
URL
7/dx orgo 10. 1007 70000000773000 319 3-100/99788--319-4999999- 40970-2219
[24] Albert Q. Jiang, Sean Welleck, Jin Peng Zhou, Wenda Li, Jiacheng Liu, Mateja Jamnik, Timothée Lacroix, Yuhuai Wu, and Guillaume Lample. Draft, sketch, and prove: Guiding formal theorem provers with informal proofs, 2023. URL htttts://aaxiiii org/ attp//aaa/2221a.a 12283
[25] Pat Langley, Gary L. Bradshaw, and Herbert A. Simon. Rediscovering Chemistry with the Bacon System, pp. 307-329. Springer Berlin Heidelberg, Berlin, Heidelberg. 1983. ISBN 978- 3-662-12405-5. doi: 10. 1e.11007778---666 12405-5 __10. URL http::ttt///e /ttp::://doi... http://di...g/....11111 1007/
110-3-662-12405-5555
[26] Douglas B. Lenat. AM: An artificial intelligence approach discovery in mathematics as heuristic search. PhD thesis, Stanford University, 1977.
[27] Douglas B. Lenat. Eurisko: A program that learns new heuristics and domain concepts. In Artificial Intelligence, volume 21, pp. 61-98. Elsevier, 1983, doi: 10.1016/5000443702655 80005-8.
[28] Yecheng Jason Ma, William Liang, Guanzhi Wang, De-An Huang, Osbert Bastani, Dinesh Jayaraman, Yuke Zhu, Linxi Fan, and Anima Anandkumar. Eureka: Human-level reward design via coding large language models, 2024. httpps:////// org http://bb//3...... 12931
[29] Allen Newell, J. C. Shaw, and Herbert A. Simon. The logic theory machine: A complex information processing system. In IRE Transactions on Information Theory, volume pp.
61-79. Institute of Radio Engineers, 1956. doi: 191.1099...956..15660
[30] Ben Norman and Jeff Clune, First-explore, then exploit: Meta-learning to solve hard exploration- exploitation trade-offs, 2024. URL htttttttt//araae org abs/ ////2/237722222222
12

---

[31] Alexander Novikov, Ngån Vü, Marvin Eisenberger. Emilien Dupont, Po-Sen Huang, Adam Zsolt Wagner, Sergey Shirobokov, Borislav Kozlovskii, Francisco R. Ruiz, Abbas Mehrabian, M. Pawan Kumar, Abigail See, Swarat Chaudhuri, George Holland, Alex Davies, Sebastian Nowozin, Pushmeet Kohli, and Matej Balog. Alphaevolve: coding agent for scientific and algorithmic discovery, 2025. https:/:::/arrt www.vvorgggaaeoe aarg/abs/25000 13131
[32] Pierre Yves Oudeyer, Frdric Kaplan, and Verena V. Hafner. Intrinsic motivation systems for autonomous mental development. IEEE Transactions on Evolutionary Computation, 11(2): 265-286, 2007. doi: 10.1 00.1109//EVC2220.80007
[33] Deepak Pathak, Pulkit Agrawal, Alexei A. Efros, and Trevor Darrell. Curiosity- explo- ration by self-supervised prediction, 2017. URL httph:tp//// :/apxii///xxvvvv/ arrxiv org/ abs/ 1705 1775.05363
[34] Lawrence C Paulson. Isabelle: A generic theorem prover. Springer, 1994.
[35] Gabriel Poesia, David Broman, Nick Haber, and Noah D. Goodman. Learning formal mathe- matics from intrinsic motivation, 2024. URL https: pettps://arziee http:///axvvvvv.. org.orgg////.. 2407 00695
[36] Henri Poincaré. Mathematical creation. The Monist, 20(3)321--33, 1910. doi: 10.5840/ monist19102037.
[37] Stanislas Polu and Ilya Sutskever. Generative language modeling for automated theorem proving. 2020.
http:/iiw.rrg/b//////a0/ 03393
[38] Z. Z. Ren, Zhihong Shao, Junxiao Song, Huajian Xin, Haocheng Wang, Wanjia Zhao, Liyue Zhang, Zhe Fu, Qihao Zhu, Dejian Yang, Z. F. Wu, Zhibin Gou, Shirong Ma, Hongxuan Tang. Yuxuan Liu, Wenjun Gao, Daya Guo, and Chong Ruan. keepseek-prover- Advancing formal mathematical reasoning via reinforcement learning for subgoal decomposition, 2025. URL
https://arxiv org/ abs ab04 21801
[39] Neil Robertson, Daniel Sanders, Paul Seymour, and Robin Thomas. The four-colour theorem. Journal of Combinatorial Theory, Series B, 70(1):2 44, 1997. ISSN 0095-8956. doi: https://doi. com wttp::ttccccccccccceeaeceaetccee
org/100.1006/jctt119999..
httLhhtts://ww www.ssceieieeineeeeeeeeeeeeeeeee http::/wwww..ccaaceeeeeeee.oo/cs
p11/5009589569771175000
[40] Bernardino Romera-Paredes, Mohammadamin Barekatain, Alexander Novikov, Matej Balog, M. Pawan Kumar, Emilien Dupont, Francisco J. R. Ruiz, Jordan S. Ellenberg, Pengming Peng, Alhussein Fawzi, et al. Mathematical discoveries from program search with large language models. Nature, 625(7995) 474, 2024. doi: 10. 011103//41186--02--6666 https:///oi. org/00 1038/ /e1///411886666 023 06924-6
URL
[41] Jürgen Schmidhuber. Formal theory of creativity, fun, and intrinsic motivation (1990-2010 IEEE Transactions on Autonomous Mental Development, 2(3):230-247) 2010. doi: 10.1 109/
TAMD.2010.2056368..
[42] Michael Shulman. Strange new universes: Proof assistants and synthetic foundations. Bull. New Ser. Am. Math. Soc., 61(2):257-270, February 2024.
[43] Satinder Singh, Richard L. Lewis, Andrew G. Barto, and Jonathan Sorg. Intrinsically motivated reinforcement Icarning An evolutionary perspective. IEEE Transactions on Autonomous Mental Development, 2(2):70-82, 2010. doi: (009///AD..0000200....
[44] Nicholas Smallbone, Moa Johansson, Koen Claessen, and Maximilian Algehed. Quick spec- ifications for the busy programmer. Journal of Functional Programming, 27:e18, 2017. doi: 10.1017/509567988110000
[45] Amitayush Thakur, George Tsoukalas, Yeming Wen, Jimmy Xin, and Swarat Chaudhuri. An in-context learning agent for formal theorem- 2024. URL http::/:: org/ abs/ 2310. 04353]
[46] The Coq Development Team. The Coq Proof Assistant, September 2023.
[47] Trieu H Trinh, Yuhuai Wu, Quoe Le, He He, and Thang Luong. Solving olympiad geometry without human demonstrations, Nature, 625(7995):476-482 2024.
13

---

[48] H. Wang. Toward mechanical mathematics. IBM Journal of Research and Development, 4(1): 2-22, 1960. doi: 10.1147/rd.41.0000
[49] Eugene Wigner. The unreasonable effectiveness of mathematics the natural sciences. Communications on Pure and Applied Mathematics, 13(1):1-14, 1960. doi: 10. 1002/cpa... 3160130102.
14

---

A Appendix supplemental material
A.1 Production Rules.
Here we include full description of each production rule available in FERMAT, including those mentioned in the main content for completeness.
Definition Production Rules.
1. Compose: This rule allows for composition of functions, predicates, and function-to- predicates. Function Composition. Let
F: X .... ...
Xn - 11 x ... x Yms
9 x ... Zx +
m} + .I,....kij be a map from F's output indices to G's input indices. Let ...., denote the parameters to be passed into F, and pi..... P: denote any additional parameters to be passed G. Then the production rule outputs function as follows,
functions, and I
compose FGT + H(xI,..... Xn. Pr,... pp) = -(vi, v*)
where
F(xi,...., jf I(i),
Vj
E (p P.).
if é Image(T).
Predicate Composition. Let
P: X x Xn Bool,
Q Z1 x x Za
Bool.
predicates, and S (1....,n) n) > (1..... k} be a sharing map from P's input variables to Q's input variables, that is, S(i) j if the i-th input variable of P and j-th input variable Q will shared when constructing the output predicate R defined below. Let Image(S) (i with i <... < i,. Then the production rule outputs predicate as follows,
compose P PQS- + R(x1, Xx, PL. P.) = P(x.......... xn)
Q(vI....,, Vvk
where
Xi
ifj=((i),
E p:
i & Image(T).
Function to Predicate Composition. This case works identically to function composition.
Let
F: x X,, Y1 X Yms P: 21 x Z₁ + Bool
be function and predicate, and / {1. (1...... m] - f1...., k} be map from F's output indices to P's input indices. Let X1. X,, denote the parameters to be passed into F. and PI...., Pa denote any additional parameters to be passed to P. Then the production rule outputs a predicate as follows,
compose FPI + H(xI..... .,.. PI..... .......p) = P(v V&.
where
F(xi,..,, xn)s, if I(i),
V2 E (pi..... P:). if j & Image(7).
2. Exists: This rule allows for existentially quantifying out variables in predicate function. Predicate. Let Pxx),... x.) be predicate, and let (f....., ... i where < n, be list of input indices to existentially quantify over. Let J =
1 in....Iānnk
15

---

with 11 < In..n= be the remaining indices. Then the production rule outputs new predicate Q as follows,
exists P )(.,,...,
X ;
Xx
Xi. P Xn)
Function. Let F(xi,... x,) be a function, and let / and J be defined similarly as before. Then the production rules outputs a new predicate as follows,
exists F
Q p x y) EX,, ... , s.t. F(x Xx)) y.
3. Map Iterate:
This rule turns an iterator function (unary or binary) into new function by applying the iterator function n times.
Unary Function. Let JF be unary iterator function. Let F² be the n-fold application F, that is, F=(x) A...... ...). Then this rule outputs new function as
times
follows,
map_ ieteeteeeeeee... =(xxn)===((x
Binary Function. Let F be a binary iterator function, and be an initial value concept to passed into the iterator. Then this production rule outputs a new function follows,
O 0) := v. G(x, n (1x == F()(x,))) x).
map iterate Fe
4. Forall: This rule allows for universal quantification of variables over either one or two predicates.
Single Predicate. Let P(xi...., x,) be a predicate, and let U = [u1, , Uj be a list indices the variables to universally quantify over. Let U [ū,,..., ūn-j) be remaining indices of the free variables. The production rule outputs new predicate R. such that
forall PU- + R(xa. Xan-,)
V Xuy,
Two Predicates. Let P(x X.) and . V&) be predicates. Let S C [l,...,n] n x !l a one-to-one sharing map, so that whenever (i,j) E S, we identify the variables and yj by substituting y, with x;.
Define the merged variable set M == (m...... + where the first n variables are |S] variables y: variables where does not appear
X1...., X,, in order, and the next in the second component of any pair in S, indexed in ascending order. Let my(1) denote the
variable in M corresponding to y..
Define the universal quantifier set U UC (1,...., n + k: - [S|} to the set of indices of variables in M to quantify over. Let 1/ denote the remaining indices of the free variables. Letting = {u.,..., ) and U (ū,..... Unth-191-5) the production rule outputs new predicate R such that
forall PQSU +
R(mayy.... maje Vm Ma, P(m m Q(m m-
5. Match: This rule allows variables be equal each other. Let A(x1, .......... ... X,, be function (resp. predicate), and let := (ii...., } with i it be a set of indices to be matched. Let J := (fI....,m) [) U [ir Then the rule outputs a new function (resp. predicate) B with n - k + arguments satisfying
with ji < ... Jn.Jnkk
match AI _
.... X2 X)1)
A(xI...,, Xn)
Xiy
that is, every occurrence of Xig...., Xi in A is replaced by the variable Xi,-
16

---

6. Constant: This rule can turn an example into concept (that accepts inputs, i.e. a value concept). FERMAT, we make the distinction between concepts and examples, and this rule provides a convenient way to bridge the gap. Let (m) be an example of the concept m. Then the production rule synthesizes value concept E out of this example,
constant
E
7. Specialize: This rule allows for specializing the imput (for functions and predicates) or output (for functions).
Specialize Input. Let A(. Xn) be function (resp. predicate), and let be the index to specialize, and be the value to substitute. Then the rule outputs a new function (resp. predicate) B satisfying
specialize Aiv _ X, X++1, xn)) A(x1 X, e, x X,,)
Specialize Output. Let F(Xi,.... Xa) be a function and let be the value we want to specialize the concept Then the rule outputs new predicate P satisfying
specialize F
..... v) P(x x,) (F
8. Negate: Let be predicate, then this production rule outputs the negation of the predicate, i.c.
negate p - Q Not(P)
9. Size: Let P(x X.) be a predicate and I = {i1,..., &m be set indices. Let J = (l,...,m)) outputs a new concept Q :n-mm with ... In. Then the production rule
size P 1
(( Xj, ... = # ((..)..... Xi P(xI,. xn)
where # X denotes the cardinality of the set X.
Conjecture Production Rules.
1. Implication: Let P and Q be predicates over the same domain, each with n inputs. Then the production rule outputs conjecture
implies P Q + Vx Xn, P(xI,....
Q
Xn)
2. Equivalence: This rule conjectures equivalence of concepts.
Predicate. Let P and Q be predicates over the same domain, each with n inputs. Then the production rule outputs conjecture
equivalence P Q + Vx X,. ,
( x.,)
Function. Let F and & be functions over the same domain, each with n inputs. Then the production rule outputs conjecture
equivalence F
Xn, X,, F(x ((x.,.,, x,,) = g(x), X,)
3. Nonexistence: This rule asserts non non-existence conjectures.
Predicate. Let P(x) Xn) be predicate. Then the production rule outputs a conjec- ture
nonexistence P - 7xx Xa, P(xi,..., Xn))
Function. Let F(x,,..... X,)) be function and be value. Then the production rule outputs a conjecture
nonexistence F 4 Axi,.... Xn, F(XI,... ((x),...,x.) v
17

---

4. Exclusivity: This production rule outputs conjectures stating that certain concepts are satisfied only on particular finite of inputs.
Predicate. Let P( Xn) the production rule outputs conjecture
be predicate, and S be subset of Domain (P). Then
exclusivity P vxi,... Xn: P(xI, Xn)
(X1:
xn)
E
Function. Let F(x1..... Xn) be function and be value. Then the production rule outputs a conjecture
exclusivity F S vx F(x1, X.)
X1
x,,
E S
production rule application will propagate the input entities' computational implementation and ex- amples where possible. While the produced symbolic definitions and computational implementations are deterministic, some rules have nondeterminism in the manner which new examples are adding upon creating.
A.2 FERMAT Technical Details.
Here we describe further implementation details regarding FERMAT.
1. Forbidden paths:
Following HR, we institute some forbidden paths which disallow the application of certain rules automatically. In particular, this disallows the creation of the following definitions & conjectures on input definition P: [--P. = P. P. > P.P + -PI. Though this forms minor optimization for our experiments, we believe that this set of forbidden paths can be learned automatically, In particular, in extension of FERMAT which also allows interpretable proof', an agent may quickly recognize these paths lead uninteresting proof's and prevent their usage in the future.
2. Global Instance Storage: By instance of a theory, we refer to all concrete values of the domain introduced thus far in the theory. Our environment keeps track of all instances seen in the theory throughout the theory exploration process.
3. Z3 Example Addition:
Definitions created involving the universal or existential quantifier rules cannot add examples or non-exampp non-examples respectively. This because adding such instances to the data of the entity requires iterating infinite. However, the more data an entity has the richer the theory. For such cases, we add certified examples for such definitions, by randomly sampling an instance of values, and using Z3 to determine whether it forms an example or non-example. We find this helps to prevent future nonexistence and trivial implication conjectures.
all values of the Nat type, which is
A.3 Proving through Z3.
Our DSL allows users to define functions and predicates over bounded and unbounded parameters, and to compose them into logical conjectures using constructs such ForAll, Exists, Implies, And, and arithmetic expressions. Critically, the DSL supports nested definitions: a predicate can define helper functions and other predicates inside its body, and similarly for functions. This enables the modular construction of conjectures and facilitates reuse of previously discovered building blocks.
Compiler and SMT-LIB Translation. accepted by Z3. Our compiler performs:
The DSL is compiled to SMT-LIB, the input language
1. Flattening of nested definitions into top-level SMT functions,
2. Lexical scoping resolution and name hygiene avoid collisions.
3. Translation DSL-level constructs into logically equivalent SMT forms. We write a compiler which converts our DSL into the SMT-lib target language. The compiler written using the parglare [14] library.
18

---

f_0 : Func
params 1;
bounded params 0;
ReturnExpr 2 x_0;
ReturnPred None;
);
f-1 :- Func
params 0;
bounded parama 0;
ReturnExpr 6;
ReturnPred None;
); ReturnEzpr None;
ReturnPred Exists
[b_0], f_0(x_0-b_0) == f_1()
);
(a) A DSL program asserting that 6 even using function composition.
p_ Pred
params 1;
bounded params 1;
f_0 :- Func
params bounded params 0;
ReturnExpr x_0 1;
ReturnPred None;
);
ReturnEzpr None;
ReturnPred Erista
[b_0], f_0(x_0=b_0) x_0
);
);
nested DSL predicate defining an inner function and using in an existential condition.
Figure 5: DSL snippets
(define-fun f_0_p_0 ((x_0 Int)) Int (+ x_0 1)) (define-fun p_O ((x_0 0 Int)) Bool
(exists ((b_0 Int)) (f_0-p_0 b_0) x_0)))
Figure 6: SMT-LIB code generated from Figure 5b where naming collisions are avoided by hygienic flattening.
Semantics and Proof Feedback. When conjecture is compiled and passed to Z3, the prover returns one of three outcomes:
UNSAT
The conjecture is logically valid. It is added to the theory as verified theorem and can be used in future derivations.
SAT The conjecture is invalid. 73 returns counterexample, which parsed back into the DSL. domain.
Timeout
We used 2s timeout with the Z3 solver.
19

---

Theory-Guided Composition. The DSL serves as unifying language in our system: all definitions, lemmas, and conjectures are expressed as DSL programs. As new concepts are discovered by our theory formation framework (FErMAt), they are registered as definitions in the DSL. New conjectures are then automatically generated by composing these building blocks. This compositional ability-enabled by nesting and hygienic compiler-allow our system to express and verify arbitrarily structured mathematical ideas.
A.4 Ground Truth Set
We curated 180 ground truth functions, theorems, and conjectures using a well-known introductory elementary number theory text [2] well small set of famous conjectures in the number theory literature, and an additional 67 ground truth entities drawn from the theory of finite fields over F27- These ground truth concepts be entirely derived by applying the production rules to the base concepts ( zero, successor, and equality for number theory, and generators and field operations for 27 Figure 7 illustrates small subset of ground truth concepts that relate to divisibility, demonstrating an area in which the model would receive extrinsic reward for discovering the most basic properties of natural numbers. On the other hand, Figure X illustrates a small subset of ground truth concepts relating to more sophisticated theorems and conjectures in the theory of prime numbers which offer extrinsic reward in theorizing about abstract ideas such as the existence of infinite instances, Figure 9
covers a subset of definitions and theorems in F22.
It is worth noting that there may be multiple paths to arriving a single concept. For example, it is possible to derive the concept is even either by applying:
apply specialized divides two index_too deeextto_spccaaizee
which gives a new concept with the first argument of the divides function to two, or by applying:
apply exists double indices to to_quttitfy=
which gives a new concept that returns True for an input there exists a natural number such that doubling results in the input. The number of possible paths reach certain ground truth concept increases exponentially with complexity. Because we want to evaluate the algorithm on its ability to find a ground truth concept regardless of the path it takes, ground truth set. In this manner, we cover as many paths to meaningful math concepts as possible, and we provide smooth reward signal to the algorithm for defining interestingness.
included redundant concepts in
A.5
Computational Resources & Hyperparameters
Our experiments are run on 64 Intel Xeon Platinum 8352Y and 64 AMD EPYC 7413 24C CPUs.
We leverage parallelism built into FERMAT to enable speedup in the evaluations. Given this alloca- tion, evaluating a single interestingness measure through episodic rollouts with FERMAT using the configuration detailed in takes ~ M = 120 seconds when using 64 workers. Our FunSearch and EvoAbstract experiments take significantly longer due to large number of interestingness measures generated and evaluated during evolutionary search. In particular, each experimental result reported with either FunSearch//EvoAbsrral takes approximately 18 hours with 64 workers. The evaluation of our GPT-4o baseline takes total of 6 hours when using 64 workers.
20

---

100
AM
dinida
2013
L
ond
Eivia acoodvit
dhidc each other
odl musber Eivio
Figure 7: Sample knowledge graph of ground truth entities relating to basic properties of divisibility the domain of natural numbers.
Algorithm EvoAbstract: Synthesis via Evolution and Abstraction Learning
Require: Template 7: Number of islands k; Generations Nyen: Abstraction frequency E N+:
Require: Parent sample size np E N+; Abstraction candidate sample size ylass E N Evolution
sample size ne:
Require: Evolution & Abstraction LLMs Lears Latsi
1: Initialize & populations PI,..., , Pk with seed programs.
2: Initialize &t empty abstraction libraries Lib Libe.
3: for generation g = 1 to N gen do
4: Sample island Uniform/ ( [k....,)..
5: P "=EVOLUUIONSSERP T,, Lib;, np. Re. Lvar, Scores).
6: Score <- POL.CYYEVA..UUTIINSSEEER
7: Update population P; < P: U (P) then
8:
if g mod
& Perform abstraction phase periodically
9:
for all islands i = to 1: do
10:
Lib, + Lib, J ABSTRACTIONSTEP(PP, Lib,, nahes Later Scores).
11:
return Best program f* found across all populations PI...., .t.
21

---

Happoe
IC uaa
TBI
www.delddeeeoo..oo Lec.s
Figure 8: Sample knowledge graph of ground truth entities relating to theorems and conjectures central the theory of prime numbers. Note that the concept of primality, is_prime, is ancestor of many concepts.
Algorithm 2 Policy Template for Action Selection
Require: Interestingness measure I(entity, graph) + R.
Require: Knowledge Graph G (V, F) with definitions D C V.
Require: Number of definitions to sample N N
Require: Simulation limit S E N+
D
Dsampled (
Set of N sampled definitions Map each definition to its interestingness score
2: Scores + {}
3: for each definition
do
4: Scores + I(d, G)
5: end for
6: Dsompled SampleBySoone(Scoree N)
7: Apotential + EnumeratePosibbecccoonn Deampite Gi)
8: Asim Sampae (pateee(Apatenttilll min(Siin A Apotential))
RRadomll sample up Stim actions
for simulation
9: AimullatedActiio.SSooo
10: for each action a E Asim do
Enew Siimllaeecction G)
Simulate action a to get resulting entity Enem b Compute interestingness of the new entity
12: Scorea + I[(eew G)
Simmllated.Accioo.Sccrr
<- scorea
14: end for
a" +- SampleByScor(AAsmm
16: return a"
22

---

Figure 9: Sample knowledge graph of ground truth entities relating theorems and conjectures central to the theory the finite field Ez7.
Rastel
23

---

Figure 10:
The one-shot prompt for our GPT-4o baseline. We do not insert the primitives here for brevity, these be found in Figure II
Figure 11: A list of primitive methods available to the interestingness measure synthesizers, Each method returns simple property or information about the knowledge graph and/or the input entity.
We note that our episodic roll-outs are time-capped, not finishing after a limit number steps. This because there is natural variance in the types of mathematical entities that get constructed, and calls to the Z3 theorem prover can often take many seconds. When resolving conjectures, we set the timeout to Z3 to be 2.0 seconds, and to 0.5 seconds when using Z3 to add instances to entities without any.
A.6 REPL
FERMAT also comes equipped with read-eval-print-lon (REPL) for manual interaction with the environment. The REPL allows the user to use an interactive shell to define, inspect, and evaluate mathematical entities.
Available commands.
Command
Description
help
Get help on commands or list available rules
list
List available concepts, rules, or conjectures
apply
Apply production rule to create new concepts/conjeetures
inspect
Show detailed information about an entity
compute
Test computational implementation with arguments
rename
Rename an entity
remove
Remove entity
visualize
Create visualization of the current knowledge graph
clear
Clear the screen
save
Save knowledge graph to file
exit
Exit the REPL
Example usage.
REPL Command
Concept Produced
apply iter successor apply iter add zero
add
multiply double
apply match add Siaices_to__atch(O00
apply match multiply andices_to_matcheeee
square
apply specialize successor zero index_ index_to_specializes
one
Figure 12: The prompt supplied to the evolution sampler Lears indicating the evolution task that needs to be applied. We have removed the description of the DSL primitives which appears in [1
24

---

Figure 13: The prompt supplied the abstraction sampler Labs, indicating the abstraction task that needs to be carried out.
Figure 14: An interestingness measure generated by GPT-4o. It begins by extracting relevant features of the state using the primitives. The measure itself is not very performant it overly rewards complexity and node connectivity in the graph, which only increase in new entities. As ground- truth entities not developed immediately using this measure, the episodes proceed by producing increasingly convoluted and uninteresting objects.
Figure 15:
The best program found by EvoAbstract in our main run on the starting knowledge graph succ_zero_eg We include the abstractions identified which are used in this program in Figure T6
Figure 16: The abstractions used in the best program found by EvoAbstract during the run succ_zero_eet
Figure 17: A performant program found by EvoAbstract our main run on the starting knowledge graph ff 27. We include the abstractions identified which are used in this program in Figure T8
The abstractions used in the best program found by EvoAbstract during the run on ff_27. Note that often newer abstractions use previous ones, sometimes trivially.
Figure 18:
Figure 19: The best program found by FunSearch during the run on succ_zero_eq.
25

---

Figure 20: Sample sections of elementary number theory discovered EvoAbstract during succ_zero_cd and ari arith_base base.
CONCEET
Legasti
suce zero bo evolved theor theory
arith base evolved theory
26

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification: Yes, the abstract and introductory aptly describe our contributions in FERMAT, investigations in interestingness learning, and EvoAbstract.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.
2. Limitations
Question:
Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: Yes, our paper discusses limitations of our investigation and framework discussion portion of the experiments section (Section 5).
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested few datasets with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution is low images are taken in low lighting. Or speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and faimess.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, worse outcome might be that reviewers discover limitations that aren't 't acknowledged the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community, Reviewers penalize honesty concerning limitations.
will be specifically instructed
3. Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?
27

---

Answer: [NA]
Justification:
Our paper does not include theoretical results.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should complemented by formal proofs provided in appendix supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main ex- perimental results of the paper to the extent that affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Answer: [Yes]
Justification: Yes, the paper discloses all information required reproduce the main results.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g.. in the case of large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
specific model and empirical evaluation, may
While NeurIPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) If the contribution is primarily new algorithm, the paper should make it clear how to reproduce that algorithm. (b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.
(c) If the contribution is new model (e.g., a large language model), then there should either be way to access this model for reproducing the results or way to reproduce the model (e.g., with open-source dataset instructions for how construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors welcome describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.
5. Open access to data and code
28

---

Question: Does the paper provide open access to the data and code, with sufficient instruc- tions faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [Yes]
Justification: Yes, include code and commands for running experiments in the supplementary material.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https://niis.cc.
aublic//uuddes/Coeeeubbiis
www.sssinoooiiillooo for more details.
While encourage the release of code and data, understand that this might not be possible, so "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurlPS code and data submission guidelines (https
/ wttps/cccppplccguua.eeaeaecc
Stteeee//ooSSSSeissSioica www.ssssiicggcooo for more details.
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the proposed method and baselines. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended the paper) is recommended, but including URLs to data and code is permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: Yes, we share details for hyperparameters in our experiments.
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, as supplemental material.
7. Experiment statistical significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification:
Yes, we report standard deviations rewards obtained during experiments with different measures, and run our method averaged over 4 runs for a comparison with FunSearch.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by emor bars, confi- dence intervals, or statistical significance tests, least for the experiments that support the main claims of the paper.
29

---

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g.. Normally distributed errors).
It should be clear whether the error bar is the standard deviation or the standard error of the mean.
is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CL, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that out of range (e.g. negative error rates).
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification:
We list the computational resources we used the Appendix.
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary failed experiments that didn't make into the paper).
9. Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurlPS Code of Ethics
inn
Answer:
[Yes]
Justification:
We have verified that our research conforms with the NeurIPS code of ethics.
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No. they should explain the special circumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., there a special consid- eration due to laws regulations in their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [NA]
Justification: There is no immediate societal impact of the work performed.
Guidelines:
The answer NA means that there no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
30

---

Examples of negative societal impacts include potential malicious unintended uses (e.g., disinformation, generating fake profiles, surveillance), faireess considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms monitor how system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Does the paper deseribe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification: Our paper poses no such risks.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification: All assets we do not exclusively develop are properly credited and respected.
Guidelines:
The answer NA means that the paper does use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset used and, possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website). the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in package should be provided. For popular datasets, paperswithcone com/ datasets has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
31

---

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if has changed) should be provided.
If this information is not available online, the authors are encouraged to reach out to the asset's s creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer:
[Yes]
Justification: Yes, our new framework and codebase comes with documentation.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset used.
At submission time, remember to anonymize your assets (if applicable). You can either create anonymized URL or include anonymized zip file.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [NA]
Justification: Our paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included in the main paper.
According the NeurIPS Code of Bthies, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or equivalent approval/review based the requirements of your country or institution) were obtained?
Answer: [NA]
Justification: Our paper does not involve crowdsoureing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurlPS Code of Ethics and the guidelines for their institution.
For initial submissions, not include any information that would break anonymity (if applicable), such the institution conducting the review.
32

---

16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology. scientific rigorousness, originality of the research, declaration is not required.
Answer: [NA]
Justification: We did not use LLMs to conduct any core method development in this paper.
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs as any important, original, non-standard components.
Please refer to L.LM policy hutt:p/://aarrrsssccco//oeeeeeee for what should or should not be described.
33


Reviews:
[{"review_id": "RMGb7KB7l3", "reviewer": "Reviewer_zbMW", "summary": "In this work, the authors introduce a new reinforcement environment called FERMAT for mathematical discovery. In particular, the mathematical theory is modeled as a Markov Decision Process (MDP), where the state is a graph representing mathematical entities (vertices) and dependencies between the entities (edges). The key challenge of the paper is how to automatically score the \"interestingness\". To do this, the authors develop an approach called EvoAbstract, which is LLM-based, with the aim of learning the intrinsic value of a mathematical object. The evaluation is done using the elementary number theory, using the Z3 solver as the prover.", "questions": "- To what extent can this approach be translated and used with another prover, e.g., if Rocq, Lean, or HOL4 is used instead? That is, how tightly integrated is the approach to Z3?\n\n- In Section 5.1, it says  \"However, agents guided by the best discovered measures can still prescribe high interestingness to entities of little value.\" So, what does this mean? If a system prescribes high interestingness value, and you (as a human) still think it is little value, why is a certain interestingness score good? \n\n- To what extent is the \"interestingness\"  biased on the LLM's knowledge of interesting theorems (i.e., theorems that have been part of the training data for the LLM)? To what extent can we then discover new theorems of interest that have not already been discovered?\n\n- It is not completely clear how the actions for proving works. t says on line 68 \"attempts to prove or discover it\". But how is the action of proving or disproving a theorem then captured in the MDP? Please clarify this, if possible.", "limitations": "Limitations are briefly discussed in the discussion section.", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 2, "significance": 2, "originality": 3, "strengths_and_weaknesses": "### Strengths ###\n\n- The paper addresses an interesting and relevant problem of mathematics, working in a more open-ended process\n\n- The paper is fairly well-written and clearly motivated, although the central idea concept of interestingness is less clear.\n\n- The approach of defining the mathematical problem as an MDP and then using reinforcement learning to discover theorems and conjectures is an interesting research direction.\n\n\n### Weaknesses ###\n\n- The theory that is used as evaluation is quite limited, and the work does not explore or evaluate the use of richer theories. This is also one of the weaker parts of the paper; by using a prover such as Z3, there are limitations of what can be achieved, compared to if a higher-order logic (e.g., HOL4) or dependently type theory (e.g., Lean or Rocq) is used.\n\n- I find the description of the central concept of \"interestingness\" to be rather vague. As a consequence, the performance comparison with manual interestingness (as described in Section 5) is not obvious. I would suggest that a deeper discussion about interestingness is added to the paper, which includes examples of different levels of interestingness. \n\n- Some figures need clearer explanations. For instance, Figure 2 (which is important) can be described in a clearer way. One way of doing it is to add numbers to the figure and then describe the different parts step-by-step, referring to these numbers in the figure in the caption.", "was_revised": true, "final_justification": "Thank you for your comprehensive clarifications and explanations. In particular, I liked your discussion about interestingness. Please make sure to include this in the final version of the paper. I also appreciate that you have included Galois fields. \n\nIt sounds promising that the approach is not limited or specific to Z3. However, to actually show that it works in dependently-typed interactive theorem provers, such as Lean and Rocq, further work is, of course, needed. I agree that this is non-trivial, but an important and interesting future direction. Given the rebuttal and also reading the other rebuttals and reviews, I have decided to increase my score.", "rebuttal": "Thank you for your detailed review of the paper! We respond to your comments and questions below, and would love to discuss further during the discussion period.\n\n> The theory that is used as evaluation is quite limited, and the work does not explore or evaluate the use of richer theories. \n\n**Response**: We agree that more complex theories are interesting avenues for study! It was indeed the intention to begin with elementary number theory, and then to expand to richer theories in future work. The FERMAT framework is capable of such extension because it does not inherently rely on either the domain or the prover (in this case Z3), and can be readily adapted for more complex theories and theorem provers. We chose Z3 for its reliability, allowing us to focus on the core challenges of the paper - definition and conjecture synthesis - while treating learning to prove as an orthogonal and very important direction for future work.\n\nTo demonstrate the extensibility of the FERMAT framework for our rebuttal, we have implemented the theory of Galois fields. Like in elementary number theory, we have curated a list of 50 ground truth entities (including primitivity, order, characteristic, and lines) for this domain, to be included in the revision. \n\nWe reran the baseline experiments (with lesser compute of 64 iterations with 30 seconds to an episode due to the time constraint) and confirmed that our evolutionary approach learns interestingness functions that outperform fixed HR measures.\nAmong hardcoded metrics, comprehensibility performed best with a reward of 4.48, while equal weighting scored 3.00. Funsearch found a measure scoring 6.52, while our method, EvoAbstract, achieved 7.78, slightly ahead of Funsearch.\nWe plan to include more experiments with this domain in our next revision, especially to measure the variance of evolution runs in this domain.\n\n> To what extent can this approach be translated and used with another prover, e.g., if Rocq, Lean, or HOL4 is used instead? That is, how tightly integrated is the approach to Z3?\n\n**Response**: This approach is easily extensible to interactive theorem provers. Our implementation is **not specific to Z3**. The way we’ve designed the framework is to use a general DSL for composition of definitions that can be cross-compiled to multiple languages like Z3, Lean, Rocq, etc. Since we want to support multiple target languages while implementing all the production rules, creating such a DSL becomes nontrivial because we need to keep track of nested variable scopes needed in our composed definition. Despite all the challenges involved in designing the DSL itself, we built a compiler for our DSL so that it can be transpiled to Z3 (and can be extended to other languages in the future). \n\nHowever, writing proofs in Lean is nontrivial and introduces significant complexity which can distract from the exploration of learning how to produce definitions and conjectures in easy-to-describe theories. Trying to learn a Lean prover from low data in itself is a central research question which is at the heart of AI.\n\nThat being said, we completely agree that extensions to more expressive languages is a natural next step in this research direction.\n\n> I find the description of the central concept of \"interestingness\" to be rather vague. As a consequence, the performance comparison with manual interestingness (as described in Section 5) is not obvious. I would suggest that a deeper discussion about interestingness is added to the paper, which includes examples of different levels of interestingness.\n\n**Response**: Thank you for this valuable suggestion. Formally defining mathematical interestingness is a profound challenge that has been explored by mathematicians for over a century. We plan to incorporate a thorough treatment in our next revision, as its inclusion will clarify the motivation for our approach and the interpretation of our results.\n\nIn plain speech, the core of “interestingness” is the ability to discern what mathematical concepts are “worth pursuing”, which we believe is critical for self-directed discovery of math, yet rarely addressed. Interestingness is the scientific potential to explore further. Human mathematicians naturally find themselves “drawn” to certain topics, whether for fixation on a certain problem, or for aesthetic appreciation, or other idiosyncratic reasons. This allows the mathematician to narrow down the combinatorially large space of mathematical exploration. For an AI agent to discover new math, it would need a similar mechanism to navigate the huge search space of mathematics. This is our core reason for trying to **learn** interestingness, which we believe to be the crucial direction in AI for math.\n\nThere are many views on what makes mathematics interesting. Poincare [2] saw beauty in the harmonious connection of seemingly unrelated ideas, while Hardy valued depth and generality over practical use. We also believe simple mathematics can be interesting through its real-world applicability [4].\n\nThe most important takeaway of our performance comparison in section 5 is the ability to programmatically, iteratively **learn** such an interestingness measure to direct math discovery, as opposed to hardcoded heuristics that do not capture the complexity of theory formation. In this section, our aim is to show that we can already do significantly better than such heuristics, and that further work can lead us to still further improvements. The end goal would be to have a learned interestingness advanced enough to truly discover new math.\n\nFinally, as per your suggestion, we agree that different levels of interestingness would be a helpful illustration. Here is a rough example, a version of which we would add to the paper:\n\nCurrent highest level (human mathematician level): I want to study the symmetries of certain groups because I think it will prove the unsolvability of the quintic.\n\nAI level: I want to make more concepts using equality because this concept has certain properties within the graph of discovered mathematical concepts (depth, connectivity, age, arity) that I have learned to prioritize with certain weightings.\n\nHeuristic level: I want to make more concepts using equality because I always prioritize concepts with the highest connectivity. \n\nNo built-in notion of interestingness: Random policy\n\nLet us know if you have questions or comments about this discussion! It is at the heart of our effort and we will be sure to include it in our next revision.\n\n> In Section 5.1, it says \"However, agents guided by the best discovered measures can still prescribe high interestingness to entities of little value.\" So, what does this mean? If a system prescribes high interestingness value, and you (as a human) still think it is little value, why is a certain interestingness score good?\n\n**Response**: Good question! The main thing that we point out there is that even the best performing interestingness metrics can cause the agent to get stuck in a local minimum - where it overvalues a concept while neglecting other concepts. In the case of our best run, the agent assigns the equality concept a very high score, which causes the algorithm to focus on developing equality related concepts at the expense of discovering new things. It is also the case that certain ground truth concepts are discovered, but subsequently not interesting enough to be further expanded (as we mention in the paper, primality is a good example). This is all to say that the interestingness measures we find are relatively good, but certainly not optimal.\n\n> To what extent is the \"interestingness\" biased on the LLM's knowledge of interesting theorems (i.e., theorems that have been part of the training data for the LLM)? To what extent can we then discover new theorems of interest that have not already been discovered?\n\n**Response**: Great questions! In our experiments, the LLM is never informed of the internal operation of Fermat and *never sees any definitions or conjectures created*. It does not even know that the domain is elementary number theory! The only signal to the LLM is 1. The program which implements the measure and 2. A numerical score obtained by using that measure for theory exploration. In this way, the LLM can’t use its existing knowledge about math to manipulate the objects produced during theory exploration, because they are never provided. Further, the LLM is never instructed that it is even working on the number theory domain in the first place. The LLM’s purpose is to provide an interestingness kernel that guides a relatively open-ended agent, so we see the discovery of new theorems of interest as entirely plausible by scaling this research effort.\n\n> But how is the action of proving or disproving a theorem then captured in the MDP? Please clarify this, if possible.\n\nThanks for pointing this out! We mentioned on lines 74-75 that if a conjecture is proven, the state removes the entity as a conjecture and replaces it with a theorem, and a proof object given by Z3. We didn’t mention what happens when a conjecture is disproved, which is that the conjecture receives a disproved status and a counterexample is attached to it. We’ll be sure to add this detail in our revisions, and explicitly describe what transition function \\delta_prove governs the proving behavior in the MDP.\n\n> For instance, Figure 2 (which is important) can be described in a clearer way…\n\nThis is a really nice suggestion, thank you! We will incorporate it in our revisions.\n\nThank you again for your thorough consideration of our paper! We would be happy to answer any further questions you might have!\n\n\n[1] A Mathematician’s Apology (G. H. Hardy, 1940)\n\n[2] Mathematical Creation (Henri Poincare, 1908)\n\n[3] Machine Learning and Information Theory Concepts towards an AI Mathematician (Bengio, Malakin, 2024)\n\n[4] The Unreasonable Effectiveness of Mathematics in the Natural Sciences (Wigner, 1960)"}, {"review_id": "tpvkGYXKNG", "reviewer": "Reviewer_uroY", "summary": "The paper presents a reinforcement learning environment called Fermat which is subsequently used to learn “interestingness” of mathematical objects. The problem was modeled as intrinsic reward optimization where the goal is to discover the best intrinsic reward function I that can guide action selections to maximize the long-term (sparse) task specific reward. The intrinsic reward functions are implemented as python programs that can be generated by LLMs. More specifically, the authors prompts one LLM () to propose candidates as if it’s doing evolution search, and use another LLM to identify useful subroutines from evolved programs, which are provided as additional context to the first LLM.  The authors show that the learned interestingness measures can better guide the discovery of ground-truth mathematical entities in the theory of arithmetic and its simple fragment.", "questions": "1. Clarification needed: page 19, algorithm 2, the interesting measure I takes an entity and the graph G, but by definition on lines 80 and 94 it should take states and actions. Is there a mix of notations here?\n2. In the discussion you mentioned that the templates limited search space, and I agree it is a good idea to do so to limit the computational resources required. I’m just curious, do you have preliminary results when you don’t provide a template at all? What’s the behavior of the LLMs in that case?", "limitations": "Yes.", "rating": 5, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strength\n- The overall design of the system is interesting. In particular, instead of blatantly asking the LLM to criticize itself, the integration of an evolution-like algorithm to update the programs proposed by the LLM provides more factual groundings for candidates selection. In addition to that, the abstraction learning also makes sense because validated sub-routines help the (first) LLM avoid going wild, thereby guiding the search towards more promising regions of the program space.\n- The careful formalization makes the problem setting clear. The production rules with examples really helped with understanding how things are modeled as an MDP and how the system progresses. The overall presentation is very good.\n- The qualitative analysis (in addition to the quantitative one) provides explanatory insights. Since what’s generated by the proposed approach are explicit python programs, the exact behavior of them can be observed and interpreted. The authors demonstrated that some subroutines do look similar to human-engineered measures proposed by previous works.\n\nWeakness\n- I am somewhat doubtful about the branding of “interestingness”. My understanding is that the system is essentially just learning the intrinsic reward functions (given the sparse extrinsic one), but this function does not necessarily express interestingness. A transition step can be given a high reward because it’s a tedious but necessary construction towards the target entity. As to the real interestingness, I think you have already “explicitly” defined it using the set of entities \\mathcal{E} (which induces the extrinsic reward)?\n- Minor: learning an intrinsic reward function is fine, but if re-constructing well-known interesting mathematical entities is the ultimate goal, maybe other regular techniques in RL that can deal with sparse rewards are also worth trying.", "was_revised": true, "final_justification": "I am happy with the discussion and the philosophical insights. I'd like to keep my positive assessment.", "rebuttal": "Thank you for the thorough review of our paper! We appreciate that you found the presentation clear and that the research methods are sensible and interesting. We respond to your comments and questions below (and are happy to engage in discussion about our work!):\n\n> I am somewhat doubtful about the branding of “interestingness”. My understanding is that the system is essentially just learning the intrinsic reward functions (given the sparse extrinsic one), but this function does not necessarily express interestingness. A transition step can be given a high reward because it’s a tedious but necessary construction towards the target entity. As to the real interestingness, I think you have already “explicitly” defined it using the set of entities \\mathcal{E} (which induces the extrinsic reward)?\n\n**Response**:  You raise a good point, and your understanding of the system is accurate. We claim that if the agent is able to learn a measure which can successfully reproduce many entities from the ground truth set, then this measure can be thought of as measuring interestingness because the ground truth set consists exactly of entities which humans find interesting. Our effort is towards identifying a concise classification of these human-made mathematical objects.\n\nIn general, the definition of interestingness has be long-debated and somewhat ill-defined [1-4]. Some properties mathematicians [1,2] have discussed value mathematical objects if they somehow connect disparate fields, or their proofs unveil a deep complexity that is surprising in some way. Informational theoretical approaches [3] contend that interesting mathematical statements, that is, the ones humans have developed, are valuable because they form a ¨representative core¨ of all mathematical statements. Another perspective can be gleaned from [Wigner, 4] that mathematical objects are interesting because of their uncanny ability to model real-world phenomena. Our approach generally aligns with all these philosophies. For instance, our simple novelty baseline metric is intended to measure how surprising a result is, based on what is known, and comprehensibility seeks to reward simpler-stated. Further, our main contention is that if a measure leads to reproduction of many human-made concepts, then that measure ought to be well-aligned with the ¨true¨ interestingness measure that produced these concepts. We like your point about tedious constructions leading to interesting concepts, though we think that a tedious construction should be dubbed interesting because of its utility in defining interesting concepts later on. This rationale is similar to recursive measures of interestingness that were developed in AM (1977). We would be happy to discuss more about this topic, the history is very rich and we would love to clarify where our approach stands amongst historical opinions! We will also be including these discussions in our next revision.\n\n> Minor: learning an intrinsic reward function is fine, but if re-constructing well-known interesting mathematical entities is the ultimate goal, maybe other regular techniques in RL that can deal with sparse rewards are also worth trying.\n\n**Response**: We agree that this is an excellent avenue for future research, and it is plausible that these could scale to developing more interesting theories. However, we also think having a Python program as a kernel for characterizing interesting objects lends itself to interpretability. Other methods may also be less interpretable in understanding *why* human mathematics is interesting.\n\n> Clarification needed: page 19, algorithm 2, the interesting measure I takes an entity and the graph G, but by definition on lines 80 and 94 it should take states and actions. Is there a mix of notations here?\n\n**Response**:  Thank you again for the extremely thorough inspection of our paper. You are right to point this out, as there is a mix of notations here. We mean to distinguish the overall policy, which can be thought of as a function which measures the interestingness of actions (by providing a probability distribution over actions given a state), with the measure we learn that assigns an interestingness score to the entities in the graph. These two problems are similar up to the policy template which is a necessary scaffolding to make use of the interestingness scores of the entities. We agree that this mix of notations can be somewhat confusing and will clarify in our next revision.\n\n> In the discussion you mentioned that the templates limited search space, and I agree it is a good idea to do so to limit the computational resources required. I’m just curious, do you have preliminary results when you don’t provide a template at all? What’s the behavior of the LLMs in that case?\n\n**Response**: Great questions! The template serves as a means to scaffold the entity scorer to produce a policy. This is done because we have base measures like comprehensibility and novelty, which operate directly on attributes of the entity instead of on any information about an action. Because of this, removing the template entirely will not work because there is no mechanism that scores actions independently, as the LLMs are only involved in producing the python program which scores the entities. However, it is a really interesting question to try to incorporate information about actions into the learned Python program, though this will require additional mechanisms for scoring production rules independently. Similarly, the evolution phase need not only be involved in producing the Python program, but the policy template itself is an evolvable piece of code. We think these are both promising future research directions that should enable better scaling for theory exploration.\n\nLet us know if you have further questions! We would be happy to discuss more.\n\n\n[1] A Mathematician’s Apology (G. H. Hardy, 1940)\n\n[2] Mathematical Creation (Henri Poincare, 1908)\n\n[3] Machine Learning and Information Theory Concepts towards an AI Mathematician (Bengio, Malakin, 2024)\n\n[4] The Unreasonable Effectiveness of Mathematics in the Natural Sciences (Wigner, 1960)\n\n[5] AM: An Artificial Intelligence Approach to Discovery in Mathematics as Heuristic Search (Lenat, 1977)"}, {"review_id": "EGuIwavqEe", "reviewer": "Reviewer_LEs3", "summary": "This paper presents two key contributions towards automating mathematical theory formation: FERMAT​​: A novel RL environment that models mathematical discovery as an MDP, with symbolic actions for concept discovery and theorem proving. EvoAbstract​​: An LLM-driven evolutionary algorithm that learns \"interestingness\" measures to guide theory exploration.", "questions": "1. Can you rely on stronger mathematical formalization systems such as Lean4?\n2. What exactly are the external rewards? How are they designed?\n3. Given that existing models possess a lot of prior knowledge, is there knowledge leakage when using the domain of number theory? Are there better domains for evaluation?", "limitations": "yes", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths:\n1. The MDP formalization of theory formation is rigorous and opens new directions for RL research in mathematical discovery.\n\n2. EvoAbstract's abstraction learning mechanism is a clever extension of evolutionary algorithms, enabling compositionality in program synthesis.\n\nWeaknesses：\n1. Evaluated only on elementary number theory; generalization to other mathematical domains remains unproven.\n\n2. Dependence heavily on Z3", "was_revised": true, "final_justification": "The author's response has solved my questions, and I will keep the score.", "rebuttal": "Thanks for your review of our paper! We appreciate your comments on the significance of the posing of the theory formulation problem and the evolutionary approach! We respond to your comments and questions below. Happy to discuss more, please share any other questions you have!\n> Evaluated only on elementary number theory; generalization to other mathematical domains remains unproven.\n\n**Response**: This is a great point! We agree that another domain would help illustrate the benefits of our method and provide another off-the-shelf exploration point for the community. To demonstrate the extensibility of the FERMAT framework for our rebuttal, we have implemented the theory of Galois fields. We chose this domain for its rich structure that is applicable to a variety of mathematical fields, from coding theory to combinatorial design, which human mathematicians have only developed in the past 200 years. Like in elementary number theory, we have curated a list of 50 ground truth entities for this domain, to be included in the revision.\n\nFor verification in this domain, we leverage the finiteness of Galois fields by implementing a simple mechanism that exhaustively checks the validity of a predicate over all field elements, when feasible. In principle, this approach could be replaced by a more sophisticated prover (e.g. some finite-field prover in Lean). \n\nWe reran the baseline experiments (with lesser compute of 64 iterations with 30 seconds to an episode due to the time constraint) and confirmed that our evolutionary approach learns interestingness functions that outperform fixed HR measures.\nAmong hardcoded metrics, comprehensibility performed best with a reward of 4.48, while equal weighting scored 3.00. Funsearch found a measure scoring 6.52, while our method, EvoAbstract, achieved 7.78, slightly ahead of Funsearch. Here is a complete table of our experiments. \n**Finite Fields added (F_27 in experiments)**  \n**# Ground Truth Entities:** 50  \n**Most interesting ground truth entities:** primitivity, order, characteristic\n\n| Heuristic/Method               | Mean    | Stdev   |\n|--------------------------------|---------|---------|\n| Zero weight/Random (64 eps)    | 2.0968  | 1.2915  |\n| Novelty (64 eps)               | 2.2295  | 1.2200  |\n| Parsimony (64 eps)            | 1.9516  | 1.4077  |\n| Applicability (64 eps)        | 2.8125  | 1.2732  |\n| Comprehensibility (64 eps)    | 4.4844  | 1.7138  |\n| Equal weight (64 eps)         | 3.0000  | 1.3346  |\n| Productivity (64 eps)         | 2.5397  | 1.4889  |\n| GPT-4o                        | 2.7413  | 0.8718  |\n| GPT-4o (best)                 | 4.9839  | 1.9633  |\n| Funsearch (64 iter)           | 6.5156  | 3.4003  |\n| EvoAbstract (64 iter)         | 7.7812  | 3.8910  |\n\nWe plan to include more experiments with this domain in our next revision, especially to measure the variance of evolution runs.\n\n\n> Dependence heavily on Z3, Can you rely on stronger mathematical formalization systems such as Lean4?\n\n**Response**: There is actually **no fundamental dependence on Z3**. We implement everything in the form of a generic DSL and cross-compile our DSL to Z3. The critical purpose of our DSL is to support nested definitions, which allows for modular construction of definitions and conjectures. The DSL is designed such that it can also be cross-compiled to other languages like Lean. Details on this are reported in Appendix A.3 (page 16, lines 647 - 669), which also discusses how we include a specific instantiation for compilation into SMT-LIB format. This was chosen for simplicity as we can use Z3 as a black box prover which allows us to focus on the less-explored problems of conjecturing and producing definitions. There is nothing that prevents using Lean, for example, inside of Fermat. However, using Lean introduces an extra complexity, as one needs to produce a suitable prover which is another moving part. Such a prover would likely have to learn to prove from scratch which is another difficult problem worthy of an entire field of research [1]. The generic DSL and compiler we wrote does the heavy lifting for composing definitions, which is not readily available in any language. We are happy to describe the specific details of how it works. \n\nTo summarize, Z3 is not too coupled to Fermat, it just serves as a useful prover tool that helps us isolate the definition-making and conjecturing task. As we mention in the conclusion, extensions to Lean are very easy to produce in Fermat. The hard part of scaling to more complex mathematics is to produce a method for learning to prove (from low data), which is a very promising research direction. Let us know if you have any questions about this!\n\n> What exactly are the external rewards? How are they designed?\n\n**Response**: Thanks for this question! The external reward is a measure of how much an automatically generated theory intersects with a ground-truth set of human-made mathematical objects. This is because we are ultimately interested in learning how to classify objects that humans find interesting. We take a set of human-made mathematical objects (primality, square numbers, etc.) from a number theory textbook to serve as the ground truth reward. Information on this can be found on lines 205 - 214 and in Appendix A.4. The full ground truth benchmark is available in the supplementary material as well! Let us know if you have any questions!\n\n> Given that existing models possess a lot of prior knowledge, is there knowledge leakage when using the domain of number theory?\n\n**Response**: Good question! The way we use the LLM is separate from the domain we study. The LLM only sees previous interestingness measures (as a Python program) and a numerical score measuring how many ground-truth concepts (on average) that measure produces during theory formation. It never sees any concepts that get produced, and the model is never even *told* that it is even working on number theory. You can inspect the prompt on page 24 (Figure 12) in the Appendix (and in the supplementary material) to confirm this. In this way, there is unlikely to be any number-theory leakage through our experiments.\n\nLet us know if we can answer any further questions!\n\n[1] Tim Gowers, How can it be feasible to find proofs? (2023)"}, {"review_id": "eeIvRsOrWU", "reviewer": "Reviewer_RkzN", "summary": "This paper presents Fermat, a RL environment that formally models the formation of mathematical definitions, conjectures, and proofs of conjectures, and EvoAbstract, an evolutionary approach for finding intrinsic reward functions that encourage exploration in Fermat that leads to the proving of certain known definitions, conjectures, and theorems. Fermat works over states modeled through graphs that represent definitions, conjectures, and theorems, and policies update these states by taking a variety of actions (new definitions, conjectures, and proof attempts, backed up by an automated prover). EvoAbstract uses an evolutionary approach that includes defining new intrinsic reward metrics while learning and using an abstraction library. The paper presents experiments that start with two different initial theories, comparing performance with a range of hardcoded intrinsic reward and a prior evolutionary search algorithm.", "questions": "Covered in significance concerns above.", "limitations": "yes", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 2, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths\n\n+Uniqueness: to my knowledge, this sort of “automated theory-building” with definition and conjecture formation, in addition to theorem proving, in which an interestingness score is learned, has not been done before.\n\n+Significance: Mathematical theorem proving is of broad interest, as is conjecture formation. Recently, intrinsic reward has been used to guide conjecture formation. This work should hence be of interest to both the theorem proving and open-ended learning communities. The experimental results show considerable improvement over baseline approaches — in particular, the introduction of abstraction learning and seeing the performance boost over FunSearch is really helpful.\n\n+Quality: the Fermat environment provides an interesting, interpretable environment for theory-building.\n\nWeaknesses\n\n-Clarity: while much of the paper was fairly clear, aspects took quite a bit of time to understand. Minor example: you describe the computational interpretation as being a function to evaluate whether an input satisfies a given symbolic definition, which makes me think that it should return a bool, but the example simply implements an operation, returning a number. More serious example: I found 2.2 to be really opaque. In particular, you describe factoring a policy space into two spaces, a space of policy templates and a space of intrinsic reward functions. It was really unclear, at that point, what the class of policy templates might be. My understanding is that you actually just have a simple fixed algorithm for getting a policy from an intrinsic reward (sampling and simulating, using the interestingness of the outcome to choose, Alg 2), but I could only understand this by being directed to Alg 2 which is referenced in section 5.\n\n-Significance: the experimental comparisons, aside from that with FunSearch, seem like a foregone conclusion. These all have hardcoded intrinsic reward functions, whereas FunSearch and EvoAbstract get to optimize over generations. This might be surprising if the intrinsic reward functions were evolved from scratch, but they get to lean on GPT-4o, and the GPT-4o baseline demonstrates that this is a fairly strong starting point. It would be interesting to see how well evolutionary search works if it has a weaker starting-point, or if evolving intrinsic reward is good for theorem-proving (as opposed to directly evolving policies, if possible), or if other forms of open-ended learning (e.g. adapting Minimo to a fine-tuned LLM setting) might be better.\n\nI think it’d also be helpful to relate this work to others on evolving intrinsic motivation [1, 2] and meta-RL [3].\n\n[1] Singh, Satinder, Richard L. Lewis, Andrew G. Barto, and Jonathan Sorg. \"Intrinsically motivated reinforcement learning: An evolutionary perspective.\" *IEEE Transactions on Autonomous Mental Development* 2, no. 2 (2010): 70-82.\n\n[2] Alet, Ferran, Martin F. Schneider, Tomas Lozano-Perez, and Leslie Pack Kaelbling. \"Meta-learning curiosity algorithms.\" *arXiv preprint arXiv:2003.05325* (2020). \n\n[3] Norman, Ben, and Jeff Clune. \"First-Explore, then Exploit: Meta-Learning to Solve Hard Exploration-Exploitation Trade-Offs.\" *Advances in Neural Information Processing Systems* 37 (2024): 27490-27528.", "was_revised": true, "final_justification": "As indicated below, I'm revising my score up.", "rebuttal": "Thank you for your thorough review! We appreciate your comments on the novelty of our research problem, and the significance of our effort to study it and produce the open-source framework that should enable further research into this area! We respond to your comments and questions below:\n\n> I found 2.2 to be really opaque. In particular, you describe factoring a policy space into two spaces, a space of policy templates and a space of intrinsic reward functions. It was really unclear, at that point, what the class of policy templates might be. My understanding is that you actually just have a simple fixed algorithm for getting a policy from an intrinsic reward (sampling and simulating, using the interestingness of the outcome to choose, Alg 2), but I could only understand this by being directed to Alg 2 which is referenced in section 5.\n\n**Response**: Thank you for pointing this out. Indeed, the motivation for factoring the space into two components was to better separate the problem of measuring the value of a single entity and then scaffolding the intrinsic measure into a policy to be followed. This is generally consistent with prior work (like HR (2000), AM (1977)), and with our objective of learning how to measure the interestingness of entities. Fixing a policy template, we focus on automatically synthesizing this intrinsic reward measure. We agree with you that 2.2 as written is confusing. We plan to include an example of the purpose of this separation in S 2.2 to clarify it for the reader and make the overall reading flow more consistently. We also think it would be good to motivate the framing of previous work like HR and AM before reaching section 2.2, but we found this hard to do fully due to the limited page constraint. Happy to hear any thoughts you might have on this!\n\n> the experimental comparisons, aside from that with FunSearch, seem like a foregone conclusion. These all have hardcoded intrinsic reward functions, whereas FunSearch and EvoAbstract get to optimize over generations. This might be surprising if the intrinsic reward functions were evolved from scratch, but they get to lean on GPT-4o, and the GPT-4o baseline demonstrates that this is a fairly strong starting point. It would be interesting to see how well evolutionary search works if it has a weaker starting-point, or if evolving intrinsic reward is good for theorem-proving (as opposed to directly evolving policies, if possible), or if other forms of open-ended learning (e.g. adapting Minimo to a fine-tuned LLM setting) might be better.\n\n**Response**: This is a fair point, though we want to mention that it is somewhat unclear a priori whether evolutionary methods *can* optimize intrinsic reward measures in this setting. We use the LLM in a rather indirect way, only showing it previous programs produced, and the numerical score corresponding to the extrinsic reward. It never sees any concepts or examples of theories produced, and does not even know that it is working on elementary number theory. The reward signal is not necessarily very clear, yet the evolutionary process is still capable of optimizing it. We think this is a valuable finding.\n\nIndeed the suggestions you make regarding intrinsic reward for theorem-proving and targeting other forms of open-ended learning are interesting research avenues. These ideas should yield very fruitful research, though may be out of scope for our singular submission. We mention that we view our research contributions as: showing that the problem of theory-formation can be studied in the modern era with modern perspectives, that evolutionary methods are valuable for assessing interestingness (though not necessarily optimal!), and provide a framework to encourage broader community involvement in this problem. Of course, future research directions we included in the conclusion and that you are mentioned are topics we intend on exploring.\n\nIn principle, the evolution operator only requires the ability to produce Python programs. Could you suggest some specific weaker operators that we could use for ablations? We chose GPT-4o-mini in our experiments to tradeoff cost (which we want to minimize) and ability to adhere to formatting instructions (which we want to maximize). LLMs happen to be a good option for this task, and we use them in a way that is indirect to the task.\n\n>  I think it’d also be helpful to relate this work to others on evolving intrinsic motivation [1, 2] and meta-RL [3].\n\n**Response**: Thank you for these excellent references! We will be sure to include them in our next revision along with a full discussion of their relation to our work. It is very encouraging to see AM (1977) as one of the central AI works motivating [1]. We find that their framework for an agent that interacts with its internal environment, then updated by interactions with the external environment, forms a general setting for our work which we do for the mathematical setting. In their case, the assumption with the optimal reward function that they seek to find is similar in our case. We make the Platonist assumption that such an optimal reward function exists (for simpler mathematics, at least) and can accurately classify all the ground truth entities in our benchmark. Indeed we find there is room in our experiments for improvement, as they also note that fitness-based reward functions still maintain a gap to the best reward. [2] is also relevant to our work in that they learn curiosity mechanisms that have some symbolic components through compositions and combinations of neural modules with buffers & other loss functions. \n\nWe find the strategy in [3] to be very sensible. While the experiments done with Fermat in our submission do not explicitly attempt to have an exploratory stage to begin with, we believe that implicitly this sort of process is occurring. Initial rounds in the evolutionary procedure are marked by the model not knowing how to optimize on the reward, so the programs generated are usually quite poor, and can be thought of as some exploration. Once some high-performing programs are found, the LLM then has better signal on how to improve the reward. However, we don´t expect that the evolutionary operator is knowingly being exploratory. We think explicitly imposing this structure on the evolutionary process could be very useful for quicker convergence and better overall learning. Thank you again for suggesting these works, the context they provide for our work is excellent!\n\n> Minor example: you describe the computational interpretation as being a function to evaluate whether an input satisfies a given symbolic definition, which makes me think that it should return a bool, but the example simply implements an operation, returning a number\n\nThank you for this observation, we agree that the description of the computational interpretation is a bit confusing, we will revise this by indicating the computational interpretation can evaluate the truth value of a predicate for certain inputs and also compute the values of operators in a subsequent revision.\n\nThank you again for your detailed review of our paper, we really appreciate it! Happy to discuss/respond to any further questions!"}, {"review_id": "89KRAwfBnd", "reviewer": "Reviewer_c2rm", "summary": "This paper introduces FERMAT, a reinforcement learning (RL) framework for automated mathematical theory formation, and EvoAbstract, an LLM-driven evolutionary algorithm to learn \"interestingness\" measures for guiding theory discovery. FERMAT models theory formation as a Markov Decision Process (MDP), enabling systematic exploration of mathematical concepts, conjectures, and theorems. EvoAbstract synthesizes interestingness metrics by integrating function abstraction, outperforming hard-coded baselines (e.g., HR measures) in discovering 180 ground-truth number theory entities. Key contributions include: (1) formalizing theory formation as an MDP with symbolic actions; (2) an abstraction-learning mechanism for modular program synthesis; (3) empirical validation showing EvoAbstract discovers 20.25 (succ_zero_eq) and 39.74 (arithmetic_base) ground-truth entities, surpassing baselines.", "questions": "1. Can FERMAT/EvoAbstract be extended to algebra or analysis? A case study on ring theory concepts (e.g., ideals) would validate generalizability.\n2. Are plans to automate production rule discovery (beyond fixed rules in Appendix A.1)? Demonstrating rule evolution would enhance autonomy .\n3. How might integrating Lean’s dependent types improve entity representation? An ablation on type-aware vs. type-agnostic interestingness would clarify impact .\n4. Can EvoAbstract use lightweight neural networks instead of GPT-4o? Reducing LLM dependency would improve accessibility .\n5. How does FERMAT handle knowledge graph redundancy as theories expand? Metrics on graph efficiency (e.g., cycle detection) are needed .", "limitations": "The authors acknowledge technical limitations (scalability, domain scope) but underaddress societal impacts. Suggestions:\n\n(1). Discuss risks of misusing FERMAT to generate flawed mathematical theories in safety-critical applications (e.g., cryptography verification).\n(2). Address biases in the curated ground-truth set, which may favor Western mathematical traditions over others.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 2, "significance": 2, "originality": 3, "strengths_and_weaknesses": "**Strengths:**\n\n1. FERMAT’s MDP formalization unifies theory formation steps (definition production, proof attempts) under a standard RL framework .\n2. EvoAbstract’s abstraction learning (e.g., reusable subroutines like calculate_example_balance) improves modularity and performance by 50% over FunSearch .\n3. Rigorous comparisons across baselines (Random, HR, GPT-4o) and ablation studies (FunSearch) validate component contributions .\nPractical Impact: FERMAT’s REPL interface and open-source code enable reproducibility and real-world use in educational theory exploration .\n\n**Weaknesses:**\n\n1. FERMAT does not leverage dependent type systems (e.g., Lean), limiting expressiveness for complex mathematics .\n2. EvoAbstract relies on GPT-4o, introducing bias and high computational cost for reproduction .\n3. Evaluations focus on elementary number theory, lacking validation in algebra or analysis .", "was_revised": true, "final_justification": "After reviewing the rebuttal and author clarifications, I have decided to maintain my original score of 4. The paper introduces a compelling and original framework (FERMAT + EvoAbstract) for formalizing automated mathematical theory formation, and contributes to a relatively underexplored but high-potential research area. However, several concerns regarding evaluation scope, practical reproducibility, and clarity remain only partially resolved, and in my view, they currently outweigh the strengths of the submission. Below is a breakdown of my reasoning:\n\n1.  The authors added a preliminary extension to Galois fields in the rebuttal, which is promising. While limited in scope, this demonstrates potential for generalization.\nGPT-4o dependency and reproducibility\n2. The authors clarified that cost was minimal and other LLMs (e.g., Qwen, Gemini) could serve as alternatives. This improves accessibility, though results may still vary across LLMs.\nLean integration and dependent types\n3. Authors explained the extensibility of their DSL and acknowledged the benefits of incorporating Lean in future work. This is a reasonable response given the paper's current scope.", "rebuttal": "Thank you for your review of our paper! We appreciate the recognition of our unification of theory formation into an MDP problem, and the rigorous comparisons of baselines, as well as the practical impact of our framework for enabling further research in this poorly studied area. We respond to your comments and questions below:\n\n> FERMAT does not leverage dependent type systems (e.g., Lean), limiting expressiveness for complex mathematics .\n\n**Response**: There is no fundamental limitation in Fermat that prevents the use of Lean. We have done the heavy lifting of supporting general definition composition through a custom generic DSL and compiler, which is a nontrivial task (see Appendix A.3 on page 16, lines 647-669). The DSL is designed in such a way that it can be cross-compiled to any target language such as Lean 4, Z3, Rocq. We chose to implement Z3 as one of the possible target languages because it comes with automated theorem-proving capabilities. In particular, Z3 serves as a black-box prover so as to reduce the number of moving pieces in our work, which is an exploration in automated theory formation that has not really been researched in the modern era. We find that our evolutionary method is useful for theory formation, but at present it seems that there are still many bottlenecks to scaling to more complex math, which we are working on and hope to expose to the community through this work. \n\nFurthermore, exploring more complex mathematics will require a more sophisticated prover, as automation like Z3 does not scale to more complex statements. Hence, learning to prove from scratch (with low data) will be necessary, and this in itself is another significant research direction which is an excellent source for future work.\n\n> EvoAbstract relies on GPT-4o, introducing bias and high computational cost for reproduction.\n> Can EvoAbstract use lightweight neural networks instead of GPT-4o? Reducing LLM dependency would improve accessibility .\n\n**Response**: Thanks for raising this! Our experiments are relatively inexpensive - reproducing all results in the paper required 2,000 samples, costing under 20 USD with GPT-4o-mini. Open-source or cheaper APIs like Qwen 3 Turbo (0.20 USD/million tokens) or free providers like Gemini make reproduction even more accessible. Any method that can generate Python programs from instructions would work - we use LLMs because they’re effective.\nRegarding bias, could you clarify what you meant? If it's data contamination, the LLM only sees past programs and their scores - never the domain or generated concepts. If you meant social bias in the LLM, our setup is narrowly scoped and we believe such effects are negligible.\n\n>  Evaluations focus on elementary number theory, lacking validation in algebra or analysis .\n\n**Response**: This is a great point! We agree that another domain would help illustrate the benefits of our method and provide another off-the-shelf exploration point for the community. We liked your suggestion of exploring algebra, and so to demonstrate the extensibility of the FERMAT framework for our rebuttal, we have implemented the theory of Galois fields. Like in elementary number theory, we have curated a list of 50 ground truth entities for this domain, to be included in the revision.\n\nWe reran the baseline experiments (with lesser compute of 64 iterations with 30 seconds to an episode due to the time constraint) and confirmed that our evolutionary approach learns interestingness functions that outperform fixed HR measures.\nAmong hardcoded metrics, comprehensibility performed best with a reward of 4.48, while equal weighting scored 3.00. Funsearch found a measure scoring 6.52, while our method, EvoAbstract, achieved 7.78, slightly ahead of Funsearch.\nWe plan to include more experiments with this domain in our next revision, especially to measure the variance of evolution runs.\n\n> Are plans to automate production rule discovery (beyond fixed rules in Appendix A.1)? Demonstrating rule evolution would enhance autonomy .\n\n**Response**: Yes! This is a very promising research direction. For example a very common pattern in math is defining an object that satisfies an extremal property, such as integers with smallest number of non-unit divisors (i.e. primes), or elements of a finite field with the highest order (i.e. primitive elements). This is a common structure and the prospect of learning such production rules is promising! We think this is a good direction for future work. One good historical reference would be Eurisko (1983), which extended the AM system by trying to learn production rules automatically with some success for VLSI chip design and naval fleet simulations.\n\n\n\n> How might integrating Lean’s dependent types improve entity representation? An ablation on type-aware vs. type-agnostic interestingness would clarify impact .\n\n**Response**: Good point! Indeed having Lean's dependent types should allow for more expressive representation. We do make use of a simple type system through our DSL which informs the values of certain interestingness measures, like parsimony, which is a basic measure involving the arity of the entity. Though, in our experiments, the parsimony measure does not actually perform better than a random baseline, indicating that this particular type information may not provide sufficient signal for replicating the ground truth set. That being said, extensions to using Lean should be able to benefit from richer information about entities that should better inform measures of interestingness, which we think is a great subject for future work. Similarly the richer proving environment lends itself to interpretable proofs, which themselves can be mined for properties to better judge the interestingness of statements. As mentioned before, since we use a custom DSL that can be cross-compiled to any target language, we can easily add support for Lean. The more expressive types available in Lean will be useful for more fine-grained representations of entities. \n\n>How does FERMAT handle knowledge graph redundancy as theories expand? Metrics on graph efficiency (e.g., cycle detection) are needed.\n\n**Response**: Good question! By construction, the knowledge graph is acyclic. Each entity has a description length - the number of characters needed to express it using production rules starting from base definitions. Since applying a rule always increases this length, cycles (which would require the length to decrease) are impossible. This prevents syntactic redundancy.\nSemantic redundancy is harder to eliminate. Fermat removes one of two entities when it proves them equivalent, but this relies on the agent proposing such conjectures. Unlike older systems like HR, which exhaustively checked equivalence (at high cost), we avoid hard-coding and instead aim to learn this behavior.\n\n\n\n> (1). Discuss risks of misusing FERMAT to generate flawed mathematical theories in safety-critical applications (e.g., cryptography verification). (2). Address biases in the curated ground-truth set, which may favor Western mathematical traditions over others.\n\nThank you for raising these important points. While FERMAT is not yet capable of generating novel mathematical theories, we recognize that automated theory formation raises significant societal and safety concerns. We believe that such systems must include formal guarantees and human oversight, especially in safety-critical settings where specification is essential. In this paper, our benchmark draws from widely taught concepts in elementary number theory, which form a global mathematical foundation with minimal cultural bias. We'll be sure to include this discussion on societal impact in our next revision.\n\nThank you for your insightful review! We would be happy to answer any further questions you might have!\n\n[1] Eurisko: A Program That Learns New Heuristics and Domain Concepts, Douglas Lenat, 1983\n[2] HR: Automatic Concept Formation in Pure Mathematics, Simon Colton, Alan Bundy, Toby Walsh, 2000."}]

Author rebuttal:

Meta-review: The context of the paper is that of RL-based concept discovery and theorem proving, building upon/extending Lenat's AM and Eurisko systems. 
An evolutionary approach is proposed to learn an "interestingness function" (IF), viewed as a way to narrow down the combinatorially large space of mathematical exploration.

This IF is successfully compared to hardcoded heuristics. Note that, as could be expected, the proposed IF is not optimal (can get the MDP stuck in uninteresting regions). 

Reviewers are generally very positive about the approach:

zbMW and LEs3 had concerns with the generality of the approach; authors successfully addressed this concern, 
implementing an extension including the theory of Galois fields.

uroY finds the overall presentation very good, with explanatory insights. Still, a question is whether an "interestingness function" is equivalent to a standard RL intrinsic reward. 

RkzN asks to which extent the good performance of the approach depends on the IF initialization (currently derived from GPT-4o, a rather strong baseline). 

c2rm suggests that using other LLMs (e.g., Qwen, Gemini) could serve as alternative. The authors agree and mention that the cost is affordable. 
The AC is curious whether the use of other LLMs has an impact on the IF.
Decision: Accept (spotlight)