Logo: Evo Lean Induction Proof

Evo Lean Induction Proof

Communautéit
Zhang-Henry
evo-lean-induction-proof

Completes Lean 4 induction proofs for recursive sequence bounds. Use when a task requires proving an inequality about a recursively defined sequence (e.g., geometric series partial sums) in Lean 4 with the Math2001/Macbeth library tactics (simple_induction, addarith, numbers, extra). Provides end-to-end proof generation, compilation, and validation.

Iwwersiicht

EditeurZhang-Henry
RepositoryCoEvoSkills
Skill-Nummevo-lean-induction-proof
Stären
83
Forks
9
Matgeliwwert Dateien
1
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Zhang-Henry huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Evo Lean Induction Proof an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/lean4-proof/evo-lean-induction-proof
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Zhang-Henry/CoEvoSkills.git /tmp/CoEvoSkills
mkdir -p .claude/skills
cp -r /tmp/CoEvoSkills/artifacts/skills/lean4-proof/evo-lean-induction-proof .claude/skills/evo-lean-induction-proof
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Evo Lean Induction Proof an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Evo Lean Induction Proof automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Evo Lean Induction Proof net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Lean 4 Induction Proof Skill

Overview

This skill handles Lean 4 proof completion tasks where:

  • A recursive sequence is defined (e.g., partial sums of a geometric series)
  • A bound must be proved for all natural numbers
  • The proof environment uses Heather Macbeth's Math2001 library tactics

Key Proof Strategy

Stronger Helper Lemma Pattern: When proving S n ≤ bound for a recursive sequence, direct induction often fails because the inductive hypothesis S k ≤ bound is too weak. Instead:

  1. Find the closed-form expression for S n (e.g., S n = 2 - 1/2^n)
  2. Prove S m = closed_form by simple_induction
  3. Rewrite the goal with the closed form
  4. Prove the bound using positivity of the remainder term

Tactic Reference (Math2001 library):

  • simple_induction n with k IH — standard induction with push_cast
  • simp [S] — unfold the recursive definition
  • rw [IH] — apply induction hypothesis
  • rw [pow_succ] — rewrite 2^(k+1) as 2^k * 2
  • ring — close algebraic goals over commutative rings
  • norm_num — numeric normalization
  • linarith — linear arithmetic
  • addarith — weaker linear arithmetic (from library)
  • positivity — prove positivity goals (from Mathlib)
  • div_pos, pow_pos — positivity lemmas for division and powers

Compilation:

  • Use lake env lean solution.lean (not lean directly, not lake build)
  • No output = success; any output indicates errors or warnings
  • Warnings must be treated as errors (remove unused variables)
  • Avoid field_simp — may not be available in all configurations

Usage

python
import sys
sys.path.insert(0, '/app/environment/skills/evo-lean-induction-proof/scripts')
from utils import run_end_to_end, validate_solution, read_template, get_prefix_lines, write_solution, compile_lean

# End-to-end: reads template, generates proof, writes, compiles, validates
result = run_end_to_end(
    workspace_dir='/app/workspace',
    solution_file='solution.lean',
    proof_start_line=15,  # line where proof body starts
    timeout=300
)
print(f"Success: {result['success']}")
if not result['success']:
    print(f"Issues: {result['issues']}")

# Validation only (after manual proof writing)
lines = read_template('/app/workspace/solution.lean')
prefix = get_prefix_lines(lines, 15)
val = validate_solution('/app/workspace', 'solution.lean', prefix, 15)
print(f"Valid: {val['valid']}, Issues: {val['issues']}")

Proof Template

For a sequence S with S 0 = 1 and S (n+1) = S n + 1/2^(n+1):

lean
theorem problemsolution (n : ℕ) : S n ≤ 2 := by
  have key : ∀ m : ℕ, S m = 2 - 1 / 2 ^ m := by
    intro m
    simple_induction m with k IH
    · simp [S]; ring
    · simp [S]
      rw [IH]
      rw [pow_succ]
      ring
  rw [key]
  have hpos : (0:ℚ) < 1 / 2 ^ n := by
    apply div_pos one_pos
    exact pow_pos (by norm_num : (0:ℚ) < 2) n
  linarith

Key Insights

  1. push_cast interaction: simple_induction calls push_cast which changes 1/2^n to (2^n)⁻¹ notation. Using simp [S] followed by rw [IH] and ring handles this cleanly.

  2. pow_succ direction: pow_succ 2 k rewrites 2^(k+1) as 2^k * 2. After rw [pow_succ], ring can close the algebraic identity.

  3. Avoiding unused variables: The lakefile may set -DwarningAsError=false but the task constraint says treat warnings as errors. Remove any have statements that aren't used in the proof.

  4. No field_simp: This tactic may not be available. Use div_pos, ring, and manual rewrites instead.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Evo Lean Induction Proof?

Completes Lean 4 induction proofs for recursive sequence bounds. Use when a task requires proving an inequality about a recursively defined sequence (e.g., geometric series partial sums) in Lean 4 with the Math2001/Macbeth library tactics (simple_induction, addarith, numbers, extra). Provides end-to-end proof generation, compilation, and validation.

Firwat Evo Lean Induction Proof op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Evo Lean Induction Proof besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Evo Lean Induction Proof an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/lean4-proof/evo-lean-induction-proof an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Evo Lean Induction Proof benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Evo Lean Induction Proof benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Evo Lean Induction Proof domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Evo Lean Induction Proof gratis?

Jo. Zhang-Henry huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇