Exact integer convolution from approximate DFTs (Harvey–van der Hoeven §5.3)
ProvedIntMul.HvdH.exactConv_eqLet be coprime for with , , and let satisfy the precision conditions of Theorem 4.1 (thm_4_1_fp). Let be any fixed-point oracle for the normalised DFT on the box (dftBox): for inputs in the disc of radius its in-box outputs lie in the disc and are within of . Let be integer arrays with , .
The algorithm exactConv scales to fixed point and applies (Gaussian resampling, Theorem 4.1) to both. It multiplies the results pointwise, applies to the conjugate, and rescales by () with rounding to the nearest integer. Put , where and are the errors of Theorem 4.1. If
then at every index of the box the output equals the exact cyclic convolution
This is the correctness half of the recursive step of Harvey–van der Hoeven (Proposition 5.4), with the power-of-two transform left as a hypothesis. It can be discharged by Theorem 3.1 or by Bluestein's reduction (bluestein_fp) to any convolution routine.
import Definitions.Def_IntMul_HvdH_ExactConv
namespace IntMul.HvdH
theorem exactConv_eq {d : ℕ} (p α b : ℕ) (s t : Fin d → ℕ) [∀ i, NeZero (s i)] [∀ i, NeZero (t i)]
(hst : ∀ i, s i < t i) (hcop : ∀ i, Nat.Coprime (s i) (t i))
(hα : 2 ≤ α) (hαp : α ^ 2 ≤ p) (hx : ∀ i, s i ≤ α ^ 2 * (t i - s i))
(hp : ∀ i, 100 * (jIter p (s i) (t i) α * (10 * eWidth p α + 12) + 1) ≤ 2 ^ p)
(hpA : 4 * (6 * sWidth p α + 4) ≤ 2 ^ p)
(Ft : ((Fin d → ℕ) → ℤ × ℤ) → ((Fin d → ℕ) → ℤ × ℤ)) (εF : ℝ)
(hFt : ∀ U : (Fin d → ℕ) → ℤ × ℤ, InDisc p U → ∀ j : Fin d → ℕ, (∀ i, j i < t i) →
‖gC (Ft U j)‖ ≤ 2 ^ p ∧
‖gC (Ft U j) - 2 ^ p * dftBox t (fun x => gC (U x) / 2 ^ p) j‖ ≤ εF)
(hb : b ≤ p) (u v : (Fin d → ℕ) → ℤ) (hu : ∀ x, |u x| < 2 ^ b) (hv : ∀ x, |v x| < 2 ^ b)
(hprec : 2 * (3 * ((∑ _i : Fin d, (6 * sWidth p α + 4 : ℝ)) + εF +
∑ i, ((jIter p (s i) (t i) α : ℝ) * (10 * eWidth p α + 12) + 4)) + 2) *
((∏ i, s i : ℕ) : ℝ) ^ 2 * 2 ^ (2 * b + 6 * d * α ^ 2) < 2 ^ p) :
∀ j : Fin d → ℕ, (∀ i, j i < s i) → exactConv p α b s t Ft u v j = convBox s u v j := by sorry
end IntMul.HvdH