تخطَّ إلى المحتوى
إضافةمستورديحتوي سكربتاتترخيص مشاركة بالمثل

writing-lean-proofs

Structured Lean 4 proof writing and library design following Mathlib conventions

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

اقرأ هذا قبل أن تنزّل

لا يشغّل تلقين أي شيء من هذا العنصر. لكن ما تنزّله يعمل على جهازك إن شغّلته أنت أو سمحت لكلود كود بتشغيله، فاقرأ الملفات أولاً.

  • في العنصر ملفات سكربت.

الملفات: 33 · الحجم: 169 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

تُثبَّت الإضافات من سوق الإضافات في كلود كود، لا بنسخ الملفات. نزّل الحزمة لتقرأ محتواها وترخيصها.

التعليمات

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).

الملفات

  • مجلد.claude-plugin297 بايت
    • plugin.json297 بايت
  • مجلدevals55 ك.بسكربت
    • مجلدcases21 ك.ب
      • مجلد01-definitions-review4.7 ك.ب
        • مجلدinput1.6 ك.ب
          • Felt.lean1.6 ك.ب
        • prompt.md39 بايت
        • rubric.md3 ك.ب
      • مجلد02-missing-api4.4 ك.ب
        • مجلدinput2.3 ك.ب
          • Bounds.lean2.3 ك.ب
        • prompt.md54 بايت
        • rubric.md2 ك.ب
      • مجلد03-normal-form4.1 ك.ب
        • مجلدinput2.2 ك.ب
          • WordCmp.lean2.2 ك.ب
        • prompt.md42 بايت
        • rubric.md1.9 ك.ب
      • مجلد04-structural3.7 ك.ب
        • مجلدinput1.2 ك.ب
          • U32Pairs.lean1.2 ك.ب
        • prompt.md56 بايت
        • rubric.md2.5 ك.ب
      • مجلد05-clean-restraint4.4 ك.ب
        • مجلدinput1.8 ك.ب
          • Carry.lean1.8 ك.ب
        • prompt.md53 بايت
        • rubric.md2.5 ك.ب
    • مجلدselftest2.9 ك.ب
      • bad-review.md780 بايت
      • good-review.md2.1 ك.ب
    • .gitignore9 بايت
    • README.md7.9 ك.ب
    • grade-prompt.md1.5 ك.ب
    • run.sh22 ك.بسكربت
  • مجلدskills89 ك.ب
    • مجلدwriting-lean-proofs89 ك.ب
      • مجلدreferences74 ك.ب
        • anti-patterns.md6.9 ك.ب
        • library-design.md7.7 ك.ب
        • linting.md22 ك.ب
        • llm-techniques.md5.4 ك.ب
        • naming-conventions.md2.5 ك.ب
        • performance.md5.3 ك.ب
        • proof-style.md7.8 ك.ب
        • tactics.md16 ك.ب
      • SKILL.md16 ك.ب
  • مجلدtests1 ك.بسكربت
    • self-test.bats1 ك.بسكربت
  • LICENSE20 ك.ب
  • README.md3.2 ك.ب

ما وجده الفحص الآلي

فحصنا الملفات آلياً وقت الاستيراد. هذا ما نبّه إليه الفحص، ولا يعني أن العنصر ضار ولا أنه سليم: اقرأه بنفسك.

  • يحتاج مراجعةملف سكربت

    في الملف plugins/writing-lean-proofs/evals/run.sh

  • يحتاج مراجعةيحذف ملفات بالقوة وبالتكرار

    في الملف plugins/writing-lean-proofs/evals/run.sh، السطر 202

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • إضافةمستورد

    brand-landingpage

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

    MITالملفات: 7

  • إضافةمستورد

    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

    MITالملفات: 5

  • إضافةمستورديحتوي سكربتاتيحتوي خطّافات

    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.0الملفات: 23

  • خادم MCPمستورد

    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مستورد

    1000ri-jp/atsurae

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

    MIT

  • وكيل فرعيمستورد

    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.

    MITالملفات: 1