Get the FREE Ultimate OpenClaw Setup Guide →

limits-colimits

npx machina-cli add skill parcadei/Continuous-Claude-v3/limits-colimits --openclaw
Files (1)
SKILL.md
1.8 KB

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.

Source

git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/math/category-theory/limits-colimits/SKILL.mdView on GitHub

Overview

This skill guides solving limits–colimits problems in category theory. It covers identifying the limit type (product, equalizer, pullback, terminal), verifying the universal property, dualizing for colimits, and performing concrete computations (e.g., in Set). It also notes Lean 4 tooling for formalization.

How This Skill Works

You classify the diagram into a limit or colimit, validate the universal property with a cone and a mediating morphism (often via IsLimit.lift in Lean 4), and then compute concrete representations or check preservation by adjoints. The approach emphasizes a small decision tree and practical checks.

When to Use It

  • Identify the exact limit/colimit type for a given diagram (product, equalizer, pullback, etc.) or its dual (coproduct, coequalizer, pushout, initial).
  • Prove the universal property by constructing the mediating morphism and showing uniqueness (use IsLimit.lift in Lean 4).
  • Apply the dual perspective to handle colimits (coproduct, coequalizer, pushout, initial object).
  • Compute explicit representations in Set to sanity-check (product as Cartesian product, equalizer as {x | f(x) = g(x)}, pullback as {(a,b) | f(a) = g(b)}; use a solver for equations when needed.
  • Formalize or verify results using Lean 4 tooling (Lean4_Limit, Lean4_Universal) and understand preservation results.

Quick Start

  1. Step 1: Identify the limit type for your diagram (Product, Equalizer, Pullback, Terminal).
  2. Step 2: Verify the universal property by constructing the mediating morphism (IsLimit.lift in Lean 4) and check commutativity.
  3. Step 3: If needed, compute concretely in Set or with Sympy to validate, then consider the dual colimit and preservation properties.

Best Practices

  • Start by classifying the diagram into a limit type (Product, Equalizer, Pullback, Terminal) or its colimit dual.
  • Always write down and reference the universal property before constructing a morphism.
  • Use the dual perspective to avoid duplicating effort when working with Colimits.
  • Compute concrete instances in Set to build intuition and catch mistakes.
  • Check preservation facts (right adjoint preserves limits, left adjoint preserves colimits; representable functors preserve limits) and use Lean 4 syntax as needed.

Example Use Cases

  • Compute a pullback in Sets for f: A -> C and g: B -> C, obtaining { (a,b) | f(a) = g(b) }.
  • Compute the equalizer of two functions f, g: X -> Y in Sets, as { x in X | f(x) = g(x) }.
  • Identify the product of objects in Sets as the limit of a discrete diagram with projections.
  • Form the coproduct (disjoint union) as the colimit of a discrete diagram in Sets.
  • Use Lean 4 to prove that right adjoints preserve limits or to construct the universal morphism via IsLimit.lift.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers