Documentation

Complexity.Foundations.BooleanAnalysis.SparseHermiteRecovery

Measurement-fiber Taylor-jet identities and Hermite–Cramer zero-counting recovery #

This module completes two mathematical bridges in the polynomial-interpolation and parity-counting pipeline of OpenAI, The Exponential Time Hypothesis is False (Sections 3.4, 5.3–5.5, and Appendix B.2–B.3, printed pp. 24–25, 37–39, 48–50):

  1. §3.4 Affine-Taylor to measurement-fiber jet bridge (Cslib.ReplacementCounting, equations (3.9)–(3.13) and Proposition 3.4, pp. 24–25): Connecting Cslib.AffineTaylor (replacedSum, affineInput, affineFactor, factorProduct, coeff_taylor_replacedSum_eq_restricted_subsets) with Cslib.ReplacementCounting.Design (targetPoly, shiftedFactorEval, sum_restricted_shiftedFactor_eq_sum_measurement_fibers):

  2. §5.4 & Appendix B.2–B.3 Taylor-shift commutation, JetTable bridge, and unconditional Hermite–Cramer recovery (Cslib.BitString, pp. 37–39, 48–50):

Main definitions #

Main results #

References #

1. §3.4 Affine-Taylor to measurement-fiber jet bridge (equations (3.9)–(3.13)) #

theorem Cslib.ReplacementCounting.targetPolynomial_eq_replacedSum {ι : Type u_1} {F : Type u_2} {A : Type u_3} [Fintype ι] [DecidableEq ι] [CommRing A] {κ : F → Type u_4} (s : Finset F) (Φ : (f : F) → MvPolynomial (κ f) A) (P : (f : F) → κ f → ι → Polynomial A) :

ReplacementCounting.targetPolynomial coincides with AffineTaylor.replacedSum ([OAI26c], equation (3.3), pp. 21, 24).

theorem Cslib.ReplacementCounting.Design.targetPoly_eq_replacedSum {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) :

M.targetPoly Φ coincides with AffineTaylor.replacedSum s Φ (M.rowIn A).

theorem Cslib.ReplacementCounting.Design.map_eval_affineInput_indicator {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (t : Fin Q) (U : Finset ι) (f : F) (v : κ f) (x : ι → Bool) :
Polynomial.map (MvPolynomial.eval fun (i : ι) => BitString.bitVal A (decide (i ∈ U))) (AffineTaylor.affineInput (M.rowIn A f v) (↑(M.nodes t)) x) = Polynomial.C ((algebraMap ℚ A) (M.evalRow t f v x)) + ∑ i ∈ U, ((Polynomial.taylor ↑(M.nodes t)) (M.rowIn A f v i) - Polynomial.C (Polynomial.eval (↑(M.nodes t)) (M.rowIn A f v i)))

Evaluating the formal variables X of AffineTaylor.affineInput (M.rowIn A f v) at the indicator of U ⊆ ι yields the scalar baseline algebraMap ℚ A (M.evalRow t f v x) plus the sum of Taylor corrections over i ∈ U ([OAI26c], equations (3.7)–(3.8), p. 24).

theorem Cslib.ReplacementCounting.Design.map_eval_affineFactor_indicator {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) (t : Fin Q) (U : Finset ι) (f : F) (x : ι → Bool) :
Polynomial.map (MvPolynomial.eval fun (i : ι) => BitString.bitVal A (decide (i ∈ U))) (AffineTaylor.affineFactor (Φ f) (M.rowIn A f) (↑(M.nodes t)) x) = M.shiftedFactorEval Φ t U f fun (v : κ f) => M.evalRow t f v x

Evaluating the formal variables X of AffineTaylor.affineFactor at the indicator of U ⊆ ι produces M.shiftedFactorEval Φ t U f (fun v => M.evalRow t f v x) ([OAI26c], equations (3.8) and (3.11), pp. 24–25).

theorem Cslib.ReplacementCounting.Design.eval_coeff_factorProduct_indicator {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) (t : Fin Q) (U : Finset ι) (x : ι → Bool) (j : ℕ) :
(MvPolynomial.eval fun (i : ι) => BitString.bitVal A (decide (i ∈ U))) ((AffineTaylor.factorProduct s Φ (M.rowIn A) (↑(M.nodes t)) x).coeff j) = (∏ f ∈ s, M.shiftedFactorEval Φ t U f fun (v : κ f) => M.evalRow t f v x).coeff j

Evaluating the j-th Taylor coefficient of AffineTaylor.factorProduct at the indicator of U ⊆ ι equals the j-th coefficient of the product of M.shiftedFactorEval over f ∈ s.

noncomputable def Cslib.ReplacementCounting.Design.classicalRepresentative {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) (t : Fin Q) (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) (hy : ∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) (g : Fin r) :
M.LocalCube t g

Classical fiber-representative selector for M.localMeasure t, choosing a local Boolean assignment u : M.LocalCube t g with M.localMeasure t g u = y g whenever all fibers y g are nonempty.

Instances For
    theorem Cslib.ReplacementCounting.Design.classicalRepresentative_valid {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) (t : Fin Q) (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) (hy : ∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) (g : Fin r) :
    M.localMeasure t g (M.classicalRepresentative t y hy g) = y g

    M.classicalRepresentative t satisfies the representative validity condition for SharedSummaries.fiberContribution.

    noncomputable def Cslib.ReplacementCounting.Design.measurementFiberJet {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) (q : ℕ) (t : Fin Q) (representative : (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) → (∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) → (g : Fin r) → M.LocalCube t g) (j : ℕ) :
    A

    Equation (3.13) measurement-fiber Taylor-jet coefficient ([OAI26c], §3.4, p. 25): the signed Möbius sum over subset pairs E ⊆ ι (#E ≤ q) and U ⊆ E of the j-th coefficient of the measurement-fiber sum at node t : Fin Q.

    Instances For
      theorem Cslib.ReplacementCounting.Design.coeff_taylor_targetPoly_eq_sum_measurement_fibers {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) (t : Fin Q) {j q : ℕ} (hj : j ≤ q) (representative : (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) → (∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) → (g : Fin r) → M.LocalCube t g) (valid : ∀ (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) (hy : ∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) (g : Fin r), M.localMeasure t g (representative y hy g) = y g) :
      ((Polynomial.taylor ↑(M.nodes t)) (M.targetPoly Φ)).coeff j = ∑ E ∈ Finset.univ.powerset with E.card ≤ q, ∑ U ∈ E.powerset, (-1) ^ (E.card - U.card) * ∑ y ∈ M.measurementBox t, (SharedSummaries.fiberContribution (M.localMeasure t) (M.restrictedLocalCube t E) (M.groupedFactor (M.shiftedFactorEval Φ t U) t) representative y).coeff j

      Equation (3.13) Taylor-jet measurement-fiber identity ([OAI26c], §3.4, pp. 24–25): for every Taylor order j ≤ q and node t : Fin Q, [z ^ j] H(nodes t + z) equals the signed Möbius sum over #E ≤ q and U ⊆ E of the j-th coefficient of the measurement-fiber sums over M.measurementBox t.

      theorem Cslib.ReplacementCounting.Design.coeff_taylor_targetPoly_eq_measurementFiberJet {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) (t : Fin Q) {j q : ℕ} (hj : j ≤ q) (representative : (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) → (∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) → (g : Fin r) → M.LocalCube t g) (valid : ∀ (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) (hy : ∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) (g : Fin r), M.localMeasure t g (representative y hy g) = y g) :
      ((Polynomial.taylor ↑(M.nodes t)) (M.targetPoly Φ)).coeff j = M.measurementFiberJet Φ q t representative j

      Packaging coeff_taylor_targetPoly_eq_sum_measurement_fibers in terms of M.measurementFiberJet.

      theorem Cslib.ReplacementCounting.Design.taylorJet_targetPoly_eq_measurementFiberJet {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) {A : Type u_4} [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) {J q : ℕ} (hJq : J ≤ q + 1) (representative : (t : Fin Q) → (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) → (∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) → (g : Fin r) → M.LocalCube t g) (valid : ∀ (t : Fin Q) (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) (hy : ∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) (g : Fin r), M.localMeasure t g (representative t y hy g) = y g) :
      (Polynomial.taylorJet (fun (t : Fin Q) => ↑(M.nodes t)) J) (M.targetPoly Φ) = fun (p : Fin Q × Fin J) => M.measurementFiberJet Φ q p.1 (representative p.1) ↑p.2

      When J ≤ q + 1, the order-J Taylor jet Polynomial.taylorJet of M.targetPoly Φ at M.nodes agrees entrywise with M.measurementFiberJet Φ q.

      theorem Cslib.ReplacementCounting.Design.targetSum_eq_of_measurementFiberJet {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) (A : Type u_4) [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) {d J q : ℕ} (hd : (liftedFactorProduct s Φ).totalDegree ≤ d) (hJ : 0 < J) (hQJ : d * R < Q * J) (hJq : J ≤ q + 1) (representative : (t : Fin Q) → (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) → (∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) → (g : Fin r) → M.LocalCube t g) (valid : ∀ (t : Fin Q) (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) (hy : ∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) (g : Fin r), M.localMeasure t g (representative t y hy g) = y g) :
      targetSum s scope Φ = (↑(Polynomial.hermiteMatrix M.nodes J).det)⁻¹ • (((Polynomial.hermiteMatrix M.nodes J).map Int.cast).updateCol (⟨0, ⋯⟩, ⟨0, hJ⟩) fun (p : Fin Q × Fin J) => M.measurementFiberJet Φ q p.1 (representative p.1) ↑p.2).det

      Proposition 3.4 complete algebraic recovery of targetSum from measurement-fiber Taylor jets ([OAI26c], §§3.4–3.5, pp. 24–25): whenever (liftedFactorProduct s Φ).totalDegree ≤ d, 0 < J, d * R < Q * J, and J ≤ q + 1, targetSum s scope Φ equals the Hermite determinant formed from M.measurementFiberJet Φ q.

      theorem Cslib.ReplacementCounting.Design.targetSum_eq_of_measurementFiberJet_jetOrder {ι : Type u_1} {F : Type u_2} [Fintype ι] [DecidableEq ι] {s : Finset F} {κ : F → Type u_3} {scope : (f : F) → κ f → ι} {r Q R D : ℕ} {τ : ℝ} (M : Design ι s κ scope r Q R D τ) (A : Type u_4) [CommRing A] [Algebra ℚ A] (Φ : (f : F) → MvPolynomial (κ f) A) {d : ℕ} (hd : (liftedFactorProduct s Φ).totalDegree ≤ d) (representative : (t : Fin Q) → (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) → (∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) → (g : Fin r) → M.LocalCube t g) (valid : ∀ (t : Fin Q) (y : (g : Fin r) → Fin (M.numRows t g) → ℤ) (hy : ∀ (g : Fin r), ∃ (u : M.LocalCube t g), M.localMeasure t g u = y g) (g : Fin r), M.localMeasure t g (representative t y hy g) = y g) :
      targetSum s scope Φ = (↑(Polynomial.hermiteMatrix M.nodes (jetOrder (d * R) Q)).det)⁻¹ • (((Polynomial.hermiteMatrix M.nodes (jetOrder (d * R) Q)).map Int.cast).updateCol (⟨0, ⋯⟩, ⟨0, ⋯⟩) fun (p : Fin Q × Fin (jetOrder (d * R) Q)) => M.measurementFiberJet Φ (d * R / Q) p.1 (representative p.1) ↑p.2).det

      Specialization of targetSum_eq_of_measurementFiberJet to the canonical truncation order q = (d * R) / Q and jet order J = jetOrder (d * R) Q = (d * R) / Q + 1 ([OAI26c], equation (3.5) and Proposition 3.4, pp. 24–25).

      2. §5.4 & Appendix B.2–B.3 Taylor-shift commutation, JetTable bridge, and unconditional #

      Hermite–Cramer recovery

      3.1 Taylor-shift commutation with cleared parity polynomials #

      theorem Cslib.BitString.taylor_clearedMonomialPoly {ι : Type u_1} (t d_den : ℤ) (k : ℕ) (θ : ι → Polynomial ℤ) (M : Finset ι) :
      (Polynomial.taylor t) (clearedMonomialPoly d_den k θ M) = clearedMonomialPoly d_den k (fun (v : ι) => (Polynomial.taylor t) (θ v)) M

      Polynomial.taylor t commutes with clearedMonomialPoly by Taylor-shifting each factor θ v.

      theorem Cslib.BitString.taylor_clearedMonomialSumPoly {ι : Type u_1} (t d_den : ℤ) (k : ℕ) (θ : ι → Polynomial ℤ) (𝓜 : Finset (Finset ι)) :
      (Polynomial.taylor t) (clearedMonomialSumPoly d_den k θ 𝓜) = clearedMonomialSumPoly d_den k (fun (v : ι) => (Polynomial.taylor t) (θ v)) 𝓜

      Polynomial.taylor t commutes with clearedMonomialSumPoly by Taylor-shifting each factor θ v.

      Mapping parityFactorCleared ℓ (Polynomial.C Δ) A_i by (Polynomial.taylorAlgHom t).toRingHom shifts A_i by Polynomial.taylor t.

      theorem Cslib.BitString.taylor_univariateClearedParityCoord {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) (t d_den : ℤ) (k ℓ : ℕ) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) (s : ℕ) :
      (Polynomial.taylor t) (univariateClearedParityCoord I P d_den k ℓ θ s) = univariateClearedParityCoord I P d_den k ℓ (fun (x : ι → Bool) (i : κ) (v : ι) => (Polynomial.taylor t) (θ x i v)) s

      Polynomial.taylor t commutes with univariateClearedParityCoord by Taylor-shifting each numerator polynomial θ x i v.

      theorem Cslib.BitString.taylor_univariateClearedParityTruncatedSum {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) (t d_den : ℤ) (k ℓ : ℕ) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) :
      (Polynomial.taylor t) (univariateClearedParityTruncatedSum I P d_den k ℓ θ) = univariateClearedParityTruncatedSum I P d_den k ℓ fun (x : ι → Bool) (i : κ) (v : ι) => (Polynomial.taylor t) (θ x i v)

      Polynomial.taylor t commutes with univariateClearedParityTruncatedSum by Taylor-shifting each numerator polynomial θ x i v.

      3.2 Exact correspondence with JetTable staged operations (Appendix B.2) #

      theorem Cslib.BitString.ofPolyZ_clearedMonomialPoly {ι : Type u_1} (J ℓ : ℕ) (d_den : ℤ) (k : ℕ) (θ : ι → Polynomial ℤ) (M : Finset ι) :
      (JetTable.ofPolyZ J ℓ) (clearedMonomialPoly d_den k θ M) = JetTable.clearedMonomialJet d_den k (fun (v : ι) => (JetTable.ofPolyZ J ℓ) (θ v)) M

      JetTable.ofPolyZ J ℓ maps clearedMonomialPoly d_den k θ M to JetTable.clearedMonomialJet d_den k (fun v => JetTable.ofPolyZ J ℓ (θ v)) M.

      theorem Cslib.BitString.ofPolyZ_clearedMonomialSumPoly {ι : Type u_1} (J ℓ : ℕ) (d_den : ℤ) (k : ℕ) (θ : ι → Polynomial ℤ) (𝓜 : Finset (Finset ι)) :
      (JetTable.ofPolyZ J ℓ) (clearedMonomialSumPoly d_den k θ 𝓜) = JetTable.clearedMonomialSumJet d_den k (fun (v : ι) => (JetTable.ofPolyZ J ℓ) (θ v)) 𝓜 id

      JetTable.ofPolyZ J ℓ maps clearedMonomialSumPoly d_den k θ 𝓜 to JetTable.clearedMonomialSumJet d_den k (fun v => JetTable.ofPolyZ J ℓ (θ v)) 𝓜 id.

      JetTable.ofPolyVPolyZ J ℓ maps parityFactorCleared ℓ (Polynomial.C Δ) A_i to JetTable.clearedParityFactorJet Δ (JetTable.ofPolyZ J ℓ A_i) with coefficients from Polynomial.parityBaseDigit ℓ.

      noncomputable def Cslib.BitString.clearedParityJetTable {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) (d_den : ℤ) (k ℓ J : ℕ) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) (t : ℤ) :

      The (J × ℓ) integer Taylor-jet table at evaluation point t : ℤ constructed from the Stage-1 and Stage-2 JetTable operations (JetTable.clearedMonomialSumJet and JetTable.clearedParityFactorJet) of StagedJetArithmetic ([OAI26c], Appendix B.2, pp. 48–49).

      Instances For
        theorem Cslib.BitString.clearedParityJetTable_apply {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) (d_den : ℤ) (k ℓ J : ℕ) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) (t : ℤ) (j : Fin J) (s : Fin ℓ) :
        clearedParityJetTable I P d_den k ℓ J θ t j s = ((Polynomial.taylor t) (univariateClearedParityCoord I P d_den k ℓ θ ↑s)).coeff ↑j

        Appendix B.2 JetTable Taylor-jet identity: at every jet order j : Fin J and V-degree s : Fin ℓ, clearedParityJetTable I P d_den k ℓ J θ t j s equals the j-th Taylor coefficient of univariateClearedParityCoord I P d_den k ℓ θ s at t.

        3.3 Unconditional Hermite–Cramer determinant recovery (Appendix B.3, eq. B.1) #

        theorem Cslib.BitString.hermiteCramerNumerator_intPoly_eq_mul {Q J : ℕ} (nodes : Fin Q → ℤ) (hQ : 0 < Q) (hJ : 0 < J) {p : Polynomial ℤ} (hdeg : p.natDegree < Q * J) :
        (hermiteCramerNumerator nodes hQ hJ fun (i : Fin Q) (j : Fin J) => ((Polynomial.taylor (nodes i)) p).coeff ↑j) = (Polynomial.hermiteMatrix nodes J).det * Polynomial.eval 0 p

        Integer Cramer factorization for ℤ[X] (Appendix B.3, eq. B.1, p. 50): for any integer polynomial p : Polynomial ℤ with p.natDegree < Q * J, replacing column (0, 0) of Polynomial.hermiteMatrix nodes J with the order-J Taylor jet of p at nodes yields a determinant equal to (Polynomial.hermiteMatrix nodes J).det * p.eval 0.

        theorem Cslib.BitString.hermiteCramerNumerator_intPoly_ediv_eq {Q J : ℕ} {nodes : Fin Q → ℤ} (hnodes : Function.Injective nodes) (hQ : 0 < Q) (hJ : 0 < J) {p : Polynomial ℤ} (hdeg : p.natDegree < Q * J) :
        (hermiteCramerNumerator nodes hQ hJ fun (i : Fin Q) (j : Fin J) => ((Polynomial.taylor (nodes i)) p).coeff ↑j) / (Polynomial.hermiteMatrix nodes J).det = Polynomial.eval 0 p

        Exact integer Cramer quotient for ℤ[X]: at distinct integer nodes nodes : Fin Q → ℤ, dividing hermiteCramerNumerator of p's order-J Taylor jet by (Polynomial.hermiteMatrix nodes J).det recovers p.eval 0.

        theorem Cslib.BitString.hermiteCramerNumerator_univariateClearedParityCoord_eq_mul {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) (d_den : ℤ) {k ℓ R_deg Q J s : ℕ} (nodes : Fin Q → ℤ) (hQ : 0 < Q) (hJ : 0 < J) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) (hk : ∀ i ∈ I, ∀ M ∈ P i, M.card ≤ k) (hθ : ∀ (x : ι → Bool), ∀ i ∈ I, ∀ M ∈ P i, ∀ v ∈ M, (θ x i v).natDegree ≤ R_deg) (hQJ : k * R_deg * (I.card + 2 * (ℓ - 1)) < Q * J) (hs : s < ℓ) :
        (hermiteCramerNumerator nodes hQ hJ fun (t : Fin Q) (j : Fin J) => ((Polynomial.taylor (nodes t)) (univariateClearedParityCoord I P d_den k ℓ θ s)).coeff ↑j) = (Polynomial.hermiteMatrix nodes J).det * Polynomial.eval 0 (univariateClearedParityCoord I P d_den k ℓ θ s)

        Cramer numerator factorization for univariateClearedParityCoord (Appendix B.3, eq. B.1): when (k * R_deg) * (#I + 2 * (ℓ - 1)) < Q * J, the Cramer determinant of the order-J Taylor jet of univariateClearedParityCoord I P d_den k ℓ θ s (s < ℓ) at nodes equals (Polynomial.hermiteMatrix nodes J).det * (univariateClearedParityCoord I P d_den k ℓ θ s).eval 0.

        theorem Cslib.BitString.hermiteCramerNumerator_univariateClearedParityTruncatedSum_eq_mul {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) (d_den : ℤ) {k ℓ R_deg Q J : ℕ} (nodes : Fin Q → ℤ) (hQ : 0 < Q) (hJ : 0 < J) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) (hk : ∀ i ∈ I, ∀ M ∈ P i, M.card ≤ k) (hθ : ∀ (x : ι → Bool), ∀ i ∈ I, ∀ M ∈ P i, ∀ v ∈ M, (θ x i v).natDegree ≤ R_deg) (hQJ : k * R_deg * (I.card + 2 * (ℓ - 1)) < Q * J) :
        (hermiteCramerNumerator nodes hQ hJ fun (t : Fin Q) (j : Fin J) => ((Polynomial.taylor (nodes t)) (univariateClearedParityTruncatedSum I P d_den k ℓ θ)).coeff ↑j) = (Polynomial.hermiteMatrix nodes J).det * Polynomial.eval 0 (univariateClearedParityTruncatedSum I P d_den k ℓ θ)

        Cramer numerator factorization for univariateClearedParityTruncatedSum (Appendix B.3, eq. B.1): under the same degree bound, the Cramer determinant of the order-J Taylor jet of univariateClearedParityTruncatedSum I P d_den k ℓ θ at nodes equals (Polynomial.hermiteMatrix nodes J).det * (univariateClearedParityTruncatedSum I P d_den k ℓ θ).eval 0.

        theorem Cslib.BitString.emod_sum_hermiteCramerNumerator_ediv_eq_commonZeroCount {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) {d_den : ℤ} (hd : d_den ≠ 0) {k ℓ R_deg Q J : ℕ} {nodes : Fin Q → ℤ} (hnodes : Function.Injective nodes) (hQ : 0 < Q) (hJ : 0 < J) (hℓ : Fintype.card ι < ℓ) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) (hk : ∀ i ∈ I, ∀ M ∈ P i, M.card ≤ k) (hdeg : ∀ (x : ι → Bool), ∀ i ∈ I, ∀ M ∈ P i, ∀ v ∈ M, (θ x i v).natDegree ≤ R_deg) (hθ : ∀ (x : ι → Bool), ∀ i ∈ I, ∀ M ∈ P i, ∀ v ∈ M, Polynomial.eval 0 (θ x i v) = d_den * bitVal ℤ (x v)) (hQJ : k * R_deg * (I.card + 2 * (ℓ - 1)) < Q * J) :
        (∑ s ∈ Finset.range ℓ, (hermiteCramerNumerator nodes hQ hJ fun (t : Fin Q) (j : Fin J) => ((Polynomial.taylor (nodes t)) (univariateClearedParityCoord I P d_den k ℓ θ s)).coeff ↑j) / (clearedProductDenom d_den k ℓ I.card * (Polynomial.hermiteMatrix nodes J).det)) % 2 ^ ℓ = ↑(commonZeroCount I P)

        Unconditional Hermite–Cramer coordinate recovery of commonZeroCount (Appendix B.3, eq. B.1, p. 50): at distinct integer nodes nodes : Fin Q → ℤ with (k * R_deg) * (#I + 2 * (ℓ - 1)) < Q * J, d_den ≠ 0, and Fintype.card ι < ℓ, summing the exact integer Cramer quotients over s ∈ range ℓ and reducing modulo 2 ^ ℓ recovers commonZeroCount I P without auxiliary D_H or hcramer hypotheses.

        theorem Cslib.BitString.emod_hermiteCramerNumerator_truncatedSum_ediv_eq_commonZeroCount {ι : Type u_1} {κ : Type u_2} [Fintype ι] [DecidableEq ι] (I : Finset κ) (P : κ → Finset (Finset ι)) {d_den : ℤ} (hd : d_den ≠ 0) {k ℓ R_deg Q J : ℕ} {nodes : Fin Q → ℤ} (hnodes : Function.Injective nodes) (hQ : 0 < Q) (hJ : 0 < J) (hℓ : Fintype.card ι < ℓ) (θ : (ι → Bool) → κ → ι → Polynomial ℤ) (hk : ∀ i ∈ I, ∀ M ∈ P i, M.card ≤ k) (hdeg : ∀ (x : ι → Bool), ∀ i ∈ I, ∀ M ∈ P i, ∀ v ∈ M, (θ x i v).natDegree ≤ R_deg) (hθ : ∀ (x : ι → Bool), ∀ i ∈ I, ∀ M ∈ P i, ∀ v ∈ M, Polynomial.eval 0 (θ x i v) = d_den * bitVal ℤ (x v)) (hQJ : k * R_deg * (I.card + 2 * (ℓ - 1)) < Q * J) :
        (hermiteCramerNumerator nodes hQ hJ fun (t : Fin Q) (j : Fin J) => ((Polynomial.taylor (nodes t)) (univariateClearedParityTruncatedSum I P d_den k ℓ θ)).coeff ↑j) / (clearedProductDenom d_den k ℓ I.card * (Polynomial.hermiteMatrix nodes J).det) % 2 ^ ℓ = ↑(commonZeroCount I P)

        Unconditional Hermite–Cramer truncated-sum recovery of commonZeroCount (Appendix B.3, eq. B.1, p. 50): under the same hypotheses, dividing the single Cramer determinant of univariateClearedParityTruncatedSum I P d_den k ℓ θ by clearedProductDenom d_den k ℓ #I * (Polynomial.hermiteMatrix nodes J).det and reducing modulo 2 ^ ℓ recovers commonZeroCount I P.

        3.4 Canonical jet order and concrete ReplacementDesign Hermite–Cramer recovery #

        Canonical confluent Taylor jet order J = ⌊(k * (R - 1)) * (m_eq + 2 * (ℓ - 1)) / Q⌋ + 1 for a degree-≤ k sparse parity system of m_eq equations at precision ℓ under a Section 4 ReplacementDesign with degree bound R - 1 and Q evaluation nodes ([OAI26c], equations (3.5) and (5.5), pp. 24, 37).

        Instances For
          theorem Cslib.BitString.sparseParityJetOrder_pos (k R Q m_eq ℓ : ℕ) :
          0 < sparseParityJetOrder k R Q m_eq ℓ

          sparseParityJetOrder is always positive.

          theorem Cslib.BitString.lt_mul_sparseParityJetOrder (k R m_eq ℓ : ℕ) {Q : ℕ} (hQ : 0 < Q) :
          k * (R - 1) * (m_eq + 2 * (ℓ - 1)) < Q * sparseParityJetOrder k R Q m_eq ℓ

          When 0 < Q, Q * sparseParityJetOrder k R Q m_eq ℓ strictly exceeds the equation (5.5) degree bound (k * (R - 1)) * (m_eq + 2 * (ℓ - 1)).

          theorem Cslib.BitString.emod_sum_hermiteCramerNumerator_design_eq_commonZeroCount {κ : Type u_2} {n Q r A₀ R : ℕ} {τ : ℚ} {F : Type u_3} [Fintype F] {scope : F → Finset (Fin n)} (D : LinearAlgebra.ReplacementDesign scope Q r A₀ R τ) (emb : κ → F) (I : Finset κ) (P : κ → Finset (Finset (Fin n))) {k ℓ J : ℕ} (hQ : 0 < Q) (hJ : 0 < J) (hℓ : n < ℓ) (hk : ∀ i ∈ I, ∀ M ∈ P i, M.card ≤ k) (hQJ : k * (R - 1) * (I.card + 2 * (ℓ - 1)) < Q * J) :

          Concrete ReplacementDesign Hermite–Cramer coordinate recovery of commonZeroCount (§5.4 & Appendix B.3, eq. B.1): for any D : ReplacementDesign scope Q r A₀ R τ with 0 < Q, n < ℓ, ∀ i ∈ I, ∀ M ∈ P i, #M ≤ k, and (k * (R - 1)) * (#I + 2 * (ℓ - 1)) < Q * J (in particular for J = sparseParityJetOrder k R Q #I ℓ), summing the concrete hermiteCramerNumerator quotients at nodeInt over s ∈ range ℓ and reducing modulo 2 ^ ℓ recovers commonZeroCount I P (discharging D_H ≠ 0 and hcramer of emod_sum_cramer_ediv_design_eq_commonZeroCount unconditionally).

          theorem Cslib.BitString.emod_hermiteCramerNumerator_truncatedSum_design_eq_commonZeroCount {κ : Type u_2} {n Q r A₀ R : ℕ} {τ : ℚ} {F : Type u_3} [Fintype F] {scope : F → Finset (Fin n)} (D : LinearAlgebra.ReplacementDesign scope Q r A₀ R τ) (emb : κ → F) (I : Finset κ) (P : κ → Finset (Finset (Fin n))) {k ℓ J : ℕ} (hQ : 0 < Q) (hJ : 0 < J) (hℓ : n < ℓ) (hk : ∀ i ∈ I, ∀ M ∈ P i, M.card ≤ k) (hQJ : k * (R - 1) * (I.card + 2 * (ℓ - 1)) < Q * J) :

          Concrete ReplacementDesign Hermite–Cramer truncated-sum recovery of commonZeroCount (§5.4 & Appendix B.3, eq. B.1): under the same hypotheses, dividing the single Cramer determinant of univariateClearedParityTruncatedSum at nodeInt by clearedProductDenom (commonDenom Q R : ℤ) k ℓ #I * (Polynomial.hermiteMatrix nodeInt J).det and reducing modulo 2 ^ ℓ recovers commonZeroCount I P.

          theorem Cslib.BitString.commonZeroCount_eq_sum_branch_hermiteCramerNumerator_design {κ : Type u_2} {n n' Q r A₀ R : ℕ} {τ : ℚ} {F : Type u_3} [Fintype F] (S : Finset (Fin n)) (e : ↥(Finset.univ \ S) ≃ Fin n') (I : Finset κ) (P : κ → Finset (Finset (Fin n))) {k : ℕ} (scope : (Fin n → Bool) → F → Finset (Fin n')) (D : (b : Fin n → Bool) → LinearAlgebra.ReplacementDesign (scope b) Q r A₀ R τ) (emb : (Fin n → Bool) → κ → F) (hQ : 0 < Q) (hk : ∀ i ∈ I, ∀ M ∈ P i, M.card ≤ k) :

          §5.5 & Appendix B.3 branch-summed concrete Hermite–Cramer recovery of commonZeroCount at shared precision $\ell = n + 1$ and canonical jet order sparseParityJetOrder: given a heavy-variable subset S : Finset (Fin n), a free-variable relabeling e : ↥(univ \ S) ≃ Fin n', and a per-branch ReplacementDesign family D b (0 < Q), summing the branch modular residues of the concrete hermiteCramerNumerator quotients at nodeInt and jet order J = sparseParityJetOrder k R Q #I (branchPrecision n) across b ∈ branchAssignments S recovers commonZeroCount I P.