xiaohongshu
xiaohongshu
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.
Full skill instructions
Synthesizes Urs Schreiber's cohesive ∞-topos framework with Mitchell Riley's linear HoTT for interaction entropy formalization.
| Modality | Symbol | Action | Interaction Use |
|---|---|---|---|
| Sharp | ♯ | Discretize | Extract trit from color |
| Flat | ♭ | Embed continuously | Full LCH embedding |
| Shape | ʃ | Quotient by homotopy | Walk trajectory class |
| Linear | ♮ | Self-adjoint tangent | One-use interaction |
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 ✓
-- 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)
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
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
# 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
(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))
# 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
hash ∘ ♯ = ♯ ∘ hash (discretization commutes)|consumed| = |interactions| (no copy/delete)Σ trit(Iᵢ) ≡ 0 (mod 3) per tripletP(verify) = 1/4 (Ramanujan gap)xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience