SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.07019 · 2020

Learning to Prove Theorems by Learning to Generate Theorems

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-22; 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/2002.07019.json · badge: /api/ran/2002.07019.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
princeton-vl/MetaGen canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
get_expr Ran
ran on a synthesized input
princeton-vl/MetaGen/src/data_loader_forward.py
code served (permissive licence) · get_code("818eeefc8a3a8cc7")
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 list, ndim 2, dtype family int; 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 Tree:
    def __init__(self, nodes=None):
        self.nodes = nodes or []
    
    def fit(self, other_tree, f_dict):
        """Returns a dictionary mapping variables to values"""
        result = {}
        for i, node in enumerate(self.nodes):
            result[f"var_{i}"] = i * 10
        return result
    
    def copy(self):
        """Returns a shallow copy of the tree"""
        return Tree(self.nodes.copy())
    
    def replace(self, mapping):
        """Replaces nodes based on mapping and returns self"""
        return self
    
    def list(self):
        """Returns list of symbols/variables in tree"""
        return [f"var_{i}" for i in range(len(self.nodes))]

class Hypothesis:
    def __init__(self, tree_obj, hyp_type='e'):
        self.tree = tree_obj
        self.type = hyp_type

class Proposition:
    def __init__(self):
        self.e = [1, 2, 3]  # non-empty list
        self.tree = Tree([1, 2])
        self.f = {"var_0": 5, "var_1": 15}
        self.unconstrained_variables = ["u1", "u2"]
        self.hyps = [
            Hypothesis(Tree([1]), 'e'),
            Hypothesis(Tree([1, 2, 3]), 'e'),
            Hypothesis(Tree([1, 2]), 'other')
        ]

class Step:
    def __init__(self):
        self.prop = Proposition()
        self.tree = Tree([1, 2, 3])
        self.unconstrained = [100, 200]

class Generator:
    def search(self, tree, k=200):
        """Returns list of indices"""
        return list(range(k // 10))

torch.manual_seed(0)

ARGS = {
    "generator": Generator(),
    "step": Step()
}
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 list, ndim 2, dtype family int — 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
mycollate Ran
ran on a synthesized input
princeton-vl/MetaGen/src/data_loader_gen.py
code served (permissive licence) · get_code("52c06d883df1fb1f")
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 list, ndim 2, dtype family int; 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 torch.utils.data as data

torch.manual_seed(0)

# Analyzing mycollate:
# - Takes a batch parameter
# - Iterates over batch, treating each element b as a tuple/list with 6 indexable elements
# - Each b[i] is expected to be a list (since += is used to concatenate)
# - Returns a list of 6 lists

# Create sample batch data
# Each item in batch should be a tuple/list of 6 lists
batch_item_1 = (
    [1, 2],           # b[0]
    [3, 4],           # b[1]
    [5, 6],           # b[2]
    [7, 8],           # b[3]
    [9, 10],          # b[4]
    [11, 12]          # b[5]
)

batch_item_2 = (
    [13, 14],         # b[0]
    [15, 16],         # b[1]
    [17, 18],         # b[2]
    [19, 20],         # b[3]
    [21, 22],         # b[4]
    [23, 24]          # b[5]
)

batch = [batch_item_1, batch_item_2]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 2, dtype family int — 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
mycollate Ran
ran on a synthesized input
princeton-vl/MetaGen/src/data_loader_gen_noproof.py
code served (permissive licence) · get_code("6ee18bc59d0aa35e")
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 list. 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 torch.utils.data as data

torch.manual_seed(0)

# The function expects a batch parameter, which is a list of tuples/sequences
# Each element b in batch should have 6 indexable items (b[0] through b[5])
# The function collates by collecting each index across all batch items

# Create sample batch data - list of tuples with 6 elements each
batch_item_1 = (
    torch.randn(4, 3),      # b[0]
    torch.randn(2, 5),      # b[1]
    torch.randn(3,),        # b[2]
    torch.randn(1, 4),      # b[3]
    torch.randn(2, 2),      # b[4]
    torch.randn(5,)         # b[5]
)

batch_item_2 = (
    torch.randn(4, 3),      # b[0]
    torch.randn(2, 5),      # b[1]
    torch.randn(3,),        # b[2]
    torch.randn(1, 4),      # b[3]
    torch.randn(2, 2),      # b[4]
    torch.randn(5,)         # b[5]
)

batch = [batch_item_1, batch_item_2]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
mycollate Ran
ran on a synthesized input
princeton-vl/MetaGen/src/data_loader_lm.py
code served (permissive licence) · get_code("e277c3411abb881b")
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 list, ndim 2, dtype family int; 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 torch.utils.data as data

torch.manual_seed(0)

# Analyze the function:
# - mycollate takes a 'batch' parameter
# - It iterates over len(batch[0]), so batch[0] must be indexable and have length
# - For each index i, it accesses b[i] for each b in batch
# - It concatenates b[i] using +=, so b[i] must be a list or concatenable
# - The function returns a list of lists

# Create a batch: list of tuples/lists where each element is a list
# Example: batch of 2 samples, each sample has 3 components
batch = [
    # First sample: 3 lists
    [
        [1, 2],           # component 0
        [3, 4],           # component 1
        [5, 6]            # component 2
    ],
    # Second sample: 3 lists
    [
        [7, 8],           # component 0
        [9, 10],          # component 1
        [11, 12]          # component 2
    ]
]

ARGS = {
    'batch': batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 2, dtype family int — 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
mycollate Ran
ran on a synthesized input
princeton-vl/MetaGen/src/data_loader_payout.py
code served (permissive licence) · get_code("79d343599b6a5d20")
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 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 torch

torch.manual_seed(0)

# The function expects a batch where each element b is a tuple/list with at least 3 elements:
# b[0] = goal_tokens (will be collected into a list)
# b[1] = goal_trees (will be collected into a list)
# b[2] = a numeric value (will be converted to tensor)

# Create sample batch items
batch_item_1 = (
    ["token1", "token2"],           # goal_tokens
    {"tree": "structure1"},          # goal_trees
    0.5                             # numeric value
)

batch_item_2 = (
    ["token3", "token4"],           # goal_tokens
    {"tree": "structure2"},          # goal_trees
    0.7                             # numeric value
)

# The batch parameter is a list of these tuples
batch = [batch_item_1, batch_item_2]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
mycollate Ran
ran on a synthesized input
princeton-vl/MetaGen/src/data_loader_pred.py
code served (permissive licence) · get_code("f6e1d8ab606f44a1")
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 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 torch
import numpy as np

torch.manual_seed(0)

# The function expects a batch where each element is a tuple with:
# - b[0]: goal_tokens
# - b[1]: goal_trees
# - b[2]: prop_tokens (list) or None
# - b[3]: prop_trees (list) or None
# - b[-2]: prop_idx (if len == 6)
# - b[-1]: true_idx (if len == 6)

# Create sample data with 6-element tuples (the longer case)
batch_item_1 = (
    torch.tensor([1, 2, 3, 4]),  # goal_tokens
    torch.tensor([5, 6, 7, 8]),  # goal_trees
    [torch.tensor([9, 10]), torch.tensor([11, 12])],  # prop_tokens (list of tensors)
    [torch.tensor([13, 14]), torch.tensor([15, 16])],  # prop_trees (list of tensors)
    0,  # prop_idx
    1   # true_idx
)

batch_item_2 = (
    torch.tensor([17, 18, 19, 20]),  # goal_tokens
    torch.tensor([21, 22, 23, 24]),  # goal_trees
    [torch.tensor([25, 26])],  # prop_tokens (list of tensors)
    [torch.tensor([27, 28])],  # prop_trees (list of tensors)
    1,  # prop_idx
    0   # true_idx
)

batch = [batch_item_1, batch_item_2]

ARGS = {
    "batch": batch
}
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 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
slow_delete_duplicates Ran
ran on a synthesized input
princeton-vl/MetaGen/src/build_payout_data_set.py
code served (permissive licence) · get_code("7f6b640ff2600f3b")
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 list, ndim 1, dtype family int; 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)

# slow_delete_duplicates takes a list and removes duplicates while preserving order
# It checks membership with "in" operator, so we need hashable items
# Let's use a simple list of integers

inlist = [1, 2, 3, 2, 4, 1, 5, 3]

ARGS = {
    "inlist": inlist
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 int — 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
build_language_model Not yet run
unverified (harvested, no recorded run)
princeton-vl/MetaGen/src/data_utils.py
code served (permissive licence) · get_code("4e5de2d4813c6c5f")
How it ran

no invocation recorded.

get_wrong Not yet run
unverified (harvested, no recorded run)
princeton-vl/MetaGen/src/build_payout_data_set.py
code served (permissive licence) · get_code("83f3b97d976fb076")
How it ran

no invocation recorded.

load_exprs Not yet run
unverified (harvested, no recorded run)
princeton-vl/MetaGen/src/data_utils.py
code served (permissive licence) · get_code("4e1c5632f18f94aa")
How it ran

no invocation recorded.

load_language_model Not yet run
unverified (harvested, no recorded run)
princeton-vl/MetaGen/src/data_utils.py
code served (permissive licence) · get_code("d57a29a20c5256f9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

FunctionAlso present inEarliest-datedOthers named
get_wrong 1 other paper
1 dated earlier
1608.02644 (2016-08)
Holophrasm: a neural Automated Theorem Prover for higher-order logic
slow_delete_duplicates 1 other paper
1 dated earlier
1608.02644 (2016-08)
Holophrasm: a neural Automated Theorem Prover for higher-order logic

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-22.

Repositories linked to this paper

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

Abstract

We consider the task of automated theorem proving, a key AI task. Deep learning has shown promise for training theorem provers, but there are limited human-written theorems and proofs available for supervised learning. To address this limitation, we propose to learn a neural generator that automatically synthesizes theorems and proofs for the purpose of training a theorem prover. Experiments on real-world tasks demonstrate that synthetic data from our approach improves the theorem prover and advances the state of the art of automated theorem proving in Metamath. Code is available at https://github.com/princeton-vl/MetaGen.

For agents

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

get_harvested_code_for_paper("2002.07019")
get_code_for_paper("2002.07019")
have("2002.07019")

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

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

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

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

Connect an agent — have() is free.