SilverSight/docs/crt-torus-embedding.md
allaun 3b6baec64e wip: durability snapshot of local working tree (pre-existing, uncommitted)
Snapshot of previously-uncommitted local work so nothing is lost after the
power outage. NOT reviewed for correctness — a WIP checkpoint, not a feature:
- multi-language hachimoji encoders (c/cpp/fortran/julia/octave/r/scala/go/rust/coq)
- formal Lean WIP (BraidTree, Eisenstein, HachimojiCapture, MathlibConnect,
  ModularFormBridge, ClusterManifold) + lakefile + E8Sidon edit
- docs/, experiments/ (epyc oisc benches), deploy/, scripts, test scaffolding
- .gitignore: exclude **/target/ and Coq build artifacts

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:49:53 -05:00

311 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CRT Reflection Embedding on a k-Torus
> Place a reflection-closed finite set onto a discrete torus, with identity
> preserved along one axis and an involution encoded across the rest.
---
## 1. What This Is
Take a finite set A ⊂ closed under reflection a ↦ S a. Pick k pairwise-coprime
moduli L₁, …, L_k. The CRT isomorphism
$$
\mathbb{Z}/M\mathbb{Z} \;\cong\; \mathbb{Z}/L_1\mathbb{Z} \times \cdots \times \mathbb{Z}/L_k\mathbb{Z}
\qquad (M = \prod L_i)
$$
is a **k-dimensional discrete torus** — a product of k cyclic groups.
We embed A onto this torus with an asymmetrical constraint:
$$
\begin{aligned}
\text{axis 1:}&\quad a \mapsto a \pmod{L_1} &&\text{(identity — the original element)} \\
\text{axes 2…k:}&\quad a \mapsto S - a \pmod{L_i} &&\text{(reflection — the involution)}
\end{aligned}
$$
Call this embedding F: A → T, where T = ∏ Z/L_i Z.
The 1D set A becomes a **point cloud on a k-torus**. Every point a ∈ A is paired
with its dual F(Sa), linked by the involution on axes 2…k.
---
## 2. Three Basic Properties
The embedding satisfies three properties — all are immediate from CRT, so we
state them and note that every property reduces to the 2-modulus base via
the fiber bundle structure (Section 3a).
**Injectivity.** If M = ∏L_i > max(A) min(A), then |F(A)| = |A|. Two distinct
elements a, b ∈ A can only collide if M divides ab, which requires |ab| ≥ M,
impossible under the range bound. CRT uniqueness forces distinct elements to
distinct torus points.
**Fixed points.** F(a) = a iff 2a ≡ S (mod L_i) for all i = 2,…,k. In practice:
the gcd of {2aS} over A controls whether F is the identity on A.
**Gap.** If F(a) ≠ a, then |F(a) a| ≥ L₁ (using the CRT integer lift of F(a)
in [0, M); see notation below). Non-fixed points are displaced by at least the
first modulus — the embedding is not arbitrarily close to identity.
**Involution.** F is structurally involutive: F(F(a)) = a in the CRT-decomposed
coordinates. On the torus, F pairs elements. This is not a defect — it is the
central structural fact.
### 2.1 Fiber bundle degeneration: k-torus → 2-torus base
All properties above reduce to the **2-modulus base case** via a projection
that eliminates hidden assumptions from the higher axes.
Define the base 2-torus T₂ = Z/L₁Z × Z/L₂Z with the 2-modulus embedding:
$$
F_2(a) = (a \bmod L_1,\; S-a \bmod L_2)
$$
Define the projection π_{1,2}: T_k → T₂ that forgets axes 3…k:
$$
\pi_{1,2}(x_1, x_2, x_3, \dots, x_k) = (x_1, x_2)
$$
**Commutation.** The k-modulus embedding F_k and the 2-modulus embedding F₂
are linked:
$$
\pi_{1,2} \circ F_k = F_2
$$
*Proof.* Both sides are defined by the same congruences on axes 1 and 2:
F_k preserves a mod L₁ on axis 1 and Sa mod L₂ on axis 2; forgetting the
remaining axes leaves exactly F₂. ∎
**Consequence.** Every property of F₂ lifts to F_k:
| Property | Proven for F₂ (2-torus) | Lifts to F_k (k-torus) via |
|----------|------------------------|---------------------------|
| Injectivity under L₁L₂ > range(A) | CRT uniqueness | Holds on T₂, so holds on any fiber |
| Gap ≥ L₁ on non-fixed points | F₂(a) ≡ a (mod L₁) | Same congruence on axis 1 |
| Fixed-point condition: 2a ≡ S (mod L₂) | Sa ≡ a (mod L₂) | Additional condition on axes 3…k refines, does not change |
| F² = id | π_{1,2}(F²) = id on T₂ | Full involution in CRT coordinates |
The k-torus is a **fiber bundle over T₂**: each base point (x₁, x₂) has fibers
from axes 3…k determined by the same reflection constraint Sa. No hidden
assumption about higher axes can affect the base properties because the base
is independent and fully reduced to the proven 2-modulus case.
This means all claims proven for (L₁, L₂) hold for any (L₁, L₂, …, L_k)
without re-proving. The higher axes are **refinements**, not independent
degrees of freedom.
---
## 3. Idempotent Sieve Lemma
Since F is an involution (F² = id), we can construct a **projection operator**
that collapses each F-orbit {a, F(a)} to a single fixed point.
### Algebraic form (Π): Projection onto the invariant subspace
When 2 is invertible modulo M = ∏L_i (i.e., all moduli are odd):
$$
\Pi := \frac{1}{2}(I + F), \qquad \Pi(a) = \frac{a + F(a)}{2} \pmod{M}
$$
**Theorem.** Π² = Π. **Proof** — a single line from F² = I:
$$
\Pi^2 = \frac{1}{4}(I+F)^2 = \frac{1}{4}(I + 2F + F^2) = \frac{1}{4}(2I + 2F) = \frac{1}{2}(I+F) = \Pi
$$
**What Π does.** Decompose element-wise on the torus:
| Axis | Π(a) = (a + F(a))/2 | Behavior |
|------|---------------------|----------|
| Identity (axis 1) | (a + a)/2 = a | Element preserved |
| Reflection (axes 2…k) | (a + (Sa))/2 = S/2 | Collapses to constant S/2 |
Π annihilates the reflection-dimension information: every point projects to
(a mod L₁, S/2, S/2, …, S/2). The output is a 1-dimensional subspace of the
k-torus — the **invariant core** of the embedding. All the combinatorial
structure (Sidon, B_h) that F(A) carries on the torus lives in the
*kernel* of Π — the part that Π erases.
### Set-theoretic form (C): Orbit closure (no modular constraints)
When 2 is not invertible modulo M (any even modulus present):
$$
\mathcal{C}(X) := X \cup F(X)
$$
**Theorem.** C² = C. **Proof:**
$$
\begin{aligned}
\mathcal{C}(\mathcal{C}(X)) &= \mathcal{C}(X \cup F(X)) \\
&= (X \cup F(X)) \cup F(X \cup F(X)) \\
&= X \cup F(X) \cup F(X) \cup F^2(X) \\
&= X \cup F(X) = \mathcal{C}(X)
\end{aligned}
$$
C simply closes a set under the involution — the most minimal invariant
packet containing X. For a single point: a ⟼ {a, F(a)}.
### Why this matters
The idempotent sieve is the **fixed-point extractor** of the CRL system.
It separates the embedding into:
- **Invariant subspace** (image of Π): the part that survives all F-reflections
- **Nullspace** (kernel of Π): the part that oscillates — the combinatorial
structure that F creates on the torus
This decomposition is universal for any involution-based construction.
The Lean verification of the set-theoretic form is a 10-line proof
(see appendix).
---
## 4. What Varies, What Doesn't
The embedding is parameterized by k moduli. Changing them changes the torus
geometry:
| Parameter | Effect |
|-----------|--------|
| Larger L₁ | Larger minimum gap. Non-fixed points spread apart. |
| More axes (larger k) | Higher-dimensional torus. More constraints coupling A to S. |
| Choice of L₂,…,L_k | Controls which residues carry the reflection. The specific prime/power selection determines which arithmetic patterns emerge. |
| Larger M = ∏L_i | Larger torus volume. More "room" but coarser grid. |
| Fixed S | The involution center. Constant across all axes 2…k. |
S is **globally invariant** — the same involution parameterizes all reflection axes.
The image F(A) is not generally closed under the original reflection S. This is
not a bug: the torus embedding lifts A out of 1D into kD, and the involution
lives *between* elements (as F-pairs), not *within* the image set.
---
## 5. k = 2 Example: Sidon from a Line
Take A = {1, 2, 5, 6} with S = 7 (reflection pairs: 1↔6, 2↔5). A is not Sidon:
1+6 = 2+5 = 7.
Embed into a 2-torus with L₁ = 3, L₂ = 4:
```
a axis 1 (mod 3) axis 2 (7a mod 4) torus point F(a)
1 1 2 (1,2)
2 2 1 (2,1)
5 2 2 (2,2)
6 0 1 (0,1)
```
In integer representatives: F(A) = {5, 10, 9, 2}. No duplicate sums — Sidon.
The gap L₁ = 3 separates the elements enough on the first axis to break the
collision. The sum invariant F(a) + F(Sa) ≡ S (mod M) links reflection-paired
preimages across the torus: F(1)=10 and F(6)=9 satisfy 10 + 9 = 19 ≡ 7 = S.
The F² = id involution pairs image points differently — F(10)=1 and F(9)=6 —
but the S-sum pairing is the structural bridge between the original reflection
on A and the torus embedding.
---
## 6. k = 16: The Braid Torus
Take k = 16 pairwise-coprime moduli. The embedding produces points on a 16-torus:
```
T = Z/L₁Z × Z/L₂Z × ... × Z/L₁₆Z
```
Axis 1 carries identity. Axes 2…16 carry the reflection constraint, each with
a different modulus. The result is a 16-dimensional point pattern where:
- Every original element a ∈ A becomes a 16-tuple
- The involutive partner F(Sa) is the reflection of the point across axes 2…16
- The pattern of points on the torus encodes both the original set A and its
involution structure via the coupling to S
**Why 16?** The BraidStorm compressor operates on 8 strands, each contributing
2 dimensions: a crossing identity axis (strand is preserved through the crossing)
and a phase axis (strand phase is inverted by the crossing). 8 × 2 = 16.
The CRT torus embedding is a concrete algebraic model for placing a braid
configuration onto a 16-dimensional lattice. Each braid crossing corresponds
to a local deformation ε(a) = F(a) a whose components on axes 2…16 characterize
the crossing type.
**Q16_16 compatibility.** The full torus modulus M = ∏ L_i exceeds Q16_16 range
for k ≥ 8 (the product of the first 8 primes alone is ~9.7×10⁶). However, the
CRT decomposition works per-axis: each L_i is small, and all computation stays
in the smaller rings Z/L_i Z. The identity axis (mod L₁) uses Q16_16 integer
arithmetic for the original value a; the reflection axes use modular arithmetic
in their respective rings. No single value requires the full modulus M at runtime.
(Proof sketch: the braid generator σᵢ acts on strand i by identity and strand i+1 by
permutation. In the 16D embedding with axes paired (2i, 2i+1) for each strand, the
identity axis is untouched and the reflection axis carries the crossing phase.
Formal verification is ongoing.)
---
## 7. What This Gets You
The CRT torus embedding is a tool for transforming a 1D reflection-closed set
into a k-dimensional point cloud with controlled properties:
- **Combinatorial separation**: The gap L₁ on axis 1 helps enforce properties
like Sidon, B_h, Golomb — breaking sum/difference collisions that exist in the
original 1D set.
- **Involution pairing**: F creates involutive pairs on the torus, which models
braid crossings, reflection-symmetric codes, or paired configurations.
- **Modulus tuning**: Different choices of L₁,…,L_k produce different torus
geometries — the embedding is a parameterized construction tool, not a
theorem with a single fixed outcome.
- **Integer-only computation**: All arithmetic is modular — no floats needed.
Compatible with Q16_16 fixed-point for the modulus selection step.
---
## 8. What This Is Not
- Not a novel "operator class" — it is an embedding. F is a specific map, not
a category of operators. The structure is the torus + the point pattern.
- Not proven to always produce Sidon/B_h/Golomb sets — the example demonstrates
the mechanism. General sufficient conditions are open.
- Not a dynamical system — iteration (applying F to F(A)) requires choosing new
moduli, which is not a fixed dynamical law. The involution F² = id on the torus
means "iteration" is really "walking through pairs," not converging.
- Not yet formally connected to braid groups — the dimensional count (8×2=16) is
suggestive, not proven. The full Yang-Baxter / Reidemeister structure on the
torus embedding is ongoing work.
---
## 9. Open Directions
1. **Optimal modulus selection** — given A, S, and a target property P (Sidon,
B_h, distinct differences), characterize the (L₁,…,L_k) that maximize the
probability that F(A) satisfies P.
2. **Braid group action** — formalize how braid generators σᵢ act on the
16-torus embedded point set. Prove that F-pairs correspond to crossings.
3. **Asymmetric storage** — the identity axis (axis 1) requires no additional
storage beyond the original A. Only the reflection axes contribute new
information. This asymmetry maps to the ASQ framework (int8 query × binary
documents) as a structural analogy: one axis is preserved at full resolution,
the others are quantized.
4. **Torus codes** — the point pattern on the torus can be interpreted as an
error-correcting code. The gap L₁ provides a minimum distance guarantee.
Characterize the code parameters (n, k, d) achievable via this construction.