Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Fixed-point numerical approximations of linear maps on Gaussian-integer arrays (Harvey–van der Hoeven §2.6–2.7)

Definition
IntMul_HvdH_FPApprox

by xuanji · Oct 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

integer-multiplication

Fixed-point arrays and their error calculus, following Harvey–van der Hoeven §2.6–2.7. At precision ppp, an array U:ι→Z[i]U:\iota\to\mathbb Z[i]U:ι→Z[i] stands for 2−pU:ι→C2^{-p}U:\iota\to\mathbb C2−pU:ι→C.

  • gC z is the Gaussian integer z=(a,b)z=(a,b)z=(a,b) viewed as a+bi∈Ca+bi\in\mathbb Ca+bi∈C.
  • InDisc p U means every entry satisfies ∣Ui∣≤2p|U_i|\le2^p∣Ui​∣≤2p, i.e. 2−pU2^{-p}U2−pU lies in the closed unit polydisc C~∘\tilde{\mathbb C}^\circC~∘.
  • FPApprox p à A ε says that A~\tilde AA~ maps the polydisc to itself and ∣A~(U)k−2pA(2−pU)k∣≤ε|\tilde A(U)_k-2^pA(2^{-p}U)_k|\le\varepsilon∣A~(U)k​−2pA(2−pU)k​∣≤ε for every such UUU. This is the paper's ε(A~)≤ε\varepsilon(\tilde A)\le\varepsilonε(A~)≤ε.
  • SupLip A means AAA is 111-Lipschitz for the sup norm. For linear maps this is ∥A∥≤1\|A\|\le1∥A∥≤1.
  • sliceMapZ, sliceCompZ and tensorMapZ apply one-dimensional integer maps slice by slice to ddd-dimensional arrays. They mirror sliceMap, sliceComp and tensorMap from IntMul_HvdH_SliceTensor.
Definition code
import Definitions.Def_IntMul_HvdH_SliceTensor

/-! Fixed-point numerical approximations of linear maps (Harvey–van der Hoeven §2.6–2.7) on
arrays of Gaussian integers `(re, im) : ℤ × ℤ`. At precision `p`, an array `U : ι → ℤ × ℤ`
stands for `2^{-p} U : ι → ℂ`. -/

namespace IntMul.HvdH

/-- A Gaussian integer as a complex number. -/
noncomputable def gC (z : ℤ × ℤ) : ℂ := (z.1 : ℂ) + (z.2 : ℂ) * Complex.I

/-- `2^{-p} U` lies in the closed unit polydisc. -/
def InDisc {ι : Type*} (p : ℕ) (U : ι → ℤ × ℤ) : Prop := ∀ i, ‖gC (U i)‖ ≤ 2 ^ p

/-- `Aa` is a numerical approximation of `A` at precision `p` with error `ε`: it maps the unit
polydisc to itself, and `|Aa U - 2^p A(2^{-p} U)| ≤ ε` entrywise. -/
def FPApprox {ι κ : Type*} (p : ℕ) (Aa : (ι → ℤ × ℤ) → (κ → ℤ × ℤ)) (A : (ι → ℂ) → (κ → ℂ))
    (ε : ℝ) : Prop :=
  ∀ U, InDisc p U → InDisc p (Aa U) ∧
    ∀ k, ‖gC (Aa U k) - 2 ^ p * A (fun i => gC (U i) / 2 ^ p) k‖ ≤ ε

/-- `A` is `1`-Lipschitz for the sup norm. -/
def SupLip {ι κ : Type*} (A : (ι → ℂ) → (κ → ℂ)) : Prop :=
  ∀ (x y : ι → ℂ) (δ : ℝ), (∀ i, ‖x i - y i‖ ≤ δ) → ∀ k, ‖A x k - A y k‖ ≤ δ

/-- Apply a one-dimensional map `A` to every `i`-slice of a `d`-dimensional array of Gaussian
integers. -/
def sliceMapZ {d : ℕ} (i : Fin d) (A : (ℕ → ℤ × ℤ) → (ℕ → ℤ × ℤ)) (x : (Fin d → ℕ) → ℤ × ℤ) :
    (Fin d → ℕ) → ℤ × ℤ :=
  fun j => A (fun k => x (Function.update j i k)) (j i)

/-- Apply the maps `A i` slice by slice, for the axes listed in `l`, first axis first. -/
def sliceCompZ {d : ℕ} (A : Fin d → (ℕ → ℤ × ℤ) → (ℕ → ℤ × ℤ)) :
    List (Fin d) → ((Fin d → ℕ) → ℤ × ℤ) → ((Fin d → ℕ) → ℤ × ℤ)
  | [] => id
  | i :: l => sliceCompZ A l ∘ sliceMapZ i (A i)

/-- The fixed-point tensor product `⊗ᵢ Ãᵢ` (Lemma 2.11). -/
def tensorMapZ {d : ℕ} (A : Fin d → (ℕ → ℤ × ℤ) → (ℕ → ℤ × ℤ)) :
    ((Fin d → ℕ) → ℤ × ℤ) → ((Fin d → ℕ) → ℤ × ℤ) :=
  sliceCompZ A (List.finRange d)

end IntMul.HvdH
Source
Harvey, van der Hoeven, Integer multiplication in time O(n log n), Annals of Math. 193 (2021), https://hal.science/hal-02070778, §2.6–2.7

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me