NLA-lib Explorer

NLAlib.Ops.StdModel.isNormalSampler_normalSample

Library · theorem

Standard rounding

The actual Gaussian sampler meets the complex relative-error contract with constant 2*(c+3) at zero floor. Raw real seed rounding has relative error c*u in the stated range; the scalar machine satisfies the standard model, literals one and two are exact, and (c+3)*u is at most one tenth. The probability law of the seeds is a separate theorem.

NLAlib.Ops.StdModel.isNormalSampler_normalSample {K : Type} {M : Ops.Machine K} {dec : K → ℝ}
  {u c : ℝ} (h : Ops.StdModel u dec M) (hu : 0 ≤ u) (hc : 0 ≤ c) (hcu : (c + 3) * u ≤ 1 / 10)
  (hlit : Ops.IsExactNatLit dec M 2) {Ω : ℝ} (roundGaussian : ℝ → K)
  (hround : ∀ (x : ℝ), |x| ≤ 2 * Ω → |dec (roundGaussian x) - x| ≤ c * u * |x|) :
  IsNormalSampler (decodeComplex dec) u (2 * (c + 3)) 0 Ω (M.normalSample roundGaussian)

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.OpsSampling.