Skip to content
cccskills
FreePublished on GitHub

2-monad

A **2-monad** is a monad internal to a 2-category K. Concretely, it consists of:

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md9.5 KB
  • CONCOMITANT_SKILLS.md5.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

2-Monad Skill

"A 2-monad is a monad in the 2-category of 2-categories — the natural habitat of algebraic structure on categories." — Blackwell, Kelly & Power (1989)

Trit: 0 (ERGODIC - coordinator) Color: #26D826 (Green) Status: Production Ready


Overview

A 2-monad is a monad internal to a 2-category K. Concretely, it consists of:

  • An endo-2-functor T : K → K
  • A 2-natural transformation η : Id_K → T (unit)
  • A 2-natural transformation μ : T² → T (multiplication)
  • Subject to the usual monad laws, now holding as equations between 2-natural transformations

The key insight: by varying the strictness of algebras and morphisms, a single 2-monad T generates a 4×4 grid of categories T-Alg_s, Ps-T-Alg, Lax-T-Alg, Colax-T-Alg with strict/pseudo/lax/colax morphisms between them.

Mathematical Definition

2-Monad (T, η, μ) on 2-category K:

  T : K → K           (endo-2-functor)
  η : Id → T          (unit, 2-natural)
  μ : TT → T          (multiplication, 2-natural)

  μ ∘ Tμ = μ ∘ μT     (associativity)
  μ ∘ Tη = id = μ ∘ ηT (unitality)

The Strictness Grid

The central organizing principle of BKP theory:

                    MORPHISMS
              strict  pseudo  lax   colax
           ┌────────┬────────┬──────┬───────┐
  strict   │ T-Alg_s│ T-Alg  │ T-Algl│ T-Algc│
           ├────────┼────────┼──────┼───────┤
A pseudo   │ Ps-s   │ Ps-T   │ Ps-l │ Ps-c  │
L          ├────────┼────────┼──────┼───────┤
G lax      │ Lax-s  │ Lax-ps │Lax-l │ Lax-c │
S          ├────────┼────────┼──────┼───────┤
  colax    │ Col-s  │ Col-ps │Col-l │ Col-c │
           └────────┴────────┴──────┴───────┘

BKP Default: T-Alg = (strict algebras, pseudo morphisms)
             This is the "right" category for most purposes.

GF(3) Mapping of Strictness

StrictnessTritRoleJustification
Colax-1 (MINUS)ValidatorWeakens structure downward
Pseudo0 (ERGODIC)CoordinatorEquivalence-invariant
Lax+1 (PLUS)GeneratorAdds structure upward
Strict—Fixed pointDegenerate case (all trits equal)

Key Theorems (BKP 1989)

1. Biadjunction

The inclusion J : T-Alg_s → T-Alg has a left biadjoint.
Equivalently: T-Alg has all PIE-limits and J preserves them.

2. Flexible Algebras

A strict T-algebra A is flexible iff it is a retract (in T-Alg)
of a free T-algebra TX for some X.

3. Coherence

Every pseudo T-algebra is equivalent (in T-Alg) to a strict one.
"Pseudo = Strict up to equivalence"

Canonical Examples

2-Monad TKT-Alg_sT-Alg (pseudo)
Free monoidCatStrict monoidal catsMonoidal cats
Free coproductCatCats with strict coproductsCats with coproducts
Free symmetric monoidalCatPermutative catsSymmetric monoidal cats
Idempotent completionCatCauchy-complete catsCauchy-complete cats
Presheaf constructionCat^op—Topoi (as 2-algebras)

Julia/Catlab Integration

using Catlab.CategoricalAlgebra

# 2-Monad as endo-2-functor on Cat
@present Sch2Monad(FreeSchema) begin
    TwoCategory::Ob
    Algebra::Ob
    Morphism::Ob
    TwoCell::Ob

    alg_carrier::Hom(Algebra, TwoCategory)     # Underlying object
    alg_action::Hom(Algebra, Algebra)          # T-action
    mor_source::Hom(Morphism, Algebra)
    mor_target::Hom(Morphism, Algebra)
    cell_source::Hom(TwoCell, Morphism)
    cell_target::Hom(TwoCell, Morphism)

    Strictness::AttrType  # {-1, 0, +1} for colax/pseudo/lax
    alg_strictness::Attr(Algebra, Strictness)
    mor_strictness::Attr(Morphism, Strictness)
end

Why This Skill Was Missing

The concept of 2-monads was distributed across multiple skills without a single owner:

  1. synthetic-adjunctions handles adjunctions but not their monad-generating capacity in 2-categories
  2. kan-extensions covers Lan/Ran but not the 2-monad T whose algebras are the extended structures
  3. infinity-operads connects to operads-as-2-monads (Weber) but doesn't own the BKP theory
  4. free-monad-gen generates free monads in 1-categories, not free 2-monads
  5. elements-infinity-cats works at the ∞-level but doesn't specialize to strict 2-monads

Gap: No skill owned the strictness grid, the BKP biadjunction theorem, or the T-Alg construction. This skill fills that gap as the central coordinator for 2-categorical algebraic structure.


Bidirectional Neighbor Index

Edge-Scoped Propagator Table

EdgeDirectionScopeFires When
2-monad → doctrinal-adjunctionoutboundscope:composeAdjunction between T-algebras formed
doctrinal-adjunction → 2-monadinboundscope:changeLax/colax structure on adjoint discovered
2-monad → flexible-algebraoutboundscope:changeNew T-algebra constructed
flexible-algebra → 2-monadinboundscope:verifyFlexibility of algebra verified
2-monad → codescentoutboundscope:composePseudoalgebra needs strictification
codescent → 2-monadinboundscope:verifyCodescent object validates coherence
2-monad → graded-monadoutboundscope:changeIndex category for grading identified
graded-monad → 2-monadinboundscope:composeGraded monad embedded as 2-monad
2-monad → synthetic-adjunctionsoutboundscope:composeMonad extracted from adjunction
synthetic-adjunctions → 2-monadinboundscope:changeAdjunction L ⊣ R generates monad RL
2-monad → kan-extensionsoutboundscope:composeLan/Ran gives 2-monad on presheaves
kan-extensions → 2-monadinboundscope:changeMigration via T-algebra structure
2-monad → free-monad-genoutboundscope:changeFree T-algebra needed
free-monad-gen → 2-monadinboundscope:composeFree monad lifted to 2-monad
2-monad → infinity-operadsoutboundscope:composeOperad realized as polynomial 2-monad
infinity-operads → 2-monadinboundscope:changeDendroidal nerve of T-Alg
2-monad → acsets-algebraic-databasesoutboundscope:changeC-Set categories are 2-monadic
acsets-algebraic-databases → 2-monadinboundscope:verifySchema migration preserves T-structure
2-monad → segal-typesoutboundscope:verifyNerve of T-Alg is Segal
segal-types → 2-monadinboundscope:verifyComposition in T-Alg validated
2-monad → open-gamesoutboundscope:composeGame composition via 2-monadic structure
open-games → 2-monadinboundscope:changePara(Optic) as 2-monad algebra
2-monad → bidirectional-lens-logicoutboundscope:changeLax/colax = covariant/contravariant
bidirectional-lens-logic → 2-monadinboundscope:verify4-kind lattice validates strictness grid

Mutual Awareness Summary

         codescent (-1)
              ↑ verify
              │
flexible (+1) ←── 2-MONAD (0) ──→ doctrinal-adj (0)
              │         │
              ↓ compose ↓ change
      graded (0)   synthetic-adj (+1)

+ 8 additional edges to existing skills

Total edges: 24 (12 bidirectional pairs) Propagator balance: 8 scope:change + 8 scope:compose + 8 scope:verify = balanced

GF(3) Triads

codescent (-1) ⊗ 2-monad (0) ⊗ flexible-algebra (+1) = 0 ✓  [BKP Core]
sheaf-cohomology (-1) ⊗ 2-monad (0) ⊗ synthetic-adjunctions (+1) = 0 ✓  [Adjunction-Monad]
segal-types (-1) ⊗ 2-monad (0) ⊗ free-monad-gen (+1) = 0 ✓  [Free-Forgetful]
linear-logic (-1) ⊗ 2-monad (0) ⊗ operad-compose (+1) = 0 ✓  [Resource-Algebraic]
covariant-fibrations (-1) ⊗ 2-monad (0) ⊗ discopy-operads (+1) = 0 ✓  [Fibered-Operadic]

Commands

just 2-monad-grid              # Display full strictness grid
just 2-monad-algebras T        # List T-algebra categories
just 2-monad-from-adjunction L R  # Extract monad from adjunction
just 2-monad-coherence check   # Verify pseudo = strict up to equiv
just 2-monad-bkp-biadjoint T   # Compute BKP left biadjoint

References

  • Blackwell, Kelly & Power (1989). "Two-dimensional monad theory." JPAA 59:1-41
  • Kelly (1974). "Doctrinal adjunction." LNM 420:257-280
  • Lack (2002). "Codescent objects and coherence." JPAA 175:223-241
  • Lack (2010). "A 2-categories companion." IMA Vol. Math. Appl. 152:105-191
  • Weber (2015). "Operads as polynomial 2-monads." TAC 30:1659-1712
  • Street (1972). "The formal theory of monads." JPAA 2:149-168

SDF Interleaving

Primary Chapter: 6. Layering

Concepts: layered data, metadata, provenance

GF(3) Balanced Triad

2-monad (0) + SDF.Ch6 (0) + [balancer] (0) = 0

Skill Trit: 0 (ERGODIC - coordination)

Connection Pattern

Layering adds structure level by level. 2-monads layer algebraic structure on categories, with each strictness level a new layer.

CT lattice atlas

Part of: para-mensch-commons (CT lattice family).

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Model ElevenLabs voice synthesis as an ACSet schema with Unison ability handlers for typed voice operations. Use when integrating ElevenLabs TTS into category-theoretic pipelines, building typed voice synthesis workflows, or managing multi-voice narration with GF(3) conservation.

The English summary is being prepared. Showing the original description.

plurigrid/asi70Updated Jul 10, 2026

Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.

The English summary is being prepared. Showing the original description.

plurigrid/asi70Updated Jul 10, 2026

13c0e3

Free

Gay MCP skill at invocation 26

The English summary is being prepared. Showing the original description.

plurigrid/asi70Updated Jul 10, 2026

19d57d

Free

Gay MCP skill at invocation 5

The English summary is being prepared. Showing the original description.

plurigrid/asi70Updated Jul 10, 2026

1ea91a

Free

Gay MCP skill at invocation 27

The English summary is being prepared. Showing the original description.

plurigrid/asi70Updated Jul 10, 2026

1eab21

Free

Gay MCP skill at invocation 3

The English summary is being prepared. Showing the original description.

plurigrid/asi70Updated Jul 10, 2026

See all skills by plurigrid

Report a problem with this skill