lean-parsing-completeness

Generate proof patterns for parsing completeness in Lean code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill aids in proving parsing completeness theorems in Lean code, ensuring that parsing functions behave correctly for well-formed inputs.

Core Features & Use Cases

  • Parsing Completeness Theorems: Generates proofs that a parsing function returns .ok for well-formed input and handles spec-level success correctly.
  • Position Bounds & Eliminator Lemmas: Provides patterns and techniques for proving position bounds and creating eliminator lemmas for monadic parsing steps.
  • Use Case: When verifying a parser's correctness, use this Skill to prove that the parser behaves as expected for all valid inputs.

Quick Start

Run the lean-parsing-completeness skill with the Lean code that needs to be analyzed.

Frequently Asked Questions about lean-parsing-completeness

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

FAQPage Schema
How do I prove parsing completeness for a monadic parser in Lean?

Parsing completeness in Lean is proven by generating proof patterns that verify parsing functions return `.ok` for well-formed inputs, ensuring position bounds and eliminator lemmas are correctly established for monadic parsing steps.

What are eliminator lemmas in Lean parser verification?

Eliminator lemmas in Lean parser verification are proven patterns that break down monadic parsing steps, allowing you to establish position bounds and verify that parsing functions handle spec-level success correctly for well-formed inputs.

How do I verify position bounds when proving parser correctness in Lean?

To verify position bounds in Lean parser correctness, you apply generated proof patterns and techniques that ensure parsing functions track positions accurately and return `.ok` results for all well-formed inputs throughout the monadic parsing steps.

When do I need to prove parsing completeness theorems for Lean code?

You need to prove parsing completeness theorems when verifying a parser's correctness in Lean, specifically to ensure the parsing function behaves as expected and returns `.ok` for all valid, well-formed inputs.

Can I use proof patterns to verify that a Lean parsing function handles spec-level success correctly?

Yes, generated proof patterns verify that a Lean parsing function handles spec-level success correctly by proving the function returns `.ok` for well-formed input and by establishing eliminator lemmas for monadic parsing steps.