Lean4 induction closed form

From XuShuwenn/RedAct · View interactive version

Lean4 induction closed form is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Finalize Lean4 proofs for recursively defined sequences by proving a closed form via induction and then deriving bounds, while respecting fixed-file-prefix and import constraints.

How to use this skill

Skill file

Lean4: Closed-Form Induction for Recursive Sequences (with Bounds)

A reusable workflow to complete Lean4 proofs for recursively defined sequences by:

1) proving a closed-form formula by induction using only allowed imports/tactics, and

2) deriving the required inequality/bound from basic nonnegativity facts.

This skill emphasizes robust rewrites (powers and division), positivity proofs, and file-discipline checks under strict prefix constraints.

When to Use

Activate this skill when:

Core Workflow

1) Inspect the constraints

2) Strengthen the claim to a closed form

| zero => ...

| succ k ih => ...`.

3) Base case

4) Inductive step (robust fraction/power rewrites)

(2 : ℚ) / 2^(k+1) = 1 / 2^k, using:

5) Conclude the target inequality

6) Verify

Verification Checklist

Common Pitfalls and How to Avoid Them

Minimal Patterns (Lean snippets)

simple_induction k with k IH

· simp [S]; numbers

· simp [S, IH]

-- use pow_succ, division lemmas, and small rewrites to finish

`

-- one_div_nonneg.mpr (pow_nonneg ...) or positivity

`

Success Criteria

Optional Script Usage

Use the helper script to:

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.