Block-pair correlation profile #
Main results #
cyclicCorr,aperiodicCorr,crossTail— the three correlation sums: cyclic (overZMod N), aperiodic (over a finite word), and cross-tail (the wrap-around remainder between two words).blockSeq,blockSeq_val— a two-word, sign-modulated block sequence, and its value.cyclicCorr_blockSeq,cyclicCorr_blockSeq_zone,cyclicCorr_blockSeq_spike— the block sequence's own cyclic correlation, split into its "zone" (bulk) and "spike" (boundary) parts.cyclicCorrPrefix,cyclicCorrWindow— the prefix and sliding-window correlation sums, withcyclicCorrPrefix_add_period,cyclicCorrPrefix_mod_period,cyclicCorrWindow_eq_subtheir periodicity and telescoping identities.cyclicCorrPrefix_blockSeq_zone/_spike,cyclicCorrWindow_blockSeq_zone/_spike,cyclicCorrWindow_blockSeq_family_zone— the block sequence's own prefix and window correlations, zone and spike parts.singleWindow— the single-offset sliding window sum.tmSign,tau,blockSign,tmPrefix— the Thue–Morse sign, its block-paired form, the running block sign, and its prefix product, withtmSign_balance,tmSign_partial_odd,tmSign_partial_abs_le_one,tau_partial_even_abs_le_one,tau_partial_odd_abs_le_one,blockSign_sq,blockSign_mul_noWrap,blockSign_mul_wrap,blockSign_transition_even/_odd,tmPrefix_two_mul/_add_one,blockSign_eq_tmPrefixtheir bounds and identities.wordU,wordV— the certified length-24design pair, withblockSeq_wordU_wordV_correlationand its prefix/window specializations (cyclicCorrPrefix_blockSeq_wordU_wordV_zone/_spike,cyclicCorrWindow_blockSeq_wordU_wordV_zone/_spike,singleWindow_blockSeq_wordU_wordV_bound,blockSeq_wordU_wordV_sq) the exact correlation profileBlockPairHost/BlockPairCriterionconsume.
Equations
- ReflectiveSubsystems.tmSign i = if List.count 1 (Nat.digits 2 i) % 2 = 0 then 1 else -1
Instances For
blockSeq unfolded on the block/offset pair: blockIdx t/blockOff t made explicit as
t.val / L, t.val % L, exposing what those private helpers compute for a numeral-level reader.
The block-pair correlation decomposition: for a period-2 * M' * L sequence assembled from
two length-L words alternated by block and scaled by ±1 block signs, the cyclic correlation at
a lag inside the block splits into a within-block term (an average of the two words' aperiodic
correlations) and a boundary term (the block-transition sign sums against the cross-tail terms).
The zone corollary: once both block-transition sign sums vanish and the two words' aperiodic correlations cancel at a lag, the assembled sequence's cyclic correlation vanishes there too.
The spike corollary: under the same block-transition balance, the cyclic correlation at the
band's own top lag k is exactly M' times the two words' combined aperiodic correlation.
The deviation envelope #
The T-term prefix of the ℕ-indexed lag-d cyclic query: the same sum cyclicCorr takes over
the whole period, truncated to its first T terms.
Equations
- ReflectiveSubsystems.cyclicCorrPrefix x d T = ∑ t ∈ Finset.range T, x ↑t * x (↑t + ↑d)
Instances For
Exact periodicity: one further whole period beyond T adds exactly the full-period sum
cyclicCorr, since a full period's worth of the ℕ-indexed reading covers every residue once.
The length-n cyclic window starting at ℕ-phase p.
Equations
- ReflectiveSubsystems.cyclicCorrWindow x d p n = ∑ i ∈ Finset.range n, x ↑(p + i) * x (↑(p + i) + ↑d)
Instances For
The single-site deviation envelope #
The length-n single-site cyclic window starting at ℕ-phase p, the lag-free analogue of
cyclicCorrWindow.
Equations
- ReflectiveSubsystems.singleWindow x p n = ∑ i ∈ Finset.range n, x ↑(p + i)
Instances For
The block-local raw remainder over the first r positions of a single block: the same
per-position query the full block decomposition sums, truncated short of the block boundary.
Equations
Instances For
The zone prefix bound: at a lag where the two words' aperiodic correlations cancel and the
block-transition sign sums stay within P at every prefix, every ℕ-indexed prefix of the
assembled sequence's lag-d query — not just the full period — deviates from zero by at most an
L-scaled constant that does not depend on the block count.
The spike prefix bound: with the two words' aperiodic correlations equal at the top lag,
every ℕ-indexed prefix of the assembled sequence's query there tracks its exact linear trend
T * s / (2 * L) to within an L-scaled constant, once both the transition sums and the
within-block deviation from that trend stay controlled uniformly in the prefix length.
The zone window corollary: every cyclic window — of arbitrary phase and length, not just a period-aligned prefix — deviates from zero by at most twice the zone prefix constant, since a window is a difference of two prefixes and each period-reduces to one within a single period.
The spike window corollary: every cyclic window's 2 * L-scaled trend deviation at the top
lag is bounded by twice the spike prefix constant, by the same period-reduction as the zone case.
The single-site block decomposition and its bound #
The Thue–Morse sign as a bounded bit-sum: tmSign i = (-1) ^ (popcount), the popcount
computed as a bit-sum over List.range (i+1) rather than through Nat.digits/List.count —
the shape a numeral-level program can compute directly with /, %, ^. Proved by strong
induction on i through tmSign_two_mul/tmSign_two_mul_add_one and the bit-sum's own recursion
(bitsum_succ); Nat.digits is not touched.
The Thue–Morse sign sequence balances to zero over every even-length initial range: the
digit-count parity pairs 2 * i against 2 * i + 1 with opposite signs at every i.
The odd-length partial identity: an odd-length initial range of the Thue–Morse sign
sequence sums to a single half-index value, since the even-length range below it vanishes
(tmSign_balance) and the added top term is tmSign at the half index.
Every partial sum of the Thue–Morse sign sequence is bounded by 1 in absolute value: an
even-length prefix vanishes and an odd-length prefix is a single ±1 value.
The transition source read off the Thue–Morse sign at half-index: `tau (2 * i) = tau (2 * i +
- = tmSign i`.
Equations
Instances For
The block-sign supply: the prefix product of tau, so that consecutive-block products read
off tau directly (blockSign_mul_noWrap, blockSign_mul_wrap).
Equations
- ReflectiveSubsystems.blockSign m j = ∏ i ∈ Finset.range ↑j, ReflectiveSubsystems.tau i
Instances For
The even-class partial transition sum is bounded by 1: the class reads tmSign at the
half-index, so this is tmSign_partial_abs_le_one transported along tauPartialEven_two_mul/
tauPartialEven_two_mul_add_one.
The odd-class partial transition sum is bounded by 1, dually to
tau_partial_even_abs_le_one.
Both block-transition sign sums vanish at the even class: the prefix-product supply pairs
ε j * ε (j + 1) with tau j.val, and tau itself balances to zero over the even class by
tmSign_balance.
The sign supply's closed form #
The sign supply's closed form. blockSign at any block index is the product of two
tmPrefix values straddling the index halved — the same pairing tauProd_two_mul/
tauProd_two_mul_add_one isolate, restated without reference to tau.
The instance #
The assembled theorem. For every block-repetition count M, the period-96 * M
sequence built from wordU/wordV alternated by block and scaled by the prefix-product sign
supply has vanishing cyclic correlation at every lag 1 through 7, and cyclic correlation
-64 * M at lag 8.
The zone prefix bound, instantiated. Every ℕ-indexed prefix (up to the period) of the
wordU/wordV block sequence's query at a lag 1 ≤ d ≤ 7 deviates from zero by at most 4 * 24,
independent of the block-repetition count M.
The spike prefix bound, instantiated. At the top lag 8, every ℕ-indexed prefix's
2 * 24-scaled deviation from the exact linear trend is at most (4 * 8 + 14) * 24, independent
of M; the certified pair's own combined aperiodic correlation there is -32
(aperiodicCorr_wordU_wordV_spike).
The zone window corollary, instantiated. Every cyclic window of the wordU/wordV block
sequence at a lag 1 ≤ d ≤ 7, of arbitrary phase and length, deviates from zero by at most
2 * (4 * 24).
The single-site instance #
The single-site window bound, instantiated. Every cyclic window of the wordU/wordV
block sequence's own single-site query, of arbitrary phase and length, deviates from zero by at
most 2 * (4 + 24), independent of M.
The design is exactly ±1-valued: blockSeq at the certified pair squares to 1
everywhere, since both the sign supply (blockSign_sq) and the two words are themselves exactly
±1-valued. This is what lets designObs (BlockPairHost.lean) read the design as a genuine
Boolean observation rather than merely a bounded one.
The profile-class family: the same seeds, extended to every length 8 * r #
The certified pair wordU/wordV (r = 3) is the antiperiodic extension of two 8-bit seeds,
blocks (a, -a, a)/(b, -b, b); the same two seeds extend to every length 8 * r and keep the
exact zone, with the extremal spike at lag 8.
The antiperiodic extension. An 8-bit seed repeated r times with alternating block sign,
(a, -a, a, -a, …) — the family whose r = 3 member is the certified pair.
Instances For
The aperiodic-correlation closed forms, along the extension length #
The zone closed form. For every extension count r ≥ 1 and every lag 1 ≤ d ≤ 7, the two
seeds' aperiodic correlations still cancel exactly — the recursive step adds the SAME increment to
both, and that increment is zero at the seed level (an 8-element check, interval_cases/decide).
The spike closed form, generic in a ±1-valued seed: at extension count r ≥ 1, the
antiperiodic extension's own lag-8 correlation is -(8 * r - 8), each of the r - 1 block
transitions contributing a full -8 and the base case r = 1 contributing 0 (lag 8 exceeds
the single block's own width). Both seedU and seedV satisfy the hypothesis, so they share this
closed form and are therefore equal at lag 8.
The total sum over one extension, and the outer partial-sum bound #
The family's own outer partial-sum bound, the abs_wordSumPartial_le_four analogue: the
running signed sum of block-pair sums is bounded by 4 at every prefix, independent of both the
block-repetition count M and the extension count r — seedU's zero total kills the even-block
terms, and seedV's total-4 term is scaled by an alternating count bounded by 1 in absolute
value (abs_alt_sum_le_one), just as the Thue–Morse partial sum was for the certified pair.
The spike remainder bound, at general r #
The certified corollaries' proofs, at general r #
The zone window corollary, at general r. cyclicCorrWindow_blockSeq_zone's own proof,
with the certified pair's word facts replaced by the family's (abs_antiExt_le_one,
aperiodicCorr_antiExt_zone) and 24 by 8 * r; the block-transition sign facts
(blockSign_transition_even/odd, abs_sum_even_blockSign_le_one, abs_sum_odd_blockSign_le_one)
are word-free and carry
over unchanged.
The spike window corollary, at general r ≥ 2. cyclicCorrWindow_blockSeq_spike's own
proof, with the certified pair's word facts and remainder bound replaced by the family's
(abs_antiExt_le_one, aperiodicCorr_antiExt_spike, blockRemainder_antiExt_bound) and 24 by
8 * r; the remainder constant is 32, the family's own crude bound, in place of the certified
pair's tight 14 (blockRemainder_antiExt_bound's own docstring). r ≥ 2 is needed for the lag
8 to stay below the extension's own length 8 * r.
The single-site window corollary, at general r. singleWindow_blockSeq_bound's own
proof, with the certified pair's word facts and outer partial-sum bound replaced by the family's
(abs_antiExt_le_one, singlePrefix_blockSeq_antiExt_period_zero,
abs_antiExt_sumPartial_le_four) and 24 by 8 * r.
A second certified pair: literal 2, length 22, spike lag 6 #
A second word pair, found by exhaustive search (../annex/probes/e1_shifted_spike_pair.py,
committed and self-asserting): length 22, with its spike — the lag where the two words'
aperiodic correlations agree rather than cancel — at 6 instead of the certified pair's 8. This
is what makes literal 2 (rather than 0) the rule this pair identifies, since the schedule's own
offset a correlates against lag 8 - a (BlockPairHost.chiProd_eq_cyclicCorrWindow),
and 8 - 2 = 6. Every lemma below mirrors the certified pair's own instance section (wordU/
wordV through blockSeq_wordU_wordV_sq), transposed to this pair, its length, and its spike lag;
only the window-level bounds are stated, since the profile-class criterion needs no more.
The zone window bound, instantiated at the second certified pair. Every cyclic window at a
lag 1 ≤ d ≤ 8, d ≠ 6, of arbitrary phase and length, deviates from zero by at most
2 * (4 * 22).
The spike window bound, instantiated at the second certified pair. Every cyclic window at
the spike lag 6, of arbitrary phase and length, has 2 * 22-scaled trend deviation at most
2 * ((4 * 6 + 10) * 22).