png-filter-proofs

Verify PNG scanline filter roundtrip proofs using Lean 4.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/fmhall/lean-png --skill png-filter-proofs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: png-filter-proofs
Source: https://github.com/fmhall/lean-png/tree/main/.claude/skills/png-filter-proofs
Command: npx skills add https://github.com/fmhall/lean-png --skill png-filter-proofs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lean, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps verify PNG scanline filter/unfilter roundtrip theorems, ensuring the integrity of image encoding and decoding processes.

Core Features & Use Cases

  • Filter Proof Verification: Validate the accuracy of PNG filter roundtrip proofs for the five types defined in the PNG specification.
  • UInt8 Arithmetic: Ensure the proper operation of UInt8 modular arithmetic in the context of PNG filters.
  • Predictor Properties: Confirm the deterministic nature of the Paeth and Average predictors used in PNG filtering.
  • Use Case: When developing a PNG encoder/decoder, use this Skill to verify the correctness of the filter implementation and prevent potential bugs.

Quick Start

Use the png-filter-proofs skill to verify the roundtrip theorem for the Sub filter on a given image.

Frequently Asked Questions about png-filter-proofs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I formally verify PNG scanline filter and unfilter roundtrip operations?

You can formally verify PNG scanline filter and unfilter operations by executing Lean 4 formal proofs that validate filter roundtrip theorems for all five PNG filter types, ensuring encoding and decoding integrity.

How does formal proof verification work for PNG filter predictors like Paeth and Average?

Formal proof verification for PNG filter predictors works by using Lean 4 theorems to mathematically confirm the deterministic nature and arithmetic correctness of Paeth and Average predictors across filter operations.

Do I need Lean 4 to verify PNG image processing filter implementations?

Yes, you need Lean 4 installed to verify PNG image processing filter implementations, as this Skill requires the Lean 4 environment to execute the formal proofs for PNG filter roundtrip theorems.

What is the best way to validate UInt8 modular arithmetic in a PNG encoder or decoder?

The best way to validate UInt8 modular arithmetic in a PNG encoder or decoder is to use formal proof verification to ensure the proper operation of UInt8 arithmetic within the context of PNG scanline filtering.

Can I use formal proofs to prevent bugs in PNG encoding and decoding processes?

Yes, you can use formal proofs to prevent bugs in PNG encoding and decoding by verifying the correctness of filter implementations and ensuring the integrity of the image processing roundtrip operations.

What are the limitations of verifying PNG filter types using Lean 4 formal proofs?

Verifying PNG filter types using Lean 4 formal proofs is limited to validating mathematical properties of the five defined PNG filter types and does not test runtime performance or handle non-standard image extensions.