Making Written Theorems Explorable by Grounding Them in Formal Representations

arXiv cs.AI / 4/6/2026

💬 OpinionSignals & Early TrendsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper argues that LLM explanations are limited for interactive learning because static text can’t be executed or stepped through.
  • It proposes “grounding” explanations in formal representations to unlock interactivity, illustrating this with “explorable theorems.”
  • The system uses LLMs to translate a theorem and its written proof into Lean code, linking each written step to the corresponding Lean constructs.
  • Users can step through proofs, run custom examples/counterexamples, and trace logical dependencies, with each step generated by executing the Lean proof and extracting intermediate state.
  • A small user study (n=16) suggests that explorable features improve proof comprehension, yielding better and more detailed answers on proof-reading comprehension questions.

Abstract

LLM-generated explanations can make technical content more accessible, but there is a ceiling on what they can support interactively. Because LLM outputs are static text, they cannot be executed or stepped through. We argue that grounding explanations in a formalized representation enables interactive affordances beyond what static text supports. We instantiate this idea for mathematical proof comprehension with explorable theorems, a system that uses LLMs to translate a theorem and its written proof into Lean, a programming language for machine-checked proofs, and links the written proof with the Lean code. Readers can work through the proof at a step-level granularity, test custom examples or counterexamples, and trace the logical dependencies bridging each step. Each worked-out step is produced by executing the Lean proof on that example and extracting its intermediate state. A user study (n = 16) shows potential advantages of this approach: in a proof-reading task, participants who had access to the provided explorability features gave better, more correct, and more detailed answers to comprehension questions, demonstrating a stronger overall understanding of the underlying mathematics.