lean-content-preservation

Community

Prove byte-level function correctness

Authorkim-em
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides structured patterns and lemmas for rigorously proving that functions operating on byte arrays (like compression or decompression algorithms) correctly preserve existing data and accurately produce new data.

Core Features & Use Cases

  • Prefix Preservation Proofs: Demonstrate that a function does not alter the initial bytes of an input buffer.
  • Content Characterization: Prove what new bytes a function generates, whether as raw slices, repeated values (RLE), or element-wise mappings.
  • Compositional Proofs: Combine proofs for sequential operations, handling complex workflows like multi-block decompression.
  • Use Case: When developing a new compression algorithm in Lean 4, use these patterns to formally verify that your decompression function correctly reconstructs the original data without corruption.

Quick Start

Use the lean-content-preservation skill to prove that the copyBytes function preserves the prefix of the destination byte array.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: lean-content-preservation
Download link: https://github.com/kim-em/lean-zip/archive/main.zip#lean-content-preservation

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.