8 KiB
Orthogonal AMMR and CRC Pattern Memory
This document specifies Orthogonal AMMR (O-AMMR) as a projection-based generalization of AMMR and defines its integration into AMMR-backed CRC pattern memory.
The central move is:
- replace additive or scalar summaries with orthogonal projection summaries
- preserve integrity via cryptographic commitment
- preserve informational structure via retained orthogonal subspaces
Section 1: Orthogonal AMMR - Projection-Based Merge Laws
1. Overview
Orthogonal AMMR (O-AMMR) extends the standard Algebraic Merkle Mountain Range by replacing scalar or associative summaries with projection-based geometric summaries.
Each node encodes:
- a cryptographic commitment
- a structured orthogonal representation of its underlying data
The structure functions as a verifiable dimensionality-reduction engine, preserving both:
- integrity, through hashing
- informational structure, through orthogonal bases
2. Node Structure
Each node N is defined as:
N = {
hash: H(N_left.hash || N_right.hash || Q || R),
summary: {
Q: orthonormal basis matrix,
R: projection coefficients,
shape: (rows, cols),
energy: ||R||_F
}
}
Where:
Qspans the retained subspace of inputsRencodes projections of inputs into that basisenergycaptures total signal magnitude
3. Canonical Merge Law
To ensure determinism across distributed systems, merge is defined as:
merge(A, B) = Orthogonalize(Canonicalize(A ∪ B))
3.1 Canonicalization
Inputs are sorted deterministically:
- by hash, or
- by structural index
This ensures:
identical input sets -> identical ordering -> identical summaries
3.2 Orthogonalization
Instead of naive Gram-Schmidt, the implementation should use one of:
- Modified Gram-Schmidt (MGS)
- Householder QR
- SVD, preferred for numerical stability
The factorization target is:
X -> Q R
with:
Qᵀ Q = IRupper triangular in QR form- or diagonal / singular-value aligned when using SVD-style retention
4. Order-Independent Variant
The recommended order-independent form is covariance accumulation:
C = Σ_i x_i x_iᵀ
Then:
C = U Σ Uᵀ
Where:
Ubecomes the orthogonal basisΣencodes signal strength
This form is:
- associative
- commutative
- appropriate for distributed AMMR aggregation
5. Hash Stability
Floating-point summaries must be stabilized before commitment.
Canonical rule:
Q_quant = round(Q, ε)
R_quant = round(R, ε)
hash = H(... || Q_quant || R_quant || ...)
Without quantization:
identical math -> different hashes -> consensus failure
6. Basis Truncation
To prevent unbounded basis growth:
retain i iff Σ_i >= λ
Only dominant components are retained.
This yields:
- compressed summaries
- bounded memory
- suppression of low-energy directions
7. Interpretation
O-AMMR transforms the structure into:
a committed projection space of computation history
Each node encodes:
- what directions of information exist
- what signal strength is retained in those directions
- what redundancy has been removed through projection
Section 2: Integration into AMMR-Backed CRC Pattern Memory
1. Redefinition of CRC Squares
Previously:
- CRC squares cached discrete pattern signatures
Now:
- CRC squares store local orthogonal summaries
Canonical regional form:
CRC_region:
Q_local
Σ_local
trust
stability
2. CRC Signature Function
Instead of:
CRC = hash(pattern bits)
use:
CRC = H(Q_quant, Σ_quant)
This encodes:
- pattern structure
- pattern strength
- dimensional composition
3. Local n-map Schema
Each region maps:
n-map:
index -> basis vector direction
weight -> singular value
So each cell contributes:
- to a direction in feature space
- not merely to a binary local state
4. Pattern Matching
Pattern matching becomes projection-based:
similarity(A, B) = ||Q_Aᵀ Q_B||
Meaning:
- similarity is the degree of alignment between retained subspaces
This replaces:
- Hamming distance
- bitwise comparison
5. Nutrient Dynamics
The nutrient layer becomes geometric rather than symbolic.
Nutrient Gain Law
gain = ||x - Q Qᵀ x||
This is the residual after projection.
Interpretation:
- high residual -> new information -> high nutrient
- low residual -> redundant information -> low nutrient
Nutrient Decay Law
Σ_i down -> branch pruned
Interpretation:
- weak directions lose energy
- low-energy directions are eventually removed
Duty Threshold Law
A region activates when:
||Σ|| > θ
Routing Export Law
Mycorrhizal routing weight is:
w_(A->B) = ||Q_Aᵀ Q_B|| * trust_A
Meaning:
- regions share signals when they span similar subspaces
AMMR Lock-In Rule
A pattern is committed when all of the following hold:
- basis is stable across steps
- singular values are stable across steps
- projection error is below threshold
6. Solver Update Order
Each orthogonal update step proceeds as:
-
Observe Convert cell states into vectors.
-
Project Apply:
x -> Q Qᵀ x -
Compute residual
r = x - Q Qᵀ x -
Update proposals If residual is large, propose a new retained direction.
-
Update CRC bases Re-orthogonalize the local region.
-
Update AMMR Merge orthogonal summaries upward through the tree.
-
Nutrient update Reward residual energy and decay weak singular directions.
7. Mirror Algorithm
AMMR provides:
(Q, Σ)
The mirror layer computes:
coefficients = Qᵀ x
Then:
output = LUT(coefficients)
This provides:
- constant-time inference after projection
- no repeated basis recomputation at execution time
8. Resulting System Behavior
The resulting system is:
a self-compressing, projection-driven field solver
Where:
- patterns are stored as subspaces
- learning means discovering new orthogonal directions
- memory means persistent basis vectors
- pruning means removing low-energy directions
Final Synthesis
The integrated system is:
-
AMMR Cryptographic commitment and hierarchical structure
-
Orthogonalization Redundancy removal through basis extraction
-
Nutrients Residual-driven learning and decay
-
Mycorrhizal routing Connectivity driven by subspace similarity
-
Mirror LUT Constant-time execution over projected coordinates
In plain terms, the system becomes:
a distributed, verifiable, self-pruning basis-learning machine
This is more than:
- pattern matching
- storage
- ordinary cached execution
It is:
structure-preserving computation memory
Completion Metrics
This specification is implementation-ready only when all of the following are mapped to code or theorem targets:
- node structure with
Q,R, and committed hash - deterministic merge law
- quantized hash commitment
- truncation rule with explicit threshold
- projection-based CRC signature
- projection similarity routing law
- residual-based nutrient update law
- mirror LUT execution keyed by projected coefficients
Immediate Lean Targets
The smallest truthful Lean-facing targets suggested by this spec are:
-
AMMRSummaryFields:- basis witness
- coefficient witness
- shape
- energy
-
CRCRegionSummaryFields:- local basis witness
- local strength witness
- trust
- stability
-
projectionSimilarityPurpose:- typed similarity witness between retained subspaces
-
residualEnergyPurpose:- typed nutrient gain witness
-
MirrorLUTIndexPurpose:- projected-coordinate key for execution
The first theorem targets should be:
- deterministic merge produces equal committed parent for equal canonical inputs
- residual energy is zero for perfectly represented inputs
- equal projected coefficients yield equal mirror LUT index