oapply-colimit

plurigrid's avatarfrom plurigrid

oapply: Operad algebra evaluation via colimits. Composes machines/resource sharers.

⭐1stars🔀2forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

The oapply-colimit skill is a specialized tool for the automated composition of complex dynamical systems using category theory. By leveraging the AlgebraicDynamics.jl framework, it enables users to compute colimits over wiring patterns to integrate individual machines or resource sharers into a unified composite model. This skill is essential for researchers and engineers working with AlgebraicJulia to perform rigorous, mathematically-backed system modeling and architecture design.

Use Cases

  • Case 1: Modeling complex ecological or biological systems, such as multi-species Lotka-Volterra models, by identifying and gluing shared state variables through undirected wiring diagrams.
  • Case 2: Designing hierarchical control systems and signal-flow networks by composing directed machines to define precise feedback loops and data transitions.
  • Case 3: Automating the construction of large-scale scientific simulations where component dynamics must be mathematically integrated via pushouts and coproducts to ensure consistency.
  • Case 4: Facilitating academic research in applied category theory by providing a computational interface for operad algebra evaluation and diagrammatic reasoning.
nameoapply-colimit
description"oapply: Operad algebra evaluation via colimits. Composes machines/resource sharers."
sourceAlgebraicJulia/AlgebraicDynamics.jl
licenseMIT
trit+1

oapply-colimit Skill

Core Pattern

oapply computes colimit of component diagram over wiring pattern:

using AlgebraicDynamics

# Pattern + components → composite
composite = oapply(wiring_diagram, [machine1, machine2, ...])

Two Composition Modes

Mode Type Gluing Example
Undirected ResourceSharer Pushout (shared state) Lotka-Volterra
Directed Machine Wiring (signal flow) Control systems

Implementation

function oapply(d::UndirectedWiringDiagram, xs::Vector{ResourceSharer})
    # 1. Coproduct of state spaces
    S = coproduct((FinSet ∘ nstates).(xs))
    
    # 2. Pushout identifies shared variables
    S′ = pushout(portmap, junctions)
    
    # 3. Induced dynamics sum at junctions
    return ResourceSharer(induced_interface, induced_dynamics)
end

GF(3) Triads

schema-validation (-1) ⊗ acsets (0) ⊗ oapply-colimit (+1) = 0 ✓
interval-presheaf (-1) ⊗ algebraic-dynamics (0) ⊗ oapply-colimit (+1) = 0 ✓

References

  • Libkind "An Algebra of Resource Sharers" arXiv:2007.14442
  • AlgebraicJulia/AlgebraicDynamics.jl