SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.17216 · ICML · 2024

Autoformalizing Euclidean Geometry

Anima Anandkumar, Kaiyu Yang, Logan Murphy, Jialiang Sun, Zhaoyu Li, Xujie Si

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 1 has no contract verdict; 5 failures of our instrument; 4 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/2405.17216.json · badge: /api/ran/2405.17216.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
loganrjmurphy/leaneuclid canonical (classifier label)
classifier basis: classifier_2025
9 ran · 4 no recorded run
FunctionStatusWhere it lives
PermutationStruct Ran
ran on a synthesized input
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("b17a3745345f3d22")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned bool, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import numpy as np

class PermutationStruct:
    pointPerms: list[list[str]]
    linePerms: list[list[str]]
    circlePerms: list[list[str]]

    def __init__(self, points, lines, circles):
        self.pointPerms = points
        self.linePerms = lines
        self.circlePerms = circles

    def noPoints(self):
        return self.pointPerms == [()]

    def noLines(self):
        return self.linePerms == [()]

    def noCircles(self):
        return self.circlePerms == [()]


INIT_ARGS = {
    'points': [('A', 'B'), ('C', 'D')],
    'lines': [('L1', 'L2', 'L3')],
    'circles': [('O1',), ('O2', 'O3')]
}

ARGS = {}

METHOD = 'noPoints'

if __name__ == '__main__':
    instance = PermutationStruct(**INIT_ARGS)
    result = getattr(instance, METHOD)(**ARGS)
    print(f"Result: {result}")
    print(f"noPoints: {instance.noPoints()}")
    print(f"noLines: {instance.noLines()}")
    print(f"noCircles: {instance.noCircles()}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — 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 — no output shape is stated: observe_signature.py could not observe it (no_inputs)
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
checkPerm Ran
ran, honoured the contract we drafted
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("f93e2527f3540da6")
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 float, 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 Levenshtein

# The function uses:
# - names: iterable of strings (used in zip and for replacement)
# - target: string (used with .replace())
# - reference: string (used in Levenshtein.ratio())
# - guarded: iterable of strings (used in zip with names)

ARGS = {
    "names": ["cat", "dog", "bird"],
    "target": "The quick brown fox jumps",
    "reference": "The quack brown fix jumps",
    "guarded": ["quick", "brown", "fox"]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
Levenshtein — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
choosePermutations Ran
ran; our contract draft was wrong, not the code
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("9ccf4b01d9d2129a")
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 tuple. 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 Levenshtein
import heapq
from itertools import permutations, product
from dataclasses import dataclass, field
from collections import Counter

@dataclass(order=True)
class NameMap:
    name: list[str] = field(compare=False)
    sim: float

    def __eq__(self, other) -> bool:
        self.name == other.name

class PermutationStruct:
    pointPerms: list[list[str]]
    linePerms: list[list[str]]
    circlePerms: list[list[str]]

    def __init__(self, points, lines, circles):
        self.pointPerms = points
        self.linePerms = lines
        self.circlePerms = circles

    def noPoints(self):
        return self.pointPerms == [()]

    def noLines(self):
        return self.linePerms == [()]

    def noCircles(self):
        return self.circlePerms == [()]

class QuantifierData:
    points: list[str]
    lines: list[str]
    circles: list[str]

    def __init__(self, points, lines, circles):
        self.points = points
        self.lines = lines
        self.circles = circles

class PropData:
    univNames: QuantifierData
    existNames: QuantifierData

    def __init__(self, univNames, existNames):
        self.univNames = univNames
        self.existNames = existNames

    def asList(self):
        return self.univNames.points + self.univNames.lines + self.univNames.circles + self.existNames.points + self.existNames.lines + self.existNames.circles

# Create ground PropData with universal and existential quantifiers
ground_univ = QuantifierData(
    points=['grd_p1', 'grd_p2'],
    lines=['grd_l1'],
    circles=['grd_c1']
)
ground_exist = QuantifierData(
    points=['grd_p3'],
    lines=['grd_l2'],
    circles=[]
)
ground = PropData(ground_univ, ground_exist)

# Create test PropData
test_univ = QuantifierData(
    points=['p1', 'p2'],
    lines=['l1'],
    circles=['c1']
)
test_exist = QuantifierData(
    points=['p3'],
    lines=['l2'],
    circles=[]
)
test = PropData(test_univ, test_exist)

# Create PermutationStruct for universal quantifiers
univ = PermutationStruct(
    points=[('grd_p1', 'grd_p2'), ('grd_p2', 'grd_p1')],
    lines=[('grd_l1',)],
    circles=[('grd_c1',)]
)

# Create PermutationStruct for existential quantifiers
exist = PermutationStruct(
    points=[('grd_p3',)],
    lines=[('grd_l2',)],
    circles=[()]
)

# Target and reference strings for Levenshtein comparison
target = "grd_p1 grd_p2 grd_l1 grd_c1 grd_p3 grd_l2"
reference = "p1 p2 l1 c1 p3 l2"

# N is the heap size limit
N = 5

ARGS = {
    'ground': ground,
    'test': test,
    'univ': univ,
    'exist': exist,
    'target': target,
    'reference': reference,
    'N': N
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
Levenshtein — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
has_match Ran
ran, violated the contract we drafted
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("e9a46f8957968943")
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 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.

from collections import Counter

class QuantifierData:
    def __init__(self, points, lines, circles):
        self.points = points
        self.lines = lines
        self.circles = circles

class PropData:
    def __init__(self, univNames, existNames):
        self.univNames = univNames
        self.existNames = existNames

# Create first PropData instance
quant_data_1_univ = QuantifierData(
    points=["p1", "p2"],
    lines=["l1"],
    circles=["c1", "c2"]
)
quant_data_1_exist = QuantifierData(
    points=["p3"],
    lines=["l2", "l3"],
    circles=["c3"]
)
prop_data_1 = PropData(quant_data_1_univ, quant_data_1_exist)

# Create second PropData instance with same permutations
quant_data_2_univ = QuantifierData(
    points=["p2", "p1"],  # permutation of p1, p2
    lines=["l1"],
    circles=["c2", "c1"]  # permutation of c1, c2
)
quant_data_2_exist = QuantifierData(
    points=["p3"],
    lines=["l3", "l2"],  # permutation of l2, l3
    circles=["c3"]
)
prop_data_2 = PropData(quant_data_2_univ, quant_data_2_exist)

ARGS = {
    "x": prop_data_1,
    "y": prop_data_2
}
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 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
has_permutation Ran
ran, violated the contract we drafted
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("4f18707c98469c94")
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 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.

from collections import Counter

class QuantifierData:
    points: list[str]
    lines: list[str]
    circles: list[str]

    def __init__(self, points, lines, circles):
        self.points = points
        self.lines = lines
        self.circles = circles

def is_permutation(list1, list2):
    return Counter(list1) == Counter(list2)

def has_permutation(x: QuantifierData, y: QuantifierData):
    return is_permutation(x.points, y.points) and is_permutation(x.lines, y.lines) and is_permutation(x.circles, y.circles)

# Create two QuantifierData instances with matching elements (permutations)
x = QuantifierData(
    points=["p1", "p2", "p3"],
    lines=["l1", "l2"],
    circles=["c1"]
)

y = QuantifierData(
    points=["p3", "p1", "p2"],  # Same elements, different order
    lines=["l2", "l1"],          # Same elements, different order
    circles=["c1"]               # Same elements
)

ARGS = {
    "x": x,
    "y": y
}
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 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
is_permutation Ran
ran; our contract draft was wrong, not the code
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("fdfee91915c790f0")
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 torch
import numpy as np
from collections import Counter

torch.manual_seed(0)

# The function is_permutation takes two lists and checks if they have the same
# elements with the same frequencies using Counter.
# We need to construct two lists that are permutations of each other.

list1 = [1, 2, 3, 2, 1]
list2 = [2, 1, 2, 1, 3]

ARGS = {
    'list1': list1,
    'list2': list2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
removeGuards Ran
ran; our contract draft was wrong, not the code
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("cb6fe1699a17fcb6")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# The function removeGuards takes a parameter 'data' and applies a lambda
# that removes the 'grd_' prefix from each string in the data.
# So 'data' should be a list of strings containing 'grd_' prefix.

data = [
    'grd_layer1',
    'grd_layer2',
    'grd_attention',
    'grd_output'
]

ARGS = {
    'data': data
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
remove_all_guards Ran
ran; our contract draft was wrong, not the code
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("76c240a8d6747abf")
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 PropData. 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
import numpy as np

class QuantifierData:
    def __init__(self, points, lines, circles):
        self.points = points
        self.lines = lines
        self.circles = circles

def removeGuards(data):
    return list(map(lambda x: x.replace('grd_', ''), data))

class PropData:
    def __init__(self, univNames, existNames):
        self.univNames = univNames
        self.existNames = existNames

    def asList(self):
        return self.univNames.points + self.univNames.lines + self.univNames.circles + self.existNames.points + self.existNames.lines + self.existNames.circles

def remove_all_guards(x: PropData):
    univ = QuantifierData(removeGuards(x.univNames.points), removeGuards(x.univNames.lines), removeGuards(x.univNames.circles))
    exist = QuantifierData(removeGuards(x.existNames.points), removeGuards(x.existNames.lines), removeGuards(x.existNames.circles))
    return PropData(univ, exist)

# Construct valid arguments
univ_quantifier = QuantifierData(
    points=['grd_p1', 'grd_p2'],
    lines=['grd_l1', 'grd_l2', 'grd_l3'],
    circles=['grd_c1']
)

exist_quantifier = QuantifierData(
    points=['grd_p3'],
    lines=['grd_l4'],
    circles=['grd_c2', 'grd_c3']
)

prop_data = PropData(univ_quantifier, exist_quantifier)

ARGS = {
    'x': prop_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PropData — a PropData output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PropData 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
replaceGuards Ran
ran; our contract draft was wrong, not the code
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("78112d3724540dc8")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# The function replaceGuards takes a parameter 'data' and maps a lambda function
# over it that prepends 'grd_' to each element. This means 'data' should be
# an iterable of strings.

data = ['guard1', 'guard2', 'guard3']

ARGS = {
    'data': data
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
NameMap Not yet run
unverified (harvested, no recorded run)
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("bb00132b7cffb7fb")
How it ran

no invocation recorded.

PropData Not yet run
unverified (harvested, no recorded run)
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("1160a348cb5575f9")
How it ran

no invocation recorded.

QuantifierData Not yet run
unverified (harvested, no recorded run)
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("3e48503267b317e0")
How it ran

no invocation recorded.

checkAndInsert Not yet run
unverified (harvested, no recorded run)
loganrjmurphy/leaneuclid/E3/Engine/choosePerms.py
code served (permissive licence) · get_code("63f2931afa6efafd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 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 13 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

Autoformalization involves automatically translating informal math into formal theorems and proofs that are machine-verifiable. Euclidean geometry provides an interesting and controllable domain for studying autoformalization. In this paper, we introduce a neuro-symbolic framework for autoformalizing Euclidean geometry, which combines domain knowledge, SMT solvers, and large language models (LLMs). One challenge in Euclidean geometry is that informal proofs rely on diagrams, leaving gaps in texts that are hard to formalize. To address this issue, we use theorem provers to fill in such diagrammatic information automatically, so that the LLM only needs to autoformalize the explicit textual steps, making it easier for the model. We also provide automatic semantic evaluation for autoformalized theorem statements. We construct LeanEuclid, an autoformalization benchmark consisting of problems from Euclid's Elements and the UniGeo dataset formalized in the Lean proof assistant. Experiments with GPT-4 and GPT-4V show the capability and limitations of state-of-the-art LLMs on autoformalizing geometry problems. The data and code are available at https://github. com/loganrjmurphy/LeanEuclid.

For agents

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

get_harvested_code_for_paper("2405.17216")
get_code_for_paper("2405.17216")
have("2405.17216")

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

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

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

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

Connect an agent — have() is free.