Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sampled baseband signals, discrete convolution and the PSF restoration filter

Definition
Arxiv2308_14427_Basic

by Xeroth · Nov 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

convolutiondeconvolutionpoint-spread-functionultrasound-imaging

Objects of Section II and Section II.A of Shen, Lin, Li and Li (2023).

  1. Sample grid and signals. Beamformed images are sampled on the grid Z×Z\mathbb{Z}\times\mathbb{Z}Z×Z of (axial, lateral) sample positions. A signal is a complex-valued function f:Z×Z→Cf:\mathbb{Z}\times\mathbb{Z}\to\mathbb{C}f:Z×Z→C that is nonzero at only finitely many samples. The tissue scatterer distribution SSS, the point spread functions PSFaberrated\mathrm{PSF}_{\mathrm{aberrated}}PSFaberrated​ and PSFideal\mathrm{PSF}_{\mathrm{ideal}}PSFideal​, the restoration filter KKK and the baseband (IQ) data RRR are all signals.
  2. Convolution. For signals f,gf,gf,g,
(f∗g)(x)=∑a+b=xf(a) g(b),x∈Z×Z,(f\ast g)(x)=\sum_{a+b=x}f(a)\,g(b),\qquad x\in\mathbb{Z}\times\mathbb{Z},(f∗g)(x)=a+b=x∑​f(a)g(b),x∈Z×Z,

a finite sum. 3. Restoration filter (eq. 1). KKK is a restoration (reshaping) filter for PSFaberrated\mathrm{PSF}_{\mathrm{aberrated}}PSFaberrated​ and PSFideal\mathrm{PSF}_{\mathrm{ideal}}PSFideal​ if PSFideal=PSFaberrated∗K\mathrm{PSF}_{\mathrm{ideal}}=\mathrm{PSF}_{\mathrm{aberrated}}\ast KPSFideal​=PSFaberrated​∗K. 4. Aberration-free data (eq. 3). Rideal=S∗PSFidealR_{\mathrm{ideal}}=S\ast\mathrm{PSF}_{\mathrm{ideal}}Rideal​=S∗PSFideal​.

Formalization Note The paper does not say whether its convolution is continuous or discrete. The definitions use the discrete convolution of finitely supported sampled signals, which matches the finite arrays of beamformed baseband data, PSF patches and digital filters the method works with. Signals are Mathlib's additive monoid algebra C[Z×Z]\mathbb{C}[\mathbb{Z}\times\mathbb{Z}]C[Z×Z], whose product is this convolution.

Definition code
import Mathlib

/-!
Shen, Lin, Li and Li, *Phase Aberration Correction with Adaptive Coherence-Weighted Point Spread
Function Restoration Filtering Technique*, arXiv:2308.14427v1 (2023): the sampled baseband
signals, the convolution operator and the PSF restoration filter of Section II and
Section II.A, eqs. (1)-(3).
-/

noncomputable section

namespace Arxiv2308_14427

/-- Section II: the grid of sample positions of a beamformed image, indexed by
(axial sample, lateral sample) in `ℤ × ℤ`. -/
abbrev SampleGrid := ℤ × ℤ

/-- Section II: a sampled baseband (IQ) signal on the sample grid, complex-valued and nonzero
at only finitely many samples. Scatterer distributions `S`, point spread functions, the filter
`K` and the beamformed data `R` are all signals. -/
abbrev Signal := AddMonoidAlgebra ℂ SampleGrid

/-- Section II.A, the operator `∗` of eqs. (1)-(6): the discrete convolution
`(f ∗ g).coeff x = ∑_{a + b = x} f.coeff a * g.coeff b` of two signals (Mathlib's product in
the additive monoid algebra, see `AddMonoidAlgebra.coeff_mul`). -/
def conv (f g : Signal) : Signal := f * g

/-- Section II.A, eq. (1), PDF p. 1: `K` is a restoration (reshaping) filter for the
phase-aberrated PSF `psfAb` and the ideal aberration-free PSF `psfId`, that is
`PSF_ideal = PSF_aberrated ∗ K`. -/
def IsRestorationFilter (psfAb psfId K : Signal) : Prop := psfId = conv psfAb K

/-- Section II.A, eq. (3), PDF p. 2: the aberration-free baseband data
`R_ideal = S ∗ PSF_ideal` of the scatterer distribution `S`. -/
def idealData (S psfId : Signal) : Signal := conv S psfId

end Arxiv2308_14427
Source
Shen, Lin, Li and Li, Phase Aberration Correction with Adaptive Coherence-Weighted Point Spread Function Restoration Filtering Technique, arXiv:2308.14427v1 (2023), Section II (locally linear space-invariant model) and Section II.A, eq. (1) (PDF p. 1) and eqs. (2)-(3) (PDF p. 2)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

SampleGrid\mathrm{SampleGrid}SampleGrid (type abbreviation). The index set Z×Z\mathbb{Z} \times \mathbb{Z}Z×Z, the set of all ordered pairs of integers (i,j)(i, j)(i,j). It has componentwise addition, (i,j)+(i′,j′)=(i+i′,j+j′)(i,j) + (i',j') = (i+i', j+j')(i,j)+(i′,j′)=(i+i′,j+j′), and zero element (0,0)(0,0)(0,0).

The code fixes no sampling interval, no physical spacing, no origin convention and no bounds. Both coordinates range over all integers, including negative ones. Nothing in the code says which coordinate is "axial" and which is "lateral".

Signal\mathrm{Signal}Signal (type abbreviation). The type of all functions

f:Z×Z→Cf : \mathbb{Z} \times \mathbb{Z} \to \mathbb{C}f:Z×Z→C

that are nonzero at only finitely many points. This is the additive monoid algebra C[Z×Z]\mathbb{C}[\mathbb{Z}\times\mathbb{Z}]C[Z×Z], which is the ring of complex Laurent polynomials in two variables.

  • Addition and scalar multiplication are pointwise.
  • Multiplication is the convolution described below.
  • The zero signal (identically 000) is included.
  • The signal δ\deltaδ with value 111 at (0,0)(0,0)(0,0) and 000 elsewhere is the multiplicative identity.

No other restriction is imposed. The values are arbitrary complex numbers, with no normalization, boundedness, support-shape, or "baseband/IQ" condition beyond being complex-valued with finite support.

conv\mathrm{conv}conv (definition). For any two signals f,gf, gf,g, conv(f,g)\mathrm{conv}(f,g)conv(f,g) is their product in C[Z×Z]\mathbb{C}[\mathbb{Z}\times\mathbb{Z}]C[Z×Z]. Concretely, for every x∈Z×Zx \in \mathbb{Z}\times\mathbb{Z}x∈Z×Z:

(f∗g)(x)  =  ∑a,b∈Z×Za+b=xf(a) g(b)  =  ∑a∈Z×Zf(a) g(x−a).(f * g)(x) \;=\; \sum_{\substack{a,\,b \,\in\, \mathbb{Z}\times\mathbb{Z} \\ a + b = x}} f(a)\, g(b) \;=\; \sum_{a \in \mathbb{Z}\times\mathbb{Z}} f(a)\, g(x - a).(f∗g)(x)=a,b∈Z×Za+b=x​∑​f(a)g(b)=a∈Z×Z∑​f(a)g(x−a).

The sum is finite because only finitely many aaa have f(a)≠0f(a) \neq 0f(a)=0. The result is again finitely supported.

This is the full (non-circular, non-truncated) two-dimensional discrete linear convolution. It has these properties:

  • commutative and associative;
  • bilinear;
  • f∗0=0f * 0 = 0f∗0=0;
  • δ\deltaδ is its identity.

There is no boundary handling, cropping, normalization factor, or complex conjugation.

IsRestorationFilter(psfAb,psfId,K)\mathrm{IsRestorationFilter}(\mathrm{psfAb}, \mathrm{psfId}, K)IsRestorationFilter(psfAb,psfId,K) (definition, a proposition). Take any three signals Pab,Pid,KP_{\mathrm{ab}}, P_{\mathrm{id}}, KPab​,Pid​,K as above. The proposition holds exactly when the following equality of finitely supported functions on Z×Z\mathbb{Z}\times\mathbb{Z}Z×Z holds:

Pid  =  Pab∗K,P_{\mathrm{id}} \;=\; P_{\mathrm{ab}} * K,Pid​=Pab​∗K,

that is, Pid(x)=∑aPab(a) K(x−a)P_{\mathrm{id}}(x) = \sum_{a} P_{\mathrm{ab}}(a)\,K(x-a)Pid​(x)=∑a​Pab​(a)K(x−a) for every x∈Z×Zx \in \mathbb{Z}\times\mathbb{Z}x∈Z×Z.

No hypotheses are placed on PabP_{\mathrm{ab}}Pab​, PidP_{\mathrm{id}}Pid​ or KKK. The equality must be exact, with no approximation, least-squares or tolerance. Some consequences:

  • Pab=0P_{\mathrm{ab}} = 0Pab​=0: the condition holds for every KKK when Pid=0P_{\mathrm{id}} = 0Pid​=0, and for no KKK otherwise.
  • Pab=PidP_{\mathrm{ab}} = P_{\mathrm{id}}Pab​=Pid​: K=δK = \deltaK=δ satisfies it.
  • Existence: nothing asserts that a KKK satisfying the condition exists. Because finitely supported signals form an integral domain under ∗*∗, such a KKK exists only when PabP_{\mathrm{ab}}Pab​ divides PidP_{\mathrm{id}}Pid​ in this ring. When Pab≠0P_{\mathrm{ab}} \neq 0Pab​=0, any such KKK is unique.

idealData(S,psfId)\mathrm{idealData}(S, \mathrm{psfId})idealData(S,psfId) (definition). For any two signals SSS and PidP_{\mathrm{id}}Pid​, this is the signal

idealData(S,Pid)  =  S∗Pid,(S∗Pid)(x)=∑a∈Z×ZS(a) Pid(x−a).\mathrm{idealData}(S, P_{\mathrm{id}}) \;=\; S * P_{\mathrm{id}}, \qquad \bigl(S * P_{\mathrm{id}}\bigr)(x) = \sum_{a \in \mathbb{Z}\times\mathbb{Z}} S(a)\, P_{\mathrm{id}}(x - a).idealData(S,Pid​)=S∗Pid​,(S∗Pid​)(x)=a∈Z×Z∑​S(a)Pid​(x−a).

It is simply the convolution of its two arguments, with no further content. The definition does not require that PidP_{\mathrm{id}}Pid​ arise from any aberrated point spread function or restoration filter. It does not mention IsRestorationFilter\mathrm{IsRestorationFilter}IsRestorationFilter or any measured data RRR. It places no constraint on SSS, which may be any finitely supported complex signal, including 000, in which case the output is 000.

Human review
  • Endorsed by Shuze Chen · Nov 26, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 26, 2026

    Confirmed by the mission captain (proposal self-audit).

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me