Can AI convert a math theorem into formal logic without quietly changing what it actually means?
Can language models translate theorems faithfully without semantic loss?
This explores whether LLMs can convert theorems from natural language into formal logic (autoformalization) without losing meaning — and the corpus is fairly blunt that they cannot, for reasons that go deeper than practice or scale.
This explores whether LLMs can translate theorems faithfully into formal logic, and the collection's answer is largely no — not because the models produce broken syntax, but because they lose meaning while looking correct. The most direct evidence: LLMs generate well-formed logical expressions that are semantically wrong, with errors clustering exactly where fidelity matters most — scope ambiguity, quantifier precision, and how finely a predicate is drawn Can large language models translate natural language to logic faithfully?. A theorem is a machine of quantifiers and scopes; get those subtly wrong and you've written a different theorem that happens to read the same.
Why does this happen? A cluster of notes suggests the problem is that LLMs reason through meaning-by-association rather than symbol manipulation. When you decouple semantic content from the logical structure of a task, performance collapses even when the correct rules are sitting right there in context Do large language models reason symbolically or semantically?. Faithful formalization is precisely the operation of stripping semantics down to symbols — the thing these models are worst at. Worse, they lean on statistical mass from pretraining: given equivalent phrasings, they prefer the textually frequent one regardless of meaning Do language models really understand meaning or just surface frequency?, and their judgments track whether a proposition was attested in training rather than whether it actually follows Do LLMs predict entailment based on what they memorized?. Translation faithfulness requires the opposite reflex: honor the source even when it's unusual.
Here's the thing you might not expect — the task is bigger than the sentence. Faithful autoformalization can't work statement-by-statement at all: even a single theorem needs a coherent web of axioms, definitions, and lemmas, and the statement-level successes you see mostly borrow that scaffolding from prebuilt libraries like Mathlib, hiding the real work Can autoformalization work on individual statements alone?. So "translate this theorem" is quietly asking the model to reconstruct an entire theory's meaning, which raises the fidelity bar rather than lowering it.
There's also a subtler failure the corpus names: a model can explain a concept correctly, then fail to apply it, and even recognize its own failure — a pattern of "potemkin" understanding where explanation and execution run on disconnected pathways Can LLMs understand concepts they cannot apply?. A model that can define a quantifier fluently but misplaces it in formalization is exhibiting exactly this. One hopeful wrinkle from the same failure literature: the errors are asymmetric — models understand formal language better than they generate it Can large language models translate natural language to logic faithfully?, which points toward verification-in-the-loop (check the candidate formalization) rather than trusting one-shot generation.
And the ceiling is partly formal, not just engineering. Any computable LLM must produce wrong outputs on infinitely many inputs, and internal self-correction can't erase that — external safeguards aren't optional Can any computable LLM truly avoid hallucinating?. For theorem translation that's oddly good news: formal logic comes with a proof checker, an external oracle that can catch the semantic slips generation can't avoid. Faithfulness, on this reading, won't come from a better translator alone — it comes from pairing the translator with something that can verify the translation preserved the theorem.
Sources 7 notes
LLMs generate well-formed logical expressions that are semantically incorrect, with errors clustering at scope ambiguity, quantifier precision, and predicate granularity. The asymmetry suggests LLMs understand formal language better than they can generate it.
When semantic content is decoupled from reasoning tasks, LLM performance collapses even with correct rules in context. Models rely on parametric commonsense and token associations rather than formal logical manipulation, constraining reasoning to training distribution semantics.
LLMs show consistent preference for higher-frequency surface forms over semantically equivalent rare paraphrases across math, machine translation, commonsense reasoning, and tool calling. This suggests models track statistical mass from pretraining rather than meaning-recognition as their primary mechanism.
McKenna et al. (2023) identified attestation bias: LLMs predict entailment based on whether the hypothesis appears in training data, not whether the premise actually supports it. Random premise experiments show models maintain high entailment predictions when hypotheses are attested, proving they respond to memorized propositions rather than premise-hypothesis relationships.
Real formalization requires theory-level work: even one theorem needs a coherent web of axioms, definitions, and lemmas. Statement-level approaches only succeed by borrowing from prebuilt libraries like Mathlib, hiding the actual complexity involved.
Show all 7 sources
Models can explain concepts accurately, fail to apply them, and recognize the failure—a triple pattern incompatible with human cognition. This indicates functionally disconnected explanation and execution pathways rather than simple knowledge gaps.
Three formal theorems prove that any computable LLM must hallucinate on infinitely many inputs, and internal mechanisms like self-correction cannot eliminate this mathematical constraint. External safeguards are therefore necessary, not optional.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Beyond Accuracy: Evaluating the Reasoning Behavior of Large Language Models -- A Survey
- Probing Structured Semantics Understanding and Generation of Language Models via Question Answering
- Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning
- Is Chain-of-Thought Reasoning of LLMs a Mirage? A Data Distribution Lens
- Large Language Models are In-Context Semantic Reasoners rather than Symbolic Reasoners
- Word Meanings in Transformer Language Models
- GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Models
- Language models show human-like content effects on reasoning tasks