1id1.net
Research paper · Preprint

Counting in Token Space: Finite Witnesses, Linear Tests and Regular Heaps

1id1:core:20261109-0002

Abstract

Token Space is a categorical framework motivated by the structural understanding of large language models and the development of related computational mechanisms. We study restricted homomorphism counts and witness resources. For core-free r-ary targets on n letters, a decoder gives the linear-test bound n + (r - 1) max(t, t′) ≤ rn, where t and t′ count twin classes; linear tests forbid repeated letters within records. Qualitative completeness follows from existing weighted-graph and simple-#CSP theorems; our contribution is the source-variable bound for Boolean relations. Standard directed cycles give linear growth of the binary witness bound. An exact search over 113,230 six-letter types finds two complement pairs agreeing on all five-letter linear tests but separated by one six-letter oriented path, proving a lower bound of six, not the exact unrestricted value. Complementation extends the classification to a specified 130,164-type family. Exact integer GPU computations are independently checked on CPU. For arbitrary heaps, finite witnesses use at most n letters and n! records; automata with m and m′ states give record length below mm′. For induced counting on regular heaps, the exact test-state threshold is m. A one-pattern reconstruction guarantee and classical Möbius inversion organize further observations. Potential uses for LLM-expressed relations require a suitable observation interface; no LLM application effects are established here.

Token SpaceHomomorphism countsFinite witnessesRegular languages

Cite this version

Wuming Pan. Counting in Token Space: Finite Witnesses, Linear Tests and Regular Heaps. 1id1, v2, 9 November 2026. 1id1:core:20261109-0002@v2. https://1id1.net/id/core/20261109-0002/v2/

Files & integrity

FileSize
Paper PDF440 KB
LaTeX source archive839 KB
SHA-256 checksums
paper.pdf
3734df1a477ea2188ba696d6fe26f8f3b7116651525f248026fc601e5a8b24b8
source.zip
6704f11e0d52787a64561c7202e0255521892fecc795fa406a5072e2d2448295

Version history

v2Revised release
v1Earlier release

Revision V14 adds an introductory explanation and a fixed-version citation to Token Linkages V7 as a structural approach to modeling Transformer-style sequence input-output behavior. Both original Token maps and the distinction between input records and structural witnesses are retained. Mathematical results, proofs, numerical evidence and verification programs are unchanged from release v1, which remains available.

Provenance & verification

AI-assisted preparation of the publication copy and source archive. The author remains responsible for the content. This deposit does not assert completed peer review.

The scientific verification programs and data are byte-identical to release v1. This revision changes only introductory context, one bibliography entry and version labels; no mathematical experiments were rerun. Compilation, citation-link, source-package and publication-integrity checks were performed.

Related paper

Token Linkages and Tree Resynchronization: An Effective Characterization ↗