kim-emkim-emCommunityยท17 Agent Skills Included

lean-zip

Formally verified DEFLATE compression and decompression in Lean

Compresses and decompresses data with zlib, gzip, and raw DEFLATE formats in pure Lean 4. Proves mathematically that decompression always restores the original data, eliminating silent corruption risks. Delivers faster compression than many Rust, JavaScript, and OCaml libraries while keeping every optimization machine-checked. Includes verified CRC-32 and Adler-32 checksums plus conformance tests against system zlib.
npx skills add kim-em/lean-zip --all -g -y
Available:

Instructs the agent on how to build, test, and safely optimize this verified compression library while keeping every correctness proof passing.

All Skills in This Repository (17)

Pure Emerald Level Indicators
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-array-list

Prove Lean 4 properties for ByteArray, Array, and List manipulation.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-content-preservation

Formalize byte-level content preservation proofs for Lean 4 byte array functions.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-roundtrip-proofs

Formalizes Lean 4 proofs for encode/decode roundtrip theorems and padding extraction.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-zstd-patterns

Implement Zstandard decompression patterns in Lean 4.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-monad-proofs

Guide Lean 4 proofs involving Option and Except monads with tactical advice.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-parsing-completeness

Prove parsing completeness theorems for Lean 4 parsers.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-fuel-induction

Guide Lean 4 fuel-based recursion proofs with loop invariants and termination.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-wf-recursion

Guide Lean 4 proofs for well-founded recursive functions with induction and termination measures.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

agent-pr-recovery

Diagnose merge conflicts and rebase stale branches for agent pull requests.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

lean-zstd-spec-pattern

Create formal Zstandard specifications in Lean with structured patterns.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

agent-worker-flow

Orchestrate claim-branch-verify-publish workflows for GitHub issues and pull requests.

Community
Advanced
๐Ÿ“ฆ In Repo
kim-emkim-em

proof-review-checklist

Automate Lean proof review with structured checklists and cleanup commands.

Community
Intermediate

Frequently Asked Questions

FAQPage Schema
How to install lean-zip?โ–ผ

Run `npx skills add kim-em/lean-zip --all -g -y` in your terminal to install all skills in this suite globally.

What is formally verified compression?โ–ผ

It means the Lean kernel mathematically proves that decompressing compressed data always returns the exact original input, for every possible input, not just tested samples.

How do I use lean-zip in a Lean project?โ–ผ

Add `require "kim-em" / "lean-zip"` to your lakefile.lean, then call Zip.Native.ZlibEncode.compress and ZlibDecode.decompress on your data.

Is lean-zip faster than Rust or C libraries?โ–ผ

Yes, at matched compression ratios it beats Rust's miniz_oxide and the C zlib reference at most levels, though hand-tuned SIMD libraries like libdeflate remain faster.

Does lean-zip need system C libraries?โ–ผ

No. The codec is pure Lean and builds without any system dependencies; only the optional conformance test suite requires system zlib.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’