Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

asi-polynomial-operadsasi 多项式运算

Agent Skill

asi-polynomial-operads 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

198

周安装

8

GitHub Stars

17

下载量

62
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:asi-polynomial-operads(asi 多项式运算)
来源仓库:https://github.com/plurigrid/asi
仓库路径:skills/asi-polynomial-operads
安装命令:
npx skills add https://github.com/plurigrid/asi --skill asi-polynomial-operads
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/plurigrid/asi --skill asi-polynomial-operads

简介

asi-polynomial-operads 用于解析多项式函子与透镜理论,支撑形式化建模与架构设计。

  • 提供位置与方向的数学抽象,支持自由单子和余自由余单子的模块化组合。
  • 通过 npx skills add 命令安装,适用于高级架构推导与范畴论驱动的开发场景。
  • 内容偏理论,需具备相关数学背景方可有效应用,不建议初级开发者直接使用。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

ASI Polynomial Operads Skill

*"Pattern runs on matter: The free monad monad as a module over the cofree comonad comonad"* — Libkind & Spivak (ACT 2024)

1. Polynomial Functors (Spivak)

Core Definition

A polynomial functor $p: \text{Set} \to \text{Set}$ is a sum of representables:

$$p \cong \sum_{i \in p(1)} y^{p[i]}$$

Where:

  • $p(1)$ = set of positions (questions, observations)
  • $p[i]$ = set of directions at position $i$ (answers, actions)

Morphisms (Dependent Lenses)

A lens $f: p \to q$ is a pair $(f_1, f^\sharp)$:

$$f_1: p(1) \to q(1) \quad \text{(on-positions)}$$ $$f^\sharp_i: q[f_1(i)] \to p[i] \quad \text{(on-directions, contravariant)}$$

Hom-set Formula

$$\text{Poly}(p, q) \cong \prod_{i \in p(1)} \sum_{j \in q(1)} p[i]^{q[j]}$$

2. Composition Products

Substitution ($\triangleleft$) — The Module Action

$$p \triangleleft q \cong \sum_{i \in p(1)} \sum_{\bar{j}: p[i] \to q(1)} y^{\sum_{a \in p[i]} q[\bar{j}(a)]}$$

Interpretation: Substitute $q$ into each "hole" of $p$.

Parallel/Dirichlet ($\otimes$)

$$p \otimes q \cong \sum_{i \in p(1)} \sum_{j \in q(1)} y^{p[i] \times q[j]}$$

Interpretation: Independent parallel execution.

Categorical Product ($\times$)

$$p \times q \cong \sum_{i \in p(1)} \sum_{j \in q(1)} y^{p[i] + q[j]}$$

3. Free Monad & Cofree Comonad

Cofree Comonad as Limit

The carrier $t_p$ of the cofree comonoid on $p$:

$$t_p = \lim \left(1 \xleftarrow{!} p \triangleleft 1 \xleftarrow{p \triangleleft!} p^{\triangleleft 2} \triangleleft 1 \leftarrow \cdots \right)$$

Trees as Positions

$$t_p \cong \sum_{T \in \text{tree}_p} y^{\text{vtx}(T)}$$

  • $\text{tree}_p$ = set of $p$-trees (possibly infinite)
  • $\text{vtx}(T)$ = vertices (rooted paths) of tree $T$

Comonoid Structure

  • Counit (Extract): $\epsilon_p: t_p \to y$ — picks the root
  • Comultiplication (Duplicate): $\delta_p: t_p \to t_p \triangleleft t_p$ — path concatenation

Module Action: Pattern Runs On Matter

$$\Xi_{p,q}: \mathfrak{m}p \otimes \mathfrak{c}q \to \mathfrak{m}(p \otimes q)$$

Where:

  • $\mathfrak{m}p$ = free monad (Pattern, decision trees, wellfounded)
  • $\mathfrak{c}q$ = cofree comonad (Matter, behavior trees, non-wellfounded)

Examples:

PatternMatterRuns On
Interview scriptPersonInterview
ProgramOSExecution
Voting schemeVotersElection
Game rulesPlayersGame
Musical scorePerformerPerformance

4. Dynamical Systems (Libkind-Spivak)

Discrete Dynamical System

$$f^{upd}: A \times S \to S \quad \text{(update)}$$ $$f^{rdt}: S \to B \quad \text{(readout)}$$

Continuous Dynamical System

$$f^{dyn}: A \times S \to TS \quad \text{(dynamics:} \dot{s} = f^{dyn}(a, s) \text{)}$$ $$f^{rdt}: S \to B \quad \text{(readout)}$$

Wiring Diagram Composition

For $\phi: X \to Y$: $$\phi^{in}: X^{in} \to X^{out} + Y^{in}$$ $$\phi^{out}: Y^{out} \to X^{out}$$

Composed Update

$$\bar{f}^{upd}(y, s):= f^{upd}(\phi^{in}(y, f^{rdt}(s)), s)$$ $$\bar{f}^{rdt}(s):= \phi^{out}(f^{rdt}(s))$$

5. Compositional Algorithms (Bumpus)

Structured Decomposition

$$d: \int G \to \mathbf{K}$$

Where $\int G$ is the Grothendieck construction.

Complexity Bound

$$O\left(\max_{x \in VG} \alpha(dx) + \kappa^{|S|} \kappa^2\right) |EG|$$

Where:

  • $G$ = shape graph of decomposition
  • $S$ = feedback vertex set
  • $\kappa$ = max local solution space size
  • $\alpha(c)$ = time to compute sheaf on object $c$

Tree-Shaped Bound

For tree-shaped decompositions ($|S| = 0$): $$O(\kappa^2) |EG|$$

6. Cohomological Obstructions (Bumpus)

Čech Cohomology

$$H^n(X, \mathcal{U}, F):= \ker(\delta^n) / \text{im}(\delta^{n-1})$$

Global Existence Constraint

$$FX \neq \emptyset \iff H^0(X, \mathfrak{M}F) = 0$$

Interpretation: A problem has a solution iff the zeroth cohomology of its model-collecting presheaf is trivial.

GF(3) Connection

While Bumpus uses $\mathbb{Z}[S]$ (free Abelianization), the methods generalize to:

  • $\text{Vect}(\mathbb{F}_3)$ — vector spaces over GF(3)
  • Balanced ternary conservation = cohomological constraint

7. Spined Categories (Bumpus)

Definition

A spined category $(\mathcal{C}, \Omega, \mathfrak{P})$:

  • $\Omega: \mathbb{N}_{=} \to \mathcal{C}$ — the spine functor
  • $\mathfrak{P}$ — proxy pushout operation

Proxy Pushout

For span $G \xleftarrow{g} \Omega_n \xrightarrow{h} H$: $$G \xrightarrow{\mathfrak{P}(g,h)_g} \mathfrak{P}(g,h) \xleftarrow{\mathfrak{P}(g,h)_h} H$$

Chordal Objects (Recursive)

Smallest set $S$ where:

  1. $\Omega_n \in S$ for all $n$
  2. $\mathfrak{P}(a,b) \in S$ for $A, B \in S$ and arrows to $\Omega_n$

Width/Triangulation

$$\Delta[X] = \min {\text{width}(\delta) \mid \delta: X \hookrightarrow H \text{pseudo-chordal}}$$

8. Open Games (Hedges)

Parametrised Lens (Arena)

ParaLens p q x s y r = (get, put)
  get : p → x → y        -- forward
  put : p → x → r → (s, q)  -- backward

The 6 wires:

  • x = observed states (from past)
  • y = output states (to future)
  • r = utilities received (from future)
  • s = back-propagated utilities (to past)
  • p = strategies (parameters)
  • q = rewards (co-parameters)

Sequential Composition

(MkLens get put) >>>> (MkLens get' put') =
  MkLens
    (\(p, p') x -> get' p' (get p x))           -- compose forward
    (\(p, p') x t ->
      let (r, q') = put' p' (get p x) t         -- future first
          (s, q) = put p x r                     -- then past
      in (s, (q, q')))

Key insight: Backward pass = constraint propagation / abduction.

Equilibrium

$$E_G(x, k):= \varepsilon_G(x; A_G; k)$$

Where $\varepsilon = \bigotimes_{p \in P} \varepsilon_p$ is the joint selection function.

9. Integration: DiscoHy Operads

The 7 Operad Network

OperadTritDescription
Little Disks (E₂)+1Non-overlapping disk configurations
Cubes (E_∞)-1Infinite-dimensional parallelism
Cactus-1Trees with cycles (self-modification)
Thread0Linear continuations + DuckDB
Gravity-1Moduli M_{0,n} with involutions
Modular+1All genera, runtime polymorphism
Swiss-Cheese+1Open/closed for forward-only learning

GF(3) Total: $(+1) + (-1) + (-1) + (0) + (-1) + (+1) + (+1) = 0$ ✓

Libkind-Spivak Dynamical Operads

OperadTritType
Directed (⊳)+1Output → Input wiring
Undirected (○)-1Interface matching via pullback
Machines0State machines with dynamics
Dynamical+1Open ODEs

10. General Intelligence Requirements (Swan/Hedges)

From "Road to General Intelligence":

Value Proposition

General intelligence must:

  1. Perform work on command — respond to dynamic goal changes
  2. Scale to real-world concerns
  3. Respect safety constraints
  4. Be explainable and auditable

Structural Causal Model

$$X_i = f_i(\text{PA}_i, U_i), \quad i = 1, \ldots, n$$

Where:

  • $\text{PA}_i$ = parent nodes
  • $U_i$ = exogenous noise (jointly independent)

Ladder of Causality

  1. Observational — statistical learning
  2. Interventional — setting variables despite natural processes
  3. Counterfactual — inferences from alternate histories

Lens-Based Abduction

ComponentRole
get (forward)Induction / forward inference
put (backward)Abduction / constraint propagation
Selection functionAttention mechanism
Equilibrium checkingReflective reasoning

11. Commands

# Run polynomial functor demo
just poly-functor-demo

# Test free monad / cofree comonad pairing
just monad-test

# Run DiscoHy operads
python3 src/operads/relational_operad_interleave.py

# Run Libkind-Spivak dynamical systems
python3 src/operads/libkind_spivak_dynamics.py

# Check GF(3) conservation
just gf3-verify

12. File Locations

lib/
├── free_monad.rb              # Pattern (decision trees)
├── cofree_comonad.rb          # Matter (behavior trees)
├── runs_on.rb                 # Module action implementation
└── discohy.hy                 # Hy operad implementations

src/music_topos/
├── free_monad.clj             # Clojure Pattern
├── cofree_comonad.clj         # Clojure Matter
├── runs_on.clj                # Module action
└── operads/
    ├── relational_operad_interleave.py
    ├── libkind_spivak_dynamics.py
    └── infinity_operads.py

scripts/
├── discohy_operad_1_little_disks.py
├── discohy_operad_2_cubes.py
├── discohy_operad_3_cactus.py
├── discohy_operad_4_thread.py
├── discohy_operad_5_gravity.lisp
├── discohy_operad_6_modular.bb
└── discohy_operad_7_swiss_cheese.py

13. References

  1. Spivak, D.I. — *Polynomial Functors: A General Theory of Interaction* (2022)
  2. Libkind, S. & Spivak, D.I. — *Pattern Runs on Matter* (ACT 2024)
  3. Spivak, D.I. — *Dynamical Systems and Sheaves* (2019)
  4. Bumpus, B.M. — *Compositional Algorithms on Compositional Data* (2024)
  5. Bumpus, B.M. — *Spined Categories* (2023)
  6. Bumpus, B.M. — *Cohomology Obstructions* (2024)
  7. Swan, J. & Hedges, J. et al. — *The Road to General Intelligence* (Springer 2022)
  8. Hedges, J. — *Open Games with Agency* (2023)

14. See Also

  • acsets — Algebraic databases (schema category)
  • discohy-streams — 7 operad variants with GF(3) balance
  • triad-interleave — Balanced ternary scheduling
  • world-hopping — Badiou triangle navigation
  • open-games — Bidirectional transformations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.26%
按下载量换算24

Claude

33.03%
按下载量换算20

Cursor

18%
按下载量换算11

Gemini CLI

8.67%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills