Documentation

Complexity.Foundations.LinearAlgebra.ReplacementDesign

Binomial measurement row counts and algebraic replacement design assembly (Lemmas 4.1 and 4.7) #

This module assembles the algebraic replacement design construction of Section 4 of the manuscript The Exponential Time Hypothesis is False ([OpenAI2026ETH], printed pp. 28, 32–34) by proving the exact binomial fiber count of Lemma 4.1 (p. 28, equation 4.8), the total measurement row bound of equation (4.16) (p. 32), and a generalized algebraic Lemma 4.7 existence theorem (pp. 33–34) establishing conditions (1)–(4) of Definition 3.1 (pp. 21–22) together with the explicit cleared-denominator and ℓ₁-coefficient norm bounds of Lemma 4.6 underlying condition (5) (formal O(Q log Q + log D) bit-length and native runtime-cost integration remain separate):

  1. Slot-level antisymmetric and symmetric pair counts (Lemma 4.1 proof, p. 28):

  2. Exact binomial fiber count and Lemma 4.1 tail bound (p. 28, eq. 4.8):

  3. Total group measurement row bound (Section 4.5, eq. 4.16, p. 32):

  4. Algebraic replacement design assembly (Definition 3.1, pp. 21–22, and Lemma 4.7, pp. 33–34):

    • ReplacementDesign bundles the variable partition varAssign, factor group schedule factorAssign, copy count h, and injective copy placement place together with the group-size, measurement-row count, measurement ℓ₁-norm, degree, evaluation-at-zero, and kernel-invariance properties of Definition 3.1 (1)–(4), plus the explicit cleared-denominator identity and ℓ₁ coefficient norm bound of Lemma 4.6 (commonDenom Q R = (R - 1)! * Q!) underlying Definition 3.1 (5) (formal O(Q log Q + log D) bit-length and native runtime-cost endpoints remain separate follow-up).
    • exists_replacementDesign proves an algebraic generalization of Lemma 4.7 (printed pp. 33–34) by combining Lemma 4.1, Lemma 4.3, Lemma 4.5 (exists_balanced_schedules_of_scopes), Section 4.5 (fiberRankCopy, varReplacementRow, varMeasurementMatrix), and Lemma 4.6: it requires only 0 ≤ τ, M ≤ b * n (omitting n ≤ M and τ ≤ 1 / 2), and the weaker node-range condition hI : ∀ a < R - 1, A₀ + a ≤ Q (vacuous at R = 1) rather than full interval containment I ⊆ [0, Q].

Main definitions #

Main results #

References #

Part 1: Slot-level antisymmetric and symmetric pair counts (Lemma 4.1, p. 28) #

Ordered pairs (a, d) : Fin r × Fin r with d < a, indexing the antisymmetric pair-basis functions e_{a,d} - e_{d,a} of eigenvalue -1 under coordinate swap.

Instances For

    Ordered pairs (a, d) : Fin r × Fin r with ¬ (d < a), indexing the diagonal and symmetric pair-basis functions of eigenvalue +1 under coordinate swap.

    Instances For

      Diagonal ordered pairs (a, d) : Fin r × Fin r with a = d.

      Instances For
        @[simp]
        theorem Cslib.LinearAlgebra.mem_antisymPairs {r : ℕ} {p : Fin r × Fin r} :
        p ∈ antisymPairs r ↔ p.2 < p.1
        @[simp]
        theorem Cslib.LinearAlgebra.mem_symPairs {r : ℕ} {p : Fin r × Fin r} :
        p ∈ symPairs r ↔ ¬p.2 < p.1
        @[simp]
        theorem Cslib.LinearAlgebra.mem_diagPairs {r : ℕ} {p : Fin r × Fin r} :
        p ∈ diagPairs r ↔ p.1 = p.2

        There are r diagonal pairs (a, a) in Fin r × Fin r.

        Swapping coordinates maps antisymPairs r (p.2 < p.1) bijectively onto {p | p.1 < p.2}.

        Partitioning Fin r × Fin r into p.2 < p.1, p.1 < p.2, and p.1 = p.2 gives 2 * #(antisymPairs r) + r = r * r.

        Twice the number of antisymmetric pairs in Fin r × Fin r is r * (r - 1).

        Twice the number of symmetric/diagonal pairs in Fin r × Fin r is r * (r + 1).

        There are r * (r - 1) / 2 antisymmetric pairs in Fin r × Fin r (Lemma 4.1, p. 28).

        theorem Cslib.LinearAlgebra.card_symPairs (r : ℕ) :
        (symPairs r).card = r * (r + 1) / 2

        There are r * (r + 1) / 2 symmetric and diagonal pairs in Fin r × Fin r (Lemma 4.1, p. 28).

        Part 2: Exact binomial fiber count and Lemma 4.1 tail bound (p. 28, eq. 4.8) #

        The subset of evaluation slots s : Fin Q at which β.2 s < β.1 s.

        Instances For

          antisymCount β is the cardinality of antisymSlots β.

          antisymCount β is at most Q.

          Equivalence between AuxLabel Q r = (Fin Q → Fin r) × (Fin Q → Fin r) and slotwise pairs Fin Q → Fin r × Fin r.

          Instances For

            For any fixed subset S : Finset (Fin Q) of evaluation slots, the auxiliary labels β : AuxLabel Q r with antisymSlots β = S are in bijection with Fintype.piFinset (fun s => if s ∈ S then antisymPairs r else symPairs r) and therefore have cardinality #(antisymPairs r) ^ #S * #(symPairs r) ^ (Q - #S).

            theorem Cslib.LinearAlgebra.card_filter_antisymCount_eq (Q r j : ℕ) :
            {β : AuxLabel Q r | antisymCount β = j}.card = Q.choose j * (r * (r - 1) / 2) ^ j * (r * (r + 1) / 2) ^ (Q - j)

            Lemma 4.1 exact binomial fiber count (p. 28): The number of auxiliary basis labels β : AuxLabel Q r with antisymCount β = j is Q.choose j * (r * (r - 1) / 2) ^ j * (r * (r + 1) / 2) ^ (Q - j).

            theorem Cslib.LinearAlgebra.card_measurementIndices_eq (Q r A₀ R : ℕ) :
            (measurementIndices Q r A₀ R).card = ∑ j ∈ Finset.range (Q + 1) with j < A₀ ∨ A₀ + R ≤ j, Q.choose j * (r * (r - 1) / 2) ^ j * (r * (r + 1) / 2) ^ (Q - j)

            Lemma 4.1 exact measurement row count (p. 28): The number of measurement indices in measurementIndices Q r A₀ R is the sum over j ∈ range (Q + 1) outside [A₀, A₀ + R) of Q.choose j * (r * (r - 1) / 2) ^ j * (r * (r + 1) / 2) ^ (Q - j).

            The binomial tail probability Pr[W ∉ {A₀, ..., A₀ + R - 1}] for W ∼ Bin(Q, (r - 1) / (2 * r)) from Lemma 4.1 and equation (4.8) (p. 28).

            Instances For
              theorem Cslib.LinearAlgebra.cast_antisymPairs_eq (r : ℕ) :
              ↑(r * (r - 1) / 2) = ↑r ^ 2 * ((↑r - 1) / (2 * ↑r))

              Rational cast of #(antisymPairs r) = r * (r - 1) / 2.

              theorem Cslib.LinearAlgebra.cast_symPairs_eq (r : ℕ) (hr : 0 < r) :
              ↑(r * (r + 1) / 2) = ↑r ^ 2 * ((↑r + 1) / (2 * ↑r))

              Rational cast of #(symPairs r) = r * (r + 1) / 2.

              theorem Cslib.LinearAlgebra.card_measurementIndices_cast_eq (Q r A₀ R : ℕ) (hr : 0 < r) :
              ↑(measurementIndices Q r A₀ R).card = ↑(r ^ (2 * Q)) * binomTailProb Q r A₀ R

              Lemma 4.1 rational identity (p. 28): For 0 < r, the number of rows #(measurementIndices Q r A₀ R) of measurementMatrix equals D * Pr[W ∉ I] = r ^ (2 * Q) * binomTailProb Q r A₀ R.

              theorem Cslib.LinearAlgebra.card_measurementIndices_le_of_binomTailProb_le {Q r A₀ R : ℕ} {ε : ℚ} (hr : 0 < r) (hε : binomTailProb Q r A₀ R ≤ ε) :
              ↑(measurementIndices Q r A₀ R).card ≤ ε * ↑(r ^ (2 * Q))

              Lemma 4.1 and equation (4.8) row bound (p. 28): If binomTailProb Q r A₀ R ≤ ε, then #(measurementIndices Q r A₀ R) ≤ ε * r ^ (2 * Q).

              theorem Cslib.LinearAlgebra.binomTailProb_eq_div (Q r A₀ R : ℕ) (hr : 0 < r) :
              binomTailProb Q r A₀ R = ↑(measurementIndices Q r A₀ R).card / ↑(r ^ (2 * Q))

              For 0 < r, binomTailProb Q r A₀ R equals the fraction #(measurementIndices Q r A₀ R) / r ^ (2 * Q) of auxiliary basis labels outside [A₀, A₀ + R).

              theorem Cslib.LinearAlgebra.binomTailProb_nonneg {Q r A₀ R : ℕ} (hr : 1 ≤ r) :
              0 ≤ binomTailProb Q r A₀ R

              binomTailProb Q r A₀ R is nonnegative for 1 ≤ r.

              theorem Cslib.LinearAlgebra.binomTailProb_zero_right (Q r A₀ : ℕ) (hr : 0 < r) :
              binomTailProb Q r A₀ 0 = 1

              When R = 0, the interval [A₀, A₀ + R) is empty and binomTailProb Q r A₀ 0 = 1 (the full binomial distribution sums to 1).

              theorem Cslib.LinearAlgebra.binomTailProb_le_one (Q r A₀ R : ℕ) (hr : 0 < r) :
              binomTailProb Q r A₀ R ≤ 1

              binomTailProb Q r A₀ R ≤ 1 for 0 < r.

              Part 3: Total group measurement row bound (Section 4.5, eq. 4.16, p. 32) #

              theorem Cslib.LinearAlgebra.card_allGroupMeasurementRows_le_two_mul_tau_mul_n {Q r A₀ R h M b n : ℕ} {τ : ℚ} (hr : 0 < r) (hb : 0 < b) (hτ : 0 ≤ τ) (hhD : h * r ^ (2 * Q) ≤ 2 * M) (hM : M ≤ b * n) (htail : binomTailProb Q r A₀ R ≤ τ / (↑r * ↑b)) :
              ↑(r * (h * (measurementIndices Q r A₀ R).card)) ≤ 2 * τ * ↑n

              Equation (4.16) total group measurement row bound (p. 32): When h * r ^ (2 * Q) ≤ 2 * M, M ≤ b * n, 0 ≤ τ, and binomTailProb Q r A₀ R ≤ τ / (r * b), the total number of measurement rows r * (h * #(measurementIndices Q r A₀ R)) across all r variable groups is at most 2 * τ * n.

              Part 4: Algebraic Section 4 replacement design (Definition 3.1 & Lemma 4.7, pp. 32–34) #

              structure Cslib.LinearAlgebra.ReplacementDesign {n : ℕ} {F : Type u_1} [Fintype F] (scope : F → Finset (Fin n)) (Q r A₀ R : ℕ) (τ : ℚ) :
              Type u_1

              A bundled Section 4 replacement design for a factor scope family scope : F → Finset (Fin n), recording Definition 3.1 (1)–(4) (pp. 21–22) together with the explicit cleared-denominator identity and ℓ₁ coefficient norm bound of Lemma 4.6 (p. 33) that underlie Definition 3.1 (5) (formal O(Q log Q + log D) bit-length and native runtime endpoints are separate follow-up).

              Instances For
                theorem Cslib.LinearAlgebra.ReplacementDesign.evalReplacementRow_zero {n : ℕ} {F : Type u_1} [Fintype F] {scope : F → Finset (Fin n)} {Q r A₀ R : ℕ} {τ : ℚ} (D : ReplacementDesign scope Q r A₀ R τ) (e : BalancedSchedules.ScopeIncidence scope) (x : Fin n → ℚ) :

                Evaluating the replacement form at T = 0 on any vector x : Fin n → ℚ extracts x (scopeVarOf scope e).

                theorem Cslib.LinearAlgebra.ReplacementDesign.evalReplacementRow_nodePoint_eq_of_eq_on_varGroup {n : ℕ} {F : Type u_1} [Fintype F] {scope : F → Finset (Fin n)} {Q r A₀ R : ℕ} {τ : ℚ} (D : ReplacementDesign scope Q r A₀ R τ) (e : BalancedSchedules.ScopeIncidence scope) (t : Fin Q) (x x' : Fin n → ℚ) (hgrp : ∀ v ∈ varGroup D.varAssign t (D.factorAssign (BalancedSchedules.scopeFactorOf scope e) t), x v = x' v) (hmeas : (varMeasurementMatrix Q r A₀ R ℚ D.place (BalancedSchedules.scopeVarOf scope)).mulVec x = (varMeasurementMatrix Q r A₀ R ℚ D.place (BalancedSchedules.scopeVarOf scope)).mulVec x') :

                In any ReplacementDesign, the value of evalVarReplacementRow at nodePoint t for incidence e = (f, v) depends only on x restricted to the assigned variable group varGroup D.varAssign t (D.factorAssign f t) and the measurements (varMeasurementMatrix Q r A₀ R ℚ D.place (scopeVarOf scope)).mulVec x.

                theorem Cslib.LinearAlgebra.exists_replacementDesign {n : ℕ} {F : Type u_1} [Fintype F] (scope : F → Finset (Fin n)) {Q r A₀ R b w : ℕ} {τ : ℚ} (hn : 1 ≤ n) (hb_pos : 1 ≤ b) (hw_pos : 1 ≤ w) (hr : 2 ≤ r) (hR : 1 ≤ R) (hRQ : R < Q) (hτ : 0 ≤ τ) (hI : ∀ a < R - 1, A₀ + a ≤ Q) (hb : ∀ (v : Fin n), {f : F | v ∈ scope f}.card ≤ b) (hw : ∀ (f : F), (scope f).card ≤ w) (hM_le : ∑ f : F, (scope f).card ≤ b * n) (hincidenceSize : 2 * (b + w) * (r ^ (2 * Q)) ^ 2 ≤ ∑ f : F, (scope f).card) (hgroupSize : 2 * Q * r ^ 2 ≤ n) (htail : binomTailProb Q r A₀ R ≤ τ / (↑r * ↑b)) :
                Nonempty (ReplacementDesign scope Q r A₀ R τ)

                Lemma 4.7 (Algebraic existence of a Section 4 replacement design, pp. 33–34): Suppose 1 ≤ n, 1 ≤ b, 1 ≤ w, 2 ≤ r, 1 ≤ R, R < Q, 0 ≤ τ, every factor scope scope f has size at most w, every variable belongs to at most b scopes, M = ∑ f, #(scope f) ≤ b * n, the balance inequalities 2 * (b + w) * (r ^ (2 * Q)) ^ 2 ≤ M and 2 * Q * r ^ 2 ≤ n hold (eq. 4.13), the mismatch-annihilator node-range condition hI : ∀ a < R - 1, A₀ + a ≤ Q holds (vacuous at R = 1 and implied by [A₀, A₀ + R) ⊆ [0, Q]), and the binomial tail bound binomTailProb Q r A₀ R ≤ τ / (r * b) holds (eq. 4.8). Then there exists a ReplacementDesign satisfying Definition 3.1 (1)–(4) and the explicit cleared-denominator and ℓ₁-coefficient norm bounds of Lemma 4.6 (omitting the paper's n ≤ M and 0 < τ ≤ 1 / 2 regime assumptions and leaving the O(Q log Q + log D) bit-length / native runtime endpoint as separate follow-up).