home / skills / plurigrid / asi / bumpus-narratives

bumpus-narratives skill

/skills/bumpus-narratives

This skill helps you reason about temporal data using sheaves on time categories, enabling compositional analysis and obstruction detection.

npx playbooks add skill plurigrid/asi --skill bumpus-narratives

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.4 KB
---
name: bumpus-narratives
description: Sheaves on time categories for compositional temporal reasoning. Bumpus
version: 1.0.0
---


# Bumpus Narratives Skill

> **Trit**: 0 (ERGODIC) - Mediates between verification (-1) and generation (+1)

Sheaves on time categories for compositional reasoning about temporal data.

## Source Papers

- Bumpus, B.M. et al. "Unified Framework for Time-Varying Data" (arXiv:2402.00206)
- Bumpus, B.M. "Compositional Algorithms on Compositional Data" (arXiv:2302.05575)
- Bumpus, B.M. "Structured Decompositions" (arXiv:2207.06091)
- Bumpus, B.M. "Spined Categories" (arXiv:2104.01841)
- Bumpus, B.M. "Cohomological Obstructions" (arXiv:2408.15184)

## Core Concepts

### 1. Narratives as Sheaves

Temporal data = sheaf F: I_N → D where:
- I_N = time category (intervals [a,b] with inclusions)
- D = data category with pullbacks
- Sheaf condition: F([a,b]) = F([a,p]) ×_{F([p,p])} F([p,b])

```
F₁³ := {(x,y) ∈ F₁² × F₂³ | f₁,₂²(x) = f₂,₃²(y)}
```

### 2. Adhesion Filter (FPT Algorithm)

For tree decompositions of width w:
- Complexity: O(f(w) · n) instead of O(2^n)
- Runs on bag boundaries via pullback checking

```julia
function adhesion_filter(sheaf::Sheaf, decomp::TreeDecomp)
    for (bag1, bag2) in edges(decomp)
        adhesion = bag1 ∩ bag2
        if !is_pullback(sheaf, bag1, bag2, adhesion)
            return false
        end
    end
    true
end
```

### 3. Cohomological Obstructions

H⁰ detects local-to-global failure:
- H⁰(F) ≠ 0 → obstruction to gluing
- Čech complex on cover of intervals

## Integration with Gay.jl

### Color-Coded Narratives

Each interval [i,j] gets deterministic color:
```julia
color([i,j]) = gay_color(BUMPUS_SEED ⊻ hash(i,j))
```

### GF(3) Conservation

Narrative operations preserve triadic balance:
- **Restriction** (-1): F([a,b]) → F([a,a])
- **Extension** (+1): F([a,a]) → F([a,b])
- **Pullback** (0): F₁³ := fibered product

## Diagram Catalog

20 extracted diagrams from Bumpus papers:
- 17 commutative diagrams
- 2 functor diagrams
- 1 graph diagram

Location: `papers/diagrams/images/bumpus-*.jpg`

## Triadic Composition

```
structured-decomp (-1) ⊗ bumpus-narratives (0) ⊗ world-hopping (+1) = 0 ✓
sheaf-cohomology (-1) ⊗ bumpus-narratives (0) ⊗ triad-interleave (+1) = 0 ✓
persistent-homology (-1) ⊗ bumpus-narratives (0) ⊗ gay-mcp (+1) = 0 ✓
```

## Example: Ice Cream Companies

From the Venice ice cream example (Diagram 1):
```
Time 1: {a₁, a₂, b, c}  →  Time 2: {a*, b, c}  →  Time 3: {a*, b}
```

The sheaf tracks:
- Company mergers (a₁, a₂ → a*)
- Company disappearance (c)
- Supplier relationships (graph morphisms)

## API

```julia
using BumpusNarratives

# Create narrative
n = Narrative(TimeCategory(1:10), FinSet)

# Add snapshots
add_snapshot!(n, 1, Set([:a, :b, :c]))
add_snapshot!(n, 2, Set([:a, :b]))

# Check sheaf condition
is_sheaf(n)  # true if pullbacks exist

# Compute H⁰ obstruction
obstruction = cech_H0(n)
```

## References

1. **Bumpus et al.** - Time-varying data via sheaves on time categories
2. **Ghrist** - Elementary Applied Topology (Čech cohomology)
3. **Fairbanks** - AlgebraicJulia ecosystem for ACSets
4. **Gay.jl** - Deterministic color chains for diagram coloring



## Scientific Skill Interleaving

This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:

### Graph Theory
- **networkx** [○] via bicomodule
  - Universal graph hub

### Bibliography References

- `general`: 734 citations in bib.duckdb



## SDF Interleaving

This skill connects to **Software Design for Flexibility** (Hanson & Sussman, 2021):

### Primary Chapter: 3. Variations on an Arithmetic Theme

**Concepts**: generic arithmetic, coercion, symbolic, numeric

### GF(3) Balanced Triad

```
bumpus-narratives (○) + SDF.Ch3 (○) + [balancer] (○) = 0
```

**Skill Trit**: 0 (ERGODIC - coordination)

### Secondary Chapters

- Ch10: Adventure Game Example

### Connection Pattern

Generic arithmetic crosses type boundaries. This skill handles heterogeneous data.
## Cat# Integration

This skill maps to **Cat# = Comod(P)** as a bicomodule in the equipment structure:

```
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
```

### GF(3) Naturality

The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```

This ensures compositional coherence in the Cat# equipment structure.

## Forward Reference

- unified-reafference (applies sheaf structure)

Overview

This skill implements Bumpus Narratives: a sheaf-theoretic framework for compositional temporal reasoning over time-indexed data. It packages constructions for time categories, sheaf conditions, pullback checks, and cohomological obstruction detection to enable robust local-to-global analysis of temporal datasets. The implementation emphasizes tree-decomposition based algorithms to make inference tractable on structured data.

How this skill works

The skill represents temporal data as a sheaf F on a time category of intervals, enforcing the sheaf gluing condition via pullback checks on interval overlaps. It runs an adhesion filter that inspects bag boundaries in tree decompositions to verify pullback consistency in O(f(w)·n) time for width-w decompositions. It also computes Čech H⁰ to detect local-to-global obstructions and exposes utilities for deterministic interval coloring and GF(3)-balanced triadic operations.

When to use it

  • You need compositional, provable gluing of time-sliced data across intervals.
  • Detecting whether local snapshots can be consistently glued to a global state.
  • Scaling temporal verification using tree decompositions to avoid exponential checks.
  • Modeling merges, births, or disappearances of entities over time in a categorical setting.
  • Integrating with symbolic or finite-set data categories where pullbacks are available.

Best practices

  • Model snapshots as objects in a data category with explicit restriction/extension maps to support pullbacks.
  • Use a tree decomposition of the interval cover when datasets have bounded treewidth to leverage the adhesion filter.
  • Run cech_H0 early to catch local-to-global obstructions before attempting global reconstruction.
  • Keep interval covers and bag boundaries explicit and minimal to reduce pullback checks.
  • Use deterministic interval coloring only for visualization and diagram consistency, not as a logical invariant.

Example use cases

  • Tracking company mergers and supplier relationships through time slices and verifying consistency of supplier mappings.
  • Verifying that locally inferred correspondences across overlapping time windows compose to a global mapping.
  • Efficiently checking sheaf conditions on temporal sensor networks with bounded interaction width.
  • Computing H⁰ obstructions to determine whether additional constraints or data are needed to glue local snapshots.
  • Annotating diagrams and narratives with deterministic colors for reproducible visualization.

FAQ

What does a nonzero H⁰ mean in practice?

H⁰ ≠ 0 indicates a local-to-global failure: local sections cannot be consistently glued into a global section without resolving mismatches on overlaps.

When should I use the adhesion filter?

Use the adhesion filter whenever you have a tree decomposition of your interval cover; it verifies pullback consistency on bag intersections and scales linearly in n for fixed width.

Does this require a specific data category D?

No — D must support pullbacks (or fiber products). Common choices are finite sets, graphs, or structured finite data types compatible with pullback computation.