proof_by_exhaustion

Partition finite domains into cases and verify each with Lean 4 tactics.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/bneb/perqed --skill proof-by-exhaustion
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: proof_by_exhaustion
Source: https://github.com/bneb/perqed/tree/main/.agents/skills/proof_by_exhaustion
Command: npx skills add https://github.com/bneb/perqed --skill proof-by-exhaustion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Partition finite domains into cases and verify each one independently.

Core Features & Use Cases

  • Finite-domain case splitting with fin_cases
  • Disjunction handling with rcases and omega
  • Templates and worked examples for end-to-end proof

Quick Start

Split the goal into Fin n cases with fin_cases and discharge each branch using decide or omega.

Frequently Asked Questions about proof_by_exhaustion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate case analysis for finite domains in Lean 4?▼

Automate case analysis for finite domains in Lean 4 by partitioning goals into cases using fin_cases and discharging each branch with decide or omega. This works for small finite types like Fin n and bounded Nat ranges.

What is the best way to split a goal into Fin n cases in Lean 4?▼

The best way to split a goal into Fin n cases in Lean 4 is applying the fin_cases tactic, followed by using decide or omega to independently verify each resulting branch.

Does proof by exhaustion work with structured disjunctions in mathlib?▼

Proof by exhaustion works with structured disjunctions in mathlib by using the rcases tactic to handle the disjunction and omega to verify each independent case automatically.

Do I need mathlib to use interval_cases and fin_cases for bounded Nat ranges?▼

You need Lean 4 with mathlib to use interval_cases and fin_cases for bounded Nat ranges, as these tactics provide the necessary environment to partition and verify finite domains.

Why does fin_cases fail to discharge branches after splitting Fin n goals?▼

fin_cases fails to discharge branches after splitting Fin n goals when the individual cases require additional arithmetic reasoning, requiring you to manually apply decide or omega to close each branch.

Can I use omega to verify each case after applying rcases in Lean 4?▼

You can use omega to verify each case after applying rcases in Lean 4, especially when handling structured disjunctions where each branch can be closed by linear arithmetic decision procedures.