lean-fuel-induction

Automate fuel independence proof verification for Lean 4 recursive functions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines and enhances Lean 4 proofs, addressing complex proof patterns like fuel independence, loop invariants, and stateful operations.

Core Features & Use Cases

  • Fuel Independence Proofs: Automates the verification of recursive functions that do not depend on their input size.
  • Loop Invariant Proofs: Provides patterns and lemmas for proving loop invariants in recursive functions.
  • Stateful Operations: Assists in proving invariants for stateful types like BitReader.
  • Use Case: A developer can use this Skill to automatically check the fuel independence of their Lean 4 recursive functions, ensuring they are correct regardless of input size.

Quick Start

Use the lean-fuel-induction skill to analyze a Lean 4 proof for fuel independence.

Frequently Asked Questions about lean-fuel-induction

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

FAQPage Schema
How do I prove fuel independence for Lean 4 recursive functions?

Fuel independence for Lean 4 recursive functions is proven by verifying that execution does not depend on input size. This Skill automates that verification process to ensure correctness regardless of input scale.

What is the best way to prove loop invariants in Lean 4?

Proving loop invariants in Lean 4 requires establishing patterns and lemmas for recursive functions. This Skill provides automated patterns to verify these invariants, streamlining the proof process for recursive operations.

Can I verify stateful operations like BitReader in Lean 4?

Yes, you can verify stateful operations like BitReader in Lean 4. This Skill assists in proving invariants for stateful types, ensuring state transitions within recursive functions maintain correctness.

Do I need to understand well-founded recursion to use lean-fuel-induction?

Yes, understanding well-founded recursion is a prerequisite. This Skill requires existing Lean 4 proof capabilities and knowledge of well-founded recursion to effectively automate proof verification for complex recursive operations.

Why does my Lean 4 recursive proof fail on larger inputs?

Lean 4 recursive proofs often fail on larger inputs due to missing fuel independence. This Skill analyzes your proof to verify fuel independence, ensuring the recursive function terminates and remains correct independent of input size.

Lean 4 proof automation vs manual invariant proofs, which approach handles complex stateful operations better?

Automated proof verification handles complex stateful operations better by systematically checking fuel independence and loop invariants. This approach reduces manual effort and ensures proof correctness across varying input scales compared to manual lemma construction.