Skip to content
PluginImportedContains scriptsShare-alike license

writing-lean-proofs

Structured Lean 4 proof writing and library design following Mathlib conventions

Imported description, not reviewed yet

This item came from its original repository and was only scanned automatically; no editor has written an Arabic description for it yet. Read its content yourself before you rely on it. This page is not indexed by search engines until it is reviewed.

Download

Read this before you download

Talqeen never runs anything from this item. But what you download runs on your machine if you run it or let Claude Code run it, so read the files first.

  • The item has script files.

Files: 33 · Size: 169 KB

Download the ZIP

The file carries the license of the original source.

Install

Plugins are installed from a plugin marketplace in Claude Code, not by copying files. Download the package to read its content and its license.

Instructions

writing-lean-proofs

Structured Lean 4 proof writing and library design following Mathlib conventions — for proofs and libraries that humans and LLMs can review, repair, and extend.

What it does

Guides Claude (and Codex, via marketplace compatibility) through a design-top-down, prove-bottom-up workflow:

  1. Design definitions and their API first — total functions with junk values, bundled morphisms/subobjects, simp-normal forms, API lemmas in the same file before first use.
  2. Build a sorry skeleton — state the theorem and its lemmas as compiling sorry stubs (spec-driven development, as practiced by the Liquid Tensor Experiment, PFR, and FLT projects), then the have/suffices/calc skeleton inside each proof.
  3. Fill goals one at a time — focusing dots, honest show lines, calc chains, simp discipline.
  4. Verify mechanically — compile and lint; never eyeball-check style.

Plus: the extraction ladder (when a have graduates to a lemma), Mathlib naming so lemma names are guessable, an anti-pattern catalog mapped to the linters that catch each one, and evidence-based techniques specific to LLM-written proofs (goal-state annotation, typed-have skeletons, verification in the loop).

Why these rules

Every principle is sourced from Mathlib's style/review/naming guides, the Mathlib maintenance papers, retrospectives of large formalizations (perfectoid spaces, LTE, PFR, FLT), Mathematics in Lean, Theorem Proving in Lean 4, and the ImProver paper (ICLR 2025) for LLM-specific techniques. The claims were verified against the primary sources; commonly overstated rules (e.g. turning Mathlib's general one-tactic-per-line recommendation into an absolute requirement) are qualified in the anti-patterns reference.

Contents

All paths below are relative to skills/writing-lean-proofs/:

  • SKILL.md — workflow, extraction ladder, quick-reference rules
  • references/library-design.md — definitions, APIs, abstraction boundaries, project decomposition
  • references/proof-style.md — tactic proof structure
  • references/naming-conventions.md — Mathlib naming
  • references/anti-patterns.md — anti-patterns → rationale → enforcing linter
  • references/llm-techniques.md — LLM-specific drafting techniques
  • references/linting.md — axiom audits, library versus self-contained CI linter profiles, and project-specific linters
  • references/performance.md — proof and reduction-cost diagnosis
  • references/tactics.md — safe, bounded, traceable tactic metaprogramming

Evals

evals/ contains a review-flow eval suite: Lean fixtures (derived from a real formal-verification project) with known planted flaws and known non-flaws, natural review prompts, per-case rubrics, and a runner that compares a baseline arm against a skill arm using an LLM judge. See evals/README.md. evals/run.sh --self-test checks offline grader-schema and isolation fixtures; --self-test-live checks the real grader against known-bad and known-good reviews and makes paid model calls.

When not to use

Lean-as-programming-language work without proofs, other proof assistants (Coq/Isabelle/Agda), Lean 3 codebases, or projects with a conflicting house style (defer to their CONTRIBUTING).

Files

  • folder.claude-plugin297 B
    • plugin.json297 B
  • folderevals55 KBscript
    • foldercases21 KB
      • folder01-definitions-review4.7 KB
        • folderinput1.6 KB
          • Felt.lean1.6 KB
        • prompt.md39 B
        • rubric.md3 KB
      • folder02-missing-api4.4 KB
        • folderinput2.3 KB
          • Bounds.lean2.3 KB
        • prompt.md54 B
        • rubric.md2 KB
      • folder03-normal-form4.1 KB
        • folderinput2.2 KB
          • WordCmp.lean2.2 KB
        • prompt.md42 B
        • rubric.md1.9 KB
      • folder04-structural3.7 KB
        • folderinput1.2 KB
          • U32Pairs.lean1.2 KB
        • prompt.md56 B
        • rubric.md2.5 KB
      • folder05-clean-restraint4.4 KB
        • folderinput1.8 KB
          • Carry.lean1.8 KB
        • prompt.md53 B
        • rubric.md2.5 KB
    • folderselftest2.9 KB
      • bad-review.md780 B
      • good-review.md2.1 KB
    • .gitignore9 B
    • README.md7.9 KB
    • grade-prompt.md1.5 KB
    • run.sh22 KBscript
  • folderskills89 KB
    • folderwriting-lean-proofs89 KB
      • folderreferences74 KB
        • anti-patterns.md6.9 KB
        • library-design.md7.7 KB
        • linting.md22 KB
        • llm-techniques.md5.4 KB
        • naming-conventions.md2.5 KB
        • performance.md5.3 KB
        • proof-style.md7.8 KB
        • tactics.md16 KB
      • SKILL.md16 KB
  • foldertests1 KBscript
    • self-test.bats1 KBscript
  • LICENSE20 KB
  • README.md3.2 KB

What the automatic scan found

We scanned the files automatically when they were imported. This is what the scan pointed at. It does not mean the item is harmful, and it does not mean it is safe: read it yourself.

  • Needs a lookA script file

    In file plugins/writing-lean-proofs/evals/run.sh

  • Needs a lookDeletes files forcibly and recursively

    In file plugins/writing-lean-proofs/evals/run.sh, line 202

Comments (0)

No comments yet. Be the first.

Sign in to comment. Commenting comes at level 1 (Member).

Report

Similar items

  • PluginImported

    brand-landingpage

    Guides developers from brand discovery through iterative design to deployment-ready HTML via Stitch.

    MITFiles: 7

  • PluginImported

    skill-forge-essentials

    Three behavioral skills addressing AI-specific failure patterns: hidden code debt from agent generation, context compaction amnesia, and imprecise Design Mode edits

    MITFiles: 5

  • PluginImportedContains scriptsContains hooks

    theme-examples

    An example plugin to read, copy and change: twenty animated backdrops behind the chat in the desktop app, with frosted-glass panels: one per project or per session. /custom-theme list names them. Fireworks go off over the theme when Claude

    Apache-2.0Files: 23

  • MCP serverImported

    06ketan/slideshot

    Convert HTML into PDF, PNG, WebP or PPTX slide carousels with themes for LinkedIn, Instagram, pitch decks and infographics, rendered via Puppeteer.

    MIT

  • MCP serverImported

    1000ri-jp/atsurae

    Video editing: timeline editing, five-layer compositing, semantic operations and FFmpeg rendering to 1080p H.264.

    MIT

  • SubagentImported

    3d-artist

    3D art and asset creation specialist for game development. Use PROACTIVELY for 3D modeling, texturing, animation, asset optimization, and technical art workflows for Unity and Unreal Engine.

    MITFiles: 1