Lean4 proof that SSOT requires definition-time hooks and introspection
I formalized the Single Source of Truth (SSOT) principle in Lean 4 (~2.1k LOC, zero sorry) and proved two core results: Structural SSOT is achievable only when a language provides definition-time hooks and runtime introspection. Macros/codegen (before definition) and reflection (after definition) are insufficient. These requirements are derived, not chosen: because structural facts are fixed at definition, derivation must occur at definition time and be introspectable to verify DOF = 1. Would appreciate review, critique, or independent checking of the Lean scripts.
Lean4 proof that SSOT requires definition-time hooks and introspection launched on January 8, 2026 with 10 votes, #1,059 of 14,584 launches that month and more than 90% of that year's launches.
In plain words
This Lean 4 formalization demonstrates that achieving Single Source of Truth for structural data requires programming language support for definition-time hooks and runtime introspection. The work proves macros and reflection alone are insufficient, using approximately 2,100 lines of code with no incomplete proofs. It is designed for language designers, formal methods researchers, and developers interested in how software architecture principles can be mathematically verified. The key contribution is deriving these requirements from first principles rather than assuming them.
written from the facts on this page · September 2026
From the sources
Any system encoding facts faces a fundamental constraint: when multiple independent locations encode the same fact, truth becomes indeterminate. We prove that DOF = 1 (Single Source of Truth) is the unique representation guaranteeing coherence, the impossibility of disagreement among encodings. The Core Theorem (Oracle Arbitrariness). In any incoherent encoding system (DOF > 1 with divergent value
You are using an outdated browser. Please upgrade your browser to improve your experience. Zenodo is currently experiencing slowness and intermittent outages due to heavy automated traffic from bots and AI crawlers. We are aware of the problem, and our team is focused on stabilizing the service. Thank you for your patience. Any system encoding facts faces a fundamental constraint: when multiple independent locations encode the same fact, truth becomes indeterminate. We prove that DOF = 1 (Single Source of Truth) is the unique representation guaranteeing coherence, the impossibility of disagreement among encodings. The Core Theorem (Oracle Arbitrariness). In any incoherent encoding system…from zenodo.org
Does a similar job
all alternatives →
Formally verified 3D CSG: Trust 93 lines spec, not 1000 lines AI codeJul 2026 · github.com · ▲115To my knowledge, this is the first formally verified implementation of a 3D constructive solid geometry (CSG) operation: mesh intersection, implemented in Lean 4 and verified against a concise specification that pins down the surface of the resulting mesh exactly and guarantees practical well-formedness conditions on the triangulation. This project is also an experiment in avoiding having to trust AI-generated code. A human reviewer only needs to read 93 lines of formal specification and run the Lean checker to certify the correctness of the kernel, skipping the intricate 1000+ lines of…
Formalizing Principia Mathematica using Lean2025 · github.com · ▲188This project aims to formalize the first volume of Prof. Bertrand Russell’s Principia Mathematica using the Lean theorem prover. Throughout the formalization, I tried to rigorously follow Prof. Russell’s proof, with no or little added statements from my side, which were only necessary for the formalization but not the logical argument. Should you notice any inaccuracy (even if it does not necessarily falsify the proof), please let me know as I would like to proceed with the same spirit of rigour. Before starting this project, I had already found Prof. Elkind’s formalization of the Principia…
Formal Verification for Machine Learning Models Using Lean 42025 · github.com · ▲52Framework for specifying and proving properties—such as robustness, fairness, and interpretability—of machine learning models using Lean 4. - fraware/leanverifier
Talos – Open-source WASM interpreter for LeanJun 2026 · github.com · ▲106At Cajal (YC W26) we’re excited to share Talos (https://github.com/cajal-technologies/talos), an open source framework for formal verification of WebAssembly modules in Lean. AI is now writing tons of the code that gets pushed to production. As code generation gets cheaper, verification becomes the bottleneck. We believe in a future where every piece of software comes with a mathematical proof that it does what its author intended - in doing so, eliminating many classes of exploits. Talos is part of the foundation for that. Talos provides a Wasm interpreter optimized for…
“Statements and State”, the next chapter of my book on interpreters2017 · craftinginterpreters.com · ▲141
Remult – a CRUD framework for full-stack TypeScript2022 · github.com · ▲130Full-stack CRUD, simplified, with SSOT TypeScript entities - remult/remult
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 3d ago · permit.petercai.com
- IV
Life & fun · 15d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 16d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 10d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 14d ago · carrierexplode.com

Life & fun · 24d ago · space.bl2.net
Source: Show HN post ↗
Launched alongside, January 2026
the whole month →- IN
Hey HN! I wanted to share something I built over the last few weeks: isometric.nyc is a massive isometric pixel art map of NYC, built with nano banana and coding agents. I didn't write a single line of code. Of course no-code doesn't mean no-engineering. This project took a lot more manual labor than I'd hoped! I wrote a deep dive on the workflow and some thoughts about the future of AI coding and creativity: http://cannoneyed.com/projects/isometric-nyc
AI · Jan 2026 · cannoneyed.com




Automatic AI-powered code reviews the moment you open a PR
Dev tools · Jan 2026 · kilo.ai
