Untrusted Authors, Trusted Answers: A Calculus of Fidelity-Graded Translations
This paper presents a Lean 4-mechanized calculus and a dual-plane system ("hurdy-gurdy") that enables untrusted LLMs to generate self-certifying, fidelity-graded translations between programming languages, ensuring that a continuously evolving, human-verified trust graph converges on decidable program questions with ever-increasing assurance.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Detective's Dilemma: When You Can't Trust the Messenger
Imagine you are trying to solve a mystery about a complex machine, like a car engine or a video game character's behavior. You have a question: "Will this car crash if I press the gas at 50 mph?" To answer it, you can't just look at the car; you have to translate its messy, real-world mechanics into a language a super-smart computer solver understands, like a math equation. But here's the catch: the person translating the car into math might make a mistake. Maybe they forgot a gear, or maybe they misunderstood how the brakes work. If the translator is wrong, the math solver gives you a perfect answer to the wrong question.
In the world of computer science, this is the problem of "translation." We often have to move a program from one language (like C or Python) to another (like a logic puzzle for a solver) to check if it's safe. Traditionally, scientists tried to solve this by proving the translator was perfect once and for all, like certifying a bridge is safe before anyone drives on it. But that's incredibly hard, especially when the translators are complex or even written by artificial intelligence. This paper asks a different question: What if we stop trying to prove the translator is perfect, and instead build a system that catches the translator's mistakes while it's working? It's the difference between trusting a single guide to lead you through a forest and having a team of guides who check each other's maps, with a rule that if they disagree, you stop and figure out who is wrong.
The "Hurdy-Gurdy" Machine: A Factory for Trustworthy Answers
This paper introduces a system called hurdy-gurdy (named after a musical instrument that cranks out tunes, but here it cranks out answers). The authors, led by Christoph Kirsch, propose a new way to handle computer programs: treat them like a game of "telephone" where every step is checked, and every answer comes with a receipt.
The core idea is simple but powerful: Don't trust the translator; trust the process.
Imagine you have a question about a program written in C. Instead of just sending it to one translator, the system sends it down two different paths.
- The Translation: The program is translated into a simpler logic language (like turning a novel into a math equation).
- The Double-Check: The system runs the original program and the translated version side-by-side. It checks if they behave the same way. If they do, great! If they don't, the system points exactly to the step where they diverged, like a referee blowing a whistle at the exact moment a player fouled.
- The "Witness" Trick: If the solver says, "Yes, a crash is possible," the system doesn't just take the solver's word. It takes the "proof" (the specific conditions that cause the crash) and runs it backwards through the translation. It feeds those conditions into the original program. If the original program actually crashes, then the answer is 100% real. The system has "replayed" the crime scene.
The Two Planes: Building and Using
The system has two distinct modes, like a factory floor and a showroom:
- The Use Plane (The Showroom): This is where the answers happen. Here, an AI (or a human) asks questions. The system doesn't just guess; it picks a route, checks the translation, and if the answer is "Yes, it's possible," it runs the replay to prove it. If the answer is "No, it's impossible," the system relies on a stack of checks: multiple translators, multiple solvers, and even mathematically verified certificates to be sure.
- The Evolution Plane (The Factory): This is where the system grows. If the system can't answer a question, it doesn't just give up. It writes down why it failed (e.g., "We don't have a translator for this specific type of loop"). It then uses an AI to build a new translator to fill that gap. Once built, the new translator is tested against the old ones. If it passes, it gets added to the registry. If it fails, it's fixed. This loop runs indefinitely, making the system smarter and more trustworthy over time, but crucially, the growth process never answers questions itself. It only builds the tools to answer them.
The "Untrusted Authors" Twist
The most surprising part of the paper is that the translators themselves were built by untrusted AI agents. The authors didn't hand-code the translators; they asked AI models to write them based on a one-page description. Usually, this would be a disaster. But because the system checks every step, the AI's mistakes were caught immediately.
For example, in one test, an AI translator missed a specific instruction, causing it to behave differently than the original program. The system's "square check" (the side-by-side comparison) spotted the error instantly, pinpointing the exact line and the exact variable that was wrong. The system then fixed the translator. The paper shows that even with AI authors who might be wrong, the architecture of the system ensures the final answers are trustworthy.
What the System Found (and Didn't Find)
The authors ran this system on a snapshot of their work from July 2026. Here is what they measured:
- Coverage: They successfully translated programs from 13 different languages (including C, Python, and even chemical reaction networks) into logic solvers. For the RISC-V processor language, they covered 96 out of 96 specific instruction types, meaning the system could handle every single instruction in that set without losing track.
- Agreement: When they sent the same question down two different translation paths (one based on a manual, one based on a formal model), the answers agreed 100% of the time on the test cases.
- Defects Caught: The system caught 24 specific defects in its own translators and tools. Some were simple typos, others were logic errors where the AI misunderstood how a computer instruction worked. Crucially, the system found these errors without a human looking at the code.
- The "Blind Spot": The system also found a limit. If two different translators made the exact same mistake (because they both misunderstood the same rule), the system couldn't catch it. This is called a "common-mode failure." The paper admits this is a risk, but the system is designed to minimize it by using diverse sources for translations.
- LLM Players: They tested if an AI could use the system to answer questions. In one experiment, an AI without tools got 7 out of 8 questions right but guessed on the hard one. The AI with the system got 8 out of 8 right, and every answer came with a machine-checked proof.
The Bottom Line
This paper doesn't claim to have solved all computer safety problems. It doesn't say that AI translators are now perfect. Instead, it proves that you can build a trustworthy system out of untrustworthy parts.
By treating every translation as a potential mistake and building a "ratchet" that only allows improvements to stick, the system creates a ladder of trust. If a question is "Can this happen?", the system can replay the event to prove it. If the answer is "No, this can't happen," the system uses a chain of independent checks and mathematically verified certificates to be sure.
The authors conclude that this approach—using a graph of routes, checking every step, and replaying the evidence—is a viable way to handle the complexity of modern software, even when the people (or AIs) building the tools are fallible. It's a shift from "trusting the author" to "trusting the architecture."
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.