Fixed log-affine Fourier model for Solve 5.38
DefinitionSolve538FourierMarginModelfourier-analysismathematical-physics
Use the first positive Fourier modes with rapidity . Put and for . The two displacements are and .
For an occupation vector , let and write for the difference of the normalized coherent-state amplitudes. The mixed overlaps and clock moments are
Define by replacing with . The margin is . The infinite-mode margin uses the infinite intensity and correlation series for the overlaps and the limits of the two clock moments.
Definition code
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.SpecialFunctions.Exp
import Mathlib.Analysis.SpecialFunctions.Exponential
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex
import Mathlib.Tactic
section
open Complex
noncomputable section
namespace Solve538Fourier
def normal (a : ℂ) : ℂ := (Real.exp (-Complex.normSq a / 2) : ℂ)
def coherent (a : ℂ) (n : ℕ) : ℂ :=
normal a * a ^ n / (Real.sqrt (n.factorial : ℝ) : ℂ)
end Solve538Fourier
end
end
section
open Complex BigOperators
noncomputable section
namespace Solve538Fourier
/-- Occupation numbers of the first N positive Fourier modes. Each coordinate
ranges over all natural numbers. The last coordinate is the highest mode. -/
def Occupations : ℕ → Type
| 0 => PUnit
| N + 1 => Occupations N × ℕ
def factors {R : Type*} [One R] [Mul R] (f : ℕ → ℕ → R) :
(N : ℕ) → Occupations N → R
| 0, _ => 1
| N + 1, k => factors f N k.1 * f (N + 1) k.2
def coherentModes (a : ℕ → ℂ) (N : ℕ) (k : Occupations N) : ℂ :=
factors (fun i => coherent (a i)) N k
def sineModes (a : ℕ → ℂ) (N : ℕ) (k : Occupations N) : ℂ :=
(coherentModes a N k - coherentModes (-a) N k) / (2 * Complex.I)
def occupationEnergy : (N : ℕ) → Occupations N → ℕ
| 0, _ => 0
| N + 1, k => occupationEnergy N k.1 + (N + 1) * k.2
def boostedOverlap (b a : ℕ → ℂ) (η : ℝ) (m N : ℕ) : ℂ :=
∑' k : Occupations N, star (sineModes b N k) *
Complex.exp (Complex.I * (η : ℂ) * m * (occupationEnergy N k : ℂ)) * sineModes a N k
end Solve538Fourier
end
end
section
open Complex BigOperators
noncomputable section
namespace Solve538Fourier
def probability (a : ℕ → ℂ) (N : ℕ) (k : Occupations N) : ℝ :=
‖sineModes a N k‖ ^ 2
def clockWeight (η : ℝ) (e : ℕ) : ℝ :=
if 16 < e then ‖Complex.exp (Complex.I * (η * e : ℝ)) - 1‖ else 0
def clockMoment (a : ℕ → ℂ) (η : ℝ) (N : ℕ) : ℝ :=
∑' k : Occupations N, probability a N k * clockWeight η (occupationEnergy N k)
end Solve538Fourier
end
end
section
open Complex BigOperators
noncomputable section
namespace Solve538Fourier
instance occupationsDecidableEq (N : ℕ) : DecidableEq (Occupations N) := by
induction N with
| zero => exact (inferInstance : DecidableEq PUnit)
| succ N ih =>
letI : DecidableEq (Occupations N) := ih
exact (inferInstance : DecidableEq (Occupations N × ℕ))
def rapidity : ℝ := Real.log 2
def firstStrength : ℝ := 3 / 100
def secondStrength : ℝ := 3 / 1000
def firstShape (n : ℕ) : ℝ := (Real.sin ((n : ℝ) / 32) / ((n : ℝ) / 32)) ^ 8
def secondShape (n : ℕ) : ℂ :=
let w : ℂ := (n : ℂ) - Complex.I
((1 + Complex.I * n) / 2) * Complex.exp ((-(rapidity * n) : ℝ) * Complex.I) *
(Complex.sin (w / 32) / (w / 32)) ^ 8
def firstDisplacement (n : ℕ) : ℂ :=
Complex.I * (firstStrength * Real.sqrt n * firstShape n : ℝ)
def secondDisplacement (n : ℕ) : ℂ :=
Complex.I * (secondStrength * Real.sqrt n : ℝ) * star (secondShape n)
def fixedMixed (m N : ℕ) : ℂ := boostedOverlap secondDisplacement firstDisplacement rapidity m N
def fixedFirstMoment (N : ℕ) : ℝ := clockMoment firstDisplacement rapidity N
def fixedSecondMoment (N : ℕ) : ℝ := clockMoment secondDisplacement rapidity N
def fixedMargin (N : ℕ) : ℝ :=
|(fixedMixed 1 N - fixedMixed 0 N).im| - Real.sqrt (fixedFirstMoment N * fixedSecondMoment N)
end Solve538Fourier
end
end
section
open BigOperators Filter Topology
noncomputable section
namespace Solve538Fourier
def intensityInfinity (a : ℕ → ℂ) : ℝ := ∑' n, Complex.normSq (a (n+1))
def correlationInfinity (b a : ℕ → ℂ) (eta : ℝ) (m : ℕ) : ℂ :=
∑' n, star (b (n+1)) * Complex.exp (Complex.I * (eta : ℂ) * m * ((n+1 : ℕ) : ℂ)) * a (n+1)
def mixedInfinity (b a : ℕ → ℂ) (eta : ℝ) (m : ℕ) : ℂ :=
(↑(Real.exp (-(intensityInfinity a + intensityInfinity b)/2)) : ℂ) *
Complex.sinh (correlationInfinity b a eta m)
def momentInfinity (a : ℕ → ℂ) (eta : ℝ) : ℝ := atTop.limUnder (clockMoment a eta)
def fixedMixedInfinity (m : ℕ) : ℂ := mixedInfinity secondDisplacement firstDisplacement rapidity m
def fixedFirstMomentInfinity : ℝ := momentInfinity firstDisplacement rapidity
def fixedSecondMomentInfinity : ℝ := momentInfinity secondDisplacement rapidity
def fixedMarginInfinity : ℝ :=
|(fixedMixedInfinity 1 - fixedMixedInfinity 0).im| -
Real.sqrt (fixedFirstMomentInfinity * fixedSecondMomentInfinity)
end Solve538Fourier
end
end
Source
Solve 5.38, fixed one-polarization log-affine Fourier certificate.