Documentation

ReflectiveSubsystems.BlockPairProfile

Block-pair correlation profile #

Main results #

def ReflectiveSubsystems.cyclicCorr {N : ℕ} [NeZero N] (x : ZMod N → ℤ) (d : ℕ) :
Equations
Instances For
    def ReflectiveSubsystems.aperiodicCorr {L : ℕ} (w : Fin L → ℤ) (d : ℕ) :
    Equations
    Instances For
      def ReflectiveSubsystems.crossTail {L : ℕ} (w w' : Fin L → ℤ) (d : ℕ) :
      Equations
      Instances For
        def ReflectiveSubsystems.blockIdx {m L : ℕ} [NeZero m] [NeZero L] (t : ZMod (m * L)) :
        Fin m

        The length-L block index of t, as an element of Fin m.

        Equations
        Instances For
          def ReflectiveSubsystems.blockOff {m L : ℕ} [NeZero m] [NeZero L] (t : ZMod (m * L)) :
          Fin L

          The offset of t within its length-L block.

          Equations
          Instances For
            def ReflectiveSubsystems.blockSeq {m L : ℕ} [NeZero m] [NeZero L] (u v : Fin L → ℤ) (ε : Fin m → ℤ) (t : ZMod (m * L)) :
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem ReflectiveSubsystems.blockSeq_val {m L : ℕ} [NeZero m] [NeZero L] (u v : Fin L → ℤ) (ε : Fin m → ℤ) (t : ZMod (m * L)) :
              blockSeq u v ε t = if Even (t.val / L) then ε ⟨t.val / L, ⋯⟩ * u ⟨t.val % L, ⋯⟩ else ε ⟨t.val / L, ⋯⟩ * v ⟨t.val % L, ⋯⟩

              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 cyclic successor block index, (j.val + 1) % m.

              Equations
              Instances For
                theorem ReflectiveSubsystems.cyclicCorr_blockSeq {L : ℕ} [NeZero L] {m M' : ℕ} [NeZero m] (hm : m = 2 * M') (u v : Fin L → ℤ) (ε : Fin m → ℤ) (hε : ∀ (j : Fin m), ε j * ε j = 1) {d k : ℕ} (_hd1 : 1 ≤ d) (hdk : d ≤ k) (hkL : k < L) :
                cyclicCorr (blockSeq u v ε) d = ↑M' * (aperiodicCorr u d + aperiodicCorr v d) + (∑ j : Fin m with Even ↑j, ε j * ε (j + 1)) * crossTail u v d + (∑ j : Fin m with Odd ↑j, ε j * ε (j + 1)) * crossTail v u d

                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).

                theorem ReflectiveSubsystems.cyclicCorr_blockSeq_zone {L : ℕ} [NeZero L] {m M' : ℕ} [NeZero m] (hm : m = 2 * M') (u v : Fin L → ℤ) (ε : Fin m → ℤ) (hε : ∀ (j : Fin m), ε j * ε j = 1) {d k : ℕ} (hd1 : 1 ≤ d) (hdk : d ≤ k) (hkL : k < L) (hzero : aperiodicCorr u d + aperiodicCorr v d = 0) (heven0 : ∑ j : Fin m with Even ↑j, ε j * ε (j + 1) = 0) (hodd0 : ∑ j : Fin m with Odd ↑j, ε j * ε (j + 1) = 0) :
                cyclicCorr (blockSeq u v ε) d = 0

                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.

                theorem ReflectiveSubsystems.cyclicCorr_blockSeq_spike {L : ℕ} [NeZero L] {m M' : ℕ} [NeZero m] (hm : m = 2 * M') (u v : Fin L → ℤ) (ε : Fin m → ℤ) (hε : ∀ (j : Fin m), ε j * ε j = 1) {k : ℕ} (hk1 : 1 ≤ k) (hkL : k < L) (heven0 : ∑ j : Fin m with Even ↑j, ε j * ε (j + 1) = 0) (hodd0 : ∑ j : Fin m with Odd ↑j, ε j * ε (j + 1) = 0) :
                cyclicCorr (blockSeq u v ε) k = ↑M' * (aperiodicCorr u k + aperiodicCorr v k)

                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 #

                def ReflectiveSubsystems.cyclicCorrPrefix {N : ℕ} [NeZero N] (x : ZMod N → ℤ) (d T : ℕ) :

                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
                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.

                  def ReflectiveSubsystems.cyclicCorrWindow {N : ℕ} [NeZero N] (x : ZMod N → ℤ) (d p n : ℕ) :

                  The length-n cyclic window starting at ℕ-phase p.

                  Equations
                  Instances For
                    theorem ReflectiveSubsystems.cyclicCorrWindow_eq_sub {N : ℕ} [NeZero N] (x : ZMod N → ℤ) (d p n : ℕ) :

                    A window is a difference of two prefixes.

                    theorem ReflectiveSubsystems.cyclicCorrPrefix_mod_period {N : ℕ} [NeZero N] (x : ZMod N → ℤ) (d T : ℕ) :
                    cyclicCorrPrefix x d T = ↑(T / N) * cyclicCorr x d + cyclicCorrPrefix x d (T % N)

                    Reduction mod the period: any prefix length decomposes into whole periods (each contributing the full-period sum exactly) plus a within-period remainder.

                    The single-site deviation envelope #

                    def ReflectiveSubsystems.singleWindow {N : ℕ} [NeZero N] (x : ZMod N → ℤ) (p n : ℕ) :

                    The length-n single-site cyclic window starting at ℕ-phase p, the lag-free analogue of cyclicCorrWindow.

                    Equations
                    Instances For
                      def ReflectiveSubsystems.wordAtNat {L : ℕ} (u v : Fin L → ℤ) (j : ℕ) :
                      Fin L → ℤ

                      The word carried by ℕ-indexed block j, depending only on its parity: u on even blocks, v on odd blocks.

                      Equations
                      Instances For
                        def ReflectiveSubsystems.signAtNat {m : ℕ} [NeZero m] (ε : Fin m → ℤ) (j : ℕ) :

                        The sign carried by ℕ-indexed block j, read through the cyclic supply by reduction mod m.

                        Equations
                        Instances For
                          def ReflectiveSubsystems.blockRemainder {L : ℕ} [NeZero L] (w w' : Fin L → ℤ) (η : ℤ) (d r : ℕ) :

                          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
                            theorem ReflectiveSubsystems.cyclicCorrPrefix_blockSeq_zone {L : ℕ} [NeZero L] {m M' : ℕ} [NeZero m] (hm : m = 2 * M') (u v : Fin L → ℤ) (ε : Fin m → ℤ) (hε : ∀ (j : Fin m), ε j * ε j = 1) (hu1 : ∀ (p : Fin L), |u p| ≤ 1) (hv1 : ∀ (p : Fin L), |v p| ≤ 1) {d k : ℕ} (_hd1 : 1 ≤ d) (hdk : d ≤ k) (hkL : k < L) (hzero : aperiodicCorr u d + aperiodicCorr v d = 0) (P : ℤ) (hPeven : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Even j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (hPodd : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Odd j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (T : ℕ) (hT : T ≤ m * L) :
                            |cyclicCorrPrefix (blockSeq u v ε) d T| ≤ (2 + 2 * P) * ↑L

                            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.

                            theorem ReflectiveSubsystems.cyclicCorrPrefix_blockSeq_spike {L : ℕ} [NeZero L] {m M' : ℕ} [NeZero m] (hm : m = 2 * M') (u v : Fin L → ℤ) (ε : Fin m → ℤ) (hε : ∀ (j : Fin m), ε j * ε j = 1) (hu1 : ∀ (p : Fin L), |u p| ≤ 1) (hv1 : ∀ (p : Fin L), |v p| ≤ 1) {k : ℕ} (_hk1 : 1 ≤ k) (hkL : k < L) (huv : aperiodicCorr u k = aperiodicCorr v k) (P : ℤ) (hPeven : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Even j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (hPodd : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Odd j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (Q : ℤ) (hRemU : ∀ (η : ℤ), η * η = 1 → ∀ r ≤ L, |2 * ↑L * blockRemainder u v η k r - ↑r * (aperiodicCorr u k + aperiodicCorr v k)| ≤ Q * ↑L) (hRemV : ∀ (η : ℤ), η * η = 1 → ∀ r ≤ L, |2 * ↑L * blockRemainder v u η k r - ↑r * (aperiodicCorr u k + aperiodicCorr v k)| ≤ Q * ↑L) (T : ℕ) (hT : T ≤ m * L) :
                            |2 * ↑L * cyclicCorrPrefix (blockSeq u v ε) k T - ↑T * (aperiodicCorr u k + aperiodicCorr v k)| ≤ (4 * P * ↑k + Q) * ↑L

                            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.

                            theorem ReflectiveSubsystems.cyclicCorrWindow_blockSeq_zone {L : ℕ} [NeZero L] {m M' : ℕ} [NeZero m] (hm : m = 2 * M') (u v : Fin L → ℤ) (ε : Fin m → ℤ) (hε : ∀ (j : Fin m), ε j * ε j = 1) (hu1 : ∀ (p : Fin L), |u p| ≤ 1) (hv1 : ∀ (p : Fin L), |v p| ≤ 1) {d k : ℕ} (hd1 : 1 ≤ d) (hdk : d ≤ k) (hkL : k < L) (hzero : aperiodicCorr u d + aperiodicCorr v d = 0) (heven0 : ∑ j : Fin m with Even ↑j, ε j * ε (j + 1) = 0) (hodd0 : ∑ j : Fin m with Odd ↑j, ε j * ε (j + 1) = 0) (P : ℤ) (hPeven : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Even j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (hPodd : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Odd j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (p n : ℕ) :
                            |cyclicCorrWindow (blockSeq u v ε) d p n| ≤ 2 * (2 + 2 * P) * ↑L

                            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.

                            theorem ReflectiveSubsystems.cyclicCorrWindow_blockSeq_spike {L : ℕ} [NeZero L] {m M' : ℕ} [NeZero m] (hm : m = 2 * M') (u v : Fin L → ℤ) (ε : Fin m → ℤ) (hε : ∀ (j : Fin m), ε j * ε j = 1) (hu1 : ∀ (p : Fin L), |u p| ≤ 1) (hv1 : ∀ (p : Fin L), |v p| ≤ 1) {k : ℕ} (hk1 : 1 ≤ k) (hkL : k < L) (heven0 : ∑ j : Fin m with Even ↑j, ε j * ε (j + 1) = 0) (hodd0 : ∑ j : Fin m with Odd ↑j, ε j * ε (j + 1) = 0) (huv : aperiodicCorr u k = aperiodicCorr v k) (P : ℤ) (hPeven : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Even j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (hPodd : ∀ J ≤ m, |∑ j ∈ Finset.range J, if Odd j then signAtNat ε j * signAtNat ε (j + 1) else 0| ≤ P) (Q : ℤ) (hRemU : ∀ (η : ℤ), η * η = 1 → ∀ r ≤ L, |2 * ↑L * blockRemainder u v η k r - ↑r * (aperiodicCorr u k + aperiodicCorr v k)| ≤ Q * ↑L) (hRemV : ∀ (η : ℤ), η * η = 1 → ∀ r ≤ L, |2 * ↑L * blockRemainder v u η k r - ↑r * (aperiodicCorr u k + aperiodicCorr v k)| ≤ Q * ↑L) (p n : ℕ) :
                            |2 * ↑L * cyclicCorrWindow (blockSeq u v ε) k p n - ↑n * (aperiodicCorr u k + aperiodicCorr v k)| ≤ 2 * (4 * P * ↑k + Q) * ↑L

                            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 #

                            theorem ReflectiveSubsystems.tmSign_eq_bitsum (i : ℕ) :
                            tmSign i = (-1) ^ ∑ j ∈ Finset.range (i + 1), i / 2 ^ j % 2

                            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.

                            theorem ReflectiveSubsystems.tmSign_balance (M : ℕ) :
                            ∑ i ∈ Finset.range (2 * M), tmSign i = 0

                            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 +

                            1. = 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
                              Instances For
                                theorem ReflectiveSubsystems.blockSign_mul_noWrap (m : ℕ) [NeZero m] (j : Fin m) (h : ↑j + 1 < m) :
                                theorem ReflectiveSubsystems.blockSign_mul_wrap (M : ℕ) [NeZero (2 * (2 * M))] (j : Fin (2 * (2 * M))) (h : ↑j + 1 = 2 * (2 * M)) :
                                blockSign (2 * (2 * M)) j * blockSign (2 * (2 * M)) (nextBlock j) = tau ↑j

                                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.

                                theorem ReflectiveSubsystems.blockSign_transition_even (M : ℕ) [NeZero (2 * (2 * M))] :
                                ∑ j : Fin (2 * (2 * M)) with Even ↑j, blockSign (2 * (2 * M)) j * blockSign (2 * (2 * M)) (j + 1) = 0

                                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.

                                theorem ReflectiveSubsystems.blockSign_transition_odd (M : ℕ) [NeZero (2 * (2 * M))] :
                                ∑ j : Fin (2 * (2 * M)) with Odd ↑j, blockSign (2 * (2 * M)) j * blockSign (2 * (2 * M)) (j + 1) = 0

                                Both block-transition sign sums vanish at the odd class, dually to blockSign_transition_even.

                                The sign supply's closed form #

                                The prefix product of tmSign itself, at home beside blockSign's own prefix product of tau.

                                Equations
                                Instances For

                                  tmPrefix at an even index: the prefix product collapses to the alternating sign, one factor of -1 per cancelling pair tmSign (2i), tmSign (2i+1).

                                  tmPrefix at an odd index: one further, un-cancelled factor of tmSign t.

                                  theorem ReflectiveSubsystems.blockSign_eq_tmPrefix (m : ℕ) (j : Fin m) :
                                  blockSign m j = tmPrefix ((↑j + 1) / 2) * tmPrefix (↑j / 2)

                                  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 first length-24 word of the certified pair.

                                  Equations
                                  Instances For

                                    The second length-24 word of the certified pair.

                                    Equations
                                    Instances For
                                      theorem ReflectiveSubsystems.blockSeq_wordU_wordV_correlation (M : ℕ) [NeZero (2 * (2 * M))] :
                                      (∀ (d : ℕ), 1 ≤ d → d ≤ 7 → cyclicCorr (blockSeq wordU wordV (blockSign (2 * (2 * M)))) d = 0) ∧ cyclicCorr (blockSeq wordU wordV (blockSign (2 * (2 * M)))) 8 = -64 * ↑M

                                      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.

                                      theorem ReflectiveSubsystems.cyclicCorrPrefix_blockSeq_wordU_wordV_zone (M : ℕ) [NeZero (2 * (2 * M))] {d : ℕ} (hd1 : 1 ≤ d) (hd7 : d ≤ 7) (T : ℕ) (hT : T ≤ 2 * (2 * M) * 24) :
                                      |cyclicCorrPrefix (blockSeq wordU wordV (blockSign (2 * (2 * M)))) d T| ≤ (2 + 2 * 1) * 24

                                      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.

                                      theorem ReflectiveSubsystems.cyclicCorrPrefix_blockSeq_wordU_wordV_spike (M : ℕ) [NeZero (2 * (2 * M))] (T : ℕ) (hT : T ≤ 2 * (2 * M) * 24) :
                                      |2 * 24 * cyclicCorrPrefix (blockSeq wordU wordV (blockSign (2 * (2 * M)))) 8 T - ↑T * (aperiodicCorr wordU 8 + aperiodicCorr wordV 8)| ≤ (4 * 1 * 8 + 14) * 24

                                      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).

                                      theorem ReflectiveSubsystems.cyclicCorrWindow_blockSeq_wordU_wordV_zone (M : ℕ) [NeZero (2 * (2 * M))] {d : ℕ} (hd1 : 1 ≤ d) (hd7 : d ≤ 7) (p n : ℕ) :
                                      |cyclicCorrWindow (blockSeq wordU wordV (blockSign (2 * (2 * M)))) d p n| ≤ 2 * ((2 + 2 * 1) * 24)

                                      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).

                                      theorem ReflectiveSubsystems.cyclicCorrWindow_blockSeq_wordU_wordV_spike (M : ℕ) [NeZero (2 * (2 * M))] (p n : ℕ) :
                                      |2 * 24 * cyclicCorrWindow (blockSeq wordU wordV (blockSign (2 * (2 * M)))) 8 p n - ↑n * (aperiodicCorr wordU 8 + aperiodicCorr wordV 8)| ≤ 2 * ((4 * 1 * 8 + 14) * 24)

                                      The spike window corollary, instantiated. Every cyclic window at the top lag 8, of arbitrary phase and length, has 2 * 24-scaled trend deviation at most 2 * ((4 * 8 + 14) * 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.

                                      theorem ReflectiveSubsystems.blockSeq_wordU_wordV_sq (M : ℕ) [NeZero (2 * (2 * M))] (x : ZMod (2 * (2 * M) * 24)) :
                                      blockSeq wordU wordV (blockSign (2 * (2 * M))) x * blockSeq wordU wordV (blockSign (2 * (2 * M))) x = 1

                                      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 first 8-bit seed: wordU's own first block.

                                      Equations
                                      Instances For

                                        The second 8-bit seed: wordV's own first block.

                                        Equations
                                        Instances For
                                          def ReflectiveSubsystems.antiExt (s : Fin 8 → ℤ) (r : ℕ) :
                                          Fin (8 * r) → ℤ

                                          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.

                                          Equations
                                          Instances For

                                            The certified pair is the r = 3 member.

                                            The certified pair is the r = 3 member.

                                            seedU is ±1-valued, squared.

                                            seedV is ±1-valued, squared.

                                            theorem ReflectiveSubsystems.abs_antiExt_le_one (s : Fin 8 → ℤ) (hs : ∀ (i : Fin 8), |s i| ≤ 1) (r : ℕ) (i : Fin (8 * r)) :
                                            |antiExt s r i| ≤ 1

                                            The extension is ±1-valued whenever the seed is.

                                            theorem ReflectiveSubsystems.antiExt_sq (s : Fin 8 → ℤ) (hs : ∀ (i : Fin 8), s i * s i = 1) (r : ℕ) (i : Fin (8 * r)) :
                                            antiExt s r i * antiExt s r i = 1

                                            The extension is exactly ±1-valued whenever the seed is: the seed's own square is 1 at every offset, and the block sign squares away.

                                            The aperiodic-correlation closed forms, along the extension length #

                                            theorem ReflectiveSubsystems.aperiodicCorr_antiExt_zone (r : ℕ) (hr : 1 ≤ r) {d : ℕ} (hd1 : 1 ≤ d) (hd7 : d ≤ 7) :

                                            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).

                                            theorem ReflectiveSubsystems.aperiodicCorr_antiExt_spike (s : Fin 8 → ℤ) (hs : ∀ (i : Fin 8), s i * s i = 1) (r : ℕ) (hr : 1 ≤ r) :
                                            aperiodicCorr (antiExt s r) 8 = -(8 * ↑r - 8)

                                            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 #

                                            theorem ReflectiveSubsystems.abs_antiExt_sumPartial_le_four (M r : ℕ) [NeZero (2 * (2 * M))] (J : ℕ) (hJ : J ≤ 2 * (2 * M)) :
                                            |∑ j ∈ Finset.range J, signAtNat (blockSign (2 * (2 * M))) j * ∑ p : Fin (8 * r), wordAtNat (antiExt seedU r) (antiExt seedV r) j p| ≤ 4

                                            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 #

                                            theorem ReflectiveSubsystems.cyclicCorrWindow_blockSeq_family_zone (M r : ℕ) [NeZero (2 * (2 * M))] [NeZero r] {d : ℕ} (hd1 : 1 ≤ d) (hd7 : d ≤ 7) (p n : ℕ) :
                                            |cyclicCorrWindow (blockSeq (antiExt seedU r) (antiExt seedV r) (blockSign (2 * (2 * M)))) d p n| ≤ 2 * ((2 + 2 * 1) * (8 * ↑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.

                                            theorem ReflectiveSubsystems.cyclicCorrWindow_blockSeq_family_spike (M r : ℕ) [NeZero (2 * (2 * M))] [NeZero r] (hr2 : 2 ≤ r) (p n : ℕ) :
                                            |2 * (8 * ↑r) * cyclicCorrWindow (blockSeq (antiExt seedU r) (antiExt seedV r) (blockSign (2 * (2 * M)))) 8 p n - ↑n * (aperiodicCorr (antiExt seedU r) 8 + aperiodicCorr (antiExt seedV r) 8)| ≤ 2 * ((4 * 1 * 8 + 32) * (8 * ↑r))

                                            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.

                                            theorem ReflectiveSubsystems.singleWindow_blockSeq_family_bound (M r : ℕ) [NeZero (2 * (2 * M))] [NeZero r] (p n : ℕ) :
                                            |singleWindow (blockSeq (antiExt seedU r) (antiExt seedV r) (blockSign (2 * (2 * M)))) p n| ≤ 2 * (4 + 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 first length-22 word of the second certified pair.

                                            Equations
                                            Instances For

                                              The second length-22 word of the second certified pair.

                                              Equations
                                              Instances For
                                                theorem ReflectiveSubsystems.cyclicCorrWindow_blockSeq_wordU2_wordV2_zone (M : ℕ) [NeZero (2 * (2 * M))] {d : ℕ} (hd1 : 1 ≤ d) (hd8 : d ≤ 8) (hd6 : d ≠ 6) (p n : ℕ) :
                                                |cyclicCorrWindow (blockSeq wordU2 wordV2 (blockSign (2 * (2 * M)))) d p n| ≤ 2 * ((2 + 2 * 1) * 22)

                                                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).

                                                The single-site instance #

                                                The single-site window bound, instantiated at the second certified pair. Every cyclic window of arbitrary phase and length deviates from zero by at most 2 * (2 + 22).

                                                theorem ReflectiveSubsystems.blockSeq_wordU2_wordV2_sq (M : ℕ) [NeZero (2 * (2 * M))] (x : ZMod (2 * (2 * M) * 22)) :
                                                blockSeq wordU2 wordV2 (blockSign (2 * (2 * M))) x * blockSeq wordU2 wordV2 (blockSign (2 * (2 * M))) x = 1

                                                The second certified design is exactly ±1-valued: blockSeq at this pair squares to 1 everywhere, mirroring blockSeq_wordU_wordV_sq.