AI-Assisted Completion of CertiGC Proofs: An Experience Report
This experience report details how AI-assisted tools (Codex) were used to stabilize and complete the CertiGC verified generational garbage collector proof in Rocq by reorganizing the verification around a new recorded-backward-edge invariant to handle mutable updates, while human experts focused on adjudicating invariants and auditing the proof path to ensure correctness.
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
Imagine you are the head architect of a massive, magical library called CertiGC. This library doesn't just store books; it's a living, breathing system that automatically cleans up old, unused books to make room for new ones. For years, the library ran on a simple rule: "Once a book is placed on a shelf, nobody ever moves it or writes a note pointing to a newer book." This rule made the cleaning crew's job easy. They could sweep through the shelves, knowing that no old book would ever suddenly point to a brand-new one.
But then, the library decided to get exciting. They wanted to allow mutable updates: letting librarians write new notes in old books that pointed to brand-new arrivals. Suddenly, the old rule ("no old books pointing to new ones") was broken. The cleaning crew's map was now wrong. If they kept sweeping based on the old map, they would miss the new books that old notes were pointing to, and those books would get thrown away by mistake!
This is the story of a team that used a super-smart AI assistant, named Codex, to fix the library's cleaning map. But here's the twist: Codex didn't just magically invent a new map from thin air. Instead, Codex acted like a tireless, hyper-organized intern who could read thousands of pages, try out new ideas, and run the "cleaning simulation" over and over again, while a human expert stood by to say, "Yes, that idea works," or "No, that breaks the rules."
The Big Problem: The Broken Map
The original map relied on a "No-Backward-Edge" rule. Think of it like a one-way street system where you can only drive forward in time. But with the new "mutable" updates, you could suddenly drive backward from an old neighborhood to a new one. The old map said, "This is impossible!" The new reality said, "It happens all the time!"
If the team tried to force the old map to work, they would have to pretend the backward drives never happened. That would mean the library would only be "correct" for a boring version of itself that didn't do the cool new things. That wasn't the goal. They needed a new rule that admitted backward drives were possible, but only if they were recorded in a special logbook.
The AI's Role: The Tireless Intern
The human expert knew they needed a new rule: "Every time an old book points to a new one, it must be written down in the 'Remembered Set' logbook."
They asked Codex to help build the proof that this new rule would keep the library safe. Codex didn't just write the final answer. It acted like a detective who:
- Read the code: It scanned the library's blueprints.
- Proposed the rule: It suggested the "Recorded-Backward-Edge" concept (the logbook idea).
- Tested the rule: It ran the library's cleaning simulation (the "Rocq kernel") thousands of times.
- Fixed the bugs: When the simulation crashed, Codex tweaked the proof scripts, tried a different angle, and ran it again.
The human expert's job was the most critical part: The Judge. Codex could suggest a rule, but the human had to decide if that rule actually matched the real-world behavior of the library. For example, Codex might have suggested, "Let's just pretend the logbook doesn't exist for the final report." The human said, "No! The logbook is real. We can't hide it."
The Results: A Clean Library
After a lot of work, the team succeeded.
- The Fix: They replaced the broken "No-Backward-Edge" rule with the new "Recorded-Backward-Edge" rule.
- The Proof: The library's cleaning process was proven to be safe, even with the new updates. The final theorem (the "Grand Certificate") still looked the same to the outside world: "The library is clean and organized." But underneath, the logic was much smarter.
- The Cleanup: Even after the main proof was accepted, the team didn't stop. They spent extra time (May 1st to May 3rd) auditing the rules to make sure no old, broken assumptions were hiding in the code. They removed a "stale" condition that was left over from the old, boring version of the library.
What This Tells Us
The paper suggests that AI tools like Codex are amazing at maintenance and repair. They can be the perfect partner for a human expert when the job involves:
- Propagating Invariants: Taking a new rule and making sure it works in every single corner of a massive codebase.
- Cleaning Up: Fixing messy proof scripts and removing old, useless code.
- Testing: Running the "simulation" (the compiler) over and over again to see if a small change breaks anything.
However, the paper is very clear about what the AI cannot do on its own.
- It didn't discover the whole solution: The human had to understand the library's semantics and decide what the new rule should be.
- It didn't replace the human judge: The AI could propose a rule, but the human had to verify that the rule didn't accidentally weaken the library's safety guarantees.
- It wasn't a "magic wand": The AI didn't just write the whole proof in one go. It was a "supervised, checker-driven" process. The human was always in the loop, guiding the AI, rejecting bad ideas, and ensuring the final result was actually correct.
The Numbers
The team worked on this for a while. The "Codex-assisted phase" (when the AI was doing the heavy lifting) happened between April 22 and May 3, 2026.
- During this time, there were 51 git commits (updates to the code).
- The AI made 13,305 tool calls (actions like reading files, running tests, or editing code).
- The human gave 415 prompts (instructions to the AI).
- The AI spent 59.3 active hours working on the problem.
The paper emphasizes that this wasn't a "solved problem" where the AI did it all alone. Instead, it was a successful collaboration where the AI handled the tedious, repetitive work of checking and fixing, while the human provided the deep understanding and the final say on what was true. The result is a library that is safe, verified, and ready for the future.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.