Memory-Tree Algebra: Numbers That Remember Their Computation
Abstract
We introduce the Memory-Tree Algebra \(\mathcal{M}\), a structure in which each element is a rooted tree encoding its complete computational history. While the evaluation map \(\mathrm{eval}: \mathcal{M} \to \mathbb{R}\) recovers classical real arithmetic, two memory-trees \(m_1 \neq m_2\) can satisfy \(\mathrm{eval}(m_1) = \mathrm{eval}(m_2)\) while remaining distinct as computational objects—they represent different paths to the same numerical result. This extension transforms complexity theory into geometry: the depth \(d(m)\) measures parallel time complexity, the size \(s(m)\) measures total work, and the rewrite distance \(\delta(m_1, m_2)\) quantifies how different two computation histories are. We prove that the evaluation map is a ring homomorphism, establish bounds relating depth, size, and structural properties of compound expressions, and show that the rewrite distance forms a pseudometric on \(\mathcal{M}\). The formalization comprises 14 verified theorems and 17 structural hypotheses in the Platonic proof system. This framework suggests a geometric reformulation of P vs NP: can every verifiable witness tree be efficiently shortened? Similarly, automatic differentiation becomes "reading the computation tree backwards."
Keywords: computational complexity, tree algebras, abstract rewriting, formal verification, P vs NP
MSC 2020: 68Q15 (Complexity classes), 03B70 (Logic in computer science), 68Q42 (Grammars and rewriting systems)