Repository navigation
Lean formalization and validation
TinyEXR now includes machine-checked Lean 4 models of the OpenEXR container and codec algorithms, with structural and codec differential validation against the C implementation.
- Structural parser/emitter inverses, sampled-channel sizes, tiled layouts and deep count-table properties.
- Complete successful PIZ block encoder/decoder round trip: bitmap framing, frequency heap and canonical Huffman construction, both wavelet modes, channel/lane traversal, LUT restoration, reordering and raw fallback.
- PXR24, B44/B44A, RLE, Adler-32 and ZIP wrapper proofs and differential coverage.
- CI gates for transitive axiom auditing, fixture freshness, malformed-input regressions and sanitizer validation.
- C fixes exposed by validation in PIZ decoding, deep edge tiles and DEFLATE handling.
The recorded validation passed 2,980 first-party theorem audits with no unexpected axioms, 8,192 codec comparisons and 126 structural-file comparisons. Local sanitizer checks passed with leak detection disabled because LSan aborts under ptrace; full LSan gates remain in CI.
The proofs establish properties of the Lean models. The C implementation is checked differentially against those models; this is not a proof of C execution semantics. The PIZ theorem requires valid geometry, matching source size, the C input-size cap and successful encoding. DEFLATE payload coding and B44 perceptual table derivation are outside the model. DWAA/DWAB remain intentionally unsupported.
Formalization and verification summary · Lean package documentation
Other changes
- Portable C11 Ptex tools: reader, writer, filtering and seam-aware sampling, with upstream differential tests.
- README now presents the pure-C11 library as the default, removes legacy v1 documentation and links the verification summary.
- Browser demos display their deployed commit hash.