Buckets:
| import Mathlib | |
| namespace OAI | |
| section | |
| namespace ExactFourier | |
| /-- One charged scalar gate, referencing only available values. -/ | |
| inductive Gate (w : ℕ) where | |
| | add (i j : Fin w) | |
| | sub (i j : Fin w) | |
| | scale (c : ℂ) (i : Fin w) | |
| def Gate.eval {w : ℕ} (v : Fin w → ℂ) : Gate w → ℂ | |
| | .add i j => v i + v j | |
| | .sub i j => v i - v j | |
| | .scale c i => c * v i | |
| /-- A topologically ordered scalar DAG; available values are never consumed. -/ | |
| inductive Program (n : ℕ) : ℕ → Type where | |
| | nil : Program n 0 | |
| | step {k : ℕ} (p : Program n k) (g : Gate (n + 1 + k)) : Program n (k + 1) | |
| def Program.eval {n : ℕ} : {k : ℕ} → Program n k → (Fin n → ℂ) → | |
| (Fin (n + 1 + k) → ℂ) | |
| | 0, .nil, x => Fin.snoc x 0 | |
| | _ + 1, .step p g, x => | |
| let v := p.eval x | |
| Fin.snoc v (g.eval v) | |
| /-- Outputs name available values, so permutations and arbitrary fanout are uncharged. -/ | |
| structure Circuit (n : ℕ) where | |
| size : ℕ | |
| program : Program n size | |
| outputs : Fin n → Fin (n + 1 + size) | |
| def Circuit.eval {n : ℕ} (C : Circuit n) (x : Fin n → ℂ) : Fin n → ℂ := | |
| fun i => C.program.eval x (C.outputs i) | |
| noncomputable def zeta (n : ℕ) : ℂ := Complex.exp (2 * Real.pi * Complex.I / (n : ℂ)) | |
| noncomputable def fourierMatrix (n : ℕ) : Matrix (Fin n) (Fin n) ℂ := | |
| fun j k => zeta n ^ (j.val * k.val) | |
| def Circuit.Computes {n : ℕ} (C : Circuit n) (A : Matrix (Fin n) (Fin n) ℂ) : Prop := | |
| ∀ x, C.eval x = A.mulVec x | |
| def MainStatement : Prop := | |
| ∀ c : ℝ, 0 < c → ∀ N₀ : ℕ, 2 ≤ N₀ → ∃ n : ℕ, N₀ ≤ n ∧ | |
| ∃ C : Circuit n, C.Computes (fourierMatrix n) ∧ | |
| (C.size : ℝ) < c * (n : ℝ) * Real.logb 2 (n : ℝ) | |
| end ExactFourier | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 1.75 kB
- Xet hash:
- fbfd70d565ea96c87f50bdae81d529c1464da10a5fea0d0e19d08b47fad3d76c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.