Skip to content
clifford-acset-bridge logo

Clifford Acset Bridge

clifford-acset-bridge

Bridge between Clifford Algebras (ganja.js/Grassmann.jl) and ACSets with grade-preserving morphisms

plurigrid/asi0installs67stars

SKILL.md

Full skill instructions

clifford-acset-bridge

Geometric Algebra as Attributed C-Set with grade-preserving morphisms

Version: 1.0.0
Trit: 0 (ERGODIC - coordinates between algebras)

Motivation

Clifford Algebras and ACSets share deep structural similarities:

  • Both have graded components (blades / objects)
  • Both support composition (geometric product / morphism composition)
  • Both have duality (Hodge dual / ACSet duality)

This skill bridges them for unified algebraic data modeling.

Schema: SchCliffordACSet

using Catlab, ACSets

@present SchCliffordACSet(FreeSchema) begin
  # Objects: One per grade
  Scalar::Ob      # Grade 0
  Vector::Ob      # Grade 1
  Bivector::Ob    # Grade 2
  Trivector::Ob   # Grade 3
  Pseudoscalar::Ob # Grade n
  
  # Morphisms: Grade-changing operations
  wedge_sv::Hom(Scalar × Vector, Vector)      # 0+1=1
  wedge_vv::Hom(Vector × Vector, Bivector)    # 1+1=2
  wedge_vb::Hom(Vector × Bivector, Trivector) # 1+2=3
  
  dot_vv::Hom(Vector × Vector, Scalar)        # 1-1=0
  dot_bv::Hom(Bivector × Vector, Vector)      # 2-1=1
  dot_tv::Hom(Trivector × Vector, Bivector)   # 3-1=2
  
  geo_vv::Hom(Vector × Vector, Scalar + Bivector) # 1*1=0+2
  
  dual::Hom(Vector, Bivector)  # Hodge star (in 3D)
  reverse::Hom(Bivector, Bivector)  # Grade involution
  
  # Attributes
  Coeff::AttrType
  coeff::Attr(Vector, Coeff)
  coeff_bv::Attr(Bivector, Coeff)
  
  # GF(3) trit per operation
  Trit::AttrType
  wedge_trit::Attr(Vector, Trit)  # +1
  dot_trit::Attr(Vector, Trit)    # -1
  geo_trit::Attr(Vector, Trit)    # 0
end

Grade Preservation as Diagram Commutativity

The fundamental law: grade(a ∧ b) = grade(a) + grade(b)

In ACSet terms, this is a functorial constraint:

Grade: CliffordACSet → GradedMonoid

where GradedMonoid has:
  Objects: ℤ (integers = grades)
  Morphisms: Addition

Commutative Diagram

        a : Vector        b : Vector
            │                  │
            └────── ∧ ─────────┘
                    │
                    ▼
              a∧b : Bivector
                    │
              grade │
                    ▼
                    2 = 1 + 1 ✓

GF(3) Correspondence

Clifford OperationGrade ChangeGF(3) TritACSet Morphism
Wedge (∧)+k+1 (PLUS)Covariant Hom
Dot (·)-k-1 (MINUS)Contravariant Hom
Geometric (*)0 (mixed)0 (ERGODIC)Profunctor
Dual (⋆)n-k0 (ERGODIC)Adjoint
Reverse (~)00 (ERGODIC)Involution

Conservation Law

For any composition of operations:

Σ trit(op_i) ≡ 0 (mod 3)

This ensures balanced exploration in the skill ecosystem.

Specter Navigation for Clifford Elements

From specter-acset:

# Navigators for Clifford algebra elements
GRADE_K(k)      # Select grade-k component
WEDGE_WITH(b)   # Navigate to wedge product
DOT_WITH(b)     # Navigate to contraction
DUAL            # Navigate to Hodge dual
REVERSE         # Navigate to reversed element

# Example: Extract bivector part of geometric product
select([geo_product, GRADE_K(2)], a * b)

# Transform: Normalize all vectors
transform([GRADE_K(1)], normalize, multivector)

ganja.js ↔ ACSet Translation

JavaScript → Julia

// ganja.js
var PGA3D = Algebra(3,0,1);
var point = 1e123 + x*(-1e023) + y*(1e013) + z*(-1e012);
var line = point & otherPoint;  // Vee (regressive)
# Julia ACSet
const PGA3D = CliffordACSet{Float64}(3, 0, 1)
point = add_part!(PGA3D, :Trivector, coeff=[1, -x, y, -z])
line = vee(point, other_point)  # Morphism application

Bidirectional Conversion

function ganja_to_acset(mv::GanjaMultivector, acset::CliffordACSet)
    for (grade, coeffs) in enumerate(mv.grades)
        ob = grade_to_object(grade)
        for (basis, val) in coeffs
            add_part!(acset, ob, coeff=val, basis=basis)
        end
    end
end

function acset_to_ganja(acset::CliffordACSet)
    mv = zeros(2^n)
    for ob in [:Scalar, :Vector, :Bivector, :Trivector]
        for part in parts(acset, ob)
            grade = object_to_grade(ob)
            mv[blade_index(grade, part)] = acset[part, :coeff]
        end
    end
    return mv
end

Open Games on Clifford ACSet

The wedge game mechanics translate directly:

struct CliffordGame <: OpenGame
    # Play: Strategy → Blade selection
    play::Function  # (gesture, state) → new_blade
    
    # Coplay: Feedback → Score adjustment  
    coplay::Function  # (gesture, state, reward) → updated_reward
    
    # Equilibrium: Grade conservation check
    equilibrium::Function  # state → Bool
end

# Player skill as morphism
function player_skill(name, trit, morphism)
    return (a, b) -> begin
        result = morphism(a, b)
        @assert mod(trit + grade(a) + grade(b), 3) == grade(result) mod 3
        result
    end
end

Integration with Existing Skills

From acsets-algebraic-databases

  • Schema definition via @present
  • DPO rewriting for blade substitution

From specter-acset

  • Bidirectional navigation (select/transform)
  • Inline caching for repeated operations

From ganja-wedge-game

  • Player gesture → operation mapping
  • Score/​reward mechanics

From open-games

  • Play/​coplay structure
  • Nash equilibrium as grade conservation

GF(3) Triads

ganja-wedge-game (+1) ⊗ clifford-acset-bridge (0) ⊗ specter-acset (0) → need -1
→ Add: three-match (-1) ⊗ clifford-acset-bridge (0) ⊗ ganja-wedge-game (+1) = 0 ✓

acsets (-1) ⊗ clifford-acset-bridge (0) ⊗ gay-integration (+1) = 0 ✓

Commands

# Julia: Load schema
julia -e 'include("clifford_acset_schema.jl")'

# Test grade preservation
just clifford-grade-test

# Convert ganja.js → ACSet
just ganja-to-acset examples/​pga3d_point.js

Files

  • Schema: lib/​clifford_acset_schema.jl
  • Bridge: lib/​ganja_acset_bridge.jl
  • Tests: test/​test_grade_preservation.jl

References


Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.

More skills from plurigrid

cargo logo
plurigrid/asi

cargo

Rust package manager (36 subcommands).

67 0
View

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...

67 0
View

**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...

67 0
View
conformal-ga logo
plurigrid/asi

conformal-ga

Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations

67 0
View

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

67 0
View
zig-systems logo
plurigrid/asi

zig-systems

Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.

67 0
View
soliton-detection logo
plurigrid/asi

soliton-detection

Topological soliton detection and agency bridge with anyonic fusion algebra for concept composition

67 0
View
paypal-mcp logo
plurigrid/asi

paypal-mcp

PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.

67 0
View
unison logo
plurigrid/asi

unison

Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.

67 0
View
tasks-acset logo
plurigrid/asi

tasks-acset

Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.

67 0
View
c logo
plurigrid/asi

c

World C Skill

67 0
View
syrup logo
plurigrid/asi

syrup

Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.

67 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View