Documentation

Complexitylib.Circuits.ExactFourier.Internal.ToeplitzCross

Exact Fourier circuits: toeplitz cross #

Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a. Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/FourierCircuit/ToeplitzCross.lean

Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.

The finite convolution sum describing the cross block of a truncated Toeplitz product.

Equations
Instances For
    theorem Complexity.ExactFourier.ToeplitzLayers.cross_succ (s : ℕ) (h g : ℕ → ℂ) (i j : ℕ) (hi : s ≤ i) (hj : j + 1 < s) :
    cross s h g (i + 1) (j + 1) = cross s h g i j - h (i + 1 - s) * g (s - (j + 1))
    theorem Complexity.ExactFourier.ToeplitzLayers.sum_upper_shift (s j : ℕ) (hj : j ≤ s) (f g : ℕ → ℂ) :
    (∑ l ∈ Finset.range s, f l * if j ≤ l then g (l - j) else 0) = ∑ l ∈ Finset.range (s - j), f (j + l) * g l

    The lower-left cross block obtained by splitting a Toeplitz matrix at time s.

    Equations
    Instances For
      theorem Complexity.ExactFourier.ToeplitzLayers.cross_mul (s a : ℕ) (h g : PowerSeries ℂ) :
      (lowerCross s a fun (x : ℕ) => (PowerSeries.coeff x) h) * CoefficientTime.truncMatrix s g = fun (i : Fin a) (j : Fin s) => cross s (fun (x : ℕ) => (PowerSeries.coeff x) h) (fun (x : ℕ) => (PowerSeries.coeff x) g) (s + ↑i) ↑j
      theorem Complexity.ExactFourier.ToeplitzLayers.cross_interior (s a e i₀ j₀ : ℕ) (h g : ℕ → ℂ) (hi : s ≤ i₀) (hj : j₀ + e ≤ s) (i j : ℕ) :
      i + 1 < a → j + 1 < e → cross s h g (i₀ + (i + 1)) (j₀ + (j + 1)) = cross s h g (i₀ + i) (j₀ + j) + -h (i₀ + (i + 1) - s) * g (s - (j₀ + (j + 1)))
      theorem Complexity.ExactFourier.Layered.symmetric_triangular {ι : Type} [Fintype ι] [LinearOrder ι] {F P N : Matrix ι ι ℂ} {d : ℕ} (hN : Layered N d) (hP : IsUnit P) (hU : P.IsUpperTriangular) (hL : N.IsLowerTriangular) (hFP : F * P = N) (hF : F.transpose = F) :
      Layered F (2 * d + 1)

      Symmetric Gaussian factorization, avoiding an appeal to LDU uniqueness.

      The formal series of reciprocals of the Newton normalization products.

      Equations
      Instances For
        theorem Complexity.ExactFourier.NewtonFourier.N_toeplitz {n : ℕ} {ω : ℂ} (hω : IsPrimitiveRoot ω n) :
        N n ω = (Matrix.diagonal fun (i : Fin n) => H ω ↑i) * CoefficientTime.truncMatrix n (invH ω) * Matrix.diagonal fun (i : Fin n) => scale ω ↑i
        theorem Complexity.ExactFourier.NewtonFourier.N_layers {n : ℕ} (hn : 0 < n) {ω : ℂ} (hω : IsPrimitiveRoot ω n) :
        Layered (N n ω) (4194304 * (Nat.log 2 n + 2) ^ 2 + 2)
        theorem Complexity.ExactFourier.NewtonFourier.dft_layers {n : ℕ} (hn : 0 < n) {ω : ℂ} (hω : IsPrimitiveRoot ω n) :
        Layered (RadixTwo.dft n ω) (8388608 * (Nat.log 2 n + 2) ^ 2 + 5)

        Exact-width Fourier layer theorem, with an absolute constant and a stronger quadratic logarithmic bound.

        Identify indices below a positive modulus with its residue classes.

        Equations
        Instances For
          theorem Complexity.ExactFourier.FourierCRT.char_nat {n : ℕ} (ψ : AddChar (ZMod n) ℂ) (k : ℕ) :
          ψ ↑k = ψ 1 ^ k
          def Complexity.ExactFourier.FourierCRT.singleAdd {ι : Type} [DecidableEq ι] (r : ι → ℕ) (i : ι) :
          ZMod (r i) →+ (j : ι) → ZMod (r j)

          Embed one residue coordinate into a product of residue-class groups.

          Equations
          Instances For
            theorem Complexity.ExactFourier.FourierCRT.sum_singleAdd {ι : Type} [Fintype ι] [DecidableEq ι] (r : ι → ℕ) (x : (i : ι) → ZMod (r i)) :
            ∑ i : ι, (singleAdd r i) (x i) = x
            theorem Complexity.ExactFourier.FourierCRT.char_sum {ι : Type} [Fintype ι] [DecidableEq ι] {R : Type} [AddCommMonoid R] (ψ : AddChar R ℂ) (x : ι → R) :
            ψ (∑ i : ι, x i) = ∏ i : ι, ψ (x i)
            noncomputable def Complexity.ExactFourier.FourierCRT.component {ι : Type} [Fintype ι] [DecidableEq ι] (r : ι → ℕ) (hn : Pairwise fun (i j : ι) => (r i).Coprime (r j)) [NeZero (∏ i : ι, r i)] (i : ι) :
            AddChar (ZMod (r i)) ℂ

            Restrict the product modulus's standard character to one Chinese-remainder component.

            Equations
            Instances For
              theorem Complexity.ExactFourier.FourierCRT.component_injective {ι : Type} [Fintype ι] [DecidableEq ι] (r : ι → ℕ) (hn : Pairwise fun (i j : ι) => (r i).Coprime (r j)) [NeZero (∏ i : ι, r i)] (i : ι) :
              theorem Complexity.ExactFourier.FourierCRT.character_factor {ι : Type} [Fintype ι] [DecidableEq ι] (r : ι → ℕ) (hn : Pairwise fun (i j : ι) => (r i).Coprime (r j)) [NeZero (∏ i : ι, r i)] (x : (i : ι) → ZMod (r i)) :
              ZMod.stdAddChar ((ZMod.prodEquivPi r hn).symm x) = ∏ i : ι, (component r hn i) (x i)
              theorem Complexity.ExactFourier.FourierCRT.factorization {ι : Type} [Fintype ι] [DecidableEq ι] (r : ι → ℕ) (hr : ∀ (i : ι), 0 < r i) (hn : Pairwise fun (i j : ι) => (r i).Coprime (r j)) :
              ∃ (ω : ι → ℂ), (∀ (i : ι), IsPrimitiveRoot (ω i) (r i)) ∧ ∃ (e : Fin (∏ i : ι, r i) ≃ ((i : ι) → Fin (r i))), (Matrix.reindex e e) (fourierMatrix (∏ i : ι, r i)) = PiTensor.matrix fun (i : ι) => RadixTwo.dft (r i) (ω i)