Agent skill

Lemma Discovery Assistant

by ArabelaTso in ArabelaTso/Skills-4-SE

Analyze failed or stuck proofs and propose auxiliary lemmas to help complete the proof in Isabelle/HOL or Coq.

Apache-2.0Auto-check passed

Install Lemma Discovery Assistant

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill lemma-discovery-assistant -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE lemma-discovery-assistant --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lemma-discovery-assistant .claude/skills/lemma-discovery-assistant && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lemma-discovery-assistant
GitHub stars
253
Token cost
~2.7k tokens
SKILL.md length
843 words
Files
4 (incl. references)
Skills in repo
170
Repo updated
First seen
Licence
Apache-2.0

At a glance

Analyze failed or stuck proofs and propose auxiliary lemmas to help complete the proof in Isabelle/HOL or Coq.

  • Works in 5 steps: Analyze Proof State → Identify the Gap → Propose Lemma Statement → …
  • Encountering proof failures
  • SKILL.md covers Overview, When Proofs Get Stuck, Lemma Discovery Process and Lemma Patterns by Proof Type, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Lemma Discovery Assistant is an agent skill from ArabelaTso/Skills-4-SE. Analyze failed or stuck proofs and propose auxiliary lemmas to help complete the proof in Isabelle/HOL or Coq. Use when encountering proof failures, stuck proof states, unprovable subgoals, or when needing to strengthen induction hypotheses. Identifies missing lemmas, suggests proof strategies, and generates helper lemmas with appropriate statements and proof sketches. Supports inductive proofs, case analysis, rewriting, and complex proof obligations.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/coq_lemmas.md`, `references/isabelle_lemmas.md` and `references/proof_patterns.md`).

The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Encountering proof failures
  • Stuck proof states
  • Unprovable subgoals
  • Needing to strengthen induction hypotheses

Example prompts

  • “/lemma-discovery-assistant”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Analyze Proof State
  2. Identify the Gap
  3. Propose Lemma Statement
  4. Suggest Proof Strategy
  5. Explain Usage

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are isabelle and coq).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Lemma Discovery Assistant loads about 2.7k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 120 tokens; SKILL.md has 843 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 843 words, ~2,731 tokens.

Download SKILL.mdSave it as .claude/skills/lemma-discovery-assistant/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
lemma-discovery-assistant
description
Analyze failed or stuck proofs and propose auxiliary lemmas to help complete the proof in Isabelle/HOL or Coq. Use when encountering proof failures, stuck proof states, unprovable subgoals, or when needing to strengthen induction hypotheses. Identifies missing lemmas, suggests proof strategies, and generates helper lemmas with appropriate statements and proof sketches. Supports inductive proofs, case analysis, rewriting, and complex proof obligations.

Lemma Discovery Assistant

Analyze stuck or failed proofs and propose auxiliary lemmas that can help complete the proof.

Overview

When proofs fail or get stuck, the issue is often a missing auxiliary lemma. This skill helps identify what lemmas are needed by:

  1. Analyzing the current proof state and goal
  2. Identifying gaps in reasoning
  3. Proposing auxiliary lemmas with precise statements
  4. Suggesting proof strategies for the lemmas
  5. Explaining how the lemmas help the main proof

When Proofs Get Stuck

Common Symptoms

Unprovable subgoal:

  • Tactics fail to make progress
  • Goal seems "obviously true" but won't prove
  • Missing connection between hypotheses and goal

Weak induction hypothesis:

  • Induction step fails
  • Need stronger property to prove
  • Generalization required

Missing intermediate steps:

  • Large gap between current state and goal
  • Need stepping stones
  • Complex reasoning required

Insufficient rewrite rules:

  • Simplification doesn't go far enough
  • Need additional equations
  • Definitions need unfolding lemmas

Lemma Discovery Process

Step 1: Analyze Proof State

Examine the current proof context:

What to look for:

  • Current goal statement
  • Available hypotheses/assumptions
  • Failed tactic and error message
  • Proof structure (induction, case analysis, etc.)
  • Type information and constraints

Questions to ask:

  • What is the proof trying to show?
  • What information is available?
  • What is missing?
  • Why did the tactic fail?
Step 2: Identify the Gap

Determine what's preventing progress:

Gap types:

  • Property gap: Need to establish intermediate property
  • Generalization gap: Current statement too specific
  • Rewrite gap: Need equation to simplify
  • Structural gap: Need lemma about data structure
  • Induction gap: Induction hypothesis too weak
Step 3: Propose Lemma Statement

Formulate precise lemma statement:

Lemma characteristics:

  • Precise: Exact types and conditions
  • General: Not overly specific to one case
  • Provable: Can be proven independently
  • Useful: Actually helps the main proof

Example patterns:

(* Isabelle *)
lemma helper_name: "⟦ assumptions ⟧ ⟹ conclusion"

(* Coq *)
Lemma helper_name : assumptions → conclusion.
Step 4: Suggest Proof Strategy

Provide guidance on proving the lemma:

Strategy types:

  • Induction (structural, well-founded, strong)
  • Case analysis
  • Rewriting and simplification
  • Unfolding definitions
  • Using existing lemmas
Step 5: Explain Usage

Show how the lemma helps the main proof:

  • Where to apply it
  • What tactic to use
  • How it closes the gap

Lemma Patterns by Proof Type

Inductive Proofs

Problem: Induction hypothesis too weak.

Solution: Strengthen the induction hypothesis.

Example (Isabelle):

Stuck proof:

isabelle
lemma "length (reverse xs) = length xs"
proof (induction xs)
  case Nil
  then show ?case by simp
next
  case (Cons x xs)
  (* Stuck: reverse (x # xs) = reverse xs @ [x]
     but we don't have a lemma about length of append *)
  then show ?case sorry
qed

Proposed lemma:

isabelle
lemma length_append: "length (xs @ ys) = length xs + length ys"
proof (induction xs)
  case Nil
  then show ?case by simp
next
  case (Cons x xs)
  then show ?case by simp
qed

Usage: Apply length_append in the induction step.

Generalization Lemmas

Problem: Statement too specific to prove by induction.

Solution: Generalize with accumulator or additional parameter.

Example (Coq):

Stuck proof:

coq
Fixpoint reverse {A} (l : list A) : list A :=
  match l with
  | [] => []
  | x :: xs => reverse xs ++ [x]
  end.

Lemma reverse_involutive : forall A (l : list A),
  reverse (reverse l) = l.
Proof.
  induction l.
  - reflexivity.
  - simpl. (* Stuck: need reverse (reverse l ++ [a]) = a :: l *)
Abort.

Proposed lemma:

coq
Lemma reverse_append : forall A (l1 l2 : list A),
  reverse (l1 ++ l2) = reverse l2 ++ reverse l1.
Proof.
  induction l1; intros; simpl.
  - rewrite app_nil_r. reflexivity.
  - rewrite IHl1. rewrite app_assoc. reflexivity.
Qed.

Usage: Use reverse_append to handle the append in the goal.

Rewrite Lemmas

Problem: Simplification doesn't reach desired form.

Solution: Add rewrite rules for specific patterns.

Example (Isabelle):

Stuck proof:

isabelle
lemma "map f (map g xs) = map (f ∘ g) xs"
proof (induction xs)
  case Nil
  then show ?case by simp
next
  case (Cons x xs)
  (* Need: (f ∘ g) x = f (g x) *)
  then show ?case sorry
qed

Proposed lemma:

isabelle
lemma comp_apply: "(f ∘ g) x = f (g x)"
  by (simp add: comp_def)

Usage: Add to simplification set or apply explicitly.

Structural Lemmas

Problem: Need properties about data structure operations.

Solution: Prove fundamental properties of the structure.

Example (Coq):

Stuck proof:

coq
Fixpoint insert (x : nat) (t : tree) : tree := (* ... *)

Lemma insert_member : forall x t,
  member x (insert x t) = true.
Proof.
  induction t.
  - (* Stuck: need properties of member and insert *)
Abort.

Proposed lemmas:

coq
Lemma member_insert_eq : forall x y t,
  x = y → member x (insert y t) = true.

Lemma member_insert_neq : forall x y t,
  x ≠ y → member x (insert y t) = member x t.

Lemma member_insert : forall x y t,
  member x (insert y t) = (x =? y) || member x t.

Usage: Case split on x = y and apply appropriate lemma.

Framework-Specific Guidance

Isabelle/HOL Lemma Discovery

For Isabelle-specific lemma patterns, tactics, and the sledgehammer tool, see references/isabelle_lemmas.md.

Key features:

  • Sledgehammer for automatic lemma discovery
  • try and try0 for tactic exploration
  • Simplification set management
  • Induction and case analysis patterns
Show full SKILL.md (344 more words)Show less
Coq Lemma Discovery

For Coq-specific lemma patterns, tactics, and proof search, see references/coq_lemmas.md.

Key features:

  • Search and SearchAbout for finding lemmas
  • auto, eauto for proof search
  • Proof automation with Ltac
  • Inversion and case analysis

Common Lemma Categories

For detailed lemma patterns organized by category, see references/proof_patterns.md.

Categories include:

  • List lemmas (append, reverse, map, filter)
  • Arithmetic lemmas (associativity, commutativity, distributivity)
  • Set/Map lemmas (membership, union, intersection)
  • Induction strengthening patterns
  • Generalization patterns

Example: Complete Lemma Discovery

Scenario: Proving correctness of insertion sort.

Main theorem (Isabelle):

isabelle
lemma insertion_sort_correct:
  "sorted (insertion_sort xs) ∧ mset (insertion_sort xs) = mset xs"

Stuck proof:

isabelle
proof (induction xs)
  case Nil
  then show ?case by simp
next
  case (Cons x xs)
  (* Need to show:
     sorted (insert x (insertion_sort xs))
     mset (insert x (insertion_sort xs)) = mset (x # xs) *)
  then show ?case sorry
qed

Analysis:

  1. Need properties of insert function
  2. Need to show insert preserves sorting
  3. Need to show insert preserves multiset

Proposed lemmas:

isabelle
(* Lemma 1: insert preserves sorting *)
lemma insert_sorted:
  "sorted xs ⟹ sorted (insert x xs)"
proof (induction xs)
  case Nil
  then show ?case by simp
next
  case (Cons y ys)
  then show ?case
    by (auto simp: sorted_Cons)
qed

(* Lemma 2: insert preserves multiset *)
lemma mset_insert:
  "mset (insert x xs) = {#x#} + mset xs"
proof (induction xs)
  case Nil
  then show ?case by simp
next
  case (Cons y ys)
  then show ?case by (auto simp: ac_simps)
qed

(* Lemma 3: sorted definition for cons *)
lemma sorted_Cons:
  "sorted (x # xs) = (sorted xs ∧ (∀y ∈ set xs. x ≤ y))"
  by (auto simp: sorted_append)

Revised main proof:

isabelle
lemma insertion_sort_correct:
  "sorted (insertion_sort xs) ∧ mset (insertion_sort xs) = mset xs"
proof (induction xs)
  case Nil
  then show ?case by simp
next
  case (Cons x xs)
  have "sorted (insertion_sort xs)" using Cons by simp
  then have "sorted (insert x (insertion_sort xs))"
    by (rule insert_sorted)
  moreover have "mset (insert x (insertion_sort xs)) = {#x#} + mset (insertion_sort xs)"
    by (rule mset_insert)
  moreover have "mset (insertion_sort xs) = mset xs"
    using Cons by simp
  ultimately show ?case by (auto simp: ac_simps)
qed

Lemma Discovery Strategies

Bottom-Up Discovery
  1. Start with failed proof
  2. Identify immediate obstacle
  3. Propose lemma for that obstacle
  4. Recursively discover lemmas for the proposed lemma
  5. Build up from base cases
Top-Down Discovery
  1. Analyze overall proof structure
  2. Identify major proof steps
  3. Propose high-level lemmas
  4. Refine each lemma
  5. Fill in details
Pattern Matching
  1. Recognize common proof patterns
  2. Apply standard lemmas for that pattern
  3. Adapt to specific context
  4. Verify applicability

Best Practices

  1. Start Simple: Propose simplest lemma that could help
  2. Be Specific: Precise types and conditions
  3. Check Provability: Ensure lemma is actually provable
  4. Verify Usefulness: Confirm lemma helps main proof
  5. Avoid Circularity: Lemma shouldn't depend on main theorem
  6. Generalize Appropriately: Not too specific, not too general
  7. Name Clearly: Descriptive names aid understanding

Troubleshooting

Lemma Still Doesn't Help

Possible issues:

  • Lemma statement incorrect
  • Need additional lemmas
  • Wrong proof strategy
  • Main theorem statement flawed

Solutions:

  • Revisit proof state analysis
  • Try different generalization
  • Consider alternative approach
  • Check theorem statement
Lemma Itself Won't Prove

Possible issues:

  • Lemma too strong
  • Missing preconditions
  • Need intermediate lemmas
  • Requires different proof technique

Solutions:

  • Weaken conclusion
  • Add necessary assumptions
  • Discover sub-lemmas
  • Try different proof method

Additional Resources

For detailed guidance on specific aspects:

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/lemma-discovery-assistant of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • references/coq_lemmas.md
  • references/isabelle_lemmas.md
  • references/proof_patterns.md

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Lemma Discovery Assistant next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lemma Discovery Assistant compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lemma Discovery Assistant this skillArabelaTso/Skills-4-SE253—~2.7kAutomated safety check: PassApache-2.0
Grant Proposal Assistantaipoch/medical-research-skills1.9k—~2.6kAutomated safety check: PassMIT
Geo Proposalsickn33/agentic-awesome-skills47k1 repos~3.2kAutomated safety check: NotesMIT
Better Proposals AutomationComposioHQ/awesome-claude-skills77k3 repos~764Automated safety check: PassNone
Proof Videoopenclaw/openclaw392k—~2.4kAutomated safety check: PassMIT
Contract And Proposal Writeralirezarezvani/claude-skills28k2 repos~3.4kAutomated safety check: PassMIT

Similar skills

  • Grant Proposal Assistant

    aipoch/medical-research-skills

    Assist with biomedical grant proposal drafting, structure, and revision; use when preparing fundable proposal sections, aligning aims and methods, or improving reviewer-facing clarity.

    1.9k GitHub stars~2.6k tokensUpdated 24 days ago
    Research & ScienceAuto-check passed
  • Geo Proposal

    sickn33/agentic-awesome-skills

    Auto-generate a professional, client-ready GEO service proposal from audit data.

    47k GitHub starsUsed in 1 repo~3.2k tokens
    Sales & SupportAuto-check: notes
  • Better Proposals Automation

    ComposioHQ/awesome-claude-skills

    Automate Better Proposals tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~764 tokens
    Productivity & AutomationAuto-check passed
  • Proof Video

    openclaw/openclaw

    Add subtitles, captions, narration cues, or zoom to a proof video or PR recording using repo-local capture helpers and a system ffmpeg renderer.

    392k GitHub stars~2.4k tokensUpdated today
    Media & CreativeAuto-check passed
  • Contract And Proposal Writer

    alirezarezvani/claude-skills

    Generate professional, jurisdiction-aware business documents: freelance contracts, project proposals, SOWs, NDAs, and MSAs.

    28k GitHub starsUsed in 2 repos~3.4k tokens
    Legal & ComplianceAuto-check passed
  • Proposal

    Chorus-AIDLC/Chorus

    Chorus Proposal workflow on Hermes — create proposals with document and task drafts, manage dependency DAG, validate, submit, and run the read-only proposal reviewer via delegatetask.

    1.2k GitHub stars~5.5k tokensUpdated 2 days ago
    Sales & SupportAuto-check passed

More from ArabelaTso/Skills-4-SE

All 170 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Lemma Discovery Assistant

What does Lemma Discovery Assistant do?

Analyze failed or stuck proofs and propose auxiliary lemmas to help complete the proof in Isabelle/HOL or Coq. Lemma Discovery Assistant is an agent skill from ArabelaTso/Skills-4-SE. Analyze failed or stuck proofs and propose auxiliary lemmas to help complete the proof in Isabelle/HOL or Coq.

When should I use Lemma Discovery Assistant?

Lemma Discovery Assistant fits situations like: encountering proof failures; stuck proof states; unprovable subgoals; needing to strengthen induction hypotheses.

How do I install Lemma Discovery Assistant in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill lemma-discovery-assistant -a claude-code`. Or copy the skill folder (skills/lemma-discovery-assistant in ArabelaTso/Skills-4-SE) into .claude/skills/lemma-discovery-assistant in your project. Claude Code loads it when a task matches its description.

How do I install Lemma Discovery Assistant in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill lemma-discovery-assistant -a codex`. Or copy the skill folder (skills/lemma-discovery-assistant in ArabelaTso/Skills-4-SE) into .agents/skills/lemma-discovery-assistant in your project. Codex loads it when a task matches its description.

Can I use Lemma Discovery Assistant in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill lemma-discovery-assistant -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lemma-discovery-assistant, .gemini/skills/lemma-discovery-assistant, .github/skills/lemma-discovery-assistant and .opencode/skills/lemma-discovery-assistant in your project.

What does Lemma Discovery Assistant need to run?

SKILL.md names no scripts, command-line tools or credentials: Lemma Discovery Assistant is instructions for the agent only.

Does Lemma Discovery Assistant access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lemma Discovery Assistant safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Lemma Discovery Assistant use?

Lemma Discovery Assistant is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lemma Discovery Assistant use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.4k tokens, read only when the agent opens those files.

What are the alternatives to Lemma Discovery Assistant?

Skills that share tags, products or a category with Lemma Discovery Assistant: Grant Proposal Assistant (aipoch/medical-research-skills, 1.9k stars), Geo Proposal (sickn33/agentic-awesome-skills, 47k stars), Better Proposals Automation (ComposioHQ/awesome-claude-skills, 77k stars) and Proof Video (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lemma Discovery Assistant?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 170 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.