Commit graph

5 commits

Author SHA1 Message Date
openresearch
3d1a8c841d fix: add --output arg to pipeline_core.py 2026-07-04 21:27:02 +00:00
openresearch
e61ee5cfdc fix: COUCH gate — Kelvin wave regime check
The COUCH gate now has TWO stages (matching BraidStateN.lean):

Stage A — Rossby/Kelvin regime:
  - Rossby drift ≠ 0 → Rossby regime (dispersive, active mixing) → PASS
  - Rossby drift = 0 → Kelvin regime (boundary-trapped, NO mixing) → FAIL

  The Kelvin regime is the degenerate case: perfectly balanced chiral
  distribution. Energy dissipation rate is ZERO (proven in
  rossby_energy_dissipation_rate: requires isActive=true).

  kelvinLabels8 (all achiral_stable) → drift=0 → Kelvin → FAIL
  rossbyLabels8 (alternating left/right) → drift≠0 → Rossby → PASS

  This is the 'q=1 degenerate' / 'rational surface' / 'stuck' case.

Stage B — scarred contention:
  - scarred_count → self_loop → threshold (unchanged)

A config passes COUCH iff BOTH stages pass.

Updated both pipeline_core.py (Python) and chiral_cross_enrich.wgsl
(GPU shader) with the Kelvin check.
2026-07-04 21:09:03 +00:00
openresearch
ace1378668 feat(pipeline): rewrite with actual SilverSight chiral system
Replaces flat CRT negation (chiral-invariant, proven) with the ACTUAL
SilverSight chiral implementation from the codebase:

1. ChiralLabel (BraidStateN.lean): 4 types
   - achiral_stable, chiral_scarred, left_handed_mass_bias, right_handed_vector_bias
2. Phase (HachimojiBase.lean): Z/360Z at 45° steps
   - Phase → chirality (ambidextrous/left/right) → ChiralLabel
3. Rossby drift (rossbyDriftFromChirality): actual weights
   - left=+65536, right=-65536, scarred=+32768, achiral=0
4. Quaternion basis (HopfFibration.lean ofChiralLabel):
   - achiral=1, left=i, right=j, scarred=k
5. Golden angle (HopfFibration.lean): Q16_16 raw 25042, winding mod 28
6. Helical residue: ⌊k·ψ⌋ mod 28 (28 exotic Durán classes)

Two swappable Sidon filters:
- SidonFilter: CRT sum-based (proven chiral-invariant for negation,
  but positional permutation of phases CAN break Sidon)
- QuaternionSidonFilter: Hamilton product of quaternion basis vectors
  (1,i,j,k) — NOT invariant under positional permutation

All Q16_16 integer arithmetic. No floats. No native_decide.
2026-07-04 21:03:01 +00:00
openresearch
62399d035d fix(pipeline): positional chirality — permutation, not negation
BREAKING FIX: chiral implementation was modeling negation (S-a vs a-S),
which is a ring automorphism and preserves all Sidon structure (proven
in CHIRAL_INVARIANCE_GENERALIZED.md).

The user's chiral implementation is POSITIONAL: the chiral config
permutes which label goes to which strand position. Each position
has its own modulus. A permutation is NOT a ring automorphism —
different label-to-modulus mappings CAN produce different Sidon
results.

Changed _embed_chiral → _embed_chiral_positional:
- chiral[j]=0: strand j stays in position j
- chiral[j]=1: strand j swaps with strand j+1
- Multiple swaps compose into a full permutation
- The permutation changes which label pairs with which modulus
- This BREAKS the chiral invariance (permutations ≠ ring automorphisms)

Both SidonFilter and DualQuaternionSidonFilter updated to use
positional chirality.
2026-07-04 20:51:39 +00:00
openresearch
d9e465fb91 feat: pipeline_core.py — module-swappable six-stage engine
Standard Filter interface: each stage is apply(configs, ctx) → configs.
Stages swappable without rewriting the pipeline. No floats (Q16_16 raw).
No native_decide.

Default stages:
  BraidStorm(k) → TreeBraid → AngrySphinx(budget) →
  MultisurfacePacker(surfaces) → COUCHFilter → SidonFilter

Swappable Sidon filters:
  - SidonFilter: CRT sum-based (chiral-invariant, proven)
  - DualQuaternionSidonFilter: dual quaternion product-based
    (chiral-discriminating — multiplication is NOT negation-invariant)

Usage:
  pipe = Pipeline([BraidStorm(k=8), TreeBraid(), ...,
                   DualQuaternionSidonFilter()])
  result = pipe.run(labels, S, moduli)

Or via CLI:
  python3 pipeline_core.py --filter crt   # CRT sum filter
  python3 pipeline_core.py --filter dq    # Dual quaternion filter

To add custom filter:
  class MyFilter(Filter):
      def apply(self, configs, ctx): ...
      @property
      def name(self): return 'MyFilter'
2026-07-04 20:43:27 +00:00