Proof summarize

From MechMath/MechMath-agent-team · View interactive version

Proof summarize is an AI agent skill from the GitHub repository MechMath/MechMath-agent-team. Use when producing a concise human-readable proof_summary.tex from the final accepted proof, extracting reusable correct/error knowledge, and updating memory.md for recurring proof errors.

How to use this skill

Skill file

Produce a Human-Readable Proof Summary

You are preparing two different outputs from one NL-Prover problem:

  1. proof_summary.tex: a concise, normal mathematical proof for human readers.
  2. Optional reusable knowledge notes and recurring-error memory.

Do not confuse these outputs. proof_summary.tex is not a run report, not a

post-mortem, and not a list of attempts. It should read like a short proof one

would send to a mathematician who only wants the final argument.

For reusable knowledge, extract only information that is worth retaining for

future work. Write ordinary correct/error notes into ../data/inbox when useful

and maintain recurring error memory in the repository-root memory.md.

Arguments

directory under ../data/workspace.

Call the selected directory:

It will usually contain at least:

Required Work

  1. Read problem.md and identify the main goal and any top-level subproblems.
  2. Read STATUS.md and extract:
  1. If present, inspect lemmas/*/verifier/, lemmas/*/generator/response_to_verifier.md, sketch/revision_*.md, refinement/, and any [human-review]...[/human-review] / [review-content]...[/review-content] blocks to recover concrete error causes and how they were fixed.
  2. Read proof.tex to confirm the final accepted answer. If STATUS.md and proof.tex conflict, treat the final retained version in proof.tex as authoritative and explicitly note the mismatch.
  3. Generate proof_summary.tex: a concise, human-readable LaTeX proof based on

the final accepted proof.tex. It should present the shortest clear final

route justified by the accepted proof, not a transcript of generated lemmas or

verifier history.

  1. Identify recurring-error memory candidates: repeated mistakes, human-reviewed complaints that the system "often", "again", "always", "keeps", "repeatedly", "usually", "frequently", "again made", or equivalent non-English wording makes the same error, or verifier failures that recur across multiple attempts.
  2. Decide whether this run produced knowledge that is actually worth saving.
  3. If yes, produce concise but information-dense Markdown notes and write them into ../data/inbox/.
  4. If no, do not create low-value notes. Still write proof_summary.tex when an accepted proof exists.

Save Only High-Value Information

Do not write a note just because a problem was completed. Only save information that is likely to be useful later.

Good candidates for saving:

Do not save:

What the Notes Must Capture

This is not a simple timeline. It must clearly separate three possible kinds of reusable information.

1. Final Correct Answers

2. Error Causes and Fixes

Prioritize substantive mathematical or workflow mistakes, not vague comments like "there was a bug".

Examples of valuable failure analysis:

If you cannot find reusable error knowledge, do not create an error note. Do not invent one.

3. Error Memory

Maintain error memory only for high-confidence recurring mistakes or human-stated correction patterns that should guide future proofs.

Good triggers:

"repeatedly", "usually", "frequently", "again made", or equivalent

non-English wording makes this mistake. In this case, you MUST update

memory.md unless the statement is incoherent or unsafe.

Examples:

Do not create memory for:

Human workflow preferences should be folded into error memory only when they are tied to a concrete recurring error pattern. For example, "When human review flags an added assumption, treat it as a blocker and repair without strengthening hypotheses" is valid memory. A generic preference like "be careful" is not.

Do not edit memory.md. It is generated from memory/experience/*.md and

memory.py guards it; hand-edits are overwritten by the next render and the

guard refuses them anyway. This paragraph used to teach the opposite — read,

merge, deduplicate, keep under 100 lines — and that was the pre-ADR-0017 model.

To record a lesson, write a candidate card:

uv run python cli_tools/memory.py candidate <workspace> \
  --agent proof-summarize --run-id <run-id> --kind negative-constraint \
  --scope class-level --statement ... --trigger ... --why ... --failure-modes ...

memory.py aggregate-candidates <workspace> promotes surviving candidates into

memory/experience/ and re-renders memory.md. Tier routing is

.agents/skills/memory-routing/SKILL.md; the card schema is ADR 0017 and is

checked by memory.py card-lint.

Cards are written in English only, even when the trigger feedback was in another

language.

Output Format

Write separate Markdown notes when justified:

  1. a correct note for reusable correct knowledge
  2. an errors note for reusable mistakes, failure modes, and fixes
  3. an update to repository-root memory.md for high-confidence recurring error patterns

You may write only the categories that contain high-value material.

Always write proof_summary.tex when proof.tex contains an accepted proof.

This file is the human-facing concise proof, not blueprint dependency tracking

and not a proof-run report. It should be much shorter than proof.tex, usually

2 to 6 pages when compiled unless the problem itself has many independent parts.

The summary may merge routine lemmas into the main argument, omit bookkeeping

lemmas, and streamline notation, but only when the resulting proof remains

mathematically justified by the accepted proof.tex.

Use these templates by default.

# <problem_id> Correct Knowledge

## Source
- ...

## Reusable Results
- ...

## Reusable Techniques
- ...

## Final Assumptions and References Used
- ...
# <problem_id> Error Knowledge

## Source
- ...

## Failure Modes
- Mistake:
  Cause:
  Fix:

## Things To Watch Next Time
- ...

Use this compact format for memory.md:

# NL-Prover Error Memory

- Rule: <short imperative rule>
  Why: <brief reason>
  Trigger: <human-review/repeated verifier/source problem_id>

Each memory item should normally be 2 to 4 lines. Prefer durable rules over

long narratives.

Use an article-style proof structure for proof_summary.tex. The exact section

names should fit the problem, but the document should look like a compact final

proof rather than a report. Prefer this pattern:

\documentclass{article}
\usepackage[]{KLMM/klmm}

\title{Concise Proof: <problem_id>}
\author{NL-Prover}
\date{\today}

\begin{document}
\maketitle

\section{<problem name or main case>}
<brief self-contained setup: notation, hypotheses, and definitions needed for
the proof. Do not include workflow history.>

\begin{theorem}[<main result>]
<faithful statement of the theorem proved by the accepted proof>
\end{theorem}

\section{<essential condition, construction, or ingredient>}
<state only the definitions or standard inputs needed for the final proof.>

\begin{proposition}[<essential intermediate claim>]
<claim needed for the theorem>
\end{proposition}
\begin{proof}
<concise proof, merging routine sublemmas into the text when possible>
\end{proof}

\section{Final assembly}
\begin{proof}[Proof of the theorem]
<short final derivation from the essential ingredients>
\end{proof}

\begin{remark}[Scope]
<optional: only if the accepted proof proves a restricted case or relies on a
specific branch/hypothesis that a reader might otherwise miss>
\end{remark}
\end{document}

Requirements for proof_summary.tex:

conditions", "Selmer membership", or "Final assembly"; avoid generic

report-like titles when a mathematical title is available.

tried, which attempts failed, which verifier reports were produced, or how the

proof was repaired.

theorem/proposition/lemma environments for intermediate claims that are

genuinely needed to make the argument readable.

and trust the argument.

propositions, or local checks, present exactly those and then give a short

final assembly proof.

numbers, and agent workflow details.

accepted proof.

file paths, status history, or reusable-error notes in proof_summary.tex.

../data/inbox/, not in the proof summary.

labeled "Incomplete Proof Summary" instead of pretending the proof is complete.

\usepackage[]{KLMM/klmm}. Before compiling proof_summary.tex to PDF, copy

the repository's tex/KLMM/ directory into the same directory as

proof_summary.tex (e.g.

cp -R tex/KLMM ../data/workspace/<problem_id>/), then compile from that

directory. For reader-facing article or progress outputs, Writer should use

repo-root tex/template.tex as the structural starting point. See the LaTeX

build policy for full details.

Requirements:

Output File

For reusable correct knowledge, create:

For reusable error knowledge, create:

If a target filename already exists, use:

For recurring error memory, update repository-root:

Do not create per-problem memory files.

For the human-readable proof report, create or overwrite:

Final Response Back to the User

After finishing:

  1. State which problem_id you used.
  2. State which files were created, if any.
  3. State whether memory.md was updated.
  4. State whether proof_summary.tex was created or updated.
  5. Give a short 3 to 6 bullet report of the most important reusable conclusions.
  6. If no note was created and memory.md was not updated, explicitly say that the run did not yield reusable knowledge worth saving.

Strict Constraints

that you MUST create or update proof_summary.tex there when an accepted proof

exists.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.