Skip to content
lhott-cohesive-linear logo

LHoTT Cohesive Linear Skill

lhott-cohesive-linear

Cohesive Linear HoTT patterns for interaction entropy with diagram generation. Implements Schreiber's cohesive modalities (♯,♭,ʃ) and Riley's linear modality (♮) for quantum-classical bridging.

plurigrid/asi0installs67stars

SKILL.md

Full skill instructions

LHoTT Cohesive Linear Skill

Synthesizes Urs Schreiber's cohesive ∞-topos framework with Mitchell Riley's linear HoTT for interaction entropy formalization.

Modal Operators

ModalitySymbolActionInteraction Use
Sharp♯DiscretizeExtract trit from color
Flat♭Embed continuouslyFull LCH embedding
ShapeʃQuotient by homotopyWalk trajectory class
Linear♮Self-adjoint tangentOne-use interaction

GF(3) Triad Placement

This skill is ERGODIC (0), forming triads with:

persistent-homology (-1) ⊗ lhott-cohesive-linear (0) ⊗ topos-generate (+1) = 0 ✓
sheaf-cohomology (-1) ⊗ lhott-cohesive-linear (0) ⊗ gay-mcp (+1) = 0 ✓
three-match (-1) ⊗ lhott-cohesive-linear (0) ⊗ rubato-composer (+1) = 0 ✓

Core Types (Pseudo-HoTT)

-- Cohesive interaction type
CohesiveInteraction : Type
  content : String
  hash : ♯ SHA256           -- discrete
  seed : ♭ UInt64           -- continuous embedding
  color : ♮ LCH             -- linear (used once)
  position : ʃ (ℤ × ℤ)      -- shape-invariant

-- Linear function (no copy/​delete)
walk_step : CohesiveInteraction ⊸ Position × Color

-- Bunched triplet (entangled context)
Γ₁ ⊗ Γ₂ ⊗ Γ₃ ⊢ conserved : GF3Zero
  where trit(Γ₁) + trit(Γ₂) + trit(Γ₃) ≡ 0 (mod 3)

Diagram Generation

Mermaid Templates

Cohesive Quadruple:

flowchart LR
    subgraph "Cohesive ∞-Topos H"
        A[Type] -->|ʃ shape| B[Shape Type]
        A -->|♭ flat| C[Codiscrete]
        C -->|Γ sections| D[Discrete]
        D -->|♯ sharp| A
    end
    style A fill:#26D826
    style B fill:#2626D8
    style C fill:#D82626
    style D fill:#2626D8

Linear Walk:

stateDiagram-v2
    [*] --> I1: seed₁
    I1 --> I2: ⊸ (linear)
    I2 --> I3: ⊸ (linear)
    I3 --> [*]: triplet complete
    
    note right of I1: trit = +1
    note right of I2: trit = 0
    note right of I3: trit = -1

Bunched Context Tree:

graph TD
    Root["Γ (context)"] --> A["Γ₁ ⊗ Γ₂"]
    Root --> B["Γ₃"]
    A --> C["I₁ (+1)"]
    A --> D["I₂ (0)"]
    B --> E["I₃ (-1)"]
    
    style C fill:#D82626
    style D fill:#26D826
    style E fill:#2626D8

Ruby Integration

module LHoTTCohesiveLinear
  # Modalities
  SHARP  = ->(x) { { trit: x[:trit] } }  # ♯ discretize
  FLAT   = ->(x) { x }                    # ♭ full embed
  SHAPE  = ->(x) { x[:position] }         # ʃ trajectory
  LINEAR = ->(x) { x.dup.freeze }         # ♮ freeze for one use
  
  def self.cohesive_interaction(content)
    hash = Digest::SHA256.hexdigest(content)
    seed = hash[0..15].to_i(16)
    gen = SplitMixTernary::Generator.new(seed)
    color = gen.next_color
    
    {
      content: content,
      hash: SHARP.call({ trit: color[:trit] }),  # ♯
      seed: FLAT.call(seed),                      # ♭
      color: LINEAR.call(color),                  # ♮
      position: nil  # computed by walk
    }
  end
  
  def self.linear_walk_step(interaction, walker)
    raise "Linear resource already consumed" if interaction.frozen?
    result = walker.step!(interaction)
    interaction.freeze  # consume linear resource
    result
  end
end

Julia Integration

# ACSets schema for LHoTT
@present SchLHoTT(FreeSchema) begin
  CohesiveType::Ob
  LinearType::Ob
  
  sharp::Hom(CohesiveType, CohesiveType)   # ♯
  flat::Hom(CohesiveType, CohesiveType)    # ♭
  shape::Hom(CohesiveType, CohesiveType)   # ʃ
  linear::Hom(CohesiveType, LinearType)    # ♮
  
  Trit::AttrType
  trit_attr::Attr(LinearType, Trit)
end

Hy/​DiscoHy Integration

(import [discopy [Ty Box Diagram monoidal]])

(defn cohesive-box [name input output modality]
  "Create DisCoPy box with modality annotation"
  (setv color (case modality
    "sharp" "#2626D8"
    "flat" "#D82626"
    "shape" "#26D826"
    "linear" "#FFAA00"))
  (Box name (Ty input) (Ty output) :color color))

(defn lhott-diagram [interactions]
  "Build monoidal diagram from interaction sequence"
  (setv boxes (lfor i interactions
    (cohesive-box (get i "skill_name")
                  "State" "State"
                  (get i "modality" "linear"))))
  (reduce monoidal.compose boxes))

Diagram Export Commands

# Generate Mermaid diagram from interactions
just lhott-diagram mermaid

# Generate base64 PNG from Mermaid
just lhott-diagram png > diagram.base64

# Export to DisCoPy SVG
just lhott-discopy-svg

# Full pipeline: interactions → ACSet → DisCoPy → Mermaid
just lhott-full-export

Key Theorems

  1. Cohesive Determinism: hash ∘ ♯ = ♯ ∘ hash (discretization commutes)
  2. Linear Conservation: |consumed| = |interactions| (no copy/​delete)
  3. GF(3) Invariant: Σ trit(Iᵢ) ≡ 0 (mod 3) per triplet
  4. Spectral Verification: P(verify) = 1/​4 (Ramanujan gap)

References

  • Corfield, D. (2025). "Linear Homotopy Type Theory: Its Origins and Potential Uses"
  • Schreiber, U. (2014). "Quantization via Linear Homotopy Types"
  • Riley, M. (2022). "A Bunched Homotopy Type Theory for Synthetic Stable Homotopy Theory"
  • nLab: Cohesive HoTT

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
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
skill-installer logo
plurigrid/asi

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

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