Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorNetwork.TaperedRecovery

Tapered Hermite recovery with finite precision #

This file finishes Lemma D.5 of [OAI26k] (§D.4.4, pp. 60–61): the value F(0) modulo 2 ^ p is recovered from the local jets of F(t + α z) modulo 2 ^ p_t.

Setting. Let K be a ℚ-algebra and B a subring of K containing ℤ_(2), the rationals with odd denominator (in the manuscript, K = ℚ[U] / (f) and B = O). The nodes are the nonzero points t of the grid S = [-L, L) of L = 2 ^ a slots (recoveryNodes), with the tapered multiplicities q_t = h max(0, u - v₂ t) (taperMult), and α = 2 ^ (a + 1). From polynomials G t ∈ K[z], the recovered value (taperedRecovery) is the right side of (D.9),

∑_t E_t(0) (G t / E_t(t + α z) mod z ^ q_t)(-t / α),

with the Hermite basis E_t and quotient of Polynomial.eval_eq_sum_hermiteBasis_mul_hermiteQuotient. For G t = F(t + α z) and deg F < ∑_t q_t it is F(0) (eval_zero_eq_taperedRecovery), the manuscript's (D.9).

Precision. Each E_t(t + α z) is a product of powers of 1 + α z / (t - q), so it has coefficients in ℤ_(2) and constant term one, and so has the inverse power series (hermiteBasis_comp_eq_map, coeff_invOfUnit_hermiteBasis_comp_mem). The quotient of a jet that is divisible by 2 ^ p_t is therefore divisible by 2 ^ p_t. Evaluating a polynomial of degree at most q_t at -t / α multiplies by rationals of valuation at least -q_t (a + 1), and E_t(0) has valuation at least -6 h D_t with D_t = 2 ^ (a - v₂ t) ((D.10), Polynomial.neg_le_padicValRat_eval_zero_hermiteBasis_taper). So if the jets G t agree with F(t + α z) modulo 2 ^ p_t below z ^ q_t, where p + 6 h D_t + q_t (a + 1) ≤ p_t, the recovered value agrees with F(0) modulo 2 ^ p (exists_taperedRecovery_eq_add). The manuscript's choice p_t = p + 8 h D_t + 8 M (a + 1) satisfies this when q_t ≤ 4 M (taperMult_le); the manuscript's multiplicities have enough total weight (le_sum_taperMult).

Congruences are stated in K as x = y + 2 ^ p * b with b ∈ B.

Main definitions #

Main results #

References #

Nodes and multiplicities #

The nodes of tapered Hermite recovery: the nonzero points of the grid of 2 ^ a slots.

noncomputable def Cslib.Circuits.Frontier.taperMult (u h : ℕ) (t : ℤ) :

The tapered multiplicity q_t = h max(0, u - v₂ t) of Lemma D.5, with natural subtraction.

The grid of 2 ^ a slots is [-2 ^ a, 2 ^ a).

theorem Cslib.Circuits.Frontier.le_sum_taperMult (a u h : ℕ) :
2 ^ a * (h * u) ≤ ∑ t ∈ recoveryNodes a, taperMult u h t

There is enough multiplicity. The 2 ^ a odd nodes have multiplicity h u each.

theorem Cslib.Circuits.Frontier.taperMult_le {u h M : ℕ} (hh : h * u ≤ 3 * M + u) (huM : u ≤ M) (t : ℤ) :
taperMult u h t ≤ 4 * M

Multiplicities are at most 4 M when h = ⌈3 M / u⌉ (any h ≤ 3 M / u + 1) and u ≤ M.

The recovered value #

noncomputable def Cslib.Circuits.Frontier.taperedRecovery {K : Type u_1} [CommRing K] [Algebra ℚ K] (a u h : ℕ) (G : ℤ → Polynomial K) :
K

The value recovered by tapered Hermite interpolation from the polynomials G t: the right side of (D.9) of [OAI26k], ∑_t E_t(0) (G t / E_t(t + α z) mod z ^ q_t)(-t / α) over the nonzero grid points t, with α = 2 ^ (a + 1). Only the first q_t coefficients of G t matter (Polynomial.hermiteQuotient_trunc).

theorem Cslib.Circuits.Frontier.taperedRecovery_def {K : Type u_1} [CommRing K] [Algebra ℚ K] (a u h : ℕ) (G : ℤ → Polynomial K) :
taperedRecovery a u h G = ∑ t ∈ recoveryNodes a, Polynomial.eval 0 (Polynomial.hermiteBasis (recoveryNodes a) (fun (q : ℤ) => ↑q) (taperMult u h) t) * Polynomial.eval ((algebraMap ℚ K) (-↑t / 2 ^ (a + 1))) (Polynomial.hermiteQuotient (recoveryNodes a) (fun (q : ℤ) => ↑q) (taperMult u h) (2 ^ (a + 1)) t ↑(G t))
theorem Cslib.Circuits.Frontier.pairwise_isUnit_sub {K : Type u_1} [CommRing K] [Algebra ℚ K] (s : Finset ℤ) :
(↑s).Pairwise fun (i j : ℤ) => IsUnit (↑i - ↑j)

Distinct integers are units of a ℚ-algebra apart.

theorem Cslib.Circuits.Frontier.eval_zero_eq_taperedRecovery {K : Type u_1} [CommRing K] [Algebra ℚ K] {a u h : ℕ} {F : Polynomial K} (hF : F.degree < ↑(∑ t ∈ recoveryNodes a, taperMult u h t)) :
Polynomial.eval 0 F = taperedRecovery a u h fun (t : ℤ) => F.comp (Polynomial.C ↑t + Polynomial.C (2 ^ (a + 1)) * Polynomial.X)

Hermite reconstruction (D.9) of [OAI26k]: for deg F < ∑_t q_t, the recovered value from the local polynomials F(t + α z) is F(0).

Integrality of the Hermite basis in local coordinates #

theorem Cslib.Circuits.Frontier.padicValuation_two_pow_div_le_one {a : ℕ} {t q : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hq : q ∈ cauchyGrid (2 ^ a)) (hne : q ≠ t) :
(Rat.padicValuation 2) (2 ^ (a + 1) / (↑t - ↑q)) ≤ 1

The rationals α / (t - q) with t ≠ q on the grid, α = 2 ^ (a + 1), lie in ℤ_(2).

theorem Cslib.Circuits.Frontier.hermiteBasis_comp_rat (a u h : ℕ) (t : ℤ) :
(Polynomial.hermiteBasis (recoveryNodes a) (fun (q : ℤ) => ↑q) (taperMult u h) t).comp (Polynomial.C ↑t + Polynomial.C (2 ^ (a + 1)) * Polynomial.X) = ∏ q ∈ (recoveryNodes a).erase t, (1 + Polynomial.C (2 ^ (a + 1) / (↑t - ↑q)) * Polynomial.X) ^ taperMult u h q

The Hermite basis over ℚ in local coordinates is a product of powers of 1 + α / (t - q) z.

Lemma D.5, integrality. For a nonzero grid point t, the Hermite basis polynomial in local coordinates, E_t(t + α z), is the image of a polynomial over ℤ_(2) with constant term one: each factor is a power of 1 + α z / (t - q) with α / (t - q) in ℤ_(2).

Congruences modulo powers of two #

The value of E_t(0) in K is the image of the rational one.

E_t(0) ≠ 0: its factors are -q / (t - q) with q ≠ 0.

theorem Cslib.Circuits.Frontier.exists_taperedRecovery_eq_add {K : Type u_1} [CommRing K] [Algebra ℚ K] (B : Subring K) (hB : ∀ c ∈ (Rat.padicValuation 2).integer, (algebraMap ℚ K) c ∈ B) {a u h p : ℕ} (pt : ℤ → ℕ) (hpt : ∀ t ∈ recoveryNodes a, p + 6 * h * 2 ^ (a - padicValInt 2 t) + taperMult u h t * (a + 1) ≤ pt t) {F : Polynomial K} (hF : F.degree < ↑(∑ t ∈ recoveryNodes a, taperMult u h t)) (G : ℤ → Polynomial K) (hG : ∀ t ∈ recoveryNodes a, ∀ j < taperMult u h t, ∃ b ∈ B, (G t).coeff j = (F.comp (Polynomial.C ↑t + Polynomial.C (2 ^ (a + 1)) * Polynomial.X)).coeff j + 2 ^ pt t * b) :
∃ b ∈ B, taperedRecovery a u h G = Polynomial.eval 0 F + 2 ^ p * b

Lemma D.5, precision ([OAI26k], §D.4.4, pp. 60–61). Let B be a subring of the ℚ-algebra K containing ℤ_(2), and let F ∈ K[T] have degree below the total multiplicity ∑_t q_t. Suppose that at every nonzero grid point t the polynomial G t agrees with F(t + α z) modulo 2 ^ p_t below z ^ q_t, where p + 6 h D_t + q_t (a + 1) ≤ p_t and D_t = 2 ^ (a - v₂ t). Then the recovered value agrees with F(0) modulo 2 ^ p.

theorem Cslib.Circuits.Frontier.exists_taperedRecovery_eq_add_of_params {K : Type u_1} [CommRing K] [Algebra ℚ K] (B : Subring K) (hB : ∀ c ∈ (Rat.padicValuation 2).integer, (algebraMap ℚ K) c ∈ B) {a u h p M : ℕ} (hu : 1 ≤ u) (huM : u ≤ M) (hh : 3 * M ≤ h * u) (hh' : h * u ≤ 3 * M + u) {F : Polynomial K} (hF : F.natDegree ≤ M * (2 * 2 ^ a - 1)) (G : ℤ → Polynomial K) (hG : ∀ t ∈ recoveryNodes a, ∀ j < taperMult u h t, ∃ b ∈ B, (G t).coeff j = (F.comp (Polynomial.C ↑t + Polynomial.C (2 ^ (a + 1)) * Polynomial.X)).coeff j + 2 ^ (p + 8 * h * 2 ^ (a - padicValInt 2 t) + 8 * M * (a + 1)) * b) :
∃ b ∈ B, taperedRecovery a u h G = Polynomial.eval 0 F + 2 ^ p * b

Lemma D.5 with the manuscript's parameters. Let 1 ≤ u ≤ M, let h satisfy 3 M ≤ h u ≤ 3 M + u (as h = ⌈3 M / u⌉ does), and let F have degree at most M (2 L - 1), L = 2 ^ a. If the jets G t agree with F(t + α z) modulo 2 ^ p_t below z ^ q_t, with p_t = p + 8 h D_t + 8 M (a + 1), then the recovered value agrees with F(0) modulo 2 ^ p.