lean-hit-development

Guide adding Higher Inductive Types to the ComputationalPaths Lean 4 library.

1|Updated Nov 11, 2025
One-click install
npx skills add https://github.com/Arthur742Ramos/ComputationalPathsLean --skill lean-hit-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lean-hit-development
Source: https://github.com/Arthur742Ramos/ComputationalPathsLean/tree/main/.claude/skills/lean-hit-development
Command: npx skills add https://github.com/Arthur742Ramos/ComputationalPathsLean --skill lean-hit-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a blueprint for adding new Higher Inductive Types (HITs) to the ComputationalPaths Lean 4 library, including axiomatization, recursion principles, and encoding/decoding of π₁.

Core Features & Use Cases

  • Define axioms for a new HIT type and its point/path constructors
  • Add recursion principles and computation rules
  • Build a group presentation and implement encode/decode between π₁ and the presentation
  • Follow established HIT patterns (Circle, Torus, Sphere) to ensure consistency

Quick Start

Create a new HIT skeleton under ComputationalPaths/Path/HIT/YourHIT.lean with required axioms, a basic encode/decode, and register your piOneEquiv.

Frequently Asked Questions about lean-hit-development

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

FAQPage Schema
How do I add a new Higher Inductive Type to a Lean 4 library?

Add a new Higher Inductive Type by defining axioms for point and path constructors, implementing recursion principles with computation rules, and building an encode/decode scheme between π₁ and a group presentation. Follow established HIT patterns like Circle or Torus for consistency.

What are encode/decode schemes in the context of π₁ calculations?

Encode/decode schemes establish a correspondence between the fundamental group π₁ of a space and an abstract group presentation. Encoding maps paths to group elements; decoding reconstructs paths from presentations, enabling computational manipulation of topological invariants.

Do I need to define recursion principles for every new HIT?

Yes. Recursion principles with β-rules and computation rules are required for every HIT. They specify how functions eliminate into the type and ensure their behavior on constructors, enabling sound inductive reasoning over the space.

How do I structure axioms and constructors for common spaces like S¹ or T²?

Define base point constructors and loop constructors as axioms. For S¹, declare a base point and one loop; for T², add two commuting loops. Wrap the result in SimpleEquiv packaging and register the piOneEquiv to make the structure accessible.

What's the relationship between group presentations and HITs?

Group presentations abstract the algebraic structure of π₁ for a HIT. The encode/decode interface maps between concrete HIT paths and presentation generators, allowing topological computations to leverage group-theoretic algorithms and simplifications.

Can I reuse patterns from existing HITs when defining new ones?

Yes. Existing Circle, Torus, and Sphere implementations provide proven patterns for axiomatization, recursion principles, and encode/decode design. Following these templates ensures consistency and reduces the risk of axiom inconsistency in new HIT declarations.