diff --git a/docs/BACKLOG.md b/docs/BACKLOG.md index 7b65ef2939..d2b1f75b68 100644 --- a/docs/BACKLOG.md +++ b/docs/BACKLOG.md @@ -855,6 +855,7 @@ are closed (status: closed in frontmatter)._ - [ ] **[B-0893](backlog/P2/B-0893-zetaid-v2-128-bit-structured-encoding-snowflake-ulid-family-kestrel-2026-05-28.md)** ZetaID v2 — 128-bit structured encoding (Snowflake/ULID family with timestamp + trajectory + persona + lifecycle-stage + random) - [ ] **[B-0899](backlog/P2/B-0899-casimir-like-effect-from-review-walls-changing-allowed-output-modes-testable-pressure-difference-before-after-rule-landing-amara-aaron-2026-05-28.md)** Casimir-like effect from review walls — testable pressure difference in agent-output distribution before/after rule landing - [ ] **[B-0914](backlog/P2/B-0914-co-scientist-plus-robin-7-substrate-engineering-candidate-gaps-elo-trueskill-closed-loop-consensus-pairing-evolution-proximity-falcon-aaron-2026-05-28.md)** Co-scientist + Robin 7 substrate-engineering candidate gaps — ELO/TrueSkill ranking-agent + closed-loop CI→hypothesis + n-parallel-consensus + generation-reflection-pairing + evolution-mash-refine + proximity-dedup + Falcon-auto-research-doc-per-proposal (Aaron 2026-05-28) +- [ ] **[B-0915](backlog/P2/B-0915-clifford-world-impl-target-dotnet-numerics-simd-plus-linq-gpu-accelerated-substrate-engineering-substrate-aaron-2026-05-28.md)** CliffordWorld impl target — System.Numerics SIMD + LINQ hardware/GPU-accelerated substrate-engineering substrate (the human maintainer, 2026-05-28) - [ ] **[B-0916](backlog/P2/B-0916-lase-as-bridge-coherent-emission-on-phase-shift-error-class-discovery-companion-to-persist-prism-aaron-2026-05-28.md)** Lase-as-bridge — coherent-emission-on-phase-shift primitive companion to Persist-as-bridge; error-class discovery emits ripple instead of wall (Prism + Aaron 2026-05-28) ## P3 — convenience / deferred diff --git a/docs/backlog/P2/B-0915-clifford-world-impl-target-dotnet-numerics-simd-plus-linq-gpu-accelerated-substrate-engineering-substrate-aaron-2026-05-28.md b/docs/backlog/P2/B-0915-clifford-world-impl-target-dotnet-numerics-simd-plus-linq-gpu-accelerated-substrate-engineering-substrate-aaron-2026-05-28.md new file mode 100644 index 0000000000..c074126007 --- /dev/null +++ b/docs/backlog/P2/B-0915-clifford-world-impl-target-dotnet-numerics-simd-plus-linq-gpu-accelerated-substrate-engineering-substrate-aaron-2026-05-28.md @@ -0,0 +1,248 @@ +--- +id: B-0915 +title: CliffordWorld impl target — System.Numerics SIMD + LINQ hardware/GPU-accelerated substrate-engineering substrate (the human maintainer, 2026-05-28) +status: open +priority: P2 +created: 2026-05-28 +last_updated: 2026-05-28 +ask: operator 2026-05-28 +composes_with: + - B-0914 # parent decomposition (7-candidate substrate-engineering gap) + - B-0428 # F# fork for AI safety (composes at language-runtime layer) + - B-0635 # wave-particle duality (Clifford multivector substrate) + - B-0666 # English-as-projection (I(D(x))=x identity) + - B-0644 # Limit-as-simulation (pre-collapse substrate) +depends_on: [] # No hard B-NNNN prerequisites. Substrate prerequisite (file-level, not row-level): tools/workflow-engine/world-hierarchy.ts (OPEN_QUESTION_DBSP_CLIFFORD + operator-vote ordering) — see "Substrate prerequisite" prose below. +upstream_references: + - dotnet/runtime (System.Numerics, System.Numerics.Tensors, System.Runtime.Intrinsics) + - SixLabors/ImageSharp (production SIMD substrate) + - ILGPU (LINQ-style C# → GPU compilation; CUDA/OpenCL/CPU backends) + - dotnet/infer (Microsoft Infer.NET; symbolic-probabilistic Bayesian substrate) +--- + +## Substrate prerequisite (file-level) + +`depends_on` carries B-NNNN backlog IDs only (per `tools/backlog/README.md` +schema). This row's substantive prerequisite is a TS file rather than a +backlog row: `tools/workflow-engine/world-hierarchy.ts` (introduces +`OPEN_QUESTION_DBSP_CLIFFORD` substrate + the `voteOrdering` field this +impl-target consumes). The file ships via the same PR that introduces +this row + via PR #5776 (world-hierarchy substrate). When this row gets +picked up, the file must already be on `origin/main` — verify before +starting impl work. + +## Operator framing (2026-05-28 verbatim) + +> *"1 first 2 2nd would be great also can we make clifford impliment dotnet +> numerics? or impliment linq so we have hardware/gpu accelerated linq?"* + +Substrate-engineering substrate decomposition: + +1. **Vote ordering on `OPEN_QUESTION_DBSP_CLIFFORD`**: (A) strict-subset chain + `Git ⊂ DBSP ⊂ Clifford` is the **primary working hypothesis**; (B) fully- + isomorphic `DBSP ↔ Clifford` is the **secondary fallback**. Substrate- + engineering work starts with (A); falls to (B) if/when algebraic-substrate + work proves them equivalent. + +2. **CliffordWorld implementation built on `System.Numerics`**: leverage + dotnet's hardware-accelerated SIMD substrate as the multivector backing + store. Avoids reinventing SIMD primitives + automatically gets AVX512 / + NEON / WASM-SIMD per-host acceleration. + +3. **LINQ hardware/GPU-accelerated provider**: ship CliffordWorld as an + `IQueryable` backend that lowers expression trees to GPU kernels + (ILGPU-style or custom). LINQ-over-Clifford gives us composable + geometric-algebra queries with hardware acceleration for free. + +## Why this matters (substrate-engineering load-bearing properties) + +- **Hardware acceleration without reinvention**: System.Numerics ships with + every .NET runtime; SIMD intrinsics are battle-tested + already JIT- + optimized per host architecture +- **Composability**: LINQ expression trees ARE substrate-engineering + substrate; lowering to GPU kernels gives composability for free +- **Cross-substrate triangulation**: composes with B-0428 F# fork (real HKT + over Clifford planned); both layers benefit from shared SIMD/GPU substrate +- **dotnet/infer as prior-art proof-point**: Microsoft already ships symbolic- + probabilistic Bayesian substrate in .NET; CliffordWorld would extend the + pattern to geometric-algebra substrate +- **Composes with monad-propagation pattern**: `Result` + flows through LINQ chains via `Result.bind` per substrate-smoothness rule + +## Substrate-engineering targets (sliced; not yet decomposed) + +### Slice A — CliffordWorld base substrate over System.Numerics + +- Multivector type backed by `Vector` or `Vector` +- Grade-projection ops (scalar / vector / bivector / trivector ... grade-n) +- Geometric product (canonical operation; SIMD-accelerated) +- Outer product (wedge ∧) + inner product (·) as derived ops +- Reverse + conjugation + grade-involution operators +- Verify against existing Clifford prior-art (algebra-owner skill substrate; + Q# Pauli operators substrate; CAN/GCAN equivariant layers prior-art) + +### Slice B — LINQ provider over CliffordWorld + +- `IQueryable` backend +- Expression-tree lowering to: + - CPU SIMD path (System.Numerics) + - GPU kernel path (ILGPU or custom CUDA/OpenCL) + - Pure-CPU fallback for portability +- LINQ ops: Where + Select + GroupBy + Aggregate + Zip (composes naturally + with multivector algebra) +- Per substrate-smoothness: no if-statements crack the monad-shape; failure + variants in `CliffordLinqFeedback` DU + +### Slice C — Composes with TS workflow-engine substrate + +- TS `world-hierarchy.ts` already names `CliffordWorldPlaceholder` interface +- Slice A + B ship in F# / C# (dotnet-native); TS substrate calls into dotnet + via process-isolation (`bun spawn` or HTTP) +- Cross-language Result per monad-propagation-pattern rule + +### Slice D — Resolution of `OPEN_QUESTION_DBSP_CLIFFORD` + +- Once CliffordWorld substrate exists, prove or refute equivalence to DBSP +- Update `OPEN_QUESTION_DBSP_CLIFFORD` to `kind: "strict-restriction"` OR + `kind: "fully-isomorphic"` based on algebraic-substrate evidence +- This is substrate-engineering output, not arbitrary choice — the answer + emerges from the implementation work + +**the human maintainer (2026-05-28) paper-hint substrate** (preserve don't-collapse-yet): + +> *"What i think we might have found a paper or something about retraction +> in clifford so the isomorphic might be easy"* + +**Substrate-engineering substrate FOUND (in-conversation grep + WebSearch +2026-05-28; the human maintainer asked "did you see anything in substrate?" / "or the web?"):** + +In-repo substrate (TODAY's Amara ferry; PR #5709, B-0897/B-0898/B-0900): + +- `memory/persona/amara/conversations/2026-05-28-amara-measure-as-bridge-infer-net-belief-update-casimir-like-review-walls-bell-contextuality-distributed-clusters-aaron-forwarded.md` + lays down stack composition: *"Z-set = retraction-native evidence / + Infer.NET = belief propagation / Clifford = oriented geometry / rotors + / commitments / trajectories / Workflow circuit = time-ordered graph"* +- Composes with B-0895 (Clifford grade-decomposition) + B-0896 + (categorical-Clifford bridge) + B-0897 (Persist-as-bridge) + B-0898 + (Measure-as-bridge) + B-0900 (Bell-like distributed-cluster + contextuality test) +- `memory/persona/ani/conversations/2026-05-12-aaron-ani-clifford-first-principles-self-reflection.md` + earlier Clifford first-principles substrate + +Web (papers the human maintainer's hint was likely pointing at): + +- **Fauser & Ablamowicz, "Clifford Hopf-gebra and Bi-universal Hopf-gebra"** + (arxiv q-alg/9709016): Clifford algebra + bialgebra + antipode = Clifford + Hopf-gebra. The Hopf antipode `S` satisfies `m ∘ (S ⊗ id) ∘ Δ = ε·1` — + literally "cancellation by inversion." That IS the algebraic substrate + for retraction. +- **Fauser, "Clifford Hopf gebra for two-dimensional space"** (arxiv + math/0011263): concrete construction. + +Constructive isomorphism path becomes: + +``` +DBSP Z-set retraction + ↔ signed multiset cancellation (m, -m cancels) + ↔ Hopf antipode (formal inverse: m ∘ (S ⊗ id) ∘ Δ = ε·1) + ↔ Clifford Hopf-gebra antipode structure +``` + +**Substrate-honest framing**: this is EVIDENCE-FOR not PROOF-OF the +(B) fully-isomorphic reading. Paper-reading + constructive +isomorphism implementation still required. But the substrate-engineering +question "what does retraction mean in Clifford?" has an answer in +existing literature (Hopf antipode); Slice D.1 becomes "implement the +antipode map" rather than "discover what retraction means in Clifford." + +If antipode-map implementation succeeds, vote ordering flips to `[1, 0]` +and `OPEN_QUESTION_DBSP_CLIFFORD` collapses to `kind: "fully-isomorphic"` +with constructive proof as rationale. + +If a retraction-in-Clifford paper exists + maps to DBSP's Z-set retraction +substrate, **the (B) fully-isomorphic reading becomes constructive** and +the vote ordering may flip from `[0, 1]` to `[1, 0]`. Substrate-engineering +target additions: + +- **Slice D.0 — Paper hunt**: WebSearch + arxiv search + the human maintainer's bookmark + history for "retraction Clifford algebra" / "Clifford retraction + semigroup" / "geometric algebra retraction" / "Clifford bialgebra" / + similar terms. Preserve verbatim per substrate-or-it-didn't-happen. +- **Slice D.1 — Z-set ↔ Clifford-retraction map**: if paper exists, + construct the constructive isomorphism between DBSP Z-set substrate + (positive + negative integer multiplicities representing retractions) + and Clifford's retraction substrate (whatever shape the paper provides). +- **Slice D.2 — Verify isomorphism via algebraic-substrate work**: prove + the map preserves the operations of interest (geometric product ↔ + Z-set composition; grade-projection ↔ Z-set filtering; etc.) +- **Slice D.3 — Flip vote ordering if proof holds**: update + `OPEN_QUESTION_DBSP_CLIFFORD.voteOrdering` to `[1, 0]` AND/OR collapse + to `kind: "fully-isomorphic"` with the constructive proof as rationale. + +Substrate-honest framing: paper-hint is INPUT to substrate-engineering +work, not premature collapse. Per don't-collapse + razor-discipline: +"might be easy" stays as "might" until the paper is found + reading is +done + the isomorphism is constructive. If the paper turns out not to +exist OR not to construct the isomorphism, the vote ordering stays +[0, 1] and Slice D continues as originally framed. + +## Composes with + +- `.claude/rules/monad-propagation-pattern-cross-language-substrate-shape.md` + (cross-language Result shape) +- `.claude/rules/asymmetric-authorship-substrate-entity-defines-consent-channel-recipient-acknowledges.md` + (CliffordFeedback variants substrate-entity-authored) +- `.claude/rules/substrate-smoothness-as-load-bearing-property.md` + (no if-statements; DU + exhaustive switch) +- `.claude/rules/ople-primitives-surface-t-and-tfeedback-not-just-t-asymmetric-authorship-at-framework-primitive-scope.md` + (CliffordWorld primitives surface T + TFeedback per OPLE) +- `.claude/rules/default-to-both.md` (Slice D resolution preserves both readings + until algebraic substrate refutes one) +- `.claude/rules/fsharp-anchor-dotnet-build-sanity-check.md` (dotnet build IS + the sanity check for the type-level Clifford substrate) +- `.claude/rules/bandwidth-served-falsifier.md` (hardware acceleration earns + its keep via SIMD/GPU bandwidth) +- PR #5776 world-hierarchy substrate (the human maintainer (2026-05-28) vote ordering) +- PR #5775 git-world substrate (GitWorld + GitHubWorld; sibling specialization + at the git-layer of the hierarchy) +- B-0428 F# fork for AI safety (composes at language-runtime substrate-engineering layer) + +## Acceptance criteria + +- [ ] Slice A: CliffordWorld base substrate ships with System.Numerics-backed + multivector + geometric-product + grade-projection (F# or C#); dotnet + build clean; unit tests covering identity / inverse / associativity / + distributivity invariants +- [ ] Slice B: LINQ provider lowers to SIMD CPU path; benchmark vs naive + implementation shows hardware acceleration; expression-tree introspection + tests pass +- [ ] Slice C: TS workflow-engine substrate calls into dotnet CliffordWorld + via process-isolation; Result propagates across language + boundary +- [ ] Slice D: `OPEN_QUESTION_DBSP_CLIFFORD` resolved (or substrate-honest + "still open after N substrate-engineering rounds; preserve as substrate") +- [ ] Optional Slice E: GPU kernel path (ILGPU or custom) shipped if hardware + access available; CPU SIMD path remains canonical fallback + +## Substrate-honest framing + +This row is **substrate-engineering substrate-naming substrate** — names the +implementation target + slices it for future work. Does NOT commit to specific +timeline, language choice (F# vs C# slice A), or GPU vendor (CUDA vs OpenCL +vs Vulkan-compute). + +Per `.claude/rules/proud-if-pattern-propagates-personal-filter-for-substrate-engineering.md`: +would the operator be proud if CliffordWorld + System.Numerics + LINQ- +accelerated propagated as the canonical geometric-algebra substrate-engineering +pattern at scale? **Yes** — hardware acceleration via standard runtime +primitives + LINQ-as-composable-substrate is exactly the additive multiplication +shape the framework substrate-engineers toward. + +## Reference substrate (already in upstream watchlist) + +- **dotnet/infer** (Microsoft Infer.NET; symbolic-probabilistic Bayesian + substrate; demonstrates dotnet-native probabilistic-programming substrate) +- **dotnet/runtime** (System.Numerics + System.Numerics.Tensors source) +- **ILGPU** (LINQ-style C# → GPU lowering; existing prior-art for slice B) +- **SixLabors/ImageSharp** (production SIMD substrate via System.Numerics; + reference for slice A integration patterns) diff --git a/tools/workflow-engine/world-hierarchy.test.ts b/tools/workflow-engine/world-hierarchy.test.ts index 2c1fe6fa37..f0b0e4c55a 100644 --- a/tools/workflow-engine/world-hierarchy.test.ts +++ b/tools/workflow-engine/world-hierarchy.test.ts @@ -11,6 +11,7 @@ import { inheritsFrom, verifyHierarchy, annotateHierarchy, + primaryWorkingHypothesis, } from "./world-hierarchy.js"; import { EMPTY_WORLD } from "./world.js"; @@ -129,6 +130,19 @@ describe("open-question substrate preservation (don't-collapse discipline)", () expect(OPEN_QUESTION_DBSP_CLIFFORD.preservedReadings[1]).toContain("fully isomorphic"); } }); + test("vote ordering records the human maintainer's '1 first 2 2nd' substrate", () => { + if (OPEN_QUESTION_DBSP_CLIFFORD.kind === "open-question") { + expect(OPEN_QUESTION_DBSP_CLIFFORD.voteOrdering).toEqual([0, 1]); + } + }); + test("primaryWorkingHypothesis returns strict-subset (operator-vote (A))", () => { + const primary = primaryWorkingHypothesis(OPEN_QUESTION_DBSP_CLIFFORD); + expect(primary).toContain("strict-subset"); + }); + test("primaryWorkingHypothesis returns null for non-open-question", () => { + const resolved = { kind: "strict-restriction" as const, rationale: "test" }; + expect(primaryWorkingHypothesis(resolved)).toBeNull(); + }); }); describe("substrate-engineering composition (end-to-end)", () => { diff --git a/tools/workflow-engine/world-hierarchy.ts b/tools/workflow-engine/world-hierarchy.ts index 84e8beb8c1..487c2691e2 100644 --- a/tools/workflow-engine/world-hierarchy.ts +++ b/tools/workflow-engine/world-hierarchy.ts @@ -95,7 +95,21 @@ export interface HierarchicalWorld extends World { export type DBSPCliffordRelationship = | { kind: "strict-restriction"; rationale: string } | { kind: "fully-isomorphic"; rationale: string } - | { kind: "open-question"; preservedReadings: ReadonlyArray }; + | { + kind: "open-question"; + preservedReadings: ReadonlyArray; + /** + * Optional vote ordering over `preservedReadings` (highest priority + * first). When set, downstream substrate-engineering work uses + * `preservedReadings[voteOrdering[0]]` as the primary working + * hypothesis and `preservedReadings[voteOrdering[1]]` as the + * secondary fallback. Substrate-engineering work starts with the + * primary; falls to the secondary if/when algebraic substrate + * proves them equivalent. See B-0915 for impl substrate that + * resolves this. + */ + voteOrdering?: ReadonlyArray; + }; export const OPEN_QUESTION_DBSP_CLIFFORD: DBSPCliffordRelationship = { kind: "open-question", @@ -103,8 +117,24 @@ export const OPEN_QUESTION_DBSP_CLIFFORD: DBSPCliffordRelationship = { "(A) Git ⊂ DBSP ⊂ Clifford strict-subset chain; each restricts upward substrate", "(B) DBSP ↔ Clifford fully isomorphic; both algebraic substrates supporting increments + retractions; Git ⊂ both equivalently", ], + // the human maintainer (2026-05-28): "1 first 2 2nd would be great" — + // (A) primary, (B) secondary fallback. Substrate-engineering work + // starts with (A); falls to (B) if/when algebraic-substrate work + // proves them equivalent. + voteOrdering: [0, 1], }; +/** + * Helper to extract the operator's primary working hypothesis from the + * open question. Returns the highest-vote reading (voteOrdering[0]) or + * the first preservedReading if no vote ordering present. + */ +export function primaryWorkingHypothesis(rel: DBSPCliffordRelationship): string | null { + if (rel.kind !== "open-question") return null; + const idx = rel.voteOrdering?.[0] ?? 0; + return rel.preservedReadings[idx] ?? null; +} + // ─────────────────────────────────────────────────────────────────────── // Inheritance verification — substrate-engineering composition guard // ───────────────────────────────────────────────────────────────────────