Exact Fourier circuits: core #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/FourierCircuit/Core.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
Evaluate a scalar gate on the currently available values.
Equations
- Complexity.ExactFourier.Gate.eval v (Complexity.ExactFourier.Gate.add i j) = v i + v j
- Complexity.ExactFourier.Gate.eval v (Complexity.ExactFourier.Gate.sub i j) = v i - v j
- Complexity.ExactFourier.Gate.eval v (Complexity.ExactFourier.Gate.scale c i) = c * v i
Instances For
All available values, with inputs first, then zero, then computed gate values.
Equations
Instances For
Outputs name available values, so permutations and arbitrary fanout are uncharged.
- size : ℕ
The number of charged scalar operations.
The topologically ordered operations.
A freely chosen available wire for each output coordinate.
Instances For
The standard complex root used by the exact discrete Fourier transform.
Equations
- Complexity.ExactFourier.zeta n = Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)
Instances For
The unnormalized DFT matrix, with positive exponential sign.
Equations
- Complexity.ExactFourier.fourierMatrix n j k = Complexity.ExactFourier.zeta n ^ (↑j * ↑k)
Instances For
Arbitrarily large sizes admit circuits below any fixed multiple of n * log₂ n.
Equations
- One or more equations did not get rendered due to their size.