mathematical_induction

Prove natural number properties using weak and strong induction in Lean 4.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Proves properties of natural numbers using induction, enabling rigorous formal reasoning in mathematics and computer science.

Core Features & Use Cases

  • Weak induction: base case and inductive step prove statements for all n.
  • Strong induction: allows assuming all smaller cases to prove the n-th case.
  • Lean 4 templates & tactics: guides practical proof scripting and tactic usage in Lean 4 for educational and research contexts.
  • Use Case: formal verification tasks, algorithm correctness proofs, and mathematical induction exercises in Lean.

Quick Start

Prove a property P(n) for all natural numbers by establishing a base case and an inductive step in Lean 4.

Frequently Asked Questions about mathematical_induction

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

FAQPage Schema
How do I prove statements for all n using mathematical induction in Lean 4?

Mathematical induction in Lean 4 proves statements for all natural numbers by encoding a base case and an inductive step. This template-driven approach establishes that if the property holds for a base value and propagates from n to n+1, it holds universally.

What is the difference between weak and strong induction in theorem proving?

Weak induction assumes only the immediate predecessor case to prove the inductive step, while strong induction allows assuming the statement holds for all smaller natural numbers. Strong induction primitives in Lean 4 help express complex proofs where weak induction is insufficient.

Can I use structural induction on custom data types in Lean 4?

Yes, structural induction applies to custom data types in Lean 4. Instead of natural numbers, it proves properties by analyzing the recursive structure of a data type, handling base constructors and recursive constructors to verify formal properties.

Do I need a Lean 4 environment to run mathematical induction proofs?

Yes, a Lean 4 environment is required to execute mathematical induction proofs. The Skill provides templates and guides practical proof scripting using Lean 4 tactics specifically designed for educational and research contexts in formal verification.

When should I use strong induction instead of basic induction for algorithm correctness proofs?

Use strong induction for algorithm correctness proofs when the proof for the n-th case depends on multiple smaller cases rather than just the immediate predecessor. This approach allows assuming all smaller natural numbers to establish complex formal properties.