Counterexample-First Proving (Pre-Proof Conjecture Screening)
Screen every non-trivial conjecture or stuck subgoal for small counterexamples before spending tactic budget on a false or under-guarded statement.
Routing
- USE FOR: pre-proof falsification of newly specified theorems, stuck induction hypotheses (>15 tactic steps),
and suspected
Natsubtraction / division-by-zero edge cases. - DO NOT USE FOR: closing valid tactic goals (
@lean-proof) or post-proof vacuity triage (@lean-tautology-triage).
Workflow
- Static Truncation Check -- Run
lean_diagnosticsto inspectNatSubTruncation(a - bwherea < b) andNatDivModByZerocertificates before sampling. - Boundary Sweep -- Probe degenerate witnesses (
0,1,a = 0 and b = 1, emptyList/Finset, disconnectedFin 3graphs) in an isolated scratch context. - Plausible Search -- Invoke
lean_counterexample_search(filePath, theoremName, strategy: "dense")to run Galois-pruned property-based shrinking without polluting source files. - Route Verdict -- If 0 counterexamples are found, hand off to
@lean-proof; if a counterexample witnesswis confirmed, recordwand escalate to@lean-specification.
Recovery & STOP
- When
SampleableExtis unavailable for an abstract typeα, specializeα := Fin 3orIntin scratch rather than skipping falsification. - Never silently weaken a public theorem statement inside a Prover session; escalate the minimal counterexample back to
specifier.
Handoffs
- Predecessors:
lean-specification,lean-gateway. - Successors:
lean-proof,lean-specification.
Detailed reference
- Fast 3-table lookup card:
../../references/cards/counterexample-first-proving-tables.md - Full handbook:
../../references/handbooks/counterexample-first-proving-handbook.md
See also
../lean-specification/SKILL.md-- Three-part theorem specification../lean-tautology-triage/SKILL.md-- Post-proof vacuity & tautology triage
