I know it's just a still frame from a demo, but I'm also slightly obsessive by nature, so - I'm starting to question what the Lean proof in this still frame actually verifies.
🐱 I looked at the original Zlib detect_data_type() and it has three decision paths:
• Block-listed byte found
→ BINARY (0).
• No block-listed byte, but allow-listed byte found
→ TEXT (1).
• Neither found (empty/gray-listed only)
→ BINARY (0).
Yet the Lean post condition crushes this into:
result ∈ {0,1}
...without distinguishing between the three conditions in the Zlib code. A valid proof may therefore provide less assurance than suggested - especially with Goodhart's Law teasing us to verify what is "easy" to verify - at the expense of testing what is hard to verify, but perhaps more valuable.
Given the vast scope of code bases that was mentioned in the video, one has to assume that the verification pipeline is highly mechanical and automated.
Establishing properties of execution, such as type consistency, memory permissions, state preservation, etc is clearly super valuable - but what about verifying the *developer's* intended functional requirements?
As memory safe languages like Rust become more popular, many of the classic memory bugs we've seen in legacy languages, are bound to reduce in number.
But what about AI generated functional specification of functional requirements? That seems to be where the wheel really hits the road.
🐭 There's another detail I'm curious about.
The LITERAL = 256 vs Lean 573 discrepancy.
Zlib's classification algorithm defines and operates on 256 possible byte values (LITERALS). But the Lean specification requires a frequency table of 573 entries.
That's not an error per se, but clearly a discrepancy between code and specification - either an intentional omission of information, or an unintentional one.
Is that discrepancy preserved somewhere? and developers reminded of it (how?) in order to avoid having the discrepancy potentially cause problems in the future?
I'm trying to get a sense of the process here - is the AI proving that the code does what it's supposed to do, or is the AI proving that the code satisfies a specification that the AI itself has generated?
Those are different things - are they not?
A formally correct proof of an incomplete specification could provide developers and managers with a misguided sense of software assurance.
Anyway, no one is going to read this, and it's not really relevant, since I don't have the full picture of what was tested and how. I *do* want to state that I'm excited to see what &Truth will become, and what (AI-assisted) formal verification will do for the software industry.
https://github.com/madler/zlib/blob/71747d1d39168833e0cae8ed84b8ce77cb049699/trees.c#L953