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.
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
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…
- FPFormalizing Principia Mathematica using Lean2025 · github.com · ▲188
This 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…
- FVFormal Verification for Machine Learning Models Using Lean 42025 · github.com · ▲52
- TOTalos – Open-source WASM interpreter for LeanJun 2026 · github.com · ▲106
At 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…
- CACrust – A CLI framework for TypeScript and BunMar 2026 · github.com · ▲95
We've been building Crust (https://crustjs.com/), a TypeScript-first, Bun-native CLI framework with zero dependencies. It's been powering our core product internally for a while, and we're now open-sourcing it. The problem we kept running into: existing CLI frameworks in the JS ecosystem are either minimal arg parsers where you wire everything yourself, or heavyweight frameworks with large dependency trees and Node-era assumptions. We wanted something in between. What Crust does differently: - Full type inference from definitions — args and flags are inferred automatically. No…
- URUnbug – Rust macros for programmatically invoking breakpoints2024 · github.com · ▲96
This project is inspired by some of the asserts in Unreal engine. Due to reliance on core_intrinsics it is necessary to develop using nightly Rust, but there are stubs in place so a production build will not require nightly. I recently released version 0.2 which includes no_std support and adds optional log message arguments to the ensure macro.
More life & fun this month
the category →- TL
Life & fun · 11d ago · louisabraham.github.io



Photosynthesis fires two of your iPhone
Life & fun · 29d ago · photosynthesis.camera
- CCCreatium Coach▲320
Your multimedia mentor that takes you from mid to great
Life & fun · 11d ago · producthunt.creatium.info
SoloUno▲310Take control of hair pulling, nail biting & skin picking
Life & fun · 29d ago · solouno.io
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
