TL;DR: We prove and machine-verify in Lean 4 a unified sharp non-asymptotic theory of sequence-model memory dynamics establishing (i) the exact shift-invariant cubic doubly-exponential self-attention rank-collapse law $D_{\ell+1} \le \gamma D_\ell \tanh(c D_\ell^2/4)$ with exact supercritical bifurcation $D_{\mathrm{crit}}(\gamma,c)=\sqrt{\frac{2}{c}\log\frac{\gamma+1}{\gamma-1}}$, the exact nonlinear Birkhoff–Hopf contraction theorem via a sum-of-squares certificate, Sinkhorn Dirichlet variance decay, universal trace-bounded residual rollout $\tau_1((1-\alpha)I+\alpha A) \ge 1 - \alpha\frac{N-\operatorname{tr}(A)}{N-1}$, and the exact $\Omega(\log N)$ non-normal causal-attention metastability barrier $\tau_1(C_N^L) \ge 1 - 2^L/\sqrt{N}$ despite spectrum $\{1/(m+1)\}$; (ii) exact minimax associative-recall trade-offs separating Hebbian linear attention ($\mathrm{MSE} \ge M/D - 1$), optimal Delta-rule decoders ($\mathrm{MSE} \ge 1 - D/M$), biased asymmetric linear sign recall ($M \le D$), and decaying RetNet forgetting horizons; and (iii) constructive $2^d$-vs-$d$ and $O(1)$-vs-$L$ Softmax Transformer separations against finite-state GSSMs and infinite-precision LTI Hankel SSMs.
- Lean 4 formalization: AttentionSSMMemoryDynamics.lean (3,308 lines, 41 headline theorems, 35 helper lemmas, 24 definitions/structures, 0 errors, 0 warnings, 0
sorry/admit/axiom/native_decide/unsafe/partial/opaque/implemented_by, 41/41 clean #print axioms using only [propext, Classical.choice, Quot.sound], compiles in ~10.6s).
- Python screening & numerical verification: verify_attention_ssm.py.
1. Main Mathematical Results
Pillar I: Dobrushin Contraction, Birkhoff–Hopf Projective Geometry, & Exact Self-Attention Rank Collapse
- Dimension-Free Exact Dobrushin–Diameter Contraction (
dobrushin_diameter_contraction):
For any row-stochastic matrix $A \in \mathbb{R}^{N \times N}$, any seminormed real vector space $E$, and any token cloud $X_1,\dots,X_N \in E$ with pairwise diameter $\le D$, coupling rows via $u_j = A_{ij} - \min(A_{ij},A_{kj})$ and $w_j = A_{kj} - \min(A_{ij},A_{kj})$ yields the dimension-free, shift-invariant bound
$$\|(AX)_i - (AX)_k\| \;\le\; \tau_1(A)\, D, \qquad \tau_1(A) := \frac{1}{2}\max_{i,k}\sum_{j=1}^N |A_{ij}-A_{kj}| = 1 - \min_{i,k}\sum_{j=1}^N \min(A_{ij},A_{kj}),$$
together with submultiplicativity $\tau_1(AB) \le \tau_1(A)\tau_1(B)$ (dobrushin_submultiplicative).
- Exact Sharp Softmax Dobrushin Bound (
softmax_dobrushin_le_tanh, softmax_dobrushin_tanh_sharp_two):
If the score matrix $S \in \mathbb{R}^{N \times N}$ has cross-ratio span $(S_{ia}-S_{ib})-(S_{ka}-S_{kb}) \le \Delta$ ($\Delta \ge 0$), then
$$\tau_1(\mathrm{softmax}(S)) \;\le\; \tanh\!\left(\frac{\Delta}{4}\right),$$
attained with exact equality at $N=2$ for every $\Delta \ge 0$.
- Exact Birkhoff–Hopf Nonlinear & Linear Projective Contraction Theorem (
birkhoff_nonlinear_contraction, birkhoff_linear_contraction):
Via an exact sum-of-squares positive-factorization certificate (birkhoff_sos_core), any positive kernel $K > 0$ with cross-ratio bound $e^\Delta$ contracts positive vectors $x, y > 0$ ($m \le x_j/y_j \le M$, $\mu = M/m$, $\rho = e^{\Delta/2}$) by the exact finite-distance nonlinear law and classical Birkhoff linear bound:
$$\log\frac{(Kx)_i/(Ky)_i}{(Kx)_k/(Ky)_k} \;\le\; 2\log\frac{\rho\sqrt{\mu}+1}{\sqrt{\mu}+\rho} \;\le\; \tanh\!\left(\frac{\Delta}{4}\right)\log\mu.$$
- Exact Shift-Invariant Cubic Doubly-Exponential Self-Attention Rank Collapse & Sharp Bifurcation (
self_attention_one_step_diam_bound, self_attention_cubic_collapse_rate, self_attention_antipodal_exact_dynamics, self_attention_bifurcation_threshold):
For pure self-attention $X^{(\ell+1)} = \mathrm{softmax}(\beta (X^{(\ell)} W_Q)(X^{(\ell)} W_K)^\top) X^{(\ell)} W_V$ with $\|W_Q\|\le q$, $\|W_K\|\le k$, $\|W_V\|\le \gamma$, $c=\beta q k$:
Pillar II: Sinkhorn–Birkhoff Doubly Stochastic Attention, Residual Rollout, & Causal Metastability
- Sinkhorn Cross-Ratio Invariance & Exact Dirichlet Variance-Decay Identity (
sinkhorn_cross_ratio_invariant, sinkhorn_dobrushin_le_tanh, doubly_stochastic_mean_conservation, doubly_stochastic_dirichlet_variance_decay):
Any diagonal scaling $P = D_u \exp(S) D_v$ preserves all cross-ratios identically, yielding the same sharp Dobrushin bound $\tau_1(P) \le \tanh(\Delta(S)/4)$. For any doubly stochastic $P$, token mean is conserved ($\overline{PX}=\bar{X}$) and token variance obeys the exact identity
$$\mathrm{Var}(X) - \mathrm{Var}(PX) \;=\; \frac{1}{N}\sum_{i=1}^N \sum_{j=1}^N P_{ij}\|X_j - (PX)_i\|_2^2 \;\ge\; 0.$$
Moreover, doubly stochastic attention provably forbids uniform attention sinks ($\exists i,\, P_{i,s} \le 1/N$, doubly_stochastic_no_attention_sink), whereas a row-stochastic attention sink with $A_{i,s} \ge 1-\varepsilon$ causes 1-layer collapse $\tau_1(A) \le \varepsilon$ (softmax_attention_sink_one_step_collapse).
- Universal Trace Lower Bound, Generalized Residual Rollout Bounds, & PSD Anti-Collapse (
dobrushin_trace_lower_bound, residual_rollout_dobrushin_two_sided, residual_rollout_equality_iff, psd_residual_variance_lower_bound, non_psd_swap_rollout_annihilates_variance):
For every $N \ge 2$, $\alpha \in [0, 1]$, and row-stochastic $A$, the rollout $R_\alpha(A) = (1-\alpha)I + \alpha A$ satisfies the two-sided bounds
$$(1-\alpha) + \alpha\frac{\operatorname{tr}(A)-1}{N-1} \;\le\; \tau_1\big((1-\alpha)I + \alpha A\big) \;\le\; (1-\alpha) + \alpha\,\tau_1(A),$$
with equality on the right for $\alpha \in (0,1)$ iff there exists a mutually self-dominant maximizing pair ($A_{ki}\le A_{ii}$, $A_{ik}\le A_{kk}$). For PSD doubly stochastic $P$, $\mathrm{Var}(R_\alpha(P)X) \ge (1-\alpha)^2\mathrm{Var}(X)$, whereas the non-PSD swap $P = \left[\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right]$ annihilates variance to $0$ in one step at $\alpha=1/2$.
- Exact Causal-Mask Spectrum & $\Omega(\log N)$ Non-Normal Metastability Barrier (
causal_uniform_dobrushin_exact, causal_uniform_binomial_eigenvalue, causal_uniform_harmonic_plateau, causal_uniform_log_depth_barrier):
For uniform causal attention $(C_N)_{ij} = \frac{1}{i+1}\mathbf{1}_{j\le i}$:
Pillar III: In-Context Linear / Kernel / Decaying Associative-Recall Width–Memory Trade-Offs
- Exact Welch–Hebbian Minimax MSE ($\ge M/D - 1$) vs. Delta-Rule Optimal-Decoder MSE ($\ge 1 - D/M$) (
welch_gram_frobenius_lower_bound, welch_hebbian_mse_lower_bound, mercedes_benz_tight_frame_equality, delta_rule_minimax_mse_lower_bound):
For any $M$ unit keys $\Phi_1,\dots,\Phi_M \in \mathbb{S}^{D-1}$ averaged over all $2^M$ bipolar tables $v \in \{\pm 1\}^M$:
- Hebbian linear attention: $\mathbb{E}_v[\mathrm{MSE}_{\mathrm{Hebb}}] = \frac{1}{M}(\|G\|_F^2 - M) \ge \frac{M}{D} - 1$ (attained with exact equality $= 1/2$ on the Mercedes-Benz tight frame $D=2, M=3$).
- Omniscient optimal linear state selector $s(v) \in \mathbb{R}^D$ (Delta-rule / ridge / pseudoinverse): $\mathbb{E}_v[\mathrm{MSE}(s(v),v)] \ge 1 - \frac{D}{M}$, and $\exists v \in \{\pm 1\}^M$ where every $w \in \mathbb{R}^D$ suffers $\mathrm{MSE} \ge 1 - \frac{D}{M}$.
- Exact $M \le D$ Universal Sign-Recall Wall (
linear_universal_sign_recall_iff_sdd, linear_universal_sign_recall_le_dim):
Universal bipolar sign recall for a $D$-dimensional linear state $s(v) = \sum_\mu v_\mu \Phi_\mu$ with arbitrary asymmetric query vectors $w_\nu \in \mathbb{R}^D$ and arbitrary affine biases $b_\nu \in \mathbb{R}$ holds iff $B_{\nu\mu} = \langle w_\nu, \Phi_\mu\rangle$ satisfies $\sum_{\mu\ne\nu}|B_{\nu\mu}| + |b_\nu| < B_{\nu\nu}$, which by Gershgorin invertibility forces $M \le D$.
- Exact Decaying Linear-Attention / RetNet Forgetting Horizon (
decay_linear_recall_forgetting_horizon):
With exponential decay $0 < \gamma < 1$ and key coherence $|\langle k_0, k_t\rangle| \ge \mu > 0$ ($t \ge 1$), universal strict sign recall of the oldest memory $v_0$ is impossible whenever
$$M - 1 \;\ge\; \frac{\log\big(1 + (1-\gamma)/\mu\big)}{\log(1/\gamma)}.$$
Pillar IV: Exact SSM (Finite-State GSSM & Infinite-Precision LTI Hankel) vs. Softmax Separations
- Exact Finite-State GSSM Copy & Hamming-Ball MQAR Error Bounds (
finite_state_ssm_copy_accuracy_bound, finite_state_ssm_hamming_error_bound):
Any GSSM with state space $H$ copies at most $|H|$ of the $V^L$ length-$L$ strings (forcing $|H| \ge V^L$ for zero-error copy), and recalls at most $|H|\sum_{j=0}^r \binom{M}{j}$ binary tables within Hamming error $r$.
- Exact Infinite-Precision LTI SSM Delay-Line Hankel Obstruction (
lti_ssm_delay_copy_state_dim_ge, shift_register_lti_achieves_delay):
Any infinite-precision real LTI SSM $(A, B, C)$ of state dimension $N$ implementing an $L$-step delay-line copy ($C^\top A^m B = \delta_{m, L-1}$ for $0 \le m \le 2L-2$) MUST satisfy $N \ge L$, attained with exact equality $N = L$ by the shift register.
- Constructive Exponential ($2^d$ vs. $d$) & Unbounded-Length ($d=2$ vs. $L$) Softmax Separations (
hypercube_softmax_universal_recall, exponential_width_separation_softmax_vs_linear, circular_2d_softmax_universal_copy, unbounded_length_separation_2d_softmax_vs_ssm):
- Exponential width separation: 1-layer Softmax Attention in width $d \ge 1$ with hypercube keys $\{\pm 1/\sqrt{d}\}^d$ and $\beta = d^2$ universally recalls $M = 2^d$ arbitrary bipolar entries, whereas every linear-readout state model requires $D \ge 2^d$.
- Unbounded-length separation at fixed $d=2$: 1-layer 2D circular-key Softmax Attention ($d = 2$ independent of $L$, $\beta = L^2(\log L + 1)$) universally copies/recalls arbitrary length $L \ge 2$, whereas finite-state GSSMs require $|H| \ge 2^L$ and LTI delay-line SSMs require $N \ge L$.
2. Prior-Art Comparison Table (Through November 2026) & Zero-Overlap Receipt
| Prior Work | Setting & Results | Our Sharp Non-Asymptotic Advance |
|---|
| Dong, Cordonnier, & Loukas (ICML 2021) | Doubly-exponential $3^L$ rank collapse of pure attention with loose $\|X\|_{1,\infty}$-dependent prefactors | Shift-invariant exact contraction $D_{\ell+1} \le \gamma D_\ell \tanh(c D_\ell^2/4)$ (zero $\|X\|$ or $N$ dependence), exact $N=2$ attainment, and exact supercritical bifurcation $D_{\mathrm{crit}}(\gamma,c)$ |
| Sander, Ablin, Blondel, & Peyré (AISTATS 2022) | Introduced Sinkformers (Sinkhorn doubly stochastic attention) as Wasserstein gradient flows | Exact cross-ratio invariance $\Delta(D_u K D_v)=\Delta(K)$, exact Dirichlet variance-decay identity, and sink-impossibility separation |
| Geshkovski, Letrouit, Polyanskiy, & Rigollet (2023–2025) | Continuous-time interacting-particle clustering on $\mathbb{S}^{d-1}$ | Discrete-layer non-asymptotic diameter contraction, exact finite-depth $3^L$ rate, and exact bifurcation threshold $D_{\mathrm{crit}}$ |
| Wu, Ajorlou, Jadbabaie, & Sra (NeurIPS 2023, NeurIPS 2024) | Products of row-stochastic matrices; qualitative slowdown of rank collapse under sparse/causal masks | Exact binomial spectrum $\{1/(m+1)\}$ of uniform causal attention + sharp $\Omega(\log N)$ non-normal metastability barrier $\tau_1(C_N^L) \ge 1 - \min(H_N^{L-1}/N, 2^L/\sqrt{N})$ |
| Jelassi, Brandfonbrener, Kakade, & Malach (ICML 2024, Repeat After Me) | GSSM vs. Transformer copying separation via bit-counting lower bounds | Quantitative exact copy-accuracy & Hamming-ball MQAR error ceilings + infinite-precision LTI Hankel rank obstruction $N \ge L$ + explicit machine-checked $d=2$ circular-key Softmax construction |
| Arora et al. (2024, Zoology / Based, arXiv:2402.18668) & Nazari (Feb 2026, arXiv:2602.04852) | Empirical & asymptotic recall-throughput trade-offs and effective state-rank reduction in linear attention | Exact minimax non-asymptotic MSE laws separating Hebbian ($\ge M/D - 1$) from Delta-rule ($\ge 1 - D/M$), exact biased asymmetric sign-recall wall $M \le D$, and exact RetNet forgetting horizon |
| Sanford, Hsu, & Telgarsky (ICML/arXiv 2024) & Merrill, Petty, & Sabharwal (ICML 2024) | Communication-complexity & circuit lower bounds on shallow transformers and SSM state tracking | Algebraic Gershgorin & Hankel obstructions valid even at infinite real precision, paired with exact constructive Softmax upper bounds |
| Lapenna, Fioresi, & Gharesifard (Apr 2026 / TMLR, arXiv:2604.07925) | Doubly-exponential rank decay bound for pure Sinkhorn attention | Exact $\tanh(\Delta(S)/4)$ Dobrushin bound via cross-ratio invariance + exact Dirichlet variance identity & PSD residual lower bound |
| Biccari, Huang, & Zuazua (Jul 2026, arXiv:2607.22367) & Rola (Oct 2026, arXiv:2610.05558) | Dobrushin contraction of attention rollout $\frac{1}{2}(I+A)$ and mutually-self-dominant equality condition at $\alpha=1/2$ | Generalized exact equality characterization to all $\alpha \in (0,1)$ + new universal trace lower bound $\tau_1((1-\alpha)I+\alpha A) \ge 1 - \alpha\frac{N-\operatorname{tr}(A)}{N-1}$ |
Strict Zero-Overlap Receipt: Unlike open-memory-associative-capacity (static single-head Modern Hopfield fixed points $T_\beta(\xi)$, Lyapunov energy $E_\beta$, spurious $k$-mixtures, and Voronoi basins) and open-kanerva-sdm-memory-phi (discrete Hamming-ball Kanerva SDM overlap kernel $\mathcal{I}_n(r,d)$), this work focuses exclusively on multi-layer self-attention/Sinkhorn/causal rank-collapse dynamics, linear/kernel/decaying associative-recall width–memory trade-offs, and SSM vs. Transformer copy/recall separations.
3. Novelty Receipt
- Exact Shift-Invariant Self-Attention Collapse Law & Supercritical Bifurcation $D_{\mathrm{crit}}(\gamma,c)$: First exact sharp non-asymptotic diameter recurrence $D_{\ell+1} \le \gamma D_\ell \tanh(c D_\ell^2/4)$ (independent of token mean and $N$), exact $N=2$ antipodal equality at every layer, and exact collapse-vs-explosion threshold $D_{\mathrm{crit}}(\gamma,c) = \sqrt{\frac{2}{c}\log\frac{\gamma+1}{\gamma-1}}$ for expansive value matrices $\gamma > 1$.
- Sum-of-Squares Certificate for Birkhoff–Hopf Nonlinear Projective Contraction: First Lean 4 formalization of Birkhoff's contraction theorem, proved via a new exact algebraic sum-of-squares positive factorization (
birkhoff_sos_core) yielding the tight finite-distance nonlinear bound $2\log\frac{\rho\sqrt{\mu}+1}{\sqrt{\mu}+\rho} \le \tanh(\Delta/4)\log\mu$.
- Universal Trace Lower Bound for Stochastic & Residual Rollout Matrices: New universal inequality $\tau_1(A) \ge \frac{\operatorname{tr}(A)-1}{N-1}$ and two-sided residual rollout bounds for all $\alpha \in [0, 1]$, generalizing Rola (Oct 2026) to arbitrary residual mixing $\alpha \in (0, 1)$ plus PSD-vs-non-PSD variance separation.
- Exact Causal-Attention Binomial Eigenbasis & $\Omega(\log N)$ Non-Normal Metastability Barrier: Complete binomial eigenvector decomposition $C_N v^{(m)} = \frac{1}{m+1} v^{(m)}$ ($v_k^{(m)} = \binom{k}{m}$) paired with the sharp generating-function Wallis bound $\tau_1(C_N^L) \ge 1 - 2^L/\sqrt{N}$, rigorously quantifying non-normal causal collapse delay.
- Unified Minimax Linear-Recall & Infinite-Precision SSM Separations: Side-by-side non-asymptotic minimax lower bounds separating Hebbian ($\ge M/D - 1$), Delta-rule ($\ge 1 - D/M$), biased asymmetric sign recall ($M \le D$), RetNet forgetting horizons, GSSM Hamming-ball error rates, and LTI Hankel delay-line rank ($N \ge L$) against explicit $2^d$ hypercube and $d=2$ circular Softmax Transformer constructions.
4. Python Computational Screening & Numerical Verification
Running python3 verify_attention_ssm.py confirms all bounds across random trials, tight frames, bifurcation orbits, causal powers, and explicit Softmax constructions:
[1A] Diam/tau*d0 max = 1.000000 (<=1), tau/tanh(Delta/4) max = 0.999059 (<=1)
[1B] Birkhoff h_out/nl_bound max = 0.998188 (<=1), h_out/lin_bound max = 0.996107 (<=1)
[1C] Bifurcation (below D_crit=1.3760): after 15 layers D = 0.000000e+00
[1C] Bifurcation (exact D_crit=1.3760): after 15 layers D = 1.376029e+00
[1C] Bifurcation (above D_crit=1.3760): after 15 layers D = 1.355854e+02
[1D] Sinkhorn cross-ratio err = 1.78e-15, Dirichlet variance identity err = 1.07e-14
[1E] Residual rollout lower <= tau_R <= upper verified (200 trials); max lower/tau_R = 1.000000
[1F] Causal N=64, L=1: (C^L)_{N-1,0}=0.01562, tau=0.98438, H^0/N=0.01562, 2^L/sqrt(N)=0.25000
[1F] Causal N=64, L=2: (C^L)_{N-1,0}=0.07412, tau=0.92588, H^1/N=0.07412, 2^L/sqrt(N)=0.50000
[1F] Causal N=64, L=3: (C^L)_{N-1,0}=0.18855, tau=0.81145, H^2/N=0.35163, 2^L/sqrt(N)=1.00000
[1F] Causal N=64, L=4: (C^L)_{N-1,0}=0.34467, tau=0.65533, H^3/N=1.66811, 2^L/sqrt(N)=2.00000
[1F] Causal N=64, L=5: (C^L)_{N-1,0}=0.51207, tau=0.48793, H^4/N=7.91332, 2^L/sqrt(N)=4.00000
[2A] Exact Welch-Hebbian MSE >= M/D - 1 and Delta-Rule MSE >= 1 - D/M verified across all 2^M assignments!
[2B] Tight frame (D=2, M=3) achieves exact Welch equality: MSE = 0.500000 == M/D - 1 = 0.500000
[2C] Exact decaying linear-attention forgetting horizon M_crit = 1 + log(1+(1-gamma)/mu)/log(1/gamma) verified!
[3A] Hypercube Softmax d=1..4, M=2^d, beta=d^2: min A_uu in [0.8808, 0.9987] > 0.5
[3B] 2D Circular Softmax d=2, L=2..50, beta=L^2(log L + 1): min A_tt >= 0.999999 > 0.5
[3C] LTI SSM delay-line Hankel matrix J_L exact rank L verified!
ALL COMPUTATIONAL CHECKS PASSED!
5. Complete Line-Numbered Inventory (AttentionSSMMemoryDynamics.lean, 3,308 lines)
Headline Theorems (41)
| # | Line | Theorem | Mathematical Role |
|---|
| 1 | L273 | dobrushin_tv_eq_one_sub_min | Exact $\mathrm{TV}(p,q) = 1 - \sum_j \min(p_j, q_j) \le 1$ |
| 2 | L310 | dobrushin_diameter_contraction | Dimension-free $\|(AX)_i - (AX)_k\| \le \tau_1(A) D$ in any seminormed space |
| 3 | L409 | dobrushin_submultiplicative | Submultiplicativity $\tau_1(AB) \le \tau_1(A)\tau_1(B)$ |
| 4 | L613 | softmax_dobrushin_le_tanh | Sharp softmax bound $\tau_1(\mathrm{softmax}(S)) \le \tanh(\Delta(S)/4)$ |
| 5 | L638 | softmax_dobrushin_tanh_sharp_two | Exact $N=2$ attainment of $\tanh(\Delta/4)$ for all $\Delta \ge 0$ |
| 6 | L740 | birkhoff_nonlinear_contraction | Exact nonlinear Birkhoff–Hopf projective contraction via SOS certificate |
| 7 | L850 | birkhoff_linear_contraction | Classical linear Birkhoff bound $2\log\frac{\rho\sqrt{\mu}+1}{\sqrt{\mu}+\rho} \le \tanh(\Delta/4)\log\mu$ |
| 8 | L941 | self_attention_one_step_diam_bound | Shift-invariant one-layer bound $D_{\ell+1} \le \gamma D_\ell \tanh(\beta q k D_\ell^2/4)$ |
| 9 | L1025 | self_attention_cubic_collapse_rate | Exact cubic doubly-exponential $3^L$ collapse rate |
| 10 | L1061 | self_attention_antipodal_exact_dynamics | Exact $N=2$ antipodal equality at every layer |
| 11 | L1097 | self_attention_bifurcation_threshold | Exact supercritical bifurcation $D_{\mathrm{crit}}(\gamma,c) = \sqrt{\frac{2}{c}\log\frac{\gamma+1}{\gamma-1}}$ |
| 12 | L1160 | sinkhorn_cross_ratio_invariant | Exact invariance of cross-ratios under Sinkhorn scaling $D_u \exp(S) D_v$ |
| 13 | L1174 | sinkhorn_dobrushin_le_tanh | Sharp $\tanh(\Delta(S)/4)$ Dobrushin bound for Sinkhorn attention |
| 14 | L1214 | doubly_stochastic_mean_conservation | Exact mean conservation $\overline{PX} = \bar{X}$ |
| 15 | L1225 | doubly_stochastic_dirichlet_variance_decay | Exact Dirichlet variance-decay identity $\mathrm{Var}(X)-\mathrm{Var}(PX) = \frac{1}{N}\sum_{i,j} P_{ij}\|X_j-(PX)_i\|^2 \ge 0$ |
| 16 | L1294 | doubly_stochastic_no_attention_sink | No uniform attention sink $> 1/N$ in doubly stochastic attention |
| 17 | L1305 | softmax_attention_sink_one_step_collapse | 1-layer $\varepsilon$-collapse of softmax under attention sink $A_{i,s} \ge 1-\varepsilon$ |
| 18 | L1340 | dobrushin_trace_lower_bound | Universal trace lower bound $(\operatorname{tr}(A)-1)/(N-1) \le \tau_1(A)$ |
| 19 | L1428 | residual_rollout_dobrushin_two_sided | Two-sided rollout bounds for all $\alpha \in [0, 1]$ |
| 20 | L1502 | residual_rollout_equality_iff | Exact mutually-self-dominant equality iff for all $\alpha \in (0, 1)$ |
| 21 | L1616 | psd_residual_variance_lower_bound | PSD doubly-stochastic residual variance floor $(1-\alpha)^2\mathrm{Var}(X)$ |
| 22 | L1668 | non_psd_swap_rollout_annihilates_variance | Non-PSD swap 1-step variance annihilation at $\alpha = 1/2$ |
| 23 | L1722 | causal_uniform_dobrushin_exact | Exact 1-step $\tau_1(C_N) = 1 - 1/N$ for uniform causal attention |
| 24 | L1779 | causal_uniform_binomial_eigenvalue | Complete exact binomial eigenbasis $C_N v^{(m)} = \frac{1}{m+1} v^{(m)}$ |
| 25 | L1884 | causal_uniform_harmonic_plateau | Exact $L$-layer harmonic plateau $\tau_1(C_N^L) \ge 1 - H_N^{L-1}/N$ |
| 26 | L1978 | causal_uniform_log_depth_barrier | Sharp $\Omega(\log N)$ non-normal metastability barrier $\tau_1(C_N^L) \ge 1 - 2^L/\sqrt{N}$ |
| 27 | L2106 | welch_gram_frobenius_lower_bound | Exact Welch bound $(\sum_\mu \|\Phi_\mu\|^2)^2 / D \le \|G\|_F^2$ |
| 28 | L2149 | welch_hebbian_mse_lower_bound | Exact Walsh-averaged Hebbian MSE $\ge M/D - 1$ & worst-case witness |
| 29 | L2248 | mercedes_benz_tight_frame_equality | Exact tight-frame attainment of Welch equality at $D=2, M=3$ |
| 30 | L2306 | delta_rule_minimax_mse_lower_bound | Exact optimal-decoder / Delta-rule minimax MSE $\ge 1 - D/M$ |
| 31 | L2498 | linear_universal_sign_recall_iff_sdd | Exact strict diagonal dominance iff for universal biased sign recall |
| 32 | L2564 | linear_universal_sign_recall_le_dim | Exact $M \le D$ ceiling for all biased asymmetric linear-state models |
| 33 | L2637 | decay_linear_recall_forgetting_horizon | Exact forgetting horizon $M-1 \ge \log(1+(1-\gamma)/\mu)/\log(1/\gamma)$ |
| 34 | L2737 | finite_state_ssm_copy_accuracy_bound | Exact GSSM copy ceiling $\le |H|$ and zero-error lower bound $V^L \le |H|$ |
| 35 | L2806 | finite_state_ssm_hamming_error_bound | Exact Hamming-ball MQAR error bound $|H|\sum_{j=0}^r \binom{M}{j}$ |
| 36 | L2852 | lti_ssm_delay_copy_state_dim_ge | Infinite-precision LTI SSM delay-line Hankel obstruction $L \le N$ |
| 37 | L2904 | shift_register_lti_achieves_delay | Shift-register witness attaining exact delay-line equality $N = L$ |
| 38 | L2987 | hypercube_softmax_universal_recall | Explicit $d$-dim hypercube Softmax universally recalling $M = 2^d$ pairs at $\beta = d^2$ |
| 39 | L3101 | exponential_width_separation_softmax_vs_linear | Exact $2^d$ vs. $d$ exponential width separation (Softmax vs. linear models) |
| 40 | L3124 | circular_2d_softmax_universal_copy | Explicit fixed-$d=2$ circular Softmax universally copying arbitrary length $L$ |
| 41 | L3251 | unbounded_length_separation_2d_softmax_vs_ssm | Exact $O(1)$ vs. $L$ & $2^L$ separation (2D Softmax vs. GSSM & LTI SSM) |
Definitions, Structures, & Supporting Lemmas (24 definitions/structures + 35 lemmas)
- Shared helpers & geometry:
bipolar (L89), bipolar_sq (L94), bipolar_abs (L97), bipolar_not (L100), dotProd (L104), sqNorm (L108), sqNorm_nonneg (L111), dotProd_comm (L115), dotProd_sq_le (L120), abs_dotProd_le_sqrt (L125), tanh_eq_exp_sub_div_add (L136), tanh_nonneg_of_nonneg (L147), tanh_lt_one (L153), tanh_le_self (L160), tanh_strictMono (L205), tanh_mono (L214).
- Stochastic/attention operators & contraction helpers:
IsRowStochastic (L221), IsDoublyStochastic (L226), rowTV (L230), dobrushinCoeff (L234), rowTV_nonneg (L241), rowTV_le_dobrushin (L245), dobrushin_le_iff (L252), dobrushin_nonneg (L265), dobrushin_le_one (L297), isRowStochastic_mul (L394), softmaxMatrix (L509), softmaxMatrix_pos (L513), softmaxMatrix_isRowStochastic (L520), tv_le_tanh_of_cross_ratio (L531), birkhoff_sos_core (L672), selfAttnLayer (L929).
- Sinkhorn, residual, & causal helpers:
diagScale (L1151), tokenMean (L1197), tokenVariance (L1201), applyAttn (L1205), residualRollout (L1322), residualRollout_isRowStochastic (L1326), causalUniformAttn (L1697), causalUniformAttn_isRowStochastic (L1700), sum_range_choose_eq (L1763), harmonicReal (L1807), harmonicReal_nonneg (L1810), harmonicReal_mono (L1813), causalUniformAttn_pow_row_zero (L1817), causalUniformAttn_pow_isRowStochastic (L1842), causalUniformAttn_pow_dobrushin_ge (L1855), wallis_prod_le_two_sqrt (L1943).
- Associative recall & SSM structures/helpers:
sum_bipolar_mul (L2070), gramMatrix (L2095), hebbianRecall (L2099), FiniteStateSSM (L2729), hammingDist (L2757), card_hammingBall (L2761), LTISSM (L2839), ltiImpulse (L2845), softmax_diag_gt_half_implies_universal_recall (L2954), hypercubeKey (L2978), circularKey (L3114).
6. Build Verification & Verbatim #print axioms Output
Command (Lean 4 v4.33.0-rc2, exit code 0, 0 errors, 0 warnings, 10.63s wall-clock):
cd /Users/arthurcolle/math_rip/new-results/collatz-coalescence && \
lake env lean /Users/arthurcolle/math_rip/new-results/open-attention-ssm-memory-dynamics/AttentionSSMMemoryDynamics.lean
Verbatim output:
'AttentionSSMMemoryDynamics.dobrushin_tv_eq_one_sub_min' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.dobrushin_diameter_contraction' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.dobrushin_submultiplicative' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.softmax_dobrushin_le_tanh' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.softmax_dobrushin_tanh_sharp_two' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.birkhoff_nonlinear_contraction' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.birkhoff_linear_contraction' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_one_step_diam_bound' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_cubic_collapse_rate' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_antipodal_exact_dynamics' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_bifurcation_threshold' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.sinkhorn_cross_ratio_invariant' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.sinkhorn_dobrushin_le_tanh' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.doubly_stochastic_mean_conservation' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.doubly_stochastic_dirichlet_variance_decay' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.doubly_stochastic_no_attention_sink' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.softmax_attention_sink_one_step_collapse' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.dobrushin_trace_lower_bound' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.residual_rollout_dobrushin_two_sided' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.residual_rollout_equality_iff' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.psd_residual_variance_lower_bound' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.non_psd_swap_rollout_annihilates_variance' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_dobrushin_exact' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_binomial_eigenvalue' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_harmonic_plateau' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_log_depth_barrier' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.welch_gram_frobenius_lower_bound' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.welch_hebbian_mse_lower_bound' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.mercedes_benz_tight_frame_equality' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.delta_rule_minimax_mse_lower_bound' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.linear_universal_sign_recall_iff_sdd' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.linear_universal_sign_recall_le_dim' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.decay_linear_recall_forgetting_horizon' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.finite_state_ssm_copy_accuracy_bound' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.finite_state_ssm_hamming_error_bound' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.lti_ssm_delay_copy_state_dim_ge' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.shift_register_lti_achieves_delay' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.hypercube_softmax_universal_recall' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.exponential_width_separation_softmax_vs_linear' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.circular_2d_softmax_universal_copy' depends on axioms: [propext,
Classical.choice,
Quot.sound]
'AttentionSSMMemoryDynamics.unbounded_length_separation_2d_softmax_vs_ssm' depends on axioms: [propext,
Classical.choice,
Quot.sound]