feat: prove the PNG round trip (IMG-PNG-2), and IMG-PNG-9 and IMG-PIX-1 with ancillary chunks - #69
Merged
ngngardner merged 7 commits intoSep 26, 2026
Conversation
enc.pour and enc.rgb.go write the blocks enc.feed writes, with the IDAT CRC run and Adler-32, and enc.nblk counts them; U32.div and U32.mod read as Nat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1bVZYFbhKkn2BKHKthcVP
State png_roundtrip over the 2^29 bound and png_walk_anc in LAWS.bend. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1bVZYFbhKkn2BKHKthcVP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1bVZYFbhKkn2BKHKthcVP
IMG-PNG-2 is reworded to rasters of fewer than 2^29 samples and proved: png_roundtrip covers the stored blocks of 65535 bytes that encode_png writes past one block, for colour type 6 (enc.pour) and colour type 2 (enc.rgb.go). png_walk_anc proves IMG-PNG-9 and the PNG side of IMG-PIX-1 for files with ancillary chunks, and with tRNS before PLTE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1bVZYFbhKkn2BKHKthcVP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1bVZYFbhKkn2BKHKthcVP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1bVZYFbhKkn2BKHKthcVP
…lace-setup-hlbfz7-wp11-png-finish # Conflicts: # LAWS.bend # PROOF.bend # SPEC.md # docs/rfc/ezimg-law-inventory.md
ngngardner
deleted the
claude/skills-marketplace-setup-hlbfz7-wp11-png-finish
branch
September 26, 2026 03:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This proves three rows:
png_roundtriptakes that bound as a U32a8equal to 8·h·w, and splits on the scanline byte count.png_roundtrip_onefrom feat: lift the PNG pixel stage to decode_png, and prove the one-block PNG round trip #64.spec.pngoverzlib.stored(65535, raw), with the right IDAT length and CRC:enc.seal.wideandenc.pour;enc.wide.rgbandenc.rgb.go.png_walk_ancextends the chunk walk to ancillary chunks after IHDR, between PLTE and tRNS, after tRNS, and after the IDAT run. It also covers the tRNS-before-PLTE order the decoder accepts for colour type 2. Every other order is refused by the decoder, so the law covers every filedecode_pngaccepts.src/changes. The one-block proof's tail moves intort.tailso the wide paths can reuse it.Checks
bend PROOF.bendprintsAll terms check.enc.pour;enc.rgb.go;enc.nblkoff by one;🤖 Generated with Claude Code
https://claude.ai/code/session_01A1bVZYFbhKkn2BKHKthcVP
Generated by Claude Code