本文へ移動
cccskills
無料GitHub で公開

algebraic-rewriting

Category-theoretic graph rewriting with DPO, SPO, and SqPO pushouts for C-Sets. Declarative transformation of acset data structures.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md2.5 KB
  • CONCOMITANT_SKILLS.md2.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Algebraic Rewriting

Overview

AlgebraicRewriting.jl is a Julia library for performing category-theoretic rewrites over C-Sets and other Catlab.jl data structures.

Rewriting Approaches

TypeDescriptionUse Case
DPODouble PushoutSafe deletion (no dangling edges)
SPOSingle PushoutGreedy deletion
SqPOSesqui-PushoutCloning + deletion

Core Concepts

Rewrite Rules

A rewrite rule consists of:

  • L (left) - Pattern to match
  • K (interface) - What to preserve
  • R (right) - Replacement pattern
using AlgebraicRewriting

# Define a rule: merge two vertices
L = @acset Graph begin V=2; E=1; src=[1]; tgt=[2] end
K = @acset Graph begin V=1 end
R = @acset Graph begin V=1 end

rule = Rule(L, K, R)

Apply Rewriting

G = @acset Graph begin
    V = 4
    E = 3
    src = [1, 2, 3]
    tgt = [2, 3, 4]
end

# Find matches and rewrite
matches = homomorphisms(L, G)
G′ = rewrite(rule, G, matches[1])

Double Pushout (DPO)

    L ←─ K ─→ R
    ↓    ↓    ↓
    G ←─ D ─→ H

The context D ensures no "dangling edges" after deletion.

Sesqui-Pushout (SqPO)

Supports cloning via the final pullback complement:

# Clone a vertex
L = @acset Graph begin V=1 end
K = @acset Graph begin V=1 end
R = @acset Graph begin V=2 end

clone_rule = Rule(L, K, R; type=:SqPO)

Gay.jl Integration

# sRGB boundary learning with rewriting seed
gay_seed!(0xabfca37b6b4bc699)

# Forward mode autodiff
∂params = Enzyme.gradient(Forward, loss, params, seed)

Documentation

Repository

  • Source: plurigrid/AlgebraicRewriting.jl (fork of AlgebraicJulia)
  • Seed: 0xabfca37b6b4bc699
  • Index: 496/1055
  • Color: #c25d0b

GF(3) Triad

algebraic-rewriting (-1) ⊗ acsets-hatchery (0) ⊗ gay-monte-carlo (+1) = 0 ✓

Related Skills

  • acsets-hatchery - ACSet data structures
  • topos-adhesive-rewriting - Adhesive categories
  • dpo-rewriting - Graph transformation
  • world-a - AlgebraicJulia ecosystem

Para(Optic) atlas

Part of: para-mensch-commons.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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.

日本語の概要は準備中です。原文の説明を表示しています。

plurigrid/asi672026年7月10日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

plurigrid/asi672026年7月10日 更新

13c0e3

無料

Gay MCP skill at invocation 26

日本語の概要は準備中です。原文の説明を表示しています。

plurigrid/asi672026年7月10日 更新

19d57d

無料

Gay MCP skill at invocation 5

日本語の概要は準備中です。原文の説明を表示しています。

plurigrid/asi672026年7月10日 更新

1ea91a

無料

Gay MCP skill at invocation 27

日本語の概要は準備中です。原文の説明を表示しています。

plurigrid/asi672026年7月10日 更新

1eab21

無料

Gay MCP skill at invocation 3

日本語の概要は準備中です。原文の説明を表示しています。

plurigrid/asi672026年7月10日 更新

plurigrid のスキルをすべて見る

このスキルの問題を報告する