The QNFO familyQNFOQWAVq08PapersAsk
QNFO Papers

Nonlinear Tree-Based Numeration Systems: A Consolidated Synthesis

AI-generated This paper was written by an AI research pipeline; no human review is recorded.

0 open findings; 2 answered findings. Written by an AI research pipeline (QNFO); no human review is recorded.

Read the audit record ·

Living paper · v2.0.0 · 2 versionsPublished Revised Tags: Ultrametric · Tree geometry · Numeral systems9 min read · 2,124 words

Get new papers by email — one short weekly digest, unsubscribe any time.

In plain language

Ordinary number systems like decimal and binary are secretly tree shapes. This paper shows how that hidden tree structure connects five different areas of math and computing. It also points to new uses in teaching, computer design, and security.

Read the plain-language version (about 2 min, no jargon, no mathematics) →

#Abstract

Positional notation — the ordinary decimal and binary systems that underlie all computation — is natively an ultrametric tree. The digit string is a path from root to leaf; the base is a branching factor; the distance between two numbers is the depth of their lowest common ancestor. This insight, formalized through the $b$-adic valuation $d(x,y)=b^{-v_b(x-y)}$, unifies five research threads — distance-dependent weighting (Rofa 2013), hereditary binary compression (Tarau 2013), rational base representation trees (Akiyama et al. 2018), automata-theoretic formalism (Charlier & Kreczman 2025, Lecomte & Rigo 2001), and historical/biological parallels (Chrisomalis 2010) — and opens extensions into tropical geometry, perfectoid spaces, quantum computing, and interface design. This document synthesizes the full investigation.

#1. The Core Theorem: Positional Notation as an Ultrametric Tree

Theorem (Native Ultrametric of Positional Notation). [established] In any integer base $b \ge 2$, the distance between two integers measured by the highest power of $b$ dividing their difference is exactly the $b$-adic valuation:

$$d(x, y) = b^{-v_b(x-y)}$$

where $v_b(n)$ is the exponent of the highest power of $b$ dividing $n$. This metric satisfies the strong triangle inequality:

$$d(x, z) \le \max\{d(x, y), d(y, z)\}$$

Proof (sketch). Two numbers share $k$ trailing digits in base $b$ iff $b^k \mid (x-y)$ but $b^{k+1} \nmid (x-y)$, giving $d(x,y)=b^{-k}$. For any three integers, if $x$ shares $k_1$ trailing digits with $y$ and $y$ shares $k_2$ with $z$, then $x$ and $z$ share at least $\min(k_1, k_2)$ trailing digits. Hence $d(x,z) \le b^{-\min(k_1,k_2)} = \max(d(x,y), d(y,z))$. $\square$

The Tree Structure:

  • Level 0 (rightmost digit) branches $b$ ways per digit $a_0 \in \{0,\ldots,b-1\}$
  • Each integer corresponds to a unique root-to-leaf path
  • Ultrametric distance = depth of lowest common ancestor = count of trailing matching digits

The Inversion: The Archimedean "number line" is a projection. The native geometry is the discrete ultrametric tree — a Cantor set, clopen balls, all triangles isosceles.

Ostrowski's Theorem [established] states that $\mathbb{Q}$ has exactly two types of completions: the Archimedean $\mathbb{R}$ and the $p$-adic $\mathbb{Q}_p$ for each prime $p$. Both are valid. Only one is canonized.


#2. Five Research Threads — Deep Dive

#Thread 1: Distance-Dependent Weighting (Rofa, 2013)

Core innovation: A digit's value depends on its vertex-to-root distance in the tree, not on its string position. This activates the digit "0" — it is no longer a passive placeholder. "012" and "12" yield distinct numerical values.

Generalized valuation:

$$val(\text{path}) = f(\text{depth of node}, \text{digit value})$$

where $f$ need not factor as $digit \times base^{position}$.

Implications: Redundancy (multiple representations for the same integer), applications in error detection/correction, and a new class of computational arithmetic.

#Thread 2: Hereditary Binary Arithmetic (Tarau, 2013)

Problem: Hyper-large numbers (Knuth up-arrow scale) cannot even have their length written in flat notation.

Solution: Recursively compress binary strings via run-length encoding, then encode the run lengths in the same compressed format. This yields a tree of trees where each node compresses the binary expansion of its subtree.

Data type:

data Tree = Zero | One | Cons Tree Tree

Result: Numbers requiring $10^{100}$ decimal digits compress to a tree of depth ~20. Addition, multiplication, and exponentiation remain computable directly on the compressed hereditary form — complexity shifts from $O(\log N)$ to $O(\text{depth of hereditary tree})$, which can be exponentially smaller for hyper-large numbers.

#Thread 3: Rational Base Representation Trees (Akiyama et al., 2008/2018)

Surprising fact: In integer bases, not every rational has a finite expansion ($1/3 = 0.\overline{3}$). In rational base $p/q$ (coprime, $p\gt q\gt 1$), every integer has a unique finite expansion — the opposite behavior.

Conversion algorithm:

$$N = \frac{p}{q} \cdot Q + r, \quad 0 \le r \lt p/q$$

which is equivalent to $Nq = pQ + rq$. Iterating produces the finite expansion.

The fractal tree: Unlike integer bases where every subtree is isomorphic, rational base trees vary by modular residue class. Some subtrees appear infinitely often; others finitely often. The language of representations is typically not regular — a fundamentally more complex object.

Connection: Rational bases are a special case of beta-expansions (Parry, 1960), linking to symbolic dynamics and subshifts of finite type.

#Thread 4: Automata-Theoretic Formalism (Lecomte & Rigo, 2001; Charlier & Kreczman, 2025)

Abstract numeration system: A regular language $L$ over $\Sigma$, ordered lexicographically, where the $n$-th word represents integer $n$.

Key result (Charlier & Kreczman, 2025): The set of valid representations $\mathcal{R}(U)$ for a weight sequence $U_n$ is regular iff $U_n$ satisfies a linear recurrence with integer coefficients — equivalently, the base is a Pisot number (algebraic integer $\gt 1$ with all conjugates $\lt 1$ in modulus).

Why regularity matters:

  • Normalization computable by a finite transducer
  • Addition recognizable by a finite automaton (digit-by-digit, 3-track)
  • Properties decidable in linear time

Buchi's theorem [established]: The first-order theory of $\langle\mathbb{N}, +\rangle$ (Presburger arithmetic) is decidable because addition is automaton-recognizable. The open question: which nonlinear weight sequences preserve recognizability?

Dumont-Thomas connection: Substitutions $\sigma: \Sigma^* \to \Sigma^*$ generate infinite words; prefix trees form numeration systems in non-standard bases (the dominant eigenvalue of the substitution's incidence matrix).

#Thread 5: Historical Context & Biological Parallels

Chrisomalis (2010) catalogued 100+ numerical notation systems across 5,500 years. The transition to positional notation was convergent evolution — multiple civilizations independently built tree structures.

SystemNative Tree FeatureSuppressed By
Babylonian sexagesimalFloating radix point = undetermined tree depthDecimal point
Mayan calendar numeralsExplicit vertical stacking = visible treeLinear timeline
Modern binary/decimalbit/digit strings are tree paths"Number line" projection

Three historical erasures:

  1. ZFC set theory: Numbers constructed from $\emptyset$ and $\in$ — no tree structure encoded
  2. Dedekind cuts: $\mathbb{R}$ as connected continuum canonized; $\mathbb{Q}_p$ marginalized as "exotic"
  3. Digital computation: Hardware enforces tree structure (bit-trees) but software presents linear abstraction

Laws of Form (Spencer-Brown, 1969): An alternative foundation where "drawing a distinction" is primitive. A positional numeral is nested marks — a tree. The base is grouping $b$ distinctions into a higher-order distinction. "10" is a re-entry of the form into its own boundary.

DNA parallel: The genetic code uses a 4-letter alphabet in codons (triplets) — structurally a 4-ary tree of depth 3 with 64 leaves mapping to ~20 amino acids. The code is degenerate and non-power positional — structurally analogous to a redundancy-allowing nonlinear tree-based numeration system.


#3. Extensions & Future Directions

#3.1 Theoretical Extensions

ExtensionCore QuestionStatus
Weight sequence classificationFor which $U_n$ is arithmetic polynomial-time? Regular?Partial: Pisot = regular; Salem = open
Tropical geometryMax-plus algebra is natively ultrametric; what are tropical numeration systems?Unexplored
Perfectoid spaces (Scholze, 2012)Can $\mathcal{O}_K$ where $K$ is perfectoid serve as a numeration ground ring?Speculative
Bruhat-Tits buildingsGeneralized trees for $\mathrm{SL}_n(\mathbb{Q}_p)$ — building-based numeration for algebraic groups?Open
Non-commutative treesFree group Cayley graphs as non-commutative numerationUnexplored

#3.2 Computational Frontiers

Silent-Radix Cryptography: The fact that a digit string cannot internally specify its base is a cryptographic primitive. A secret large base $b$ makes numbers ambiguous without it — reducing to an integer knapsack problem.

Ultrametric Quantum Computing [speculative]:

  • Thesis I: Tree topology confines errors geometrically — $p_L \propto (p/p_{\text{th}})^{d_{\text{tree}}}$
  • Thesis II: 3D-integrated transmon qubits in coaxial cavities via TSVs — manufacturable
  • Thesis III: Prime-frequency spectral engineering for frequency-domain multiplexing
  • Disconfirmed if: depth-2 tree (8 transmons) shows no improvement over 2D layout

p-Adic Neural Networks: Replace real weights with $p$-adic valued weights. Non-Archimedean metric enables exact computation (no floating-point rounding).

Tree-Native Programming Language: First-class numeration bases, active zero, base-polymorphic arithmetic, ultrametric distance as primitive.

#3.3 The p-Adic Curriculum

AgeContent
5-6The tree as complete representation of $\mathbb{Z}_2$
6-7Expansion to base $p$; "how far apart in the tree?"
7-8$p$-adic metric formalized: $|x|_2 = 2^{-\text{depth}}$; clopen sets
8-9Sequences and convergence: "climbing the tree together"
9-10Differentiation: difference quotients, strict differentiability
10-11Integration: Volkenborn integral, Mahler basis, Fundamental Theorem
11+Introduce $\mathbb{R}$ as the "other" completion of $\mathbb{Q}$

Key principle: Build ultrametric intuition before Archimedean. The line becomes a specialized tool, not the default geometry.

#3.4 Interface Design: The Archimedeanized Tree

All interfaces degrade an ultrametric catalog (file system, knowledge graph) into an Archimedean line (scrollbar, feed, search results). Design principle: the tree is ground truth; lateral edges are shortcuts; both views simultaneously available.


#4. Production Infrastructure: Ultrametric Engine

The QNFO ultrametric engine (ask-qwav.q08.workers.dev, v2.8) implements the core discovery principles in production:

#4.1 Deployed State

MetricValue
Papers indexed109
Vectors in Vectorize170 (BGE-M3, 1024-dim)
AI model/deepseek-ai/deepseek-r1-distill-qwen-32b
Embedding model/baai/bge-m3
Total Cloudflare Workers28

#4.2 Working Endpoints

EndpointPurposeMathematical Principle
/api/search?q=XSemantic search via vector embeddingsCosine similarity in 1024-dim embedding space — the ultrametric tree is implicit in the nearest-neighbor structure of the vector index
/api/papersList all papers1D linear listing — the Archimedean projection of the tree
/api/ask?q=XAI-powered Q&A over corpusRetrieval-augmented generation using embedding search
/api/statsPaper metadata statisticsQuantitative audit of the corpus
/api/healthSystem healthOperational monitoring

#4.3 Theory-to-Engine Mapping

Mathematical ConceptEngine Implementation
Ultrametric distance $d(x,y)=b^{-v_b(x-y)}$Cosine similarity on 1024-dim BGE-M3 embeddings — an ultrametric in the limit of single-linkage clustering
Tree structure of positional notationVectorize index partitions the embedding space into a hierarchical tree (nearest-neighbor graph)
$p$-adic cache TTL $= 15s \times 2^{\text{ord}_2}$Documented in skill but not exposed as an endpoint in v2.8
3-phase discovery (word → cluster → tree)v2.8 uses vectorize-only search; cluster expansion and tree-based search not deployed
Spectral analysis (Tate, Amice, Intrinsic Amice)Not deployed in this instance
Bruhat-Tits buildingNot deployed — theoretical only

#4.4 Architecture

Workers (28 total)
├── ask-qwav             — ultrametric discovery engine (v2.8)
├── ultrametric-tree-api — tree API (separate worker)
├── graph-api            — knowledge graph (graph-api.qnfo.org)
├── qnfo-data-api        — unified data API (v2 endpoints)
├── living-paper-api     — living paper system
├── cms-api              — content management
└── 22 other operational workers
R2: qnfo/ namespace (canonical storage)
D1: qnfo-audit (18 tables, FTS5)
Vectorize: BGE-M3 embeddings, 170 vectors, 1024-dim
Pages: deep.qwav.tech, papers.qnfo.org

#5. The Gap Analysis

GapDescriptionImpact
External literature searcharXiv and Semantic Scholar APIs unreachable from this environmentLiterature discovery limited to internal QNFO corpus (109 papers)
Advanced engine featuresSpectral analysis, Bruhat-Tits, Berkovich, dendrogram endpoints not deployedEngine operates as basic semantic search, not full ultrametric tree explorer
Engine-skill driftSkill documents 27+ endpoints; v2.8 has 11Skill documentation needs updating
DNA connectionThe genetic code's tree structure is noted as an analogy but not mathematically formalizedOpen research question
Empirical validationQuantum computing thesis, p-adic curriculum, silent-radix crypto — all [speculative] or [my conjecture]Requires experimental verification

#6. Research Roadmap

TimeframeMilestoneCertainty
1-5 yearsPilot p-adic curriculum vs. control; depth-2 tree quantum chip benchmarkedFeasible
5-10 yearsFull weight sequence classification; tree-native programming language prototypeLikely
10-20 yearsTree-based cryptographic standards; DNA-numeration isomorphism proven/refutedSpeculative
20-50 yearsBruhat-Tits numeration for $n$-dimensional groups; reflective numeration systemsHighly speculative

#7. Key References

  1. Rofa (Quni-Gudzinas, 2013). On Number Representation. arXiv:2005.10207. [EXTERNAL-SOURCE]
  2. Tarau, P. (2013). Arithmetic Algorithms for Hereditarily Binary Natural Numbers. arXiv:1310.8277. [WEB-SEARCH]
  3. Akiyama, S., Frougny, C., & Sakarovitch, J. (2008). On subtrees of the representation tree in rational base numeration systems. Discrete Mathematics & Theoretical Computer Science. [WEB-SEARCH]
  4. Charlier, E. & Kreczman, S. (2025). Positional numeration systems and regular languages. [WEB-SEARCH]
  5. Lecomte, P. & Rigo, M. (2001). Abstract numeration systems. In Words, Languages & Combinatorics III. [LLM-INFERRED]
  6. Chrisomalis, S. (2010). Numerical Notation: A Comparative History. Cambridge. [WEB-SEARCH]
  7. Spencer-Brown, G. (1969). Laws of Form. Allen & Unwin. [established]
  8. Holly, J. (2001). Pictures of Ultrametric Spaces, the $p$-adic Numbers, and Valued Fields. Amer. Math. Monthly, 108(8), 721-728. [established]
  9. QNFO (2026). The Ultrametric Foundation. deep.qwav.tech/papers/ultrametric-foundation/. [EXTERNAL-SOURCE]
  10. Scholze, P. (2012). Perfectoid Spaces. Publ. Math. IHES, 116, 245-313. [established]

Synthesized from: five-thread deep-dive, extensions & future directions analysis, live Cloudflare infrastructure audit (28 Workers, ask-qwav v2.8, 109 papers), and the Ultrametric Foundation thesis.

Spotted a typo or a possible error? Select the passage and choose Report, or .

New papers by email

One short weekly digest: titles and links. No tracking; unsubscribe any time.

Cite this paper

Report a problem

Anonymous: no name or email is asked for. Each report is checked against the paper, and a confirmed one is corrected in the next version.

Keep exploring

One body of research, three doors.