diff --git a/Png/Proofs.lean b/Png/Proofs.lean new file mode 100644 index 0000000..569a369 --- /dev/null +++ b/Png/Proofs.lean @@ -0,0 +1,2 @@ +import Png.Proofs.RoundTrip +import Png.Proofs.Verify diff --git a/Proofs/RoundTrip.lean b/Png/Proofs/RoundTrip.lean similarity index 100% rename from Proofs/RoundTrip.lean rename to Png/Proofs/RoundTrip.lean diff --git a/Proofs/Verify.lean b/Png/Proofs/Verify.lean similarity index 92% rename from Proofs/Verify.lean rename to Png/Proofs/Verify.lean index fe6388e..9b45f93 100644 --- a/Proofs/Verify.lean +++ b/Png/Proofs/Verify.lean @@ -6,6 +6,6 @@ the verified bar. -/ -import Proofs.RoundTrip +import Png.Proofs.RoundTrip #print axioms Png.Proofs.parse_print diff --git a/Proofs.lean b/Proofs.lean deleted file mode 100644 index b877d25..0000000 --- a/Proofs.lean +++ /dev/null @@ -1,2 +0,0 @@ -import Proofs.RoundTrip -import Proofs.Verify diff --git a/README.md b/README.md index 25a3027..ff496a1 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ A PNG chunk parser and printer in Lean. It reads the chunk layer of a PNG file: the signature, then each chunk's length, type, data, and CRC-32 check. It does not decode pixels, and it does not inflate IDAT data. The main claim is proved: parsing what the printer wrote returns the same chunk list. The tests run the parser against real PNG files built with Python's zlib and against a strict oracle written from the rules; see `tests/TEST-RESULTS.md` for the counts. -Status: in progress. The specification has not yet been approved by a reviewer apart from its author, and no statement file (`Spec.lean`) has been added by a reviewer, so this is not verified. +Status: in progress. The specification has not yet been approved by a reviewer apart from its author, and no statement file (`Png/Spec.lean`) has been added by a reviewer, so this is not verified. ## What is proved -The definitions are in `Png/Value.lean` (the chunk type, the printer, and the well-formedness rules), `Png/Parse.lean` (the parser), and `Png/Crc32.lean` (the CRC-32). The proofs are in `Proofs/RoundTrip.lean`. +The definitions are in `Png/Value.lean` (the chunk type, the printer, and the well-formedness rules), `Png/Parse.lean` (the parser), and `Png/Crc32.lean` (the CRC-32). The proofs are in `Png/Proofs/RoundTrip.lean`. | Claim | Theorem | |-------|---------| @@ -52,7 +52,7 @@ Needs Linux, elan, and Python 3.11 or later. ``` lake build -grep -rn "sorry" --include="*.lean" Png Proofs Main.lean Png.lean Proofs.lean +grep -rn "sorry" --include="*.lean" Png Main.lean Png.lean python3 tests/run_tests.py ``` diff --git a/lakefile.toml b/lakefile.toml index a91e752..b9dc45b 100644 --- a/lakefile.toml +++ b/lakefile.toml @@ -1,13 +1,14 @@ name = "png" version = "0.1.0" license = "Apache-2.0" -defaultTargets = ["Png", "Proofs", "png"] +defaultTargets = ["Png", "PngProofs", "png"] [[lean_lib]] name = "Png" [[lean_lib]] -name = "Proofs" +name = "PngProofs" +roots = ["Png.Proofs"] [[lean_exe]] name = "png" diff --git a/tests/TEST-RESULTS.md b/tests/TEST-RESULTS.md index f9ac030..bf88b52 100644 --- a/tests/TEST-RESULTS.md +++ b/tests/TEST-RESULTS.md @@ -21,7 +21,7 @@ Written by `tests/run_tests.py`. Rerun it to check these numbers. ## Axiom check -Recorded on 2026-10-26 against the head of this pull request, on Lean 4.35.0. The line below is the output printed for `Proofs/Verify.lean` during a clean `lake build` (17 jobs). +Recorded on 2026-10-26 against the head of this pull request, on Lean 4.35.0. The line below is the output printed for `Png/Proofs/Verify.lean` during a clean `lake build` (17 jobs). ```text 'Png.Proofs.parse_print' depends on axioms: [propext, Quot.sound]