LambdaCat banner
skishore23 skishore23

LambdaCat

Development community

Description

Build composable, reliable agents on a typed categorical core — functional plan algebra with lenses, loops, and runtime law checks

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

LambdaCat Logo

🐾 LambdaCat

A practical functional programming library grounded in category theory.

Features

**Core Category Theory**: Complete implementation of categories with objects, morphisms, composition, and identities. Includes functors and natural transformations.

**Law Checking**: Built-in test suites that verify mathematical laws for categories, functors, applicatives, and monads at runtime.

**Functional Programming**: Standard typeclasses (Functor, Applicative, Monad) with implementations for Option, Result, Reader, Writer, and State.

**Agent Framework**: Plan execution system with composable operations like `sequence`, `parallel`, `choose`, and `focus`.

**Diagram Rendering**: Export categories and computation plans to Mermaid and Graphviz formats.

**Advanced Features**: Limits, colimits, adjunctions, and Kleisli category construction.


Why LambdaCat?

Category theory provides a rigorous foundation for functional programming. LambdaCat makes these concepts accessible and practical:

  • Composable: Build complex behavior from simple, well-tested components
  • Verifiable: Mathematical laws are checked automatically

Setup

python -m venv .venv
source ./.venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -U pip
pip install -e .

Quick Start

Basic Categories

from LambdaCat.core import obj, arrow, build_presentation, Cat

# Create a category with objects and morphisms
A = obj("A")
B = obj("B")
f = arrow("f", "A", "B")

presentation = build_presentation([A, B], [f])
C = Cat.from_presentation(presentation)

# Composition works as expected
result = C.compose("f", "id:A")  # Returns "f"

Standard Categories

from LambdaCat.core.standard import discrete, simplex, walking_isomorphism

# Discrete category - only identity arrows
D = discrete(["A", "B", "C"])

# Simplex category - linear or