home / skills / plurigrid / asi / synthetic-adjunctions

synthetic-adjunctions skill

/skills/synthetic-adjunctions

This skill generates adjunction data to drive universal constructions, enabling automated limits, colimits, and Kan extensions in directed type theory.

npx playbooks add skill plurigrid/asi --skill synthetic-adjunctions

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.7 KB
---
name: synthetic-adjunctions
description: Synthetic adjunctions in directed type theory for ∞-categorical universal
  constructions.
license: UNLICENSED
metadata:
  trit: -1
  source: local
---

# Synthetic Adjunctions Skill: Universal Construction Generation

**Status**: ✅ Production Ready
**Trit**: +1 (PLUS - generator)
**Color**: #D82626 (Red)
**Principle**: Adjunctions generate universal structures
**Frame**: Directed type theory with adjoint functors

---

## Overview

**Synthetic Adjunctions** generates adjunction data in directed type theory. Adjunctions are the fundamental generators of universal constructions—limits, colimits, Kan extensions, and monads all arise from adjunctions.

1. **Unit/counit**: Natural transformations η, ε
2. **Triangle identities**: Coherence conditions
3. **Mate correspondence**: Bijection between hom-sets
4. **Universal properties**: Initial/terminal characterizations

## Core Formula

```
L ⊣ R adjunction:
  η : Id → R ∘ L       (unit)
  ε : L ∘ R → Id       (counit)
  
Triangle identities:
  (εL) ∘ (Lη) = id_L
  (Rε) ∘ (ηR) = id_R
```

```haskell
-- Generate adjunction from universal property
generate_adjunction :: FreeConstruction → Adjunction
generate_adjunction (Free F) = Adjunction {
    left = F,
    right = Forgetful,
    unit = η_universal,
    counit = ε_evaluation
}
```

## Key Concepts

### 1. Adjunction Generation

```agda
-- Construct adjunction from representability
representable-adjunction : 
  (F : A → B) → (G : B → A) →
  ((a : A) (b : B) → Hom_B(F a, b) ≃ Hom_A(a, G b)) →
  Adjunction F G
representable-adjunction F G iso = record
  { unit = λ a → iso.inv (id (F a))
  ; counit = λ b → iso.to (id (G b))
  ; triangle-L = from-iso-naturality
  ; triangle-R = from-iso-naturality
  }
```

### 2. Free-Forgetful Generation

```agda
-- Generate free algebra adjunction
free-forgetful : (T : Monad) → Adjunction (Free T) (Forgetful T)
free-forgetful T = record
  { unit = T.η
  ; counit = T.μ ∘ T.map(eval)
  ; triangle-L = T.left-unit
  ; triangle-R = T.right-unit
  }

-- Free monoid on sets
Free-Mon : Adjunction Free Underlying
Free-Mon = free-forgetful List-Monad
```

### 3. Kan Extension via Adjunction

```agda
-- Left Kan extension as left adjoint to restriction
Lan : (K : A → B) → Adjunction (Lan_K) (Res_K)
Lan K = record
  { left = λ F → colim_{K/b} F ∘ proj
  ; right = λ G → G ∘ K
  ; unit = universal-arrow
  ; counit = eval-at-colimit
  }
```

### 4. Generate Limits from Adjunctions

```agda
-- Diagonal adjunction gives limits
limit-adjunction : Adjunction Δ lim
limit-adjunction = record
  { left = Δ         -- diagonal functor
  ; right = lim      -- limit functor
  ; unit = proj      -- projections
  ; counit = univ    -- universal property
  }
```

## Commands

```bash
# Generate adjunction from free construction
just adjunction-generate --free-on Monoid

# Synthesize unit/counit
just adjunction-unit-counit L R

# Verify triangle identities
just adjunction-verify adj.rzk
```

## Integration with GF(3) Triads

```
covariant-fibrations (-1) ⊗ directed-interval (0) ⊗ synthetic-adjunctions (+1) = 0 ✓  [Transport]
yoneda-directed (-1) ⊗ elements-infinity-cats (0) ⊗ synthetic-adjunctions (+1) = 0 ✓  [Yoneda-Adjunction]
segal-types (-1) ⊗ directed-interval (0) ⊗ synthetic-adjunctions (+1) = 0 ✓  [Segal Adjunctions]
```

## Related Skills

- **elements-infinity-cats** (0): Coordinate ∞-categorical adjunctions
- **covariant-fibrations** (-1): Validate fibration conditions
- **free-monad-gen** (+1): Generate free monads from adjunctions

---

**Skill Name**: synthetic-adjunctions
**Type**: Universal Construction Generator
**Trit**: +1 (PLUS)
**Color**: #D82626 (Red)

Overview

This skill generates adjunction data in directed type theory to produce universal constructions such as limits, colimits, Kan extensions, and monads. It synthesizes unit and counit natural transformations, enforces triangle identities, and exposes mate correspondences between hom-sets. The primary aim is to turn representability or free/forgetful patterns into explicit adjunction records suitable for formal development and computation.

How this skill works

Given a specification (representability isomorphism, free construction, or a restriction/extension pattern), the skill builds left and right functors plus unit and counit maps and proves the triangle identities. It can derive adjunctions from representability, construct free-forgetful adjunctions from monads, and produce left Kan extensions as left adjoints to restriction. The outputs are structured adjunction records and verification routines for coherence conditions.

When to use it

  • You have a representability isomorphism and need the corresponding adjunction.
  • You want to generate a free-forgetful adjunction from a monad or algebraic theory.
  • You need to construct left or right Kan extensions via adjointness.
  • You want to derive limits/colimits from diagonal or evaluation adjunctions.
  • You need machine-verifiable unit/counit and triangle identity proofs.

Best practices

  • Provide an explicit hom-set bijection or universal property when possible to get the strongest, constructive adjunction.
  • Prefer free/forgetful patterns for algebraic constructions (monads, free monoids) to reuse existing monad structure.
  • Keep functor definitions composable and small so unit/counit proofs follow naturally from naturality.
  • Use the skill’s verification commands to confirm triangle identities and coherence early in development.
  • Compose adjunctions modularly: build complex universal constructions by composing simpler adjunction records.

Example use cases

  • Generate an adjunction from a Hom-isomorphism: produce unit/counit and triangle proofs from a representability witness.
  • Construct the free-forgetful adjunction for monoids using the list monad and verify the counit/evaluation.
  • Compute a left Kan extension as a left adjoint to restriction and export the universal arrow and evaluation maps.
  • Derive limits from the diagonal adjunction and obtain projection maps and universal property witnesses.
  • Automate creation of adjunction data when transforming a FreeConstruction into an Adjunction record in a type-theoretic development.

FAQ

What inputs does the skill require to generate an adjunction?

Provide either a hom-set bijection (representability), a free/monad specification, or a restriction/extension pattern (for Kan extensions). The skill uses these to produce functors, unit/counit, and coherence proofs.

Can the skill verify triangle identities automatically?

Yes. It emits verification routines and can check triangle identities and naturality conditions for the generated unit and counit.