TRANSMISSION // 2612.05561v1
Representing Logic Trees with PyTorch Tensors
Source published
The authors describe a tensor representation for first-order logic trees and a batched saturation implementation. The supplied paper text reports no benchmark results.

Can first-order logic trees be represented in a way that supports batched operations in PyTorch? Dhyan Aranha, Jérémie Marques and Carlos Simpson introduce a tensor-based format and describe its use in an implementation of a classical theorem-proving procedure.
The paper introduces Insertable Tensor Representations for Trees (ITTR), a way to encode forests of first-order logic formulas as PyTorch tensors. The authors’ goal is to take advantage of GPU throughput from early in a theorem-proving pipeline, before any neural-network-based clause selection. The paper describes a representation and implementation; the supplied text does not report performance results.
A formula can be illustrated as a tree, with a symbol and its arguments arranged in parent–child relationships. This is a simplified picture rather than a complete account of first-order formula structure. ITTR flattens trees into nested-parentheses form and stores information about each node in a tensor. The encoding records positions for the parentheses that open and close a node, along with a numeric value for its symbol. In the described scheme, the initial formula strings are scanned from left to right, using separate counters for variable and non-variable symbols.
The authors describe vectorized operations for extracting subtrees, inserting forests of trees, and finding the first points where pairs of trees differ. These differences are useful for unification: finding substitutions that make expressions match. For example, matching f(X) with f(a) requires replacing X with a.
Unification is not fully loop-free. The authors say their method still uses loops and branching, applying substitutions iteratively, one variable at a time. This helps avoid errors that could arise when dependent substitutions are attempted simultaneously. Their account therefore distinguishes operations designed to run in a vectorized manner from the broader unification procedure, which retains sequential steps.
The paper also describes an implementation of a batched version of Robinson’s saturation algorithm. It starts with clauses in conjunctive normal form and applies inference rules, including resolution and factoring, to generate further clauses. Instead of selecting one clause at a time, the implementation selects batches and uses the ITTR operations to compute unifiers and apply substitutions. The procedure continues until the unprocessed pool is empty or an empty clause is derived.
For filtering, the implementation hashes clauses and checks hash collisions against existing clauses. The described equivalence check is strict: clauses must have the same literals in the same order, under the paper’s strong notion of α-equivalence. This is not a general check for equivalence under arbitrary literal reordering.
The authors say the project files run through tpbench, a framework they describe as intended for comparison with Vampire and PyRes. The supplied paper text reports no benchmark results, so it does not establish comparative speed, proof success rates, or measured performance. The source describes an implementation, but that description alone is not independent verification of how reliably it runs.
The authors keep the system deliberately simple. They say they did not implement superposition, a calculus they note is used by Vampire and E. For equality, their current method is to add the needed axioms manually to the initial clause context; they identify automating this as future work. They also envision a sufficiently strong neural network handling search and hope that working in PyTorch will make integration more seamless. These are aspirations, not results demonstrated in the paper.
This article is based on an arXiv preprint. The available evidence does not establish its peer-review status. The contribution presented here is a proposed tensor representation and a described batched implementation, with important algorithmic and performance questions left open.
- automated theorem proving
- PyTorch
- tensor representations
- first-order logic
- unification
- Robinson saturation
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Building Theorems from Carefully Designed Contradictions
Source published
Shared keywords: first order logic
When AI proofs multiply, who makes them mathematics?
Source published
Shared keywords: automated theorem proving
An AI Proof Workflow Designed to Change Course
Source published
Shared keywords: automated theorem proving