generating_functions

Derive recurrences and closed forms for sequences using formal power series in Lean 4.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Encode a sequence as a formal power series and use algebraic operations to derive recurrences, closed forms, and identities.

Core Features & Use Cases

  • Translate a sequence into a generating function F(x) and manipulate it to obtain a recurrence.
  • Solve for closed-form expressions or identities using standard generating-function techniques and partial fractions.
  • Integrate with Lean 4 / mathlib4 to formalize proofs and coefficient extraction within a proof environment.

Quick Start

Provide a sequence and ask the system to derive its generating function and the associated recurrence or closed form.

Frequently Asked Questions about generating_functions

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

FAQPage Schema
How do I derive a recurrence relation from a sequence using generating functions?

Encode the sequence as a formal power series F(x), apply algebraic operations and partial fractions, then extract coefficients to derive the associated recurrence relation or closed form.

What is the best way to find a closed form for an integer sequence with formal power series?

Translate the integer sequence into a generating function and apply standard power series manipulation techniques like partial fractions to solve for a closed-form expression.

Can I use Lean 4 and mathlib4 to formalize generating function proofs for combinatorics?

Yes, this approach integrates with Lean 4 and mathlib4 to formalize generating functions, relying on formal power series manipulation to validate algebraic identities and extract coefficients within the proof environment.

Does generating function manipulation work for proving algebraic identities in mathlib4?

Generating function manipulation works for proving algebraic identities in mathlib4 by encoding sequences as power series and using coefficient extraction to formally verify the identity within the proof assistant.

How do I extract coefficients from a convolution of formal power series in Lean 4?

Manipulate the generating functions algebraically and apply the coefficient extraction logic supported by mathlib4 to isolate the specific sequence terms from the convolution.