Claude Code Plugins

Community-maintained marketplace

Feedback

infinity-operads

@plurigrid/asi
0
0

∞-Operads for pairwise/tritwise Cat# interactions with lazy ACSet materialization unifying effective, realizability, and Grothendieck topoi via dendroidal Segal spaces.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name infinity-operads
description ∞-Operads for pairwise/tritwise Cat# interactions with lazy ACSet materialization unifying effective, realizability, and Grothendieck topoi via dendroidal Segal spaces.
version 1.0.0

∞-Operads Skill (ERGODIC 0)

"The dendroidal nerve carries operads to ∞-operads exactly as the simplicial nerve carries categories to ∞-categories." — Cisinski-Moerdijk

Trit: 0 (ERGODIC)
Color: #26D826 (Green)
Role: Coordinator/Transporter XIP: Dendroidal (Ω-set) → Cat# horizontal morphism

Core Insight: Pairwise = Bicomodule, Tritwise = Equipment Tensor

Interaction Type Cat# Structure Operad View Lazy ACSet
Pairwise Bicomodule composition in Prof Binary operation JOIN on demand
Tritwise Equipment tensor ⊗ (GF(3) balanced) Ternary tree grafting Materialized view
N-ary ∞-operad algebra evaluation Dendroidal composition Recursive CTE

1. Dendroidal Sets and ∞-Operads

Ω-Category (Tree Category)

Objects: Finite rooted trees T with labelled edges Morphisms: Face/degeneracy maps (like Δ for simplicial sets)

       r
      /|\         
     e1 e2 e3     ∈ Ω  (corolla with 3 inputs)

Dendroidal Set

Functor X: Ω^op → Set

  • X(T) = set of T-shaped operations
  • Face maps = composition
  • Degeneracy maps = identity insertion

∞-Operad as Dendroidal Segal Space

A dendroidal set satisfying:

  1. Segal condition: Inner horn fillers (composition exists)
  2. Completeness: Isomorphisms ≃ homotopies (for Rezk-completion)
Nerve: Operads → dSet
N_dO(T) = Hom_Operad(Ω(T), O)

2. Cat# Equipment ↔ ∞-Operads

Horizontal Morphisms as Pairwise Interactions

In Cat# = Comod(P):

  • Objects = polynomial comonads (skills with trit)
  • Horizontal morphisms = bicomodules = pra-functors

Pairwise interaction = bicomodule M: C ↛ D:

M: C^op × D → Set

Equipment Tensor as Tritwise Interactions

The equipment structure provides:

⊗: Prof(C, D) × Prof(D, E) → Prof(C, E)

Tritwise interaction = tensor of three bicomodules:

M ⊗ N ⊗ P: C ↛ E  where GF(3)(M, N, P) = 0

∞-Operad Algebra = N-ary Interaction

For ∞-operad O and category C:

Alg_O(C) = Fun^⊗(O, C)

N-ary skill interaction = O-algebra evaluation:

eval: O(n) × C^n → C

3. Lazy ACSet Materialization

Schema: Lazy Geometric Morphisms

@present SchLazyTopos(FreeSchema) begin
  # Objects
  Topos::Ob
  Site::Ob
  Functor::Ob
  
  # Types of topoi
  is_grothendieck::Attr(Topos, Bool)
  is_effective::Attr(Topos, Bool)
  is_realizability::Attr(Topos, Bool)
  
  # Geometric morphism = adjoint pair (f^*, f_*)
  GeomMorph::Ob
  source::Hom(GeomMorph, Topos)
  target::Hom(GeomMorph, Topos)
  
  # Lazy parts (computed on demand)
  inverse_image::Hom(GeomMorph, Functor)  # f^* (left adjoint)
  direct_image::Hom(GeomMorph, Functor)   # f_* (right adjoint)
  
  # Category of elements for on-demand computation
  ∫::Hom(Functor, Site)
end

Lazy Evaluation via Category of Elements

Instead of materializing all parts:

# Don't compute: X(ob) for all ob ∈ C
# Instead: ∫X = category of elements, evaluate locally

function lazy_parts(X::ACSet, query::Query)
    # Only materialize parts matching query
    ∫X = category_of_elements(X)
    return filter(∫X, query)
end

DuckDB Lazy Views

-- Lazy view: pairwise interactions as bicomodules
CREATE OR REPLACE VIEW v_pairwise_bicomodule AS
SELECT 
    s1.skill_id AS source,
    s2.skill_id AS target,
    s1.trit + s2.trit AS gf3_partial,
    CASE 
        WHEN s1.trit = -1 THEN 'Ran_K → Adj'
        WHEN s1.trit = 0 THEN 'Adj → ?'
        WHEN s1.trit = 1 THEN 'Lan_K → ?'
    END AS migration_type,
    s1.color || ' → ' || s2.color AS color_flow
FROM catsharp_skills s1
CROSS JOIN catsharp_skills s2
WHERE s1.skill_id != s2.skill_id
-- Lazy: only materialize on query with specific source/target
;

-- Lazy view: tritwise GF(3) balanced interactions
CREATE OR REPLACE VIEW v_tritwise_equipment AS
SELECT 
    s1.skill_id AS minus_skill,
    s2.skill_id AS zero_skill,
    s3.skill_id AS plus_skill,
    (s1.trit + s2.trit + s3.trit) AS gf3_sum,
    CASE (s1.trit + s2.trit + s3.trit) % 3 
        WHEN 0 THEN '✓ BALANCED'
        ELSE '✗ VIOLATION'
    END AS status,
    -- Equipment tensor structure
    s1.kan_role || ' ⊗ ' || s2.kan_role || ' ⊗ ' || s3.kan_role AS equipment_tensor,
    -- Color flow
    s1.color || ' ⊗ ' || s2.color || ' ⊗ ' || s3.color AS color_tensor
FROM catsharp_skills s1
CROSS JOIN catsharp_skills s2
CROSS JOIN catsharp_skills s3
WHERE s1.trit = -1 AND s2.trit = 0 AND s3.trit = 1
-- Lazy: exponentially many rows, query with constraints
;

-- Lazy view: geometric morphisms between skill-topoi
CREATE OR REPLACE VIEW v_geometric_morphism AS
SELECT 
    source.skill_id AS source_topos,
    target.skill_id AS target_topos,
    source.home AS source_home,
    target.home AS target_home,
    -- Adjoint pair: inverse_image ⊣ direct_image
    source.kan_role AS inverse_image,  -- Left adjoint
    target.kan_role AS direct_image,   -- Right adjoint
    -- Topos type
    CASE source.home
        WHEN 'Presheaves' THEN 'grothendieck'
        WHEN 'Span' THEN 'effective'
        WHEN 'Prof' THEN 'realizability'
    END AS topos_type
FROM catsharp_skills source
CROSS JOIN catsharp_skills target
WHERE source.skill_id != target.skill_id
-- Lazy: materialize specific morphism on demand
;

4. Topos Unification: Effective ≅ Realizability ≅ Grothendieck

The Three Topoi

Topos Type Cat# Home Trit Key Property
Grothendieck Presheaves +1 Sheaves on site (generators)
Realizability Prof 0 Computable functions (transport)
Effective Span -1 Quotients of decidable sets (validators)

Geometric Morphisms Make Them Identical (Lazy View)

The key insight: all geometric morphisms form a 2-category (or (∞,1)-category) and the lazy ACSet materialization computes:

Geom(E, F) = { f: E → F | f^* ⊣ f_* }

Cat# Equipment Unifies Them

┌─────────────────────────────────────────────────────────────────────────┐
│  Cat# Equipment Structure Unifying Topoi                                │
│                                                                          │
│           Span (Effective)                                              │
│               ↑ Ran_K                                                   │
│               │                                                          │
│  Presheaves ←──┼── Prof (Realizability)                                 │
│    (Groth)     │      ↑ Adj                                             │
│       ↑ Lan_K  │      │                                                  │
│       └────────┴──────┘                                                  │
│                                                                          │
│  GF(3) Conservation: (-1) + (0) + (+1) ≡ 0 (mod 3)                      │
│  = Naturality condition = All three topoi are equivalent                │
└─────────────────────────────────────────────────────────────────────────┘

Naturality as Topos Equivalence

The naturality square:

G(f) ∘ η_A = η_B ∘ F(f)

Becomes the topos equivalence via:

  1. Inverse image f^* : Sh(Y) → Sh(X) preserves finite limits
  2. Direct image f_* : Sh(X) → Sh(Y) is right adjoint
  3. GF(3) = 0 ensures the triangle commutes

5. GF(3) Triads

# Core ∞-Operads Triads

# Dendroidal Core
segal-types (-1) ⊗ infinity-operads (0) ⊗ rezk-types (+1) = 0 ✓

# Cat# Equipment
temporal-coalgebra (-1) ⊗ infinity-operads (0) ⊗ free-monad-gen (+1) = 0 ✓

# Topos Unification
sheaf-cohomology (-1) ⊗ infinity-operads (0) ⊗ topos-generate (+1) = 0 ✓

# Lazy Materialization
persistent-homology (-1) ⊗ infinity-operads (0) ⊗ oapply-colimit (+1) = 0 ✓

# Spivak Cat# Integration
yoneda-directed (-1) ⊗ infinity-operads (0) ⊗ operad-compose (+1) = 0 ✓

# Cisinski-Moerdijk
kinetic-block (-1) ⊗ infinity-operads (0) ⊗ gay-mcp (+1) = 0 ✓

6. Commands

# Query pairwise bicomodule interactions
just infinity-pairwise source=kan-extensions target=operad-compose

# Find all GF(3) balanced tritwise interactions
just infinity-tritwise --balanced

# Lazy materialize geometric morphisms for a skill
just infinity-geom-morph --skill=acsets

# Show topos unification status
just infinity-topos-unify

# Generate ∞-operad algebra evaluation diagram
just infinity-algebra-eval --operad=E_n --arity=3

7. Python Extension

# Add to catsharp_skill_acset_mapping.py

def create_infinity_operad_views():
    """Create lazy materialization views for ∞-operad interactions"""
    return """
    -- Dendroidal tree structure for n-ary operations
    CREATE OR REPLACE VIEW v_dendroidal_tree AS
    WITH RECURSIVE tree AS (
        -- Base: corollas (single node)
        SELECT skill_id, trit, 1 AS depth, skill_id AS root
        FROM catsharp_skills
        
        UNION ALL
        
        -- Recursive: graft trees
        SELECT 
            t.skill_id || '◁' || s.skill_id AS skill_id,
            (t.trit + s.trit) % 3 AS trit,
            t.depth + 1 AS depth,
            t.root
        FROM tree t
        JOIN catsharp_skills s ON s.skill_id != t.skill_id
        WHERE t.depth < 3  -- Limit recursion
    )
    SELECT * FROM tree;
    
    -- ∞-operad algebra: evaluate n-ary operation
    CREATE OR REPLACE VIEW v_operad_algebra_eval AS
    SELECT 
        'E_' || COUNT(*) AS operad,
        GROUP_CONCAT(skill_id, ' ⊗ ') AS operands,
        SUM(trit) AS trit_sum,
        CASE SUM(trit) % 3 
            WHEN 0 THEN 'coherent'
            ELSE 'obstruction'
        END AS evaluation_status
    FROM catsharp_skills
    GROUP BY CUBE(trit)  -- All possible groupings
    HAVING COUNT(*) >= 2;
    
    -- Topos equivalence via geometric morphisms
    CREATE OR REPLACE VIEW v_topos_equivalence AS
    SELECT 
        s1.home AS topos_1,
        s2.home AS topos_2,
        COUNT(*) AS morphism_count,
        SUM(s1.trit + s2.trit) % 3 AS gf3_balance
    FROM catsharp_skills s1
    JOIN catsharp_skills s2 ON s1.home != s2.home
    GROUP BY s1.home, s2.home;
    """

# Lazy ACSet materialization
class LazyACSetMaterializer:
    """Compute ACSet parts on demand, not upfront"""
    
    def __init__(self, schema, conn):
        self.schema = schema
        self.conn = conn
        self._cache = {}
    
    def parts(self, ob: str, query: str = None):
        """Materialize parts of object ob matching query"""
        cache_key = (ob, query)
        if cache_key in self._cache:
            return self._cache[cache_key]
        
        # Lazy SQL execution
        sql = f"SELECT * FROM catsharp_skills WHERE 1=1"
        if query:
            sql += f" AND {query}"
        
        result = self.conn.execute(sql).fetchall()
        self._cache[cache_key] = result
        return result
    
    def geometric_morphism(self, source: str, target: str):
        """
        Compute geometric morphism between skill-topoi.
        Only materializes the specific adjoint pair.
        """
        return {
            'source': source,
            'target': target,
            'inverse_image': f'Lan_{source}',  # f^*
            'direct_image': f'Ran_{target}',   # f_*
            'adjunction': 'f^* ⊣ f_*'
        }
    
    def category_of_elements(self, functor_id: str):
        """∫F: category of elements for on-demand traversal"""
        # Lazy: return iterator, not list
        sql = f"""
            SELECT skill_id, trit, color 
            FROM catsharp_skills 
            WHERE skill_id LIKE '%{functor_id}%'
        """
        return self.conn.execute(sql).fetchdf().iterrows()

8. Neighbor Awareness (Braided Monoidal)

Direction Neighbor Relationship
Left (-1) kan-extensions Universal property source (Lan ⊣ Res ⊣ Ran)
Right (+1) operad-compose Composition target (oapply colimit)

9. References

  1. Cisinski, D.-C. & Moerdijk, I. (2011). "Dendroidal Sets and Simplicial Operads." arXiv:0906.2949
  2. Lurie, J. (2017). "Higher Algebra" §2 (∞-Operads)
  3. Barwick, C. & Schommer-Pries, C. (2021). "On the Unicity of the Theory of Higher Categories"
  4. Spivak, D.I. (2023). "All Concepts are Cat#" (ACT 2023)
  5. Johnstone, P.T. (2002). "Sketches of an Elephant" (Topos Theory)
  6. van Oosten, J. (2008). "Realizability: An Introduction to its Categorical Side"

10. See Also

  • catsharp — Cat# = Comod(P) polynomial equipment
  • kan-extensions — Universal property formulation
  • operad-compose — Operadic composition via oapply
  • asi-polynomial-operads — Full polynomial functor theory
  • kinetic-block — Dendroidal stratification patterns
  • segal-types — ∞-category Segal conditions
  • rezk-types — Complete Segal spaces

Scientific Skill Interleaving

This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:

Graph Theory

  • networkx [○] via bicomodule
    • Universal graph hub

Bibliography References

  • category-theory: 139 citations in bib.duckdb
  • operads: 5 citations in bib.duckdb