Documentation

Complexitylib.Circuits.ExactFourier.Internal.Main

Exact Fourier circuits: main #

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

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

A polynomial upper bound large enough to contain the required prime inventory.

Equations
Instances For
    theorem Complexity.ExactFourier.PrimeInventory.family (q m : ℕ) :
    ∃ (r : Fin m → ℕ), (∀ (i : Fin m), Nat.Prime (r i)) ∧ Function.Injective r ∧ (∀ (i : Fin m), 2 * q ≤ r i) ∧ ∀ (i : Fin m), r i ≤ upper q m
    theorem Complexity.ExactFourier.PrimeInventory.family_coprime {m : ℕ} {r : Fin m → ℕ} (hr : ∀ (i : Fin m), Nat.Prime (r i)) (hi : Function.Injective r) :
    Pairwise fun (i j : Fin m) => (r i).Coprime (r j)

    The explicit layer-depth bound used to transfer a finite win to Fourier circuits.

    Equations
    Instances For
      theorem Complexity.ExactFourier.FourierTransfer.depth_bound (q m : ℕ) :
      ↑(depth q m) ≤ 536870917 * (Real.log (↑m + 2 * ↑q + 10) + 1) ^ 2
      theorem Complexity.ExactFourier.FourierTransfer.family_cost {q h : ℕ} (A : Matrix (Fin q) (Fin q) ℂ) (hq : 2 ≤ q) (gen : ∀ (M : Matrix (Fin q) (Fin q) ℂ), IsUnit M → PositiveGeneration.Pattern A h M) {a C : ℝ} (ha : 0 ≤ a) (hC : 0 ≤ C) (amp : ∀ (k : ℕ), ↑(CircuitCost.cost (TensorAxis.power A k)) ≤ C * ↑q ^ k * (↑k + 1) ^ a) (m : ℕ) :
      ∃ (n : ℕ), 2 ^ m ≤ n ∧ ↑(CircuitCost.cost (fourierMatrix n)) ≤ 536870917 * ↑(q * (h + 1) + 1) * (C + 1) * ↑n * (Real.log (↑m + 2 * ↑q + 10) + 1) ^ 2 * (↑m + 2 * ↑q + 10) ^ a
      theorem Complexity.ExactFourier.FourierTransfer.log_square_littleO {a : ℝ} (ha : a < 1) :
      (fun (x : ℝ) => (Real.log x + 1) ^ 2) =o[Filter.atTop] fun (x : ℝ) => x ^ (1 - a)
      theorem Complexity.ExactFourier.FourierTransfer.shifted_log_power_ratio {a c : ℝ} (ha : a < 1) :
      Filter.Tendsto (fun (m : ℕ) => (Real.log (↑m + c) + 1) ^ 2 * (↑m + c) ^ a / ↑m) Filter.atTop (nhds 0)

      An actual finite win transfers to arbitrarily large exact Fourier DAGs, with every scalar multiplication charged.

      Existence of an exact circuit in every width, used only to define the minimum.

      The least number of source scalar gates computing the exact Fourier transform.

      Equations
      Instances For

        The liminf formulation of the main theorem, for the literal minimum scalar gate count.