/kit:proving-specfrom kit
Constructs K proofs or diagnoses stuck, failing, or resource-limited Prover claims by inspecting residual configurations and extending verification modules.
Ships in kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This stage produces the proof-extension layer: additions to the
VERIFICATION module of verification.k, prove.sh with the exact
commands used, and a passing proof run.
spec.k is a set of K reachability claims. Prover attempts to prove each
claim by symbolically executing from the LHS and checking it reaches the RHS
under the given conditions. When a claim remains unproved, inspect the
residual configuration — a state it reached but could not close — in the saved
stdout. This skill provides the tools to read that residual and extend
verification.k until the proof closes.
Use writing-spec before this skill if spec.k is not yet written.
For EVM targets, read EVM specification patterns before drafting or repairing the claims.
The prover closes a claim by rewriting the LHS to the RHS. It gets stuck when:
verification.k. Plain
rule statements in the spec module are a K compiler error; only claims and
[simplification] rules are allowed there.Choose the diagnostic that fits the observed failure; the techniques below are options, not a fixed sequence.
Use the soundness contract to classify and justify the extension. The Gate A obligations cover execution, value, state, binding, and control fidelity. Record the applicable justification and dependencies alongside the proof evidence.
Prefer strengthening an invariant, a truthful summary, or an auxiliary execution claim when these address the residual. A genuine fixed-semantics gap is a model boundary, not permission to replace program execution with an unjustified result-bearing oracle.
Repair soundness findings under the shared repair contract. Preserve useful evidence, remove the unjustified dependency, and recheck affected claims and obligations. A narrower theorem can be partial progress; it does not complete a request for the full symbolic input domain.
Summary definitions belong in VERIFICATION-SUMMARIES; proof extensions
belong in VERIFICATION. If a repair changes a definitional equation,
revisit the theorem's meaning and SCOPE.md using writing-spec, then
recheck affected claims and adequacy obligations. A separate spec audit
is optional; changed assumptions invalidate dependent evidence.
Choose the simplest faithful form the prover can use. Prefer an equivalent closed form when it lies in a solver-supported theory. If no faithful closed form exists, keep the recursive definition; do not replace it with an inaccurate formula merely to make the proof close. Use explicit base/step equations plus targeted induction, folding, or summary lemmas. A recursive evaluator can still unfold indefinitely on a symbolic argument, so diagnose that mechanism rather than rejecting recursion itself. See deriving-invariants.md and symbolic-recursion debugging.
Add [simplification] lemmas for algebraic facts the prover cannot derive
on its own. A [simplification] rule fires during symbolic simplification, not
during normal rewriting. Keep them in verification.k (or, if they apply only
to a specific proof, in the spec module):
rule (X +Int Y) ==Int X +Int Z => Y ==Int Z [simplification]
The loop-invariant claim in spec.k is the loop invariant. When the proof is
stuck on the invariant's inductive step, common options include:
requires or express a
tighter postcondition.[simplification] rule to verification.k that lets
the prover discharge the residual algebraic obligation.Keep the invariant and the summary function consistent: the invariant
postcondition (s |-> S +Int sumTo(N)) and the summary function definition
(sumTo(N) = N*(N+1)/2) must describe the same quantity.
Submit and interpret evidence. Use prover-client prove --help for
submission details and running-k.md for workflow and evidence
rules. Record the command in prove.sh.
An outcome of proved with tool exit 0 means the selected claims closed or
were admitted under the supplied theory; check the per-claim stdout and any
trusted labels under reading the result.
For notProved, read the stdout residual and stderr. Always submit under the
resource caps below.
Read the residual. The residual is the symbolic configuration the prover reached but could not match against the claim's RHS. Extract it from stdout as described in the shared result contract, then compare its term shape to the RHS. The mismatch locates what is missing.
Inspect a stalled trace when needed. Isolating a claim and comparing residual configurations at nearby depth bounds can reveal where progress stops. Use the symptom router below to choose a focused diagnostic.
Revise the proof strategy. Choose a justified lemma, summary equation, auxiliary claim, invariant strengthening, or different claim decomposition that addresses the evidence. Recheck the affected claims.
Record the extension even when the proof passes; prover success does not validate the added theory.
After editing verification.k, submit another attempt under the
proof submission rules.
Important hygiene:
For server timeouts, HTTP request limits, and cancellation, follow kit-help.
prover-client prove polls Prover automatically and updates
proof-NNN/result.json. Keep the command running and read metrics
in that file to check progress when metrics are available. They may stay
unchanged while the backend is still working.
Check the saved result before retrying. If the proof keeps repeating
states or unfolding a helper, use the diagnostics below to find the cause.
Use prover-client prove --help for depth-bounded diagnostic options.
When the run itself has a deadline, a stuck task spends time you cannot recover:
proved, copy the exact submitted spec.k and verification.k
aside as the proved snapshot. Deliver files byte-identical to the latest
snapshot. Make no edit after the last proved check; if an edit cannot be
proved again before the deadline, restore the snapshot.prover-client run and compare the final states with the claim; choose
another diagnostic when the evidence points elsewhere.Match the observed symptom, then open only the owning reference.
| Symptom | Open |
|---|---|
| Prover or the Kit client is unavailable | running-k.md — Shell setup |
| Backend or definition mismatch | running-k.md — Backends |
| K cannot find the requested main syntax module | running-k.md — Backends |
| Unsure whether a backend result means success | running-k.md — Reading the result |
| Proof module rejects an ordinary rule | k-claims.md — Functions and simplification |
Unused filtering labels | prover-client prove --help |
| A symbolic helper keeps expanding | symbolic-recursion.md |
| A loop repeats and the invariant is never applied | circularity-not-applying.md |
| An external operation has no faithful equations | opaque-primitives.md |
Fixed rules stay stuck on a supersort variable while isS(V) holds | sort-refinement.md |
| Stuck within the first few steps, e.g. on a plain variable lookup | stuck-in-first-steps.md |
| A nested container claim stalls on constructor alternatives | nested-sequences.md |
| The proof runs without revealing where progress stops | Bounded inspection below |
If a timed-out task leaves no residual, isolate one claim and inspect it with
a depth bound using prover-client prove --help, under the
proof submission rules.
Choose the bound from the scale of the observed trace, not from a universal fixed number. Compare the residual configuration at nearby increasing bounds:
A run with --depth is diagnostic, even if every claim closes within the
bound. Fix one identified mechanism, rebuild if needed, and rerun the isolated
claim without the bound for the final proof.
[function]/[simplification], claim syntax, and labels.writing-spec — states or revises spec.k and its scope.validating-proof — reviews passing evidence; it checks the
extension inventory from the proof files rather than trusting the construction
record, then applies Gate A — real-program soundness, Gate B — intent
adequacy,
and Gate C — trust and evidence auditability.spec.k,
verification.k, SCOPE.md,
and the task statement; on a redo, the failing audit artifact path.VERIFICATION module, prove.sh
with the exact commands used, and a passing proof run.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nlp-research-rosu/kit-plugin --plugin kit10 skills in this plugin
/auditing-semanticsUse when auditing a candidate K semantics before a Prover maintainer freezes it under a versioned bundled ID; this is outside the live Kit pipeline./auditing-specReview K claims and summaries for adequacy against the original program contract./kit-helpExplain KIT commands, settings, evidence files, attempt limits, and task timeouts./kit-onboardingSet up KIT when Prover Client is missing or not connected, or when the user requests installation, an update or reconnection. Covers CLI installation, browser approval and initial settings. Reuse completed setup on subsequent tasks./sharedNot a skill: the reference library the other kit skills load via relative links. Never invoke directly./using-kitUse KIT to verify a program with K and Prover, or choose the relevant verification skill.Other plugins' skills for the same job