SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.07927 · NeurIPS · 2025

Solving Inequality Proofs with Large Language Models

James Zou, Jikai Jin, Alex Gu, Pan Lu, Tony Xia, Jiayi Sheng, Luna Lyu, Dataset Leaderboard

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 4 violated it and 1 has no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2506.07927.json · badge: /api/ran/2506.07927.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
lupantech/ineqmath canonical (classifier label)
classifier basis: classifier_2025
9 ran · 1 no recorded run
FunctionStatusWhere it lives
EquivalenceCheck Ran
ran on a synthesized input · constructed an object; no result was computed
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("166a2bb1eff7ab17")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, EquivalenceCheck: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pydantic import BaseModel

class EquivalenceCheck(BaseModel):
    analysis: str
    equivalent: bool

ARGS = {
    "analysis": "The two implementations produce identical outputs for all test cases.",
    "equivalent": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EquivalenceCheck — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EquivalenceCheck output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clean_answer Ran
ran, violated the contract we drafted
lupantech/ineqmath/data_curation/data_reformulation/bound_reformulation.py
code served (permissive licence) · get_code("11636c4dee59c991")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def clean_answer(answer):
    """
    Clean the answer by ensuring it has proper dollar sign formatting
    For example: 
    - $$C = 3$$ becomes $C = 3$
    - C = 1 becomes $C = 1$
    """
    if isinstance(answer, str):
        answer = answer.strip()
        answer = re.sub('^\\$\\$(.+)\\$\\$$', '$\\1$', answer)
        if not (answer.startswith('$') and answer.endswith('$')):
            answer = f'${answer}$'
    return answer


# Test cases for different input scenarios
test_case_1 = "$$C = 3$$"  # Double dollar signs
test_case_2 = "C = 1"      # No dollar signs
test_case_3 = "$x = 5$"    # Already properly formatted
test_case_4 = "  $$y = 2$$  "  # With whitespace and double dollars

ARGS = {
    "answer": test_case_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_bound_answer Ran
ran; our contract draft was wrong, not the code
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("67cfa7775d25af48")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
import tempfile
import os

def local_llm_engine(prompt: str) -> str:
    """Mock LLM engine that returns a formatted answer."""
    return "C=42"

# Create a temporary file for the bound_prompt_path
temp_dir = tempfile.mkdtemp()
prompt_file = os.path.join(temp_dir, "bound_prompt.txt")
with open(prompt_file, 'w') as f:
    f.write("Example 1: The answer is 5\n5\n")
    f.write("Example 2: The result equals 10\n10\n")

# Build the namespace with all required arguments
args_ns = argparse.Namespace(
    bound_answer_quick_extraction=True,
    bound_prompt_path=prompt_file
)

prediction_with_box = "The final answer is $\\boxed{42}$"

ARGS = {
    "prediction": prediction_with_box,
    "args": args_ns
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_relation_answer Ran
ran; our contract draft was wrong, not the code
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("ff123d3fec1da790")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
import tempfile
import os

# Create a temporary file for the relation_prompt_path
temp_dir = tempfile.mkdtemp()
relation_prompt_file = os.path.join(temp_dir, "relation_prompt.txt")
with open(relation_prompt_file, 'w') as f:
    f.write("Example 1: The value is less than 5. Answer: (D)\n")
    f.write("Example 2: The value is greater than or equal to 10. Answer: (B)\n")
    f.write("Example 3: The values are equal. Answer: (C)\n")

# Create argparse.Namespace with required arguments
args = argparse.Namespace(
    relation_prompt_path=relation_prompt_file
)

# Create answer_sentence parameter
answer_sentence = "The answer is (A) $\\leq$ based on our analysis."

ARGS = {
    "answer_sentence": answer_sentence,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_transformation_prompt Ran
ran; our contract draft was wrong, not the code
lupantech/ineqmath/data_curation/data_reformulation/bound_reformulation.py
code served (permissive licence) · get_code("fda61b96dacc3bc0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# The function get_transformation_prompt takes a single parameter: problem
# which is a string representing an inequality problem to be transformed.
# The function constructs and returns a prompt string based on this input.

problem = """
Let $a, b, c \\in \\mathbb{R}^{+}$. Prove the inequality
$$
\\frac{abc}{(1+a)(a+b)(b+c)(c+16)} \\leq \\frac{1}{81}
$$
"""

ARGS = {
    "problem": problem
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
locate_answer Ran
ran; our contract draft was wrong, not the code
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("39d9673604e55cb6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

# The function takes a single parameter: prediction (str)
# It processes the string to extract answers based on trigger phrases
# or returns the last 3 lines joined by newlines

ARGS = {
    'prediction': 'The model computed several steps.\nFirst, we calculate x.\nThen, we find y.\nThe final answer is 42.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
verify_bound_answer Ran
ran, violated the contract we drafted
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("3ceaf943c514f3ac")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
import tempfile
import os

# Create a temporary file for the bound_verification_prompt_path
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as f:
    prompt_content = """Example 1:
Ground truth: 2
Prediction: 2
Analysis: Both expressions are identical numerical values.
Equivalent: true

Example 2:
Ground truth: 1/2
Prediction: 0.5
Analysis: 1/2 and 0.5 are different representations of the same value.
Equivalent: true

Example 3:
Ground truth: sqrt(4)
Prediction: 2
Analysis: sqrt(4) simplifies to 2, which is equivalent.
Equivalent: true

Example 4:
Ground truth: 2*pi
Prediction: 6.28318
Analysis: 2*pi is exact, 6.28318 is an approximation. Not equivalent.
Equivalent: false
"""
    f.write(prompt_content)
    temp_path = f.name

try:
    # Create argparse.Namespace with the required parameter
    args_namespace = argparse.Namespace(
        bound_verification_prompt_path=temp_path
    )

    ARGS = {
        "ground_truth": "1/2",
        "prediction": "0.5",
        "args": args_namespace
    }
finally:
    # Clean up temp file after defining ARGS
    pass
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
verify_bound_answer_with_llm Ran
ran, violated the contract we drafted
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("2509a65628293bac")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
import tempfile
import os

# Create a temporary file for the bound_verification_prompt_path
temp_dir = tempfile.mkdtemp()
prompt_file_path = os.path.join(temp_dir, "bound_verification_prompt.txt")

# Write some example content to the prompt file
example_content = """
Example 1:
Ground truth: 1/2
Prediction: 0.5
Analysis: Both represent the same value. 1/2 equals 0.5 exactly.
Equivalent: true

Example 2:
Ground truth: sqrt(4)
Prediction: 2
Analysis: sqrt(4) = 2 exactly.
Equivalent: true

Example 3:
Ground truth: 2*pi
Prediction: 6.28318
Analysis: 2*pi is exact, 6.28318 is an approximation. They are not equivalent.
Equivalent: false

Example 4:
Ground truth: x + y
Prediction: y + x
Analysis: Both are algebraically equivalent by commutativity of addition.
Equivalent: true
"""

with open(prompt_file_path, 'w') as f:
    f.write(example_content)

# Create argparse.Namespace with required parameters
args = argparse.Namespace(
    bound_verification_prompt_path=prompt_file_path
)

# Define mock local_llm_engine function for testing
def local_llm_engine(prompt, response_format):
    """Mock LLM engine that returns a structured response"""
    from pydantic import BaseModel
    
    class EquivalenceCheck(BaseModel):
        analysis: str
        equivalent: bool
    
    # Simple mock response
    return EquivalenceCheck(
        analysis="Step-by-step analysis of expressions",
        equivalent=True
    )

# Make local_llm_engine available in the global scope for the function
import builtins
builtins.local_llm_engine = local_llm_engine

# Define ground_truth and prediction
ground_truth = "1/2"
prediction = "0.5"

ARGS = {
    "ground_truth": ground_truth,
    "prediction": prediction,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
verify_relation_answer Ran
ran, violated the contract we drafted
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("2008ae1131969bfc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse

CHOICES_DICT = {'A': '(A) $\\leq$', 'B': '(B) $\\geq$', 'C': '(C) $=$', 'D': '(D) $<$', 'E': '(E) $>$', 'F': '(F) None of the above'}

CHOICES = list(CHOICES_DICT.values())

# Create valid arguments for verify_relation_answer
ground_truth = '(A) $\\leq$'
prediction = '(A) $\\leq$'
args = argparse.Namespace()

ARGS = {
    'ground_truth': ground_truth,
    'prediction': prediction,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ScoreComputer Not yet run
unverified (harvested, no recorded run)
lupantech/ineqmath/models/utils/compute_score.py
code served (permissive licence) · get_code("fb5c76164b56d0ce")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Inequality proving, crucial across diverse scientific and mathematical fields, tests advanced reasoning skills such as discovering tight bounds and strategic theorem application. This makes it a distinct, demanding frontier for large language models (LLMs), offering insights beyond general mathematical problem-solving. Progress in this area is hampered by existing datasets that are often scarce, synthetic, or rigidly formal. We address this by proposing an informal yet verifiable task formulation, recasting inequality proving into two automatically checkable subtasks: bound estimation and relation prediction. Building on this, we release IneqMath, an expert-curated dataset of Olympiad-level inequalities, including a test set and training corpus enriched with step-wise solutions and theorem annotations. We also develop a novel LLM-as-judge evaluation framework, combining a final-answer judge with four step-wise judges designed to detect common reasoning flaws. A systematic evaluation of 29 leading LLMs on IneqMath reveals a surprising reality: even top models like o1 achieve less than 10% overall accuracy under step-wise scrutiny; this is a drop of up to 65.5% from their accuracy considering only final answer equivalence. This discrepancy exposes fragile deductive chains and a critical gap for current LLMs between merely finding an answer and constructing a rigorous proof. Scaling model size and increasing test-time computation yield limited gains in overall proof correctness. Instead, our findings highlight promising research directions such as theorem-guided reasoning and self-refinement.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2506.07927")
get_code_for_paper("2506.07927")
have("2506.07927")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2506.07927.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2506.07927.svg)](https://syntology.ai/paper/2506.07927)

Connect an agent — have() is free.