Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Full exterior and sampled prefix

Abstract

Conditional next-bit couplings and zero screening for forbidden-run words.

Write W(n) for Fin n to Bool and A(k,n,w) for the original DBonacciAdmissible scanner. C(k,n,F,x) is the finite set of legal full words w satisfying w(i)=x(i) for every i in F. The fixed set F can contain the entire exterior of a contiguous block and any sampled prefix. Both ends remain fixed. L(F,x,h) is completionLaw, the uniform PMF on this fiber, where h states that the fiber is nonempty.

For PMFs p and q on Bool, J(p,q) denotes bitCoupling. Set a=p(false) and b=q(false). If a is at most b, its masses at (false,false), (false,true), (true,false), (true,true) are a, zero, b-a, one-b. Otherwise exchange the two coordinates of the same construction with a and b interchanged. This is the finite shared-threshold next-bit law.

Theorem 1.1 (Exact conditional-bit marginals and a common zero).

(\forall (k,n:\mathbb{N}), (((0 < k) \implies ((\forall (F:\operatorname{Finset}\left(\operatorname{Fin}\left(n\right)\right)), ((\forall (x,y:(\operatorname{Fin}\left(n\right) \to \operatorname{Bool})), ((\forall (h:\operatorname{Nonempty}\left(\operatorname{C}\left(k, n, F, x\right)\right)), ((\forall (g:\operatorname{Nonempty}\left(\operatorname{C}\left(k, n, F, y\right)\right)), ((\forall (i:\operatorname{Fin}\left(n\right)), (((\neg (i \in F)) \implies (((\operatorname{mapFst}\left(\operatorname{J}\left(\operatorname{evalLaw}\left(F, x, h, i\right), \operatorname{evalLaw}\left(F, y, g, i\right)\right)\right) = \operatorname{evalLaw}\left(F, x, h, i\right)) \land (\operatorname{mapSnd}\left(\operatorname{J}\left(\operatorname{evalLaw}\left(F, x, h, i\right), \operatorname{evalLaw}\left(F, y, g, i\right)\right)\right) = \operatorname{evalLaw}\left(F, y, g, i\right)) \land (1/2 \leq \operatorname{mass}\left(\operatorname{J}\left(\operatorname{evalLaw}\left(F, x, h, i\right), \operatorname{evalLaw}\left(F, y, g, i\right)\right), \operatorname{false}, \operatorname{false}\right)))))))))))))))))))

Proof. Machine-checked in Lean as D5/S1/Words/AdmissibleWords/KBonacciConditionalBlockCoupling.conditional_step_coupling (✓ std3). ∎

Source. Repository-derived.

Commentary.

The laws p and q in the formula are the pushforwards of L(F,x,h) and L(F,y,g) by evaluation at i. Deleting the one at an unfixed coordinate gives an injection from one-completions into zero-completions while preserving all other bits. Thus each actual conditional zero mass is at least one half. The displayed joint law has exact marginals and common-zero mass equal to their minimum. No lower bound on word length relative to k is required.

Theorem 1.2 (A common zero screens the earlier prefix).

(\forall (k,n:\mathbb{N}), (((0 < k) \implies ((\forall (x,y:(\operatorname{Fin}\left(n\right) \to \operatorname{Bool})), (((((\operatorname{A}\left(k, n, x\right)) \land (\operatorname{A}\left(k, n, y\right)))) \implies ((\forall (z:\operatorname{Fin}\left(n\right)), (((((\operatorname{at}\left(x, z\right) = \operatorname{false}) \land (\operatorname{at}\left(y, z\right) = \operatorname{false}))) \implies ((\forall (t:(\operatorname{Fin}\left(n\right) \to \operatorname{Bool})), (\operatorname{A}\left(k, n, \operatorname{S}\left(x, z, t\right)\right) \iff \operatorname{A}\left(k, n, \operatorname{S}\left(y, z, t\right)\right)))))))))))))))

Proof. Machine-checked in Lean as D5/S1/Words/AdmissibleWords/KBonacciConditionalBlockCoupling.zero_screening (✓ std3). ∎

Source. Repository-derived.

Commentary.

Define S(x,z,t)(i) to be x(i) when i is at most z and t(i) otherwise. A forbidden window is either contained in the legal prefix, contained in the shared later assignment, or crosses z. The last possibility contains the specified zero. Hence replacing the legal prefix preserves the entire suffix-completion condition.

Theorem 1.3 (Uniform suffix laws agree after reset).

(\forall (k,n:\mathbb{N}), (((0 < k) \implies ((\forall (F:\operatorname{Finset}\left(\operatorname{Fin}\left(n\right)\right)), ((\forall (x,y:(\operatorname{Fin}\left(n\right) \to \operatorname{Bool})), (((((\operatorname{A}\left(k, n, x\right)) \land (\operatorname{A}\left(k, n, y\right)))) \implies ((\forall (z:\operatorname{Fin}\left(n\right)), (((((\operatorname{at}\left(x, z\right) = \operatorname{false}) \land (\operatorname{at}\left(y, z\right) = \operatorname{false}) \land ((\forall (i:\operatorname{Fin}\left(n\right)), (((\operatorname{val}\left(i\right) \leq \operatorname{val}\left(z\right)) \implies (i \in F))))) \land ((\forall (i:\operatorname{Fin}\left(n\right)), (((((i \in F) \land (\operatorname{val}\left(z\right) < \operatorname{val}\left(i\right)))) \implies (\operatorname{at}\left(x, i\right) = \operatorname{at}\left(y, i\right)))))))) \implies (((\operatorname{mapReset}\left(\operatorname{L}\left(F, x\right), y, z\right) = \operatorname{L}\left(F, y\right)) \land ((\forall (w:(\operatorname{Fin}\left(n\right) \to \operatorname{Bool})), ((\forall (i:\operatorname{Fin}\left(n\right)), (((\operatorname{val}\left(z\right) < \operatorname{val}\left(i\right)) \implies (\operatorname{at}\left(\operatorname{S}\left(y, z, w\right), i\right) = \operatorname{at}\left(w, i\right)))))))) \land (((\operatorname{mapFst}\left(\operatorname{R}\left(F, x, y, z\right)\right) = \operatorname{L}\left(F, x\right)) \land (\operatorname{mapSnd}\left(\operatorname{R}\left(F, x, y, z\right)\right) = \operatorname{L}\left(F, y\right)))))))))))))))))))

Proof. Machine-checked in Lean as D5/S1/Words/AdmissibleWords/KBonacciConditionalBlockCoupling.reset_law_transport (✓ std3). ∎

Source. Repository-derived.

Commentary.

All coordinates through z are fixed. The two legal exterior words have a zero at z and agree at every fixed coordinate strictly after z. Prefix replacement S(y,z,w) is a bijection between their full completion fibers, with inverse S(x,z,w). It therefore transports the uniform conditional laws exactly. R(F,x,y,z) samples w from L(F,x) and returns the pair (w,S(y,z,w)); its two marginal pushforwards are exactly L(F,x) and L(F,y). Every coordinate strictly after z is preserved.

Theorem 1.4 (Stopped conditional recursion has exact full-word marginals).

(\forall (k,n:\mathbb{N}), (((0 < k) \implies ((\forall (s:\operatorname{List}\left(\operatorname{Fin}\left(n\right)\right)), (((\operatorname{Nodup}\left(s\right)) \implies ((\forall (F:\operatorname{Finset}\left(\operatorname{Fin}\left(n\right)\right)), ((((\forall (i:\operatorname{Fin}\left(n\right)), (((i \in s) \implies (\neg (i \in F)))))) \implies ((\forall (x,y:(\operatorname{Fin}\left(n\right) \to \operatorname{Bool})), ((\forall (h:\operatorname{Nonempty}\left(\operatorname{C}\left(k, n, F, x\right)\right)), ((\forall (g:\operatorname{Nonempty}\left(\operatorname{C}\left(k, n, F, y\right)\right)), (((\operatorname{mapFst}\left(\operatorname{P}\left(s, F, x, y, h, g\right)\right) = \operatorname{L}\left(F, x, h\right)) \land (\operatorname{mapSnd}\left(\operatorname{P}\left(s, F, x, y, h, g\right)\right) = \operatorname{L}\left(F, y, g\right)))))))))))))))))))))

Proof. Machine-checked in Lean as D5/S1/Words/AdmissibleWords/KBonacciConditionalBlockCoupling.prefix_coupling_marginals (✓ std3). ∎

Source. Repository-derived.

Commentary.

P(s,F,x,y,h,g) denotes prefixCoupling. At each listed site, the finite next-bit joint law is bound to the recursively refined completion law. Its supported bit pairs have nonempty refined fibers. The marginal weight of a bit times its refined uniform completion mass is the original mass on that bit fiber; summing over Bool proves exact disintegration. If the fixed histories already contain a common screening zero and agree at all farther fixed sites, the recursion instead uses resetCoupling, with legal representatives chosen from the actual nonempty fibers. Uniform prefix transport proves both marginals in this stopped branch.

Theorem 1.5 (Reset transport has zero free-site Hamming mean).

(\forall (k,n:\mathbb{N}), ((\forall (s:\operatorname{List}\left(\operatorname{Fin}\left(n\right)\right)), ((\forall (F:\operatorname{Finset}\left(\operatorname{Fin}\left(n\right)\right)), ((\forall (x,y:(\operatorname{Fin}\left(n\right) \to \operatorname{Bool})), ((\forall (h:\operatorname{Nonempty}\left(\operatorname{completions}\left(k, n, F, x\right)\right)), ((\forall (z:\operatorname{Fin}\left(n\right)), ((((\forall (i:\operatorname{Fin}\left(n\right)), (((i \leq z) \implies (i \in F))))) \implies ((((\forall (i:\operatorname{Fin}\left(n\right)), (((i \in s) \implies (\neg (i \in F)))))) \implies (\operatorname{mean}\left(\operatorname{resetCoupling}\left(F, x, y, h, z\right), \operatorname{scanHamming}\left(s\right)\right) = 0))))))))))))))))

Proof. Machine-checked in Lean as D5/S1/Words/AdmissibleWords/KBonacciConditionalBlockCoupling.reset_mean_zero (✓ std3). ∎

Source. Repository-derived.

Commentary.

Every coordinate through z is fixed and every scanned site is free. resetMap copies the sampled word at all scanned sites, so their total disagreement has mean zero. The histories are arbitrary and only the x completion fiber is required to be nonempty.

Theorem 1.6 (A supported fixed head separates from the remaining mean).

(\forall (n:\mathbb{N}), ((\forall (p:\operatorname{PMF}\left(\operatorname{Pair}\left((\operatorname{Fin}\left(n\right) \to \operatorname{Bool}), (\operatorname{Fin}\left(n\right) \to \operatorname{Bool})\right)\right)), ((\forall (i:\operatorname{Fin}\left(n\right)), ((\forall (t:\operatorname{List}\left(\operatorname{Fin}\left(n\right)\right)), ((\forall (a,b:\operatorname{Bool}), ((((\forall (w:\operatorname{Pair}\left((\operatorname{Fin}\left(n\right) \to \operatorname{Bool}), (\operatorname{Fin}\left(n\right) \to \operatorname{Bool})\right)), (((\operatorname{eval}\left(p, w\right) \neq 0) \implies (((\operatorname{fst}\left(w, i\right) = a) \land (\operatorname{snd}\left(w, i\right) = b))))))) \implies (\operatorname{mean}\left(p, \operatorname{scanHamming}\left(\operatorname{cons}\left(i, t\right)\right)\right) = \operatorname{disagreement}\left(a, b\right) + \operatorname{mean}\left(p, \operatorname{scanHamming}\left(t\right)\right)))))))))))))

Proof. Machine-checked in Lean as D5/S1/Words/AdmissibleWords/KBonacciConditionalBlockCoupling.mean_head (✓ std3). ∎

Source. Repository-derived.

Commentary.

For any full-word-pair probability mass function with supported head bits a and b, the mean scanHamming of i followed by t equals disagreement(a,b), equal to zero when a=b and one otherwise, plus the mean scanHamming of t. No legality, order or distinctness hypothesis is required.

Paper application: first common zero and the emitted scan event

In the Chinese and English Chapter 39 example ex-ch39-p2e-uniform-parent-gap, fix k>=2, n>=1, two legal full words x,y agreeing off one site u (allow x=y), and a nonempty interval B excluding u. Keep every coordinate of B-complement fixed. For a right block scan increasingly; for a left block reverse the sites and both full words. Put m=card(B), and let (X_j,Y_j) be the emitted bit pair at the j-th scanned site, for 1<=j<=m. The following is the paper shared-threshold construction and its finite probability argument, not an additional kernel-verified theorem.

Given any positive-probability joint sampled history, each marginal next-bit law is the uniform legal completion law with that chain’s sampled prefix and entire exterior fixed. Deleting the next true bit is an injection into false completions, so its conditional false mass is at least 1/2. Before a common zero, use a fresh shared uniform threshold at every step, even if the remaining conditional laws already agree. The conditional common-zero probability is the minimum of the two false masses, hence at least 1/2. At the first common zero, every forbidden window joining earlier history to the remaining suffix crosses that zero. The suffix laws, including the fixed far exterior, therefore coincide and can be sampled identically. Each step and this suffix draw preserve the original completion-law marginals. conditional_step_coupling and reset_law_transport supply the corresponding native one-step and screening identities; they do not by themselves identify a multi-step emitted event of prefixCoupling.

Define T on every output as the first common-zero scan position, or T=m+1 if there is none. Let G_j be the information generated by the first j emitted pairs and A_j={T>j}, for 0<=j<=m; A_0 is the whole sample space. All conditional probabilities refer only to histories of positive probability. For 1<=j<=m, the finite tower identity gives Pr(A_j)=E[indicator(A_{j-1}) Pr((X_j,Y_j)!=(false,false) | G_{j-1})]<=Pr(A_{j-1})/2. Induction yields Pr(A_j)<=2^(-j), including j=0 and j=m. The event permits (true,true); it is not the event that all preceding pairs disagree. A_m={T=m+1} means that the whole block contains no common zero.

On the support of this same paper joint law, a common zero at r forces X_q=Y_q for every r<=q<=m, including the zero itself. Thus {X_j!=Y_j} is a subset of A_j, and Pr(X_j!=Y_j)<=Pr(A_j)<=2^(-j). Linearity of the finite disagreement sum gives E[sum_{j=1}^m indicator(X_j!=Y_j)]<=sum_{j=1}^m 2^(-j)=1-2^(-m)<=1, without independence between positions. Reversing the scan gives the identical assertion for a left block; exterior coordinates remain fixed. The empty-block extension has T=1 and zero cost. If the initial block laws already coincide, an alternative synchronous whole-block draw has cost zero without requiring any zero in its output.

The native prefixCoupling tests resetReady before scanning a site and can transport a shared completion before an emitted common zero. Its no-common-false event must therefore also be bounded in this initial reset branch; it cannot be identified with latent survival of the recursion. The native prefix_coupling_emitted_tail in KBonacciEmittedTail supplies this event estimate by a completion-fiber count and recursive emitted-event induction. right_scan_hamming separately proves expected cost at most one. The complete two-orientation event/support assembly remains a separate obligation. The paper derivation and synchronous alternative do not replace that native-law obligation.

The native emitted-event estimate is D5/S1/Words/AdmissibleWords/KBonacciEmittedTail.prefix_coupling_emitted_tail.

Fix integers k >= 2 and n >= 0. The state set S is the actual finite subtype DBonacciName k n: its elements x are full words x.val : Fin n to Bool with proof of DBonacciAdmissible k n x.val. Thus S consists of the legal words with no k consecutive true bits, with open boundaries. In the book’s Chapter 39 example on a uniform parent gap, the parameter correspondence is K=k, N=n and the one-based book site j=i.val+1 for i : Fin n. The book’s legal-word set W_N corresponds to S, whereas W(n) above denotes all Boolean words, including illegal ones. Every sum over x or y below is over S unless a fiber is specified.

Put Z=card(S), pi(x)=1/Z, and pi[h]=(1/Z) sum_x h(x). The all-zero word is legal, including the unique empty word at n=0, so Z>0. The canonical Names suppliers DBonacciName, DBonacciAdmissible and dbonacci_name_card identify Z with dbonacci k (n+2); Values.dbonacci_level_pos supplies positivity for positive order. The uniformPmf supplier in DBonacci.TerminalSampling realizes pi on this actual nonempty subtype. The normalization is the number of legal states, not the number 2^n of unconstrained words.

Let B be any finite subset of Fin n and take B-complement in the whole set Fin n. No interval or connectedness assumption is imposed. Define ext_B(x)=x.val restricted to B-complement and A_B(x)={y in S : ext_B(y)=ext_B(x)}. Write m_B(x)=card(A_B(x)). The state x belongs to its own fiber, hence m_B(x)>0. Forgetting the legality proof is a bijection from A_B(x) to the original C(k,n,B-complement,x.val), so these two finite sets have the same cardinality. Every exterior coordinate, on all sides of B, is fixed.

The actual full-state refresh law mu_B(x) is the original completionLaw(B-complement,x.val,h_x) pushed to S, where h_x is completion_nonempty applied to x.property. More explicitly, sample a supported completion w from L(B-complement,x.val,h_x) and set legalWord(w) to the subtype element with value w and the legality proof contained in its completion membership. This conversion changes no bit. Equivalently, first sample the uniform PMF on the completion subtype and map this supported legalWord conversion. If a total map on all ambient Boolean words is used, it can return x off the legal support; those inputs have zero mass, so this extension has no effect on mu_B(x).

Forgetting the subtype proof after this pushforward gives exactly the original completionLaw again. Its pushforward by restrictBlock B is the canonical conditionalBlockLaw B x.val x.property from KBonacciIntervalBlockCoupling. Conversely, a block assignment b in that law’s support has an original legal completion preimage. Restoring b on B and x.val on every site in B-complement recovers that completion, hence a legal state, and pushes the block law back to mu_B(x). Restriction and restoration are inverse on this support because the entire exterior is fixed. An arbitrary unsupported assignment need not restore to a legal word.

The canonical completionLaw_apply formula therefore gives mu_B(x)(y)=1/m_B(x) for y in A_B(x) and zero otherwise. Define its real transition mass and its action on any complex function f:S to C by T_B(x,y)=indicator(y in A_B(x))/m_B(x) and (E_B f)(x)=sum_y T_B(x,y)f(y). Here T_B(x,y)=(mu_B(x)(y)).toReal is the real mass at y; real weights are embedded in C when multiplying f(y). This identifies the matrix with the original legal-state law, rather than assuming a freely chosen stochastic matrix.

The actual exterior law is q_B=(ext_B)_* pi. For any realizable exterior eta, let C_eta={x in S : ext_B(x)=eta} and m_eta=card(C_eta). Then q_B(eta)=m_eta/Z. In particular q_B(ext_B(x))=m_B(x)/Z. Impossible exteriors have q_B mass zero. For y in C_eta, conditional probability under pi is (1/Z)/(m_eta/Z)=1/m_eta; conditioning on ext_B(x) consequently gives precisely mu_B(x). Thus E_B is conditional averaging with respect to the full exterior, with no assumption of independent exterior bits.

Equality of exterior data partitions S into disjoint nonempty fibers. If y is in A_B(x), then A_B(y)=A_B(x) and m_B(y)=m_B(x); otherwise both directed masses T_B(x,y) and T_B(y,x) vanish. This proves T_B(x,y)>=0 and T_B(x,y)=T_B(y,x). The equality of completion laws on equal fixed data is also exactly the content of the original completionLaw_congr. Each row has m_B(x) entries equal to 1/m_B(x), so sum_y T_B(x,y)=1. Symmetry then gives sum_x T_B(x,y)=1. It follows that sum_x pi(x)T_B(x,y)=pi(y); the other marginal of pi(x)T_B(x,y) is pi(x). Uniform stationarity and reversibility have thus been derived from actual fibers.

Use the conjugate-first uniform pairing <f,g>_pi=(1/Z) sum_x conj(f(x))g(x) and squared norm ||f||_pi^2=(1/Z) sum_x |f(x)|^2, for arbitrary complex f,g. Throughout, |z|^2 is the squared complex modulus conj(z)z, a nonnegative real number, not the complex square z^2. Let Id denote the identity operator on these functions. All sums are finite, so no limiting or integrability assumption is needed.

Let C range once over the distinct nonempty exterior fibers, and put fbar_C=(1/card(C)) sum_{x in C} f(x). Then E_B f is fbar_C throughout C. A second fiber average changes nothing, proving E_B^2=E_B. Moreover E_B f=f if and only if f is constant on every actual exterior fiber: the forward direction follows from equality of their means and the reverse direction from averaging a constant. This identifies the fixed functions and the range of E_B.

Grouping the finite sums by these fibers gives <f,E_B g>_pi=(1/Z) sum_C card(C) conj(fbar_C)gbar_C=<E_B f,g>_pi. In particular <f,E_B f>_pi=(1/Z) sum_C card(C)|fbar_C|^2=||E_B f||_pi^2>=0, with this real number embedded in the complex numbers when compared with the pairing. Thus E_B is self-adjoint and positive semidefinite. For any fiber-constant h, the sum over C of f-fbar_C is zero, so <h,f-E_B f>_pi=0. Together with idempotence this proves that E_B is the orthogonal projection onto the fiber-constant functions.

Put p_x(y)=(mu_B(x)(y)).toReal. Define conditional variance independently from the original law’s moments: V_B(f;x)=sum_y p_x(y)|f(y)|^2-|sum_y p_x(y)f(y)|^2. The mean in this definition is E_B f(x) by the preceding law identification. Equivalently the two moments can be taken over the original supported completions w, evaluating f(legalWord(w)); the pushforward preserves both finite sums. This variance is defined by the conditional law, without using a generator energy as its definition.

For a real probability row p_y=p_x(y), let a=sum_y p_y f(y). Expand |f(y)-a|^2=|f(y)|^2-2 Re(conj(a)f(y))+|a|^2. Since sum_y p_y=1 and sum_y p_y f(y)=a, the summed cross term is -2|a|^2 and the final term is |a|^2. Hence V_B(f;x)=sum_y T_B(x,y)|f(y)-E_B f(x)|^2>=0. Equal exteriors have identical laws, means and variances, so V_B(f;x) is constant on each fiber. It is also E_B(|f-E_B f|^2)(x), since E_B f(y)=E_B f(x) on the row support.

The complex energy identity can be checked inside each fiber. Write m=card(C)>0, S_C=sum_{x in C} f(x) and a=S_C/m. Then sum_{x in C} conj(f(x))(f(x)-a)=sum_{x in C}|f(x)|^2-|S_C|^2/m=sum_{x in C}|f(x)-a|^2=(1/(2m)) sum_{x in C} sum_{y in C}|f(x)-f(y)|^2. Indeed sum_x conj(f(x))a=conj(S_C)S_C/m, which is real. In the centered expansion the two conjugate cross terms total -2|S_C|^2/m and the constant terms total |S_C|^2/m. In the ordered pair expansion the two diagonal-square sums total 2m sum_x |f(x)|^2, while the cross terms total -2|S_C|^2. This finite cancellation supplies every equality, including its exact factor two.

Summing the fiber identity and dividing by Z yields the complete chain: Re<f,(Id-E_B)f>_pi = (1/(2Z)) sum_x sum_y T_B(x,y)|f(x)-f(y)|^2 = (1/Z) sum_x sum_y T_B(x,y)|f(y)-E_B f(x)|^2 = (1/Z) sum_x V_B(f;x) = sum_eta q_B(eta)V_B(f;eta) = ||f-E_B f||_pi^2. The pair sum is over ordered pairs of legal states, including the zero diagonal terms. The centered conditional sum has factor 1/Z, whereas the ordered difference sum has factor 1/(2Z).

Here V_B(f;eta) is V_B(f;x) for any x with exterior eta, and may be set to zero for an impossible exterior. It is well-defined because equal exteriors have equal laws. Grouping the state average gives (1/Z) sum_x V_B(f;x)=sum_C (card(C)/Z)(1/card(C)) sum_{x in C}|f(x)-fbar_C|^2. This is exactly expectation under the exterior pushforward q_B, whose weights are card(C)/Z; it is not a uniform average over distinct exteriors. Their fiber-size weights cancel the conditional denominators and produce the global factor 1/Z.

The pairing <f,(Id-E_B)f>_pi itself is real and nonnegative: orthogonality gives <E_B f,f-E_B f>_pi=0 and therefore <f,(Id-E_B)f>_pi=||f-E_B f||_pi^2 as a complex number with zero imaginary part. Alternatively, in the centered double sum replace E_B f(x) by E_B f(y) on every supported pair and use sum_x T_B(x,y)=1; this directly recovers the same squared residual norm. These arguments apply to arbitrary complex functions, with conjugate cross terms retained.

Now take any finite index set I and any family a maps to B_a of finite subsets of Fin n, allowing an empty index set. Set r_a=1 for every a in I, with a separate refresh clock for each index. Define (L_refresh f)(x)=sum_{a in I}((E_{B_a}f)(x)-f(x)), so -L_refresh=sum_{a in I}(Id-E_{B_a}). Define the Dirichlet energy D(f)=Re<f,-L_refresh f>pi. Linearity and the single-block chain give D(f)=sum{a in I} ||f-E_{B_a}f||pi^2=sum{a in I} pi[V_{B_a}(f;.)]=(1/(2Z)) sum_{a in I} sum_x sum_y T_{B_a}(x,y)|f(x)-f(y)|^2. The corresponding centered and exterior-average expressions are summed with the same indices.

Repeated block values contribute separately, once per clock index; they are not collapsed to a set of distinct blocks. There is no factor 1/M in L_refresh or D, where M=card(I). Only when M>0 may one also introduce the discrete-time average P=(1/M) sum_{a in I} E_{B_a}; then L_refresh=M(P-Id). For I empty, L_refresh and D are zero and no division by M is used. Under the book’s parameter map, its blocks are B_a={i : a<=i.val+1<=a+ell-1}, ell=2k-1, indexed by all integers a=2-ell,…,n for n>=1, with M=n+ell-1; equal truncated intervals keep their separate indices. The identities above do not require this particular family.

For B empty, every fiber is {x}, mu_B(x) is the point mass at x, E_B=Id and all single-block energies and conditional variances vanish. For B=Finset.univ, the only realized exterior is empty, the fiber is all of S, mu_B(x)=pi and E_B f=pi[f]. Disconnected blocks satisfy the same formulas because agreement on the whole complement still defines the same partition. No independence of their components is assumed. Short words n<k are included. At n=0 the sole legal state is the empty word, Z=1, every refresh is the identity and every energy vanishes. This asserts no excited eigenvalue or excited gap for an empty chain.

For a realizable exterior eta, encode a completion by its true-bit subset A of B. Let w_eta(A) equal true exactly on A within B and equal eta on B-complement, and set F_eta={A subset of B : DBonacciAdmissible k n w_eta(A)}. Restriction to true bits and reassembly w_eta are inverse bijections between the original completion support, C_eta and F_eta. Thus m_eta=card(F_eta)>0 and the original conditional law becomes the uniform law 1/m_eta on F_eta. The actual exterior mass remains q_B(eta)=m_eta/Z.

The family F_eta is lower under inclusion. Erasing i from A changes w_eta(A) only by setting its B-coordinate i to false; the original legal_delete preserves legality and leaves every exterior coordinate fixed. Iterating deletions gives A’ in F_eta whenever A’ is a subset of A in F_eta. This is also the direct application of the pinned Finset.antitone_iff_forall_insert_le and isLowerSet_setOfPred criteria. Since the fiber is inhabited, its empty true-bit subset belongs to F_eta, even when eta contains true bits outside B. For every nonnegative integer ell with card(B)<=ell, m_eta<=2^card(B)<=2^ell.

Apply HereditaryFlip.Metric.flipGraph to F_eta: its vertices are these supported assignments and A is adjacent to R exactly when card(A symmetric-difference R)=1. The canonical exists_shortest_walk, connected and dist_eq suppliers give connectedness and graph distance card(A symmetric-difference R). Reassembly preserves this distance as the full-word Hamming distance because both states have exterior eta. Deleting to A intersect R and reversing the deletion path from R gives a legal path of that length. For general B this graph is on one fixed-exterior support; no states with a different exterior are added to its vertex set.

For B=Finset.univ, every legal name corresponds to its full true-bit subset, and the inverse takes a supported subset to its legal Boolean word. The exterior is empty, so this is a bijection from S to the full hereditary support. Transporting flipGraph along this bijection gives exactly the actual legal-name graph: x and y are adjacent if and only if card({i : x.val(i) differs from y.val(i)})=1. The transported graph is connected and its native graph distance is this full Hamming distance. Both adjacency and distance are identified on the legal states themselves, including the single empty state at n=0.

For i in B, fixing eta and every other B-coordinate fixes exactly the original full exterior of the singleton {i}, since B-complement together with B minus {i} is {i}-complement. In a supported state x, further conditioning the uniform C_eta law on those remaining coordinates therefore gives precisely mu_{ {i} }(x), by completionLaw_apply and completionLaw_congr. If its singleton support has size r, the conditioning event has mass r/m_eta; dividing each supported mass 1/m_eta by this event mass gives 1/r. Deletion ensures that false is supported, so the bit support is either {false} or {false,true}, never {true}. Every distinct legal flip has transition mass 1/2 under the original singleton refresh. A fixed singleton fiber contributes zero variance; no independent replacement kernel is introduced.

Write energy_B(f)=Re<f,(Id-E_B)f>pi=pi[V_B(f;.)] for the original block energy, and energy_i(f)=energy{ {i} }(f) for the global rate-one singleton energy. For arbitrary complex f, define the conditional site energy within C_eta by Dsite_eta(f)=(1/m_eta) sum_{x in C_eta} sum_{i in B} V_{ {i} }(f;x). Each variance uses the original singleton law just identified. Equivalently, its pair expression is (1/(2m_eta)) sum_{x in C_eta} sum_{i in B} sum_{y in C_eta} T_{ {i} }(x,y)|f(x)-f(y)|^2. Singleton updates stay in this same exterior fiber.

Put g_eta(A)=f(w_eta(A)), with w_eta(A) regarded as its legal subtype element. Let Q_eta=sum_{A in F_eta} sum_{R in F_eta, card(A symmetric-difference R)=1} |g_eta(A)-g_eta(R)|^2 count ordered one-flip pairs, and let U_eta sum the same squared differences once per unordered edge. Then Q_eta=2U_eta. The factor 1/2 in the variance pair formula and the legal-flip transition mass 1/2 give exactly Dsite_eta(f)=Q_eta/(4m_eta)=U_eta/(2m_eta). Diagonal refreshes have zero difference. The squared differences are complex moduli, so these coefficients also hold for complex-valued f.

For card(B)<=ell, the lower-family comparison gives Var_eta(f)<=ellQ_eta/4. Here Var_eta(f)=(1/m_eta) sum_{A in F_eta}|g_eta(A)-gbar_eta|^2 and gbar_eta=(1/m_eta) sum_{A in F_eta}g_eta(A). In terms of the reused suppliers, a HereditaryFlip.Metric geodesic has length at most ell; the triangle inequality and the pinned sq_sum_le_card_mul_sum_sq bound each endpoint squared difference by ell times the path’s edge sum. Both orientations of every path edge occur in Q_eta, so this edge sum is at most Q_eta/2 and the endpoint bound is ellQ_eta/2. Averaging over all ordered endpoint pairs and using Var_eta(f)=(1/(2m_eta^2)) sum_A sum_R |g_eta(A)-g_eta(R)|^2 gives the displayed comparison. Substituting the actual site energy yields Var_eta(f)<=ellm_etaDsite_eta(f)<=ell2^ellDsite_eta(f). Dsite_eta already contains its conditional average 1/m_eta; no second such factor is inserted.

Average once over distinct realizable exteriors with their actual weights m_eta/Z. The block identity is energy_B(f)=sum_eta (m_eta/Z)Var_eta(f). Also sum_eta (m_eta/Z)Dsite_eta(f)=(1/Z) sum_x sum_{i in B} V_{ {i} }(f;x) =sum_{i in B} energy_i(f): the factor m_eta cancels the conditional average within each partition fiber. Consequently the actual arbitrary-block comparison is energy_B(f)<=ell2^ellsum_{i in B} energy_i(f), for k>=2, n>=0 and card(B)<=ell. This uses the original uniform legal-state law and rate-one singleton clocks. It requires neither independent block components nor a uniform law on exterior assignments.

For n>=1, take ell=2k-1 and the original zero-based integer starts a in Icc(1-ell,n-1), with B_a={i : a<=i.val<=a+ell-1}. These are the same indexed clocks as the book’s one-based starts above after adding one to a. Each block has cardinality at most ell. A fixed site i belongs to exactly the ell indexed blocks whose starts range from i.val-ell+1 through i.val. Hence summing the preceding comparison gives sum_a energy_{B_a}(f)<=ell^22^ellsum_i energy_i(f). For short chains, repeated values of B_a, including repeated full-chain blocks, remain separate clock indices in this sum. There is no factor 1/M. The coefficient depends on k; this comparison makes no optimality or K-uniform claim.

The comparison includes empty and disconnected B and singleton completion supports. A singleton F_eta has Q_eta=U_eta=Var_eta=Dsite_eta=0. If B is empty, both sides of the block comparison are zero. At n=0 every block is empty and every indexed block and singleton energy sum is zero, without supplying an excited gap.

Original indexed refresh: from edge eigenfunctions to complex Poincare

For this spectral argument assume k>=2 and n>=1, keep S=DBonacciName k n and the uniform legal-state law pi, and put ell=2k-1. Let I be the integer interval Icc(1-ell,n-1), with B_a={i : a<=i.val<=a+ell-1}. Its cardinality is m=n+ell-1. Each a is a separate rate-one clock, even when clipping gives B_a=B_b for different starts. Write T_a=T_{B_a}, with the actual transition masses already identified above, and A=-L_refresh=sum_{a in I}(Id-E_{B_a}). Thus (Af)(x)=sum_{a in I}(f(x)-sum_y T_a(x,y)f(y)).

The graph G here has exactly the legal names as vertices and an edge exactly when d_H(x,y)=card({i : x.val(i) differs from y.val(i)})=1. The full true-bit subset bijection above transports HereditaryFlip.Metric.flipGraph to G; legal_delete makes that support hereditary. The frozen exists_shortest_walk, connected and dist_eq suppliers consequently give a legal G-walk of length d_H(x,y) for every pair x,y. This is the actual full-state Hamming distance, not just a distance within one refresh fiber.

Take a nonconstant real function f:S to R satisfying Af=lambdaf for a real lambda. The finite maximum L=max_{G.Adj(x,y)} |f(x)-f(y)| is attained and positive: connectedness supplies a path between states with different values, so some edge on it has nonzero difference. Orient an attaining edge (s,t) so f(s)-f(t)=L>0. For any v,w, sum the edge differences along a Hamming geodesic to obtain |f(v)-f(w)|<=Ld_H(v,w). This extends the edge bound on f to every pair without constructing or assuming couplings for all pairs.

Let u be the unique differing coordinate of s,t. For each indexed block choose one joint law Q_a on S times S with first marginal mu_{B_a}(s) and second marginal mu_{B_a}(t). These are the same original refresh laws used in T_a. For an exterior-near block, meaning u is outside B_a and some block site is at distance less than k from u, the frozen KBonacciIntervalBlockCoupling.conditional_interval_block_coupling supplies an actual block-assignment joint J_a with both conditionalBlockLaw marginals and expected internal blockHamming at most one. Restore each sampled assignment with its own unchanged full exterior, using the supported legal-state conversion above. The marginal support guarantees legality, and restriction and restoration are inverse there; hence the pushforward Q_a has both required full-state marginals. Off-support fallback values have zero mass.

On every supported pair from this restoration, the full Hamming cost is the internal blockHamming plus one: the unchanged exteriors differ exactly at u. Thus c_a=E_{Q_a}[d_H] is finite and at most two for an exterior-near block. If u belongs to B_a, the two full exteriors agree; completionLaw_congr makes their original refresh laws equal and a diagonal joint gives c_a=0. If u is outside B_a and every block site is at distance at least k from u, changing only u gives an inverse pair of bijections between the two completion fibers. No length-k window meets both u and B_a, so legality is preserved. Choose Q_a as the joint induced by this uniform fiber transport; it has both exact marginals and c_a=1. These containing, near and far choices define one coupling family. The scanner_iff_literal and completionLaw_apply suppliers justify this far-block identification.

There are exactly ell indexed blocks containing u, whose starts are u.val-ell+1,…,u.val. An exterior-near block has a site at distance less than k from u. Its start lies in one of the two integer intervals [u.val+1,u.val+k-1] and [u.val-ell-k+2,u.val-ell], so there are at most 2(k-1) such clocks. The remaining clocks are far. Applying the preceding costs to this same indexed family yields sum_a(c_a-1)<=-ell+2(k-1)=-1, or sum_a c_a<=m-1. Repeated clipped blocks remain counted separately throughout this drift estimate.

Put q_a(v,w)=Q_a(v,w).toReal. Since this is a finite probability law, q_a>=0, sum_w q_a(v,w)=T_a(s,v), sum_v q_a(v,w)=T_a(t,w), and c_a=sum_v sum_w q_a(v,w)d_H(v,w). The exact marginals and the geodesic bound give (E_{B_a}f)(s)-(E_{B_a}f)(t) =sum_v sum_w q_a(v,w)(f(v)-f(w))<=L*c_a. This is weak expectation comparison under the same actual joint used for the cost and drift; it needs neither an optimal transport law nor the attained finite KR equality.

Subtract Af(s)=lambdaf(s) and Af(t)=lambdaf(t). Since f(s)-f(t)=L and each of the m clocks contributes its own identity term, (m-lambda)L=sum_a((E_{B_a}f)(s)-(E_{B_a}f)(t)) <=L*sum_a c_a<=L(m-1). Positivity of L gives lambda>=1. There is no division by m and no change of stationary measure: this is the original rate-one indexed generator on the original legal subtype.

To pass to arbitrary complex functions, identify the actual real matrix A(x,y)=m*delta(x,y)-sum_{a in I}T_a(x,y), where delta(x,y) is one when the legal states x and y are equal and zero otherwise. Finite sum interchange gives (Af)(x)=sum_y A(x,y)f(y)=-L_refresh f(x), also for complex f by embedding the real entries in C. The actual fiber symmetry gives A(x,y)=A(y,x), and the stochastic row sums give sum_y A(x,y)=m-m=0. Symmetry also gives sum_x A(x,y)=0. Thus A annihilates constants and sum_x (Ag)(x)=0 for every g. These are identities of the original indexed refresh, with its original uniform legal-state law.

View real functions on S as the Euclidean space with inner product sum_x u(x)v(x). The real symmetric A is Hermitian. The pinned Matrix.IsHermitian.eigenvectorBasis and Matrix.IsHermitian.mulVec_eigenvectorBasis give a real orthonormal eigenbasis e_j with Ae_j=lambda_je_j. If sum_x u(x)=0, put alpha_j=sum_x e_j(x)u(x). A constant e_j has alpha_j=0; every nonconstant e_j has lambda_j>=1 by the actual eigenfunction argument above. Consequently alpha_j^2<=lambda_jalpha_j^2 in every direction. The pinned OrthonormalBasis.sum_sq_inner_right and OrthonormalBasis.sum_inner_mul_inner identities, using symmetry to move A across the inner product, now give sum_x u(x)^2=sum_j alpha_j^2<=sum_j lambda_j*alpha_j^2=sum_x u(x)(Au)(x). This is the spectral passage used in CostCoupling’s coupled-generator application, here with all its matrix hypotheses identified on S.

For any real g set gbar=(1/Z)sum_x g(x) and u=g-gbar. Since Z>0, sum_x u(x)=0. The zero row sums give Au=Ag, and the zero column sums give sum_x (Ag)(x)=0. Hence sum_x u(x)(Au)(x)=sum_x g(x)(Ag)(x): centering preserves the quadratic energy. We obtain sum_x (g(x)-gbar)^2<=sum_x g(x)(Ag)(x), without assuming g has mean zero.

Write an arbitrary complex f as r+is with real r,s. Because A is real, Af=Ar+iAs and fbar=(sum_x f(x))/Z=rbar+i*sbar. Pointwise, |f(x)-fbar|^2=(r(x)-rbar)^2+(s(x)-sbar)^2 and Re(conj(f(x))(Af)(x))=r(x)(Ar)(x)+s(x)(As)(x). Adding the two real bounds and dividing once by Z therefore gives (1/Z)sum_x |f(x)-fbar|^2<=(1/Z)sum_x Re(conj(f(x))(Af)(x)). The actual TerminalSampling.uniformPmf masses are pi(x)=1/Z, so fbar=sum_x pi(x)f(x)=pi[f] and the left side is exactly Var_pi(f)=sum_x pi(x)|f(x)-pi[f]|^2. No change to the stationary measure or normalization is made in this passage.

On the right, substitute the actual complex generator action and interchange the finite state and clock sums. This gives the exact quadratic identity (1/Z)sum_x Re(conj(f(x))sum_y A(x,y)f(y))=sum_{a in I} Re<f,(Id-E_{B_a})f>pi=sum{a in I} energy_{B_a}(f). Equivalently one may sum over the finite subtype {a : Int // a in I}; forgetting its membership proof gives exactly the integer sum over I=Icc(1-ell,n-1), with the same B_a and one summand per start. This is an equality of clock sums, not a sum over distinct block values. Combining with the earlier site comparison yields, for k>=2, n>=1 and every complex f, Var_pi(f)<=sum_{a in I} energy_{B_a}(f)<=ell^22^ellsum_{i : Fin n} energy_i(f), where ell=2k-1. The block gap bound is one and the singleton Poincare constant is C(k)=ell^2*2^ell for these rate-one generators. Repeated clipped blocks remain counted and no factor 1/m is inserted.

Native control and the scalar singleton coefficient

Keep k>=2, now allowing every n>=0. For an arbitrary full Boolean word w, write flip_i(w)=Function.update w i (!w(i)). A full length-k window containing i has an integer start s>=0 with s+k<=n and s<=i.val<s+k. Define the original control c_i(w) to be one exactly when every such window contains a site j different from i with w(j)=false, and zero otherwise. Only full windows are tested; there are no padded boundary windows. The tested bits exclude i, so c_i(flip_i(w))=c_i(w). This definition concerns full words, not just legal names.

If c_i(w)=1, no containing window can be all true either before or after the flip, because its off-center false bit remains. Every window not containing i is unchanged. Thus the set of forbidden-window starts is unchanged, and KBonacciIntegerInterval.scanner_iff_literal gives DBonacciAdmissible k n (flip_i(w)) iff DBonacciAdmissible k n w. This equivalence applies even when w is illegal: enabled does not mean legal. For example, at k=2,n=4 the word 1100 is enabled at one-based site 4, since its only containing full window is sites 3,4 and site 3 is false. Its flip is 1101. Both words remain illegal because the unchanged window at sites 1,2 is all true.

For a legal x in S the converse is also available: c_i(x.val)=1 iff flip_i(x.val) is legal. Indeed, if control fails, some containing full window has all off-center bits true. Legality forces x.val(i)=false, and the flip makes this window all true. Also a legal true center is always enabled: legal_delete makes its false flip legal. Consequently a disabled legal center is false. These statements identify the native control with availability of the other legal singleton completion.

A word agreeing with x.val outside {i} is either x.val or flip_i(x.val), and these two words differ at i. The original full-exterior completion fiber is therefore {x.val,flip_i(x.val)}, of cardinality two, when c_i(x.val)=1; it is {x.val}, of cardinality one, when c_i(x.val)=0. Apply completionLaw_apply on {i}-complement with the nonemptiness proof completion_nonempty from x.property. At any ambient word w the enabled PMF mass is (2 : ENNReal)^(-1) if w=x.val or w=flip_i(x.val), and zero otherwise; the disabled mass is one at w=x.val and zero elsewhere. Pushing supported words to legal names preserves these masses: Subtype.ext identifies equality of names with equality of their words. Taking toReal gives T_i(x,y)=1/2 at the two enabled legal completions and zero elsewhere, or T_i(x,y)=delta(x,y) for a disabled row, where T_i=T_{ {i} }. Each original row sums to one and uses its actual fiber denominator.

For legal x,y the resulting scalar identity, with its coefficient on the refresh side, is c_i(x.val)(delta(x,y)-indicator(y.val=flip_i(x.val)))c_i(y.val)=2(delta(x,y)-T_i(x,y)). Here indicator is one when its equality holds and zero otherwise. For an enabled diagonal entry x=y, the flip indicator is zero and the two sides are 1 and 2(1-1/2)=1. For the enabled flip entry, x differs from y, flip invariance makes c_i(y.val)=1, and both sides are -1=2*(0-1/2). At every other enabled entry the delta, flip indicator and transition mass vanish, giving zero. For a disabled row the left factor c_i(x.val) vanishes, while T_i(x,y)=delta(x,y), so both sides are zero for every legal y.

At k=2,n=2 the legal words are 00,01,10, with coordinates read from one-based site 1 to site 2. At site 2, x=00 is enabled because site 1 is false: its original completion fiber is {00,01}, its masses are 1/2,1/2,0 in this legal-word order, and its scalar row is 1,-1,0. For x=10 the same site is disabled and false; its flip 11 is illegal, its fiber is {10}, its masses are 0,0,1, and its scalar row is 0,0,0. The enabled row at 01 has the same two refresh masses as 00. These rows use legal-state normalization and do not assign probability to 11.

For 1<=n<k no full length-k window exists. Every full word is legal and every control is one; each singleton fiber has the two distinct flips and the original PMF puts mass 1/2 on each. This follows from the empty window condition and completionLaw, without an independent-bit assumption. At n=0 there is just the empty word and its completion fiber has cardinality one; there are no sites, so the local scalar assertions are vacuous and all block and singleton energies vanish. No excited gap is asserted there. The short-chain singleton calculation by itself does not establish a native full-space gap for 1<=n<k.

The scalar identity identifies legal-word entries and the factor two. The following full-word calculation supplies the actual matrix multiplication, complex quadratic energy, complete-window penalties and legal/illegal sector invariance. The subsequent normalization uses the inverse map f(x)=sqrt(Z)*psi(x.val) for arbitrary legal-supported native amplitudes, and combines the original Poincare chain with the illegal-sector unit bound. All native norms and energies remain unweighted.

Native full-word matrices and the ordered flip energy

Keep k>=2 and n>=0, and now work on the full finite word space W(n)=Fin n to Bool, of cardinality 2^n. A native amplitude psi:W(n) to C is arbitrary, including at illegal words. All sums over v,w,u,t in this native calculation run over W(n). Define delta(v,w)=1 if v=w and zero otherwise, with these real scalars embedded in C. Matrix multiplication means (AD)(v,w)=sum_u A(v,u)D(u,w), and (A psi)(w)=sum_u A(w,u)psi(u). Use the conjugate-first unweighted pairing <psi,phi>=sum_w conj(psi(w))phi(w), Q(A,psi)=Re sum_w conj(psi(w))(A psi)(w), and ||psi||^2=sum_w |psi(w)|^2. There is no division by 2^n or by the legal-state count Z in these native quantities.

For each i:Fin n, let F_i=flip_i. Updating the same Boolean coordinate twice gives F_i(F_i(w))=w, and F_i(w) differs from w at i. Thus F_i is a permutation and v=F_i(w) iff F_i(v)=w, equivalently w=F_i(v). Define X_i(v,w)=delta(v,F_i(w)), so column w is the basis vector at F_i(w). Reindexing by the involution gives (X_i psi)(w)=sum_u delta(w,F_i(u))psi(u)=psi(F_i(w)). The two flip-entry orientations therefore specify the same matrix, rather than a transpose convention being assumed.

Use exactly the full-window, off-center Boolean control c_i defined above, embedded as zero or one in C, and put C_i(v,w)=delta(v,w)c_i(w). Hence (C_i psi)(w)=c_i(w)psi(w), c_i(w)^2=c_i(w), and c_i(F_i(w))=c_i(w). Define the actual native local matrix h_i=C_i*(Id-X_i)*C_i, where Id(v,w)=delta(v,w). To identify this with the book’s ordered product, for each complete window a containing i let L_(a,i) be its increasing site list with i deleted. The ordered inner product D_(a,i)=product_(j in L_(a,i)) P_j is diagonal by the same ordered-projection rule used below for B_a, with diagonal value product_(j in L_(a,i)) indicator(w(j)=true). Its complement Id-D_(a,i) is therefore diagonal with value one exactly when some off-center site in that window is false. Multiply these complements in increasing window-start order. Each step multiplies their diagonal values, so the outer product is diagonal with value one exactly when every complete containing window has such a false site: precisely c_i(w). The one-based book start a+1 corresponds to the natural start a here, preserving both orders. Empty outer products are Id; an empty inner product is Id and its complement is zero. Thus this argument identifies the actual ordered product with C_i on every full word, including illegal words, without assuming that similarly named controls agree or using a commuting-product shortcut.

To evaluate the actual product, first expand its inner matrix multiplication: (C_i*(Id-X_i))(v,u)=sum_t C_i(v,t)(delta(t,u)-delta(t,F_i(u)))=c_i(v)(delta(v,u)-delta(v,F_i(u))). Only t=v survives the diagonal factor. The outer multiplication is then h_i(v,w)=sum_u (sum_t C_i(v,t)*(delta(t,u)-delta(t,F_i(u))))C_i(u,w)=c_i(v)(delta(v,w)-delta(v,F_i(w)))*c_i(w), since only u=w survives. These are the two finite intermediate sums in the matrix product. In particular the earlier legal scalar expression is the restriction of these entries: delta(v,F_i(w))=indicator(w=F_i(v)) by involution.

Apply the same product to a full-word amplitude. Successive action of the right C_i, Id-X_i and left C_i gives (h_i psi)(w)=c_i(w)(c_i(w)psi(w)-c_i(F_i(w))psi(F_i(w)))=c_i(w)(psi(w)-psi(F_i(w))). The final equality uses both control invariance and c_i^2=c_i. Equivalently, it is psi(w)-psi(F_i(w)) on an enabled coordinate and zero on a disabled one. No legal-support restriction has entered either matrix multiplication or action.

For the quadratic energy write r_i(w)=c_i(w)Re(conj(psi(w))(psi(w)-psi(F_i(w)))). The action gives Q(h_i,psi)=sum_w r_i(w). Since F_i is a permutation, sum_w r_i(F_i(w))=sum_w r_i(w). Put a=psi(w) and b=psi(F_i(w)); using F_i^2=Id and c_i(F_i(w))=c_i(w), the paired summand is r_i(w)+r_i(F_i(w))=c_i(w)Re(conj(a)(a-b)+conj(b)(b-a))=c_i(w)|a-b|^2. Indeed the two cross terms are -conj(a)b and -conj(b)a, whose sum is -2 Re(conj(a)b), while the remaining terms are |a|^2+|b|^2. This computation applies to arbitrary complex a,b.

Summing that paired identity gives 2Q(h_i,psi)=sum_w c_i(w)|psi(w)-psi(F_i(w))|^2, hence Q(h_i,psi)=(1/2)sum_w c_i(w)|psi(w)-psi(F_i(w))|^2>=0. The sum counts both orientations of every enabled flip pair. Its one-half comes from this ordered-pair count, with no one-half inserted into h_i or the Hamiltonian. The entries are real and symmetric by the flip and control identities, so h_i is Hermitian; the displayed nonnegative quadratic form establishes positive semidefiniteness on the entire full-word space, without a legality premise or an assumed PSD hypothesis.

For example, at k=2,n=2 and one-based site 2, use the full-word order 00,01,10,11. The actual C_i is diag(1,1,0,0), X_i exchanges 00 with 01 and 10 with 11, and h_i has matrix [[1,-1,0,0],[-1,1,0,0],[0,0,0,0],[0,0,0,0]]. Its action on amplitudes (alpha,beta,gamma,delta) is (alpha-beta,beta-alpha,0,0). Its energy is |alpha-beta|^2, also when all four amplitudes are complex. The zero row at illegal 11 comes from this site’s disabled control, not from removing 11 from the full-word basis.

Ordered complete-window penalties and invariant sectors

Let Window(k,n) be the finite set of natural starts a with a+k<=n, equivalently the subtype {a:Fin(n+1) // a.val+k<=n}. For k>0 every such a corresponds one-to-one to the book’s one-based complete interval [a+1,a+k]; conversely the interval’s left endpoint minus one recovers a. These are complete forbidden windows only. They are distinct from the earlier clipped refresh-block clock indices Icc(1-ell,n-1); no padded, partial or negative-start window is introduced into the penalty.

For j:Fin n define the actual on-site true-bit projection P_j(v,w)=delta(v,w)indicator(w(j)=true). Let L_a be List.finRange n filtered by a<=j.val<a+k, retaining its increasing order, and define B_a as the matrix product of the P_j along L_a in that order. The empty-list product is Id. To evaluate any such ordered list L, use induction: its empty product is diag(1); if the tail product is diag(d), multiplication by the head projection gives (P_jdiag(d))(v,w)=sum_u delta(v,u)*indicator(u(j)=true)*delta(u,w)*d(w)=delta(v,w)*indicator(w(j)=true)*d(w). This is the pinned diagonal-multiplication rule at each inductive step. Thus the full product is diagonal with value product_{j in L} indicator(w(j)=true), equal to one exactly when every listed bit is true. The argument follows the actual order and assumes no commuting-product identity.

For L=L_a, membership is precisely a<=j.val<a+k. Since a+k<=n is part of Window(k,n), all k sites of the natural window occur, each once. Therefore B_a(v,w)=delta(v,w)*indicator(TrueBlock w a k), where TrueBlock means a+k<=n and w(j)=true for every j:Fin n in that interval. This derives the full-window projection from the ordered on-site product, rather than replacing it by an unrelated diagonal penalty.

Define count_forbidden(w)=sum_{a in Window(k,n)} indicator(TrueBlock w a k), a nonnegative integer, and P_forbid=sum_{a in Window(k,n)} B_a. The bijection of starts to book intervals ensures that each original forbidden window contributes exactly once, even when several overlapping windows are forbidden in the same word. Finite sum interchange and the diagonal formula give P_forbid(v,w)=delta(v,w)*count_forbidden(w) and (P_forbid psi)(w)=count_forbidden(w)*psi(w), with the integer embedded in C. Consequently Q(P_forbid,psi)=sum_w count_forbidden(w)|psi(w)|^2, or equivalently sum_w sum_a indicator(TrueBlock w a k)|psi(w)|^2. No probability or fiber-size denominator appears.

For k>0, KBonacciIntegerInterval.scanner_iff_literal identifies DBonacciAdmissible k n w with the absence of every complete TrueBlock w a k. Negating this finite condition says that w is illegal iff some a in Window(k,n) has TrueBlock w a k. Any natural TrueBlock start lies in Fin(n+1) because a+k<=n; conversely every subtype start is a natural start, so this reformulation loses no boundary case. Hence count_forbidden(w)=0 exactly on legal words, and count_forbidden(w)>=1 on every illegal word.

Call psi legal-supported when psi(w)=0 at every illegal w. At a legal coordinate count_forbidden(w)=0; at an illegal coordinate psi(w)=0. The action formula therefore gives P_forbid psi=0 coordinate by coordinate, not merely zero expected energy. Call psi illegal-supported when psi(w)=0 at every legal w. Now count_forbidden(w)|psi(w)|^2>=|psi(w)|^2 at an illegal coordinate since the count is at least one, and both sides are zero at a legal coordinate. Summing yields Q(P_forbid,psi)=sum_w count_forbidden(w)|psi(w)|^2>=sum_w |psi(w)|^2=||psi||^2. These support conditions allow arbitrary complex phases and zero amplitudes.

The actual full native matrix is H=sum_{i:Fin n} h_i+P_forbid, with unit coefficients on the original local matrices and complete-window products. Linearity of finite matrix action, sum interchange and Re give Q(H,psi)=sum_i Q(h_i,psi)+Q(P_forbid,psi). Since every local energy is nonnegative on every amplitude, an illegal-supported psi satisfies Q(H,psi)>=Q(P_forbid,psi)>=||psi||^2. In particular the unit lower bound uses the unweighted full-word norm. It is not a lower bound on Q(H,psi) for every full-word amplitude: take a nonzero constant amplitude on legal words and zero on illegal words. Enabled flips preserve legality, so every enabled difference vanishes, and the legal-supported penalty action vanishes; this amplitude has zero energy and positive norm.

To check sector invariance entry by entry, take v,w with opposite legality. They are distinct, so delta(v,w)=0. In the h_i entry formula, if c_i(w)=0 the right control already gives zero. If c_i(w)=1 and v=F_i(w), the enabled-flip legality equivalence proved above would give the same legality at v and w, a contradiction. Thus delta(v,F_i(w))=0 as well and h_i(v,w)=0. Every B_a is diagonal, so B_a(v,w)=0 for these distinct words. Summing gives H(v,w)=0 in both cross-sector orientations.

Let V_legal and V_illegal be the subspaces of full-word amplitudes supported on the legal and illegal words respectively. Coordinate restriction splits every psi uniquely as psi_legal+psi_illegal, with disjoint support and <psi_legal,psi_illegal>=0. The vanishing cross-sector entries make each subspace invariant under the actual H, so H is their orthogonal direct sum and Q(H,psi)=Q(H,psi_legal)+Q(H,psi_illegal). The illegal summand has the unit bound just derived. This is an invariant direct-sum statement. The normalization and quadratic estimate below use this same actual H.

At n=0 there is exactly one full word, the empty function. There are no sites and, for k>=2, no complete forbidden windows, so both sums defining H are empty and H=0. Every word is legal, and there is no excited state or excited gap. For 0<=n<k more generally, Window(k,n) is empty, every word is legal, and the control condition is vacuous. Hence C_i=Id, h_i=Id-X_i, P_forbid=0 and H=sum_i(Id-X_i). An illegal-supported amplitude must then be zero, so its unit inequality is vacuous. The displayed short-chain formula alone is not used to claim gap two.

The enabled illegal pair is visible in the actual penalty as well. At k=2,n=4 and one-based site 4 (i.val=3), let w=1100 and v=1101=F_i(w). The only complete containing window is sites 3,4, whose off-center bit at site 3 is false, so both controls are one. The first complete window, sites 1,2 (a=0), is all true in both words; B_0(w,w)=B_0(v,v)=1. The other complete windows, sites 2,3 and 3,4, each contain the false bit at site 3, so count_forbidden(w)=count_forbidden(v)=1. On the ordered pair (w,v), h_i is exactly [[1,-1],[-1,1]], while the retained penalty is diag(1,1).

For arbitrary complex amplitudes alpha at w and beta at v, extended by zero off this pair, the local action is (alpha-beta,beta-alpha), and its conjugate-first energy is Re(conj(alpha)(alpha-beta)+conj(beta)(beta-alpha))=|alpha-beta|^2. The ordered flip formula gives (1/2)(|alpha-beta|^2+|beta-alpha|^2), the same value. The complete-window penalty contributes |alpha|^2+|beta|^2. Thus the h_i-plus-penalty energy is |alpha-beta|^2+|alpha|^2+|beta|^2; the other local terms have nonnegative energies. This example retains an enabled transition entirely within the illegal sector and its original forbidden window, instead of equating enabled with legal.

Put S=DBonacciName k n, Z=|S|>0 and pi(x)=1/Z. Equip complex functions on S with <f,g>_pi=(1/Z)sum_x conj(f(x))g(x); the native pairing is <psi,chi>=sum_w conj(psi(w))chi(w). Define (Uf)(w)=f(x)/sqrt(Z) when w=x.val is legal, and zero otherwise. Restriction gives the inverse f(x)=sqrt(Z)*psi(x.val) for every legal-supported psi. It is different from the unscaled restriction g(x)=psi(x.val): f=sqrt(Z)*g. Both compositions are identities on their stated domains. Finite support restriction and sqrt(Z)^2=Z give <Uf,Ug>=<f,g>_pi, hence ||Uf||^2=||f||_pi^2; there is no native 1/2^n weight.

The normalized uniform legal vector is Omega=U1, so Omega(w)=1/sqrt(Z) on legal words and zero otherwise, and ||Omega||^2=1. For an arbitrary full amplitude psi, put g(x)=psi(x.val), m=(1/Z)sum_x g(x), and a=<Omega,psi>=(1/sqrt(Z))sum_x g(x)=sqrt(Z)*m. The illegal part contributes nothing to a. For legal-supported psi and its inverse f=sqrt(Z)*g, pi[f]=a. Thus zero mean of f is equivalent to orthogonality to Omega, but neither is required in the final inequality.

Expand |g(x)-m|^2=|g(x)|^2+|m|^2-2 Re(g(x)conj(m)) and sum. Since sum_x g(x)=Zm, the result is sum_x |g(x)-m|^2=sum_x |g(x)|^2-Z|m|^2. Consequently, for legal-supported psi, Z*Var_pi(g)=||psi||^2-|a|^2, whereas Var_pi(f)=||psi||^2-|a|^2 for f=sqrt(Z)g. The right side is also ||psi-aOmega||^2 and is nonnegative. This is the nonzero-mean variance identity; replacing variance by the norm without subtracting the ground overlap would be false.

The exact legal local action above gives (h_i psi)(x.val)=2*(g(x)-E_i g(x)), with zero action on illegal coordinates. The complete-window penalty annihilates psi. The same formulas after division by sqrt(Z) give H U f=U(2 sum_i(Id-E_i)f)=U(-2 L_site f), since E_i is complex-linear. Finite pairing and clock sums give Q(h_i,psi)=2Zenergy_i(g)=2energy_i(f) and Q(H,psi)=2Zsum_i energy_i(g)=2sum_i energy_i(f). The coefficient 2Z belongs to unscaled restriction g; coefficient 2 belongs to the isometric inverse f. Every singleton clock still has rate one. The rescaled local and total energy equalities are finite-sum exposition; their direct exact Lean application remains unverified. The full quadratic bound below instead uses the unscaled 2Z identity.

For k>=2,n>=1 apply the original complex Poincare inequality to g, with C(k)=(2k-1)^2*2^(2k-1). Multiplying Var_pi(g)<=C(k)sum_i energy_i(g) by 2Z/C(k) and substituting the two identities yields Q(H,psi)>=(2/C(k))(||psi||^2-|<Omega,psi>|^2) for every legal-supported psi, including a nonzero mean and arbitrary complex phases. Equivalently apply Poincare to f and use coefficient two. No desired coercivity or positive-semidefinite conclusion is inserted as a premise.

For an arbitrary full psi let l(w)=psi(w) on legal words and zero otherwise, and r(w)=psi(w) on illegal words and zero otherwise. Then psi=l+r, ||psi||^2=||l||^2+||r||^2 and <Omega,psi>=<Omega,l>. The actual cross-sector entries vanish in both orientations. Expanding each finite pairing therefore gives <l,Hr>=<r,Hl>=0 and Q(H,psi)=Q(H,l)+Q(H,r). Apply the legal estimate to l and the illegal unit estimate to r. With c=2/C(k) the result is Q(H,psi)>=c*(||l||^2-|<Omega,l>|^2)+||r||^2 >=min(1,c)*(||psi||^2-|<Omega,psi>|^2). The last comparison uses the nonnegative centered legal norm and the nonnegative illegal norm; it makes no support or orthogonality assumption on psi.

Here ell=2k-1>=3, so ell^2>=9 and 2^ell>=8. Thus C(k)>=72, 0<c<=1/36<1, and min(1,c)=c. In particular the full native quadratic estimate is Q(H,psi)>=(2/C(k))*(||psi||^2-|<Omega,psi>|^2). At k=2 it gives 1/36 and at k=3 it gives 1/400, uniformly over n>=1 at each fixed k. These are lower bounds, without an optimality or uniform-in-k claim. On vectors orthogonal to Omega this is the usual coercive lower bound. A separate formal eigenvalue theorem is not needed for the displayed quadratic statement.

The finite support, pairing, variance and energy identities also apply at n=0. There Z=1, H=0 and every amplitude lies along Omega, so the centered squared norm is zero. This is a zero-energy boundary identity, with no excited gap. For 1<=n<k the forbidden-window sum is empty, all words are legal, C_i=Id and H=sum_i(Id-X_i); the bound above remains valid. The quadratic application makes no claim of physical, Rydberg, anyon, geometric or Rauzy realization. It adds application exposition to the existing formal suppliers and does not add a separately retained Lean theorem or extend their independent verification status.

This application gives the actual-law, conditional-projection and complex-energy calculation in the book’s Chapter 39 example, Paper derivation: a uniform gap at fixed forbidden-run length. Its canonical suppliers are the original completionLaw_apply and completionLaw_congr, completion_nonempty, DBonacciName and its counting and positivity results, the restrictBlock and conditionalBlockLaw definitions, legal_delete, and HereditaryFlip.Metric’s hereditary graph and Hamming-geodesic results. The support correspondence, conditional coefficients and indexed block-to-site comparison are applications of these suppliers and finite-sum estimates, without a claim of mathematical novelty.

The coupled-generator application in CostCoupling supplies the route from actual adjacent-state couplings and summed drift to a uniform Poincare inequality. The fiber calculation here supplies the specific legal-state kernel, its projection and variance normalization, the actual block-to-single-site comparison and the legal-state graph/Hamming correspondence. The real spectral bound, centering, complex split and exact indexed quadratic sum give the complete original complex block/singleton Poincare chain for k>=2,n>=1. The native scalar singleton calculation keeps its coefficient two for k>=2,n>=0; the full-word application now also derives the actual diagonal-control matrix product, ordered flip energy, ordered complete-window penalties, illegal-sector unit energy bound and zero cross-sector entries. These are applications of the reused definitions and finite-sum identities, without a claim of mathematical novelty. The ordered off-center-window product is identified with the diagonal C_i above. The uniform-L2 isometry, ground-overlap variance identity and legal/illegal energy split give the direct full-space quadratic bound for k>=2,n>=1 as application consequences. Physical or Rydberg realization and geometric, Rauzy or anyon realization remain outside this result. No excited gap is asserted at n=0.

References