Research-Stack/2-Search-Space
Brandon Schneider 5290413080 fix(avm-isa): stabilize AVMIsa + PIST.Trace build; canary #eval fires clean
AVMIsa fixes (all pre-existing errors from the upstream merge):
- Types.lean: add Repr to AvmTy
- Value.lean: replace `deriving Inhabited` with explicit instance (AnyVal
  is a dependent structure; auto-derive can't pick a default ty+val pair);
  add Repr instance that delegates to AvmVal.repr
- Instr.lean: add Repr to Prim and Instr
- State.lean: fix `List.set ⟨i, h⟩` → `List.set i` (List.set takes Nat,
  not Fin); drop now-dead `h` binding; add Repr to State
- Step.lean: rewrite evalPrim branches to pattern-match directly on AnyVal
  `⟨ty, val⟩` pairs instead of `if v.ty = T` + separate val match (Lean
  can't unify `AvmVal v.ty` with `AvmVal T` from a propositional if-guard);
  replace `List.get? pc` (removed in Lean 4.30) with `list[pc]?` subscript;
  rename Q0_16.addSat/subSat → Q0_16.add/sub (no sat variants exist);
  add Repr to StepError and Outcome

PIST.Trace fixes:
- Drop invalid `set_option pp.pretty true`
- MVarId.toNat → MVarId.name.toString
- List.size → List.length (then .toArray for Json.arr)
- Json.num takes JsonNumber {mantissa : Int, exponent : Int}; cast Nat → Int
- goals.mapM goalToJson: lift MetaM → TacticM via liftMetaM

Canary result: `#eval run 8 canaryNot canaryState` →
  Outcome.ok { pc := 2, stack := [AvmVal.b true], halted := true }

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-26 21:39:46 -05:00
..
FAMM Remove legacy Python prototypes superseded by Lean formalization 2026-05-19 15:34:17 +00:00
GhostPivot Remove legacy Python prototypes superseded by Lean formalization 2026-05-19 15:34:17 +00:00
GhostPivot2 initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
manifold Remove legacy Python prototypes superseded by Lean formalization 2026-05-19 15:34:17 +00:00
PIST fix(avm-isa): stabilize AVMIsa + PIST.Trace build; canary #eval fires clean 2026-05-26 21:39:46 -05:00
rust feat(rust): add AngrySphinx and FAMM receipt tools 2026-05-20 18:41:57 -05:00
search Bump the python-minor-patch group 2026-05-20 23:04:17 -05:00
simulations initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
tardygrada initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
README.md initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
SearchSpace.lean initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00

2-Search-Space

Purpose: Quaternion, braid, and manifold primitives for high-dimensional search space navigation.

Depends on: 0-Core-Formalism

Components

Component Status Description
PIST In core/, scratch/ Perfectly Imperfect Square Theory
SVQF In core/ Spherical Quaternion Vector Field
FAMM In core/, scratch/ Frustration-Aware Manifold Mesh
Braid Theory Planned Topological constraints via braid brackets

Key Optimizations

  1. Quaternion Sieve — Counter-rotation as band-pass filter
  2. Non-linear Gearbox — φ-based fractional steps
  3. Calabi-Yau Compactification — Discarded space folded into compactified dimensions
  4. Ricci Flow — Self-smoothing via ∂g_ij/∂t = -2R_ij

Hardware Range

Framework uses fixed-point arithmetic (Q16_16) — runnable on NES (1983) to modern FPGA.