polynomial_time_reductions

Formulate polynomial-time reductions with Lean 4 correctness proof templates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a formal, structured approach to prove hardness of computational problems by constructing polynomial-time reductions from known-hard problems to a target problem, enabling rigorous NP-hardness or NP-completeness arguments.

Core Features & Use Cases

  • Formal reduction blueprint: defines a computable transformation from instances of a source problem to instances of a target problem and establishes correctness criteria.
  • Correctness scaffolding: outlines forward and backward directions to ensure YES-instances map correctly between problems, with placeholders for actual arguments.
  • Lean 4 templates: offers Lean 4 skeletons for encoding problems, reductions, and proofs to guide formalization and verification.

Quick Start

Define a reduction from a known hard problem (e.g., SAT) to your target problem and prove that a solution to the target corresponds to a solution to the source.

Frequently Asked Questions about polynomial_time_reductions

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

FAQPage Schema
How do I prove NP-hardness using a polynomial-time reduction?

To prove NP-hardness using a polynomial-time reduction, define a computable transformation from a known-hard problem like SAT to your target problem, then establish correctness criteria showing YES-instances map correctly.

Can I formalize complexity theory reductions in Lean 4?

Yes, you can formalize complexity theory reductions in Lean 4 by using provided templates that offer skeletons for encoding computational problems, defining reductions, and structuring the formal proofs for verification.

What is the structure for a polynomial-time reduction correctness proof?

A polynomial-time reduction correctness proof requires establishing both forward and backward directions, ensuring that YES-instances of the source problem map correctly to YES-instances of the target problem and vice versa.

How do I show a computational problem is NP-complete?

To show a computational problem is NP-complete, construct a formal reduction blueprint from a known NP-hard problem to your target problem and verify that the transformation preserves solution existence in both directions.

Do I need to define a transformation function for every NP-hardness proof?

Yes, defining a computable transformation function from instances of a source problem to instances of a target problem is required, along with proving this transformation executes in polynomial time and preserves answer mappings.