The Gap Between “It Compiles” and “It’s Right”
Every AI coding agent I use now writes, tests, and merges code faster than I can read it, and I’ve noticed I stopped actually reading it. I skim the diff, I see green checkmarks, I approve. That’s not a confession of laziness — it’s what the workflow trains you to do. The agent writes the test, the agent writes the code that passes the test, and I’m left rubber-stamping a system that graded its own homework.
I keep coming back to a question: why does this feel fine when an AI does it for my API endpoints, but it would feel insane if a mathematician announced a new theorem was true because an AI said so and a unit test passed?
Why Math Gets to Trust It
Mathematicians actually do trust AI-generated proofs now — in April 2026, GPT-5.4 Pro produced a full solution to Erdős Problem #1196, a conjecture that had sat unsolved for almost 60 years, in about 80 minutes. Terence Tao and other mathematicians took it seriously enough to spend real effort auditing it, distilling its chaotic 55-page argument into something they could publish as a genuine “Proof from The Book.” That’s a real vote of confidence in AI reasoning at the frontier of a field.
But notice what made that trust earnable: the proof went through Lean. Lean is a formal proof assistant — it doesn’t accept “this looks right” or “the intuition checks out.” It requires every claim to be reduced to primitive logical steps and mechanically verified against the axioms. The AI could hallucinate, ramble, take a bizarre route through probability theory to solve a number theory problem — none of that mattered, because the output had to survive contact with a checker that has no capacity for being persuaded. Mathematics doesn’t trust the AI. It trusts the spec, and the AI’s job is to satisfy the spec.
That’s the part we’ve skipped in software.
“Tests Passed” Is Not “Formally Verified”
When we say an AI coding agent’s output “passed the tests,” we’re leaning on a much weaker guarantee than a Lean-checked proof, and we’re treating it as if it were the same thing. Tests are themselves generated code, often by the same model, often after the fact, often shaped to match whatever the model already produced rather than an independent statement of what the software was supposed to do. That’s not verification — it’s the agent grading its own exam using an answer key it also wrote.
There’s a name for the actual gap here: researchers like Shuvendu Lahiri at Microsoft call it the “intent gap” — the distance between the informal thing you asked for and the precise behavior the code actually implements. In the Codex-autocomplete era, this gap didn’t matter much because a human read every line before it shipped. Human review was the de facto formal check. Agentic coding removed that check, and — this is the part that unsettles me — didn’t replace it with anything nearly as rigorous. AI-generated code, as Lahiri puts it, is “plausible by construction, not correct by construction.” That’s true whether it’s a proof of a number theory conjecture or a rate limiter for your API.
What Intent Formalization Would Actually Look Like
The formal-methods answer to this is something like “intent formalization” — writing down, before generation, a checkable specification of what the code must satisfy: pre/post-conditions, invariants, properties that a verifier (not the model itself) can mechanically check. It’s a spectrum. On the light end, it’s just disambiguating the properties your prompt is vague about via test cases you actually trust. On the heavy end, it’s writing code in something like Dafny or Verus, where the compiler literally won’t accept code that doesn’t satisfy the stated contract — the software equivalent of Lean rejecting an invalid proof.
Notably, even the mathematicians haven’t fully solved this. The First Proof Challenge in February 2026 gave frontier models ten genuinely unpublished lemmas — no contamination possible — and the best public system solved six out of ten, with plenty of confident, wrong proofs along the way. The lesson wasn’t “AI can’t do novel math.” It was that autonomy without a spec to check against produces exactly the kind of plausible nonsense you’d expect, and that grading it without a formal checker required enormous human labor. That’s a preview of what unverified AI code review looks like at scale, except in software the stakes are usually invisible until production.
The Habit We Haven’t Built Yet
I don’t think the answer is “make every engineer learn Lean.” Most software isn’t provable in that sense, and most bugs aren’t from violated logical invariants — they’re from ambiguous intent nobody wrote down. But the mathematicians’ habit is worth stealing in miniature: write the spec before you generate the artifact, and make the spec something other than the model’s own say-so can check.
Right now most of us are doing the equivalent of asking an AI to prove a theorem and accepting it because the proof “sounded right.” Mathematics learned not to do that the hard way. I wonder how expensive our version of that lesson is going to be before we build the same discipline.
Sources
- Prompt-to-Paper: Agentic AI System for Bioinformatics — arXiv · AI
- A case study of evaluating AI agents on a neuroscience data-to-discovery pipeline — arXiv · AI
- Networked Intelligence: Active Shared Context Graphs for Human-AI Team Science — arXiv · AI
- CrowdMath: A Dataset of Crowdsourced Mathematical Research Discussions — arXiv · AI
- Evaluating SageMath-Augmented LLM Agents for Computational and Experimental Mathematics — arXiv · AI
- FormalScience: Scalable Human-in-the-Loop Autoformalisation of Science with Agentic Code Generation in Lean — arXiv · AI
- YUKTI: From Natural-Language Situations to Robust, Verifiable Decisions An Uncertainty-Typed Proposition IR, Assumption-Robust Pareto Frontiers, and a Regret Certificate — arXiv · AI
- Experiments in Agentic AI for Science — arXiv · AI
- Can Generalist Agents Automate Data Curation? — arXiv · AI
- Sound Agentic Science Requires Adversarial Experiments — arXiv · AI
- DreamProver: Evolving Transferable Lemma Libraries via a Wake-Sleep Theorem-Proving Agent — arXiv · AI
- OMEGA: Optimizing Machine Learning by Evaluating Generated Algorithms — arXiv · AI
- Nothing from Something: Can a Language Model Discover 0? — arXiv · AI
- Frontier LLM-based agents can overcome the ontology curation bottleneck for natural phenotypes — arXiv · AI
- Lean4Agent: Formal Modeling and Verification for Agent Workflow and Trajectory — arXiv · AI
- Pythagoras-Prover: Advancing Efficient Formal Proving via Augmented Lean Formalisation — arXiv · AI
- Don’t Gamble, GAMBLe: An Analytical Framework for AI-Driven Research Systems — arXiv · AI
- LABBench2: An Improved Benchmark for AI Systems Performing Biology Research — arXiv · AI
- Can AI Agents Synthesize Scientific Conclusions? — arXiv · AI
- PrologMCP: A Standardized Prolog Tool Interface for LLM Agents — arXiv · AI
- FirstResearch: Auditable Question Formation for LLM Scientific Discovery Agents — arXiv · AI
- First head-to-head comparison of agentic AI applied to the analysis of simulated data of the Einstein Telescope — arXiv · Astrophysics
- A vision foundation model for single-cell biology via spatial gene cartography — arXiv · Quantitative Biology
- Foundation-model-guided radiogenomic discovery linking cancer genomes to cancer scans — arXiv · Quantitative Biology
- TadA-Bench: A Million-Variant Benchmark for Future-Round Discovery Toward Agentic Protein Engineering — arXiv · Quantitative Biology
- TheBioCollection: Unified Pre-Training Scale LLM Corpus for Biology — arXiv · Quantitative Biology
- MechAInistic: An LLM-guided Multi-Agent System for Reasoning over Genome-Scale Constraint-Based Metabolic Models — arXiv · Quantitative Biology
- Auditing Retrieval-Augmented LLM Hypotheses for Longitudinal Cell Painting Morphology — arXiv · Quantitative Biology
- Auditing pretraining contamination in single-cell foundation model benchmarks — arXiv · Quantitative Biology
- Causal dictionary learning reveals and validates transcription-factor binding features in genomic language models — arXiv · Quantitative Biology
- Ontology-constrained multi-LLM scoring of hypothesis support in the predictive processing literature — arXiv · Quantitative Biology
- AI drug discovery leaders warn U.S. health funding cuts risk falling behind global rivals — Fortune
- Zuckerberg Trying to Simulate Human Biology at the Cellular Level — Futurism
- Amateur armed with ChatGPT solves an Erdős problem — Hacker News
- Large language models can predict the results of social science experiments — Nature News
- Towards the construction of a virtual yeast — Nature News
- ‘Virtual cells’ aim to turn raw data into predictive models of biology — Nature News
- ‘The job description is changing’: mathematician Terence Tao on the rise of AI — Nature News
- CRISPR gets a power boost from AI-designed ‘molecular scissors’ — Nature News
- How AI is reshaping discovery in maths and physics — Nature News
- AI systems devise hypotheses and ways to test them — Nature News
- Autonomous AI screening flags unreliable Lyme test results, boosting sensitivity to 95.7% — Phys.org
- AI sorts cell droplets into four shapes, uncovering drug effects in human cells — Phys.org
- AI framework could speed battery, combustion and materials research by automating simulations — Phys.org
- Why a tiny social media post has mathematicians rethinking AI — Phys.org
- Finding hidden catalytic knowledge from literature data — Phys.org
- Mathematicians unleash multifold speed boost for supercomputer simulations of molecules — Phys.org
- Physicists and AI model Claude ‘collaborate’ to prove a 10-year-old jamming conjecture — Phys.org
- AI identifies new particle models that may explain neutrinos’ tiny mass — Phys.org
- AI agent helps prepare synchrotron X-ray experimental measurements, paving the way for autonomous operation — Phys.org
- Researchers develop AI tool that finds the equations behind complex systems — Phys.org
- Toward experiment-guided AlphaFold: Researchers overcome AI tool’s single-conformation limitation — Phys.org
- To discover new physics, AI may need to ‘unlearn’ the old one — Phys.org
- Why AI rules in science matter now: Nature backs wider debate beyond mathematics — Phys.org
- AI reveals unexpected source of antibiotic candidates in prion proteins — Phys.org
- AI system translates protein sequences into text, helping reveal functions of unknown proteins — Phys.org
- AI-powered lab discovers brighter lead-free nanomaterials in 12 hours — Phys.org
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQHZECweVCpmxNM5AExrH9oE85c0ao2Ev73ncCRRFlIWVG09TdKaanVtspzx1HlKGCW5rHLdHE6ZuihF5SOIgaLK4bsTB8Sg8yt6WurLuFxU_WWgxkq-R9_n-iGCqnWbt6lTk5vOBumofuJmEsPtL8qYS9a75ywmsNWn0ZxXidnCp6sZNvQR98tqqI3vlXg7xnMYiWsa-2HtHAQShJLeMy6OYDiqGAwyfJz8xb0Bk8ryoGEVeUffBZWvVyDw6UpgO8s= — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFtkIQtzECA9V_tYWKxpWKsyPkxskHcaYjqrbyc_aB4JssX_j5-TZ5JoqfYjkYhIWquOhnJnq8UJ8OYwF02E1OSOKFxbneXrUidjnkqB-QGpElWBkjRydxDGeL5Falxm3UJl6ldmpIgyy1x7PYXt0ccxnxvlXA_z3gzA67PRVcL8zzgjvzRq4dXfi1AVPBdtKIBtUHAmpOAmCnP7n4vdOQYJ_lPTBjgQg== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQF3dnHl2NVAgbK_ofsm7JGLXvCAa8QMClwyyWaNuWU-UIQ8wnISOk1qptg7FKbgVigerkY5trwWAZYYWbs2IHo92ETzPErpf8WJbr2F2JupS4doh1-wXdEBJQ== — Gemini Deep Research
- The Uses of Argument in Mathematics — arXiv
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQHKlsihardrk6B-pMxuYATy0Qe5XLyWnEEFrFyn4iBGqhqR8tQxaxQJVcefwHn4q9Zja50GgXbvAkboAo2BCFbaD1gXBI2ym7yXBEhbSBkt9co7kyPnJ20Ycfq9YmIl61onhLMtOeYq2d78kPWTzmwq0F7o67I8jdRN_6Mq6_E_Qd1oqAHYzOzVW60Vz89jmQ== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQGCAyYTzEKorHauT3T8ZOPqWvhCt5S5SLiC8ISCq7V0acS98I7Sko_gBtlYbdqy_cn137sQacQITysB7bgBeJwRJzWPcV5C716J5SVaMgdCMjdBxaFWarSzmzamPvgPXuxsgr4bFGOqgnBZ48HsvT6R6xDcB1L415mQ42hyjK1MLrjhQ70dtC0= — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEbmj2gU4s7D1ECDv3EnxJ3EhgdUM-AZhdg2HY3Del9fr2cPhNQq2u_DsgFCtbJnqkGViZzVuK50UbqXkVXypFAgCloaTcRfN_2aSf7ganCh9ehUUcZ9ZMIPWzBZGLK_sautf7XhdAzAYD-pENn7ARiuckpb9JBs4OGyj5Wq_CnpvG3OmIzw5f8IuKY — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQGlva1PKQwuZnw4zLzD4dKG-xI_7tmn0SmXQTMx2J11JhIx4lDLpbDh8ebeyFRq-tVWQf0qPivelGiFHu1OuwUq1T5p13j6bM-fPylwmcMmXEnxyYkxD0oHSQ== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFc7aQbOL94e_uoqqV79_WaY-CxaE4RTxQb5tp9ebBU35yFCcIZUXdUhK7OxWl6y9rEkZh1gtFHziYrFUrpUMh5wHiN-scHXilfDkp7x9laSThuOi7Lwvl1BPTLnE33jtKt6Sin2bTj — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEUx_9bkNZRiL4RnXRQrbzeVOppfuCgYicNSd2wDbXFzUtAZq10YLFMXp63B9CfFeBtKcRtA5-lIcDtrAxVzjNQxkf_quJvfG83HIwxzN_sKMhfkk4kCyB22O_Z5G7SJVDddv9ONf7i_0nYVxF07L9921p1gAXxYiyejCH4_CStn9imlpi3 — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEwbI7Wjj0HNywC4dTUYlZjNGAYu-WzqddXQFiigsYtbdQg6bronnkJ8r_XzZfcvSdaBmmF3n1ydc_J4uPW77HO5A1-fz8aGVrGUxfdZJn5HdjnIa876pvY05lcrqZ-qzwYJI7725nBrkPR1oSowDf_VCrMBYYmAR1EdSCNIg== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQHpEVCdwS9EFaUV2d-IO1OaQGvh0HQg-cwvvp1MVvIcaABk2SMpcNGhMcd3S5hZiT9Y_sgQAQjaAX8o4YR_KNF7LtR9wBHd-PIOgiufDPMCrtgbvOJ2xitxQF8LrEUvhdsnQMDb9JEMFabBfZIJkY8oskTllYhbyaZZk46ZynZl2oOfqPWnJYmFCCSv9CpBNUR9mb3qPlV7RqkWn4sfQI6oaxk= — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQGjKgfVGMK4rOZgNuxHFd6YhQ6TLYi_KWt_E6rTi1Ws1HkJEPsg8HGtZ3ZtIxG15wJCNZ48qunADqv5ZR9ofYWUNUaGnr6dIafaFVkE1beAs7waC6nwDdaEk6gm_LiREtp_wPZJE0Q4KiRMQ9ZSMGVq — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEuci8mChL9ipnI9iWdP4m_Xsp6tR5ddVZcCC7CCsZctIRaJR4vSnm83VQT9CAH56uOEcEweVr4EymGlVyZ-AfZvUCM6JPFfE_hJe_JjvNMwRhFd7W5wTUc3wVDvVfDfzQecUpicjNzVEF3jX5iU4eVP4wPzWf0NTnx7kMnbXDR64lDo0yWTj-zDBpkLvRYbcOcE3hfE66PKOWm99_j11JOaRqOBQlNzt1RR3Tud3R4ktXhjOQs7jXNomKl0a5JYnPQYfg= — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEkiPkH5gGL4gWsZOPMoYBj8keZgViVBUN9IBvawwpz3vLrzAZX67nTN4VygVZzyatMG-pUfKuRTZekk8qrj9dCvu8GXg7Qw33Uu1QpvsTBbWtiMRsLLmHcOw== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQH3-4hnFh89c9PUse6X20YOjyd1cgpNg-9Dbrcl4_kZReyY4CypxWtq5Si9o_9KoMgtWIG7LOQpu_ztuRG-vrfcVQvsLNgmMvGmXg7Zy_fyZo5L0Xc-rjPlli-RuHHwjpCHDynmvsVDJNZHXMA_5qca1_ReF9Mn2SpraAhIy1lDonVOa58jBIA0WY4G9rpW7o8bprk4YloPhyz-Bq8TY4w2P9jvjeSLi7bCv6Y4vzNzJ95hxnyvMRnRKQqRKQ== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFDAIljNWEfhy0tATADjiIDBBkhHLRGh5cf2Pe49xpKAketPSHtHCmhjAOvKjeGCFE6x7UGEfemNOXI-BRaVVVvrT4tndNB1tl6EnRGVBl2bzm0z54XP5fm37bvFmuIVgupckrssCVZri9TPuPBNKCB_stx6gyr8OhI8Ej4kbRa83tPKNYfTG4cirnm2t0MDyIe-HWUOF4fk6k= — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFbThKLHFbxqExnkzgHgF8H8tyYJa8loIUfVU49-_sKrDjgUYnZPSyrLMfGBPF5S4wGTUz1S1gHgXWE5Y7AatqS_iYE-pPtLVGCp8FudVOPMCmwrf15FrfR6k8AUq9-Mdgd — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQHeOLDEA0ZHEjlKEjr6As30lL8nRDRKzSnSaVmWEAGOE1xnfkN88RNTu-r55bYMVVoWGYKwnvwDQgikDn-U6ADiZpehDGHc7WeZfHXIAYC_20lN0newKzfOSAb13x89hFutqGfw3qYl5GJISCvh2YZY_6ZzwayGYfskiQ== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQE6GhJ5iu5Q6wcIrf9KdhFS5Y_lf02wC3PmhFcQ0sL7TO4jK1pKJngVpLo7yadSeE7DRxDQAIQg7bFDoUJEkv6_AMnNuTVi2QLV4F91Z3heJY7e5G2wz6-mbg== — Gemini Deep Research
- https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQHdD5d9HZi6-fiVEsqOcagULcDfi8A2eerVhSkdE8ZQUk7c-VC9fMWCvDI-gUfIPIV_DPwixIW_7OJKnTfnDOKR21bNOr_CxFKngJCwRV3jHfHExfc9uIMMC40CTZxbHp4acCKfUF3xn_0eMmbMXOGOmqX–moPEU74L2dC0dJV42okROCZgIxpD0k69HJdl1x-LztF0oVJUFGxIkZmEbRnKvOEMPvFdswhxdsrZQ== — Gemini Deep Research
- AI Cracks the Secrets of How the Universe’s Heaviest Elements Are Forged — SciTechDaily
