limits-colimits

Problem-solving strategies for limits colimits in category theory

⭐2.2kstars🔀157forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

This Claude skill provides comprehensive problem-solving strategies for limits and colimits within category theory. It integrates formal verification using Lean 4 and symbolic computation with Sympy to help users identify limit types, verify universal properties, and compute concrete examples in various categories. By combining mathematical theory with computational tools, it streamlines the process of formalizing and solving complex categorical problems.

Use Cases

  • Case 1: Formalizing mathematical proofs in Lean 4 involving products, equalizers, pullbacks, and their dual colimit structures.
  • Case 2: Computing concrete limits in the category of Sets, such as solving for pullbacks or equalizers using symbolic Python scripts.
  • Case 3: Verifying universal properties by constructing unique morphisms and ensuring diagram commutativity for specific cones and cocones.
  • Case 4: Analyzing the preservation of limits and colimits under adjoint functors or representable functors in advanced research contexts.
namelimits-colimits
description"Problem-solving strategies for limits colimits in category theory"
allowed-tools[Bash, Read]

Limits Colimits

When to Use

Use this skill when working on limits-colimits problems in category theory.

Decision Tree

  1. Identify Limit Type

    • Product: limit of discrete diagram
    • Equalizer: limit of parallel pair f, g: A -> B
    • Pullback: limit of A -> C <- B
    • Terminal object: limit of empty diagram
    • Lean 4: CategoryTheory.Limits namespace
  2. Verify Universal Property

    • Cone from L with projections pi_i: L -> D_i
    • For any cone from X, unique morphism u: X -> L
    • Triangles commute: pi_i . u = cone_i
    • Lean 4: IsLimit.lift gives the unique morphism
  3. Colimit (Dual)

    • Coproduct: colimit of discrete diagram
    • Coequalizer: colimit of parallel pair
    • Pushout: colimit of A <- C -> B
    • Initial object: colimit of empty diagram
  4. Compute Limits Concretely

    • In Set: product = Cartesian product
    • Equalizer = {x | f(x) = g(x)}
    • Pullback = {(a,b) | f(a) = g(b)}
    • sympy_compute.py solve "f(a) == g(b)"
  5. Preservation

    • Right adjoint preserves limits
    • Left adjoint preserves colimits
    • Representable functors preserve limits
    • Lean 4: Adjunction.rightAdjointPreservesLimits
    • See: .claude/skills/lean4-limits/SKILL.md for exact syntax

Tool Commands

Lean4_Limit

# Lean 4: import CategoryTheory.Limits.Shapes.Products

Lean4_Universal

# Lean 4: IsLimit.lift cone -- unique morphism from universal property

Sympy_Pullback

uv run python -m runtime.harness scripts/sympy_compute.py solve "f(a) == g(b)"

Lean4_Build

lake build  # Compiler-in-the-loop verification

Cognitive Tools Reference

See .claude/skills/math-mode/SKILL.md for full tool documentation.