Skip to content
Back to skills

Categorical Composition

ASecurity

**Category:** Phase 3 Core - Compositional Architecture **Status:** Skeleton Implementation **Dependencies:** None (foundational)

  • 61 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 6, 2026
developmentgoaws

Works with

  • terminal

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add plurigrid/asi --skill categorical-composition --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Categorical Composition?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Categorical Composition
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/plurigrid-categorical-composition/badge)](https://www.skillsdirectory.com/skills/plurigrid-categorical-composition)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Categorical Composition

**Category:** Phase 3 Core - Compositional Architecture
**Status:** Skeleton Implementation
**Dependencies:** None (foundational)

## Overview

Implements categorical abstractions for compositional learning: Kan extensions for adapting between learning problems, higher adjunctions for bidirectional transformations, and functorial parameter transfer for compositional generalization.

## Capabilities

- **Kan Extensions**: Left/right Kan extensions for problem adaptation
- **Adjunctions**: Adjoint functors for bidirectional transformations
- **Functorial Transfer**: Preserve structure across parameter spaces
- **Compositional Architecture**: Build complex systems from simple components

## Core Components

1. **Category Theory Primitives** (`category_theory.jl`)
   - Category, functor, natural transformation definitions
   - Composition and identity laws
   - Diagram chasing utilities

2. **Kan Extensions** (`kan_extensions.jl`)
   - Left Kan extension (initial/colimit-based)
   - Right Kan extension (terminal/limit-based)
   - Pointwise computation formulas

3. **Adjunctions** (`adjunctions.jl`)
   - Adjoint functor pairs
   - Unit and counit natural transformations
   - Triangle identities verification

4. **Functorial Parameter Transfer** (`functorial_transfer.jl`)
   - Transfer neural network parameters via functors
   - Preserve compositional structure
   - Zero-shot generalization via categorical reasoning

## Integration Points

- **Input from**: All Phase 3 skills (provides compositional framework)
- **Output to**: All Phase 3 skills (foundational abstraction)
- **Coordinates with**: `formal-verification-ai` (correctness proofs)

## Usage

```julia
using CategoricalComposition

# Define source and target categories
C = FiniteCategory(objects=[:A, :B], morphisms=Dict(:f => (:A, :B)))
D = FiniteCategory(objects=[:X, :Y, :Z], morphisms=Dict(:g => (:X, :Y), :h => (:Y, :Z)))

# Define functor F: C -> D
F = Functor(
    source=C,
    target=D,
    object_map=Dict(:A => :X, :B => :Y),
    morphism_map=Dict(:f => :g)
)

# Compute left Kan extension
G = Functor(source=C, target=Set, object_map=Dict(:A => [1,2], :B => [3,4]))
Lan_F_G = left_kan_extension(F, G)

# Verify adjunction
@assert check_adjunction(Lan_F_G, restriction_functor(F))
```

## References

- Mac Lane "Categories for the Working Mathematician" (1971)
- Fong & Spivak "Seven Sketches in Compositionality" (2019)
- Shiebler et al. "Category Theory in Machine Learning" (2021)

## Implementation Status

- [x] Basic category theory primitives
- [x] Functor composition
- [ ] Full Kan extension computation
- [ ] Adjunction verification
- [ ] Neural network parameter transfer demo

Files in this skill

  • SKILL.md2.6 KB
  • category_theory.jl6 KB
  • kan_extensions.jl5.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.