When humans learn to solve a problem—say, sorting a deck of cards—we do not just learn how to handle physical cards. We learn an abstract strategy that can instantly be applied to sorting blocks by size, organizing files alphabetically, or prioritizing tasks. In artificial intelligence, however, systems often treat these tasks as completely unrelated because their surface-level features (predicates, data types, and environments) differ.
The core insight of structural logic reuse is that many disparate domains share identical underlying computational, logical, or algebraic shapes. By abstracting away domain-specific details, we can discover universal templates that allow proofs, programs, and search strategies to be transferred seamlessly across completely different domains.
Lifting Concrete Logic to Second-Order Templates
How do we formalize the "shape" of a problem independently of its domain? The answer lies in moving from first-order logic (which reasons about specific objects and relations) to second-order logic (which treats the relations themselves as variables).
Consider a rule about social networks: "If Person A is friends with Person B, and Person B is friends with Person C, then Person A is likely friends with Person C." This is the property of transitivity. If we replace the specific predicate isFriendsWith with a variable $P$, we get an abstract template:
$$P(x, y) \land P(y, z) \implies P(x, z)$$
This abstraction mechanism is what allows knowledge to cross massive domain gaps. As shown by Davis et al. (2011), representing high-level structural regularities using second-order logic bridges the gap between human-like analogical reasoning and statistical learning, enabling patterns found in molecular biology to be transferred directly to social networks. Similarly, Kolobov et al. (2015) leverage these second-order templates to extract domain-independent logical shapes (like symmetry and transitivity) from a source domain to bias and accelerate learning in a data-scarce target domain.
This lifting process is equally powerful in automated theorem proving. Kolbe et al. (1995) demonstrate that proofs can be abstracted into reusable templates by replacing concrete function symbols with variables. This allows a theorem prover to reuse the structural logic of a proof originally developed for integer arithmetic and apply it directly to list manipulation, avoiding redundant search.
Isomorphism in Program Synthesis and Derivation
The same principle applies to code. Two programs operating on entirely different data types may share an identical recursive or algebraic structure. This is known as structural isomorphism.
Wysotzki (1983) established that if two problems share the same underlying tree-shaped computational structure, a recursive scheme induced in one domain can be transferred to another by focusing on the algebraic structure of the equations rather than specific function definitions. For instance, Yokomori (1985) formalized this via a "recursive-schema," demonstrating that logic programs for list manipulation and integer arithmetic often share an identical underlying logical structure, allowing systems to synthesize new programs by mapping existing ones.
Instead of just reusing the final code, systems can also reuse the process of building the code. Harandi et al. (1989) introduced a method of "derivational analogy" that stores and replays the high-level functional abstractions used to construct programs. This allows complex algorithmic structures to be transferred across seemingly unrelated tasks, such as adapting text-processing patterns to file-system management.
This idea has been extended to modern program synthesis by discovering functional primitives. Hocquette et al. (2024) developed a system that automatically refactors first-order logic programs to discover higher-order abstractions like map, filter, and fold. Because these templates capture fundamental computational patterns rather than domain-specific features, a structural template identified in string manipulation can be successfully reused to solve problems in robotics or game logic.
Guiding Search and Aligning Modalities
Why does this structural alignment work so well in practice? Because it drastically prunes the search space. When an AI system encounters a new domain, it does not need to learn how to reason from scratch; it simply maps the new domain's primitives onto a known strategy.
Early work by Kling (1971) pioneered this via the ZORBA system, which recognized structural isomorphisms between distinct mathematical domains to transfer proof strategies, significantly accelerating automated theorem proving. Rather than relying on traditional numeric heuristic functions to guide state-space exploration, Georgeff (1981) proposed using procedural programs or "strategies" that can be mapped from a source domain to a target domain, allowing abstract problem-solving logic (like sorting) to navigate structurally distinct environments (like spatial puzzles).
This structural mapping is not limited to transferring logic between two programming domains; it can also bridge the gap between entirely different modalities, such as code and mathematics. For example, Borchert et al. (2025) exploit the structural similarity between programming functions and mathematical theorems. By topologically decomposing open-source software into its constituent parts, they treat code as a structural analogue for formal mathematics, allowing machine learning models to learn formalization patterns from high-resource programming data to solve data-scarcity issues in mathematical autoformalization.
The Geometry of Logic is Universal
The power of structural program isomorphism lies in a simple truth: whether a system is analyzing a molecule, proving a mathematical theorem, or refactoring a shell script, the underlying computational graphs, recursive schemas, and second-order templates remain the same. By shifting our focus from what a program or proof is operating on to how its logic is structured, we unlock the ability to transfer intelligence across the boundaries of disparate domains.
Key Foundational Work
A Paradigm for Reasoning by Analogy (1971) — contributed 1 concept elements to this direction.
Search Methods Using Heuristic Strategies (1981) — contributed 1 concept elements to this direction.