Sieve Variance #
This module defines the mean density $\mu$ and the physical variance $\sigma^2$ of the survivor distribution in the Krafft Sieve, and proves Parseval's identity to relate the variance to the Fourier coefficients.
Definition of N as the cardinality of A. Let $N = |A| = \prod_{i=1}^w (p_i - 2)$ be the total number of surviving residues.
Equations
- KrafftSieve.N n r = (KrafftSieve.A n r).card
Instances For
Definition of the global mean density μ. Define the global mean density $\mu = \frac{N}{q}$.
Equations
- KrafftSieve.μ n r = ↑(KrafftSieve.N n r) / ↑(KrafftSieve.q n)
Instances For
Definition of the Discrete Fourier Transform fHat. Define the Discrete Fourier Transform of $f$ at frequency $h \in \mathbb{Z}/q\mathbb{Z}$ as: $$ \hat{f}(h) = \frac{1}{q} \sum_{x=0}^{q-1} f(x) e^{-2\pi i h x / q} $$
Equations
- KrafftSieve.fHat n r h = 1 / ↑(KrafftSieve.q n) * ∑ x : ZMod (KrafftSieve.q n), ↑(KrafftSieve.f n r x) * Complex.exp (-2 * ↑Real.pi * Complex.I * ↑(h.val * x.val) / ↑(KrafftSieve.q n))
Instances For
Definition of the physical variance sigmaSq. Define the physical variance of the survivor distribution as: $$ \sigma^2 = \frac{1}{q} \sum_{x=0}^{q-1} (f(x) - \mu)^2 $$
Equations
- KrafftSieve.sigmaSq n r = 1 / ↑(KrafftSieve.q n) * ∑ x : ZMod (KrafftSieve.q n), (KrafftSieve.f n r x - KrafftSieve.μ n r) ^ 2
Instances For
Application of orthogonality to simplify the double sum of function values.
Standard Parseval's Identity: The sum of the squared magnitudes of the Fourier coefficients equals the average of the squared function values.
Parseval's Identity for the Sieve: The variance of the indicator function f is strictly equal to the sum of the squared magnitudes of its non-zero Fourier coefficients.