Attributed C-Sets as algebraic databases. Category-theoretic data structures generalizing graphs and dataframes with Gay.jl color integration.
/plugin marketplace add plurigrid/asi/plugin install asi-skills@asi-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
ACSets.jl provides acsets ("attributed C-sets") - data structures generalizing both graphs and data frames. They are an efficient in-memory implementation of category-theoretic relational databases.
An ACSet is a functor from a category C to Set, with attributes. This means:
using ACSets
# Define a schema
@present SchGraph(FreeSchema) begin
V::Ob
E::Ob
src::Hom(E, V)
tgt::Hom(E, V)
end
# Create an acset
g = @acset Graph begin
V = 3
E = 2
src = [1, 2]
tgt = [2, 3]
end
# Rec2020 wide gamut with acset seed
gay_seed!(0xb4545686b9115a09)
# Mixed mode checkpointing
params = OkhslParameters()
∂params = Enzyme.gradient(Reverse, loss, params, seed)
Patterson, Lynch, Fairbanks. Categorical data structures for technical computing. Compositionality 4, 5 (2022). arXiv:2106.04703
0xb4545686b9115a09algebraic-rewriting (-1) ⊗ acsets-hatchery (0) ⊗ gay-monte-carlo (+1) = 0 ✓
acsets-algebraic-databases - Full ACSet guidespecter-acset - Bidirectional navigationworld-a - AlgebraicJulia ecosystem