NLAlib.Sign.accepts_signProgram_of_isArithAccurate
Library · theorem
Total counted matrix sign execution returns an approximation within its supplied tolerance, under the Hermitian spectral-gap, scaling, arithmetic-error and cap assumptions of the capped Newton–Schulz analysis. All resource bounds concern the same execution. [Shah2024, Theorem 2.6].
NLAlib.Sign.accepts_signProgram_of_isArithAccurate {K : Type} [Inhabited K] (M : Ops.Machine K)
(dec : K → ℝ) (mm : MatMulMap (K × K)) (qr : QRMap (K × K)) (unif : K → ℝ → K)
(normal : ℂ → K × K) (domain : (Fin 2 → ℕ) → Prop) (admitted : ∃ d, domain d)
(matrixWork matrixWorkspace : Ops.MatrixOp → List ℕ → ℕ) (h01 : dec (M.lit 0) ≠ dec (M.lit 1))
{d : Fin 2 → ℕ} (hd : domain d) (x : (Sign.problem domain admitted).Input d)
(I : Ops.Interp Ops.DenseOp (Ops.CmpTst ⊕ Ops.IdxTst) K)
(hI :
(Ops.Dense.functionalModel (Sign.problem domain admitted) M dec (Ops.EntryCodec.pair K)
(fun {l m n} ↦ mm) (fun {m n} ↦ qr)
(Ops.Dense.resources matrixWork matrixWorkspace)).contracts
d x I)
(tape : Ops.Tape K) {u floor Omega : ℝ} {mu : ℕ → ℝ}
(hM :
(M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif normal).IsArithAccurate dec u
floor Omega mu)
(hmu : 0 ≤ mu (d 0)) (hu0 : 0 ≤ u) (hf0 : 0 ≤ floor) (hf : floor * (2 * ↑(d 0)) ≤ 1)
(hOmega : 9 * (↑(d 0) + 1) ≤ Omega) (hA : (decodeMatrix dec (Sign.inputMatrix d x)).IsHermitian)
{a : ℝ} (ha : 0 < a) (hspec : ∀ y ∈ spectrum ℝ (decodeMatrix dec (Sign.inputMatrix d x)), a ≤ |y|)
(hb : specNorm (decodeMatrix dec (Sign.inputMatrix d x)) ≤ dec (Sign.scale d x))
(heps : 0 < dec (Sign.tolerance d x)) (heps1 : dec (Sign.tolerance d x) ≤ 1 / 2)
(hu :
640 * ↑(d 0) * √↑(d 0) * (8 + mu (d 0)) *
(newtonSchulzSteps (a / (2 * dec (Sign.scale d x)))
(dec (Sign.tolerance d x) / (16 * ↑(d 0))) +
1) *
u ≤
a / dec (Sign.scale d x) * dec (Sign.tolerance d x))
(hcap :
newtonSchulzSteps (a / (2 * dec (Sign.scale d x))) (dec (Sign.tolerance d x) / (16 * ↑(d 0))) ≤
↑(d 1)) :
(Sign.wordSpecification M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif normal domain admitted
matrixWork matrixWorkspace).Accepts
Sign.signProgram I (Ops.Dense.resources matrixWork matrixWorkspace) tape d x fun x_1 m ↦
Sign.StoresApproximation dec (Sign.inputMatrix d x) (dec (Sign.tolerance d x)) mImport NLAlib.Eigensolvers.Sign.Accuracy.