NLA-lib Explorer

NLAlib.ShiftedQR.roundedDecoupleLoop_pwrites

Library · theorem

This statement changed in the recorded rename: 2026-11-schur, 2026-11-smalleig.

Standard rounding

The rounds of the decoupling loop on the good tapes: if each iteration from the state before round i < F with the scan flag 0 reaches the state after it except with probability at most \varphi \ge 0, then from a stored upper Hessenberg \mathbf{H} with \psi_k(\mathbf{H}) \le N_{\max} the initial scan, the at most F rounds (iteration and scan, NLAlib.ShiftedQR.roundedDecoupleScan_writes) and the exit (NLAlib.ShiftedQR.roundedDecoupleExit_writes) set the flag to 0 and hold an upper Hessenberg perturbed unitary similarity with error FE and a bottom entry of modulus at most \omega_D, except with probability at most F\varphi (NLAlib.Ops.PWrites.whileFuel). A step in the proof of NLAlib.ShiftedQR.roundedDecoupleWith_randomDecouplingRoutineContract_at.

NLAlib.ShiftedQR.roundedDecoupleLoop_pwrites {n : ℕ} {O Q : Type} [Ops.Has Ops.ScalarOp O]
  [Ops.Has Ops.IndexOp O] [Ops.Has ShiftedQR.DiskSampleOp O] [Ops.Has Ops.CmpTst Q]
  [Ops.Has Ops.IdxTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ} (hI : I.IsMeasurable)
  {win : O → List ℕ → ℕ} (hloc : ∀ (o : O), I.TapeLocal o (win o)) (hS : Ops.IsScalar M I)
  (hM : Ops.StdModel u id M) (hu1 : u < 1) (hL : Ops.IsIndexLit M I)
  (hNat : Ops.IsExactNatLit id M (n + 1)) (hC : Ops.IsCmp id I) {law : ℕ → Measure ℝ}
  {k q n0 F L T : ℕ} {SE : Ops.Stmt O Q} (hk : 0 < k) (hkn : k ≤ n) {w p f lg : ℕ × ℕ} {ns ws : ℕ}
  {ps : List ℝ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {tL tv c E ωD Nmax φ : ℝ}
  (hps : ps.getD 0 0 = tL) (hps0 : 0 < ps.length) (hHess : IsUpperHessenberg H)
  (hψH : hessenbergPotential k H ≤ Nmax) (hthr : (1 + u) ^ 2 * tv ≤ (1 - u) ^ 2 * tL)
  (hcut : tL ≤ (1 - u) ^ 2 * ωD ^ 2) (hωD : 0 ≤ ωD) (hc0 : 0 ≤ c) (hE0 : 0 ≤ E) (hφ : 0 ≤ φ)
  (hfuel : (1 + u) ^ 2 * (c ^ F * Nmax) ^ 2 ≤ tL) (hj : F * (k + 1 + n0) ≤ ns)
  (hlgv : ∀ b ∈ [w, p, f], b.1 ≠ lg.1) (hlgL : lg.1 < L)
  (hit :
    ∀ i < F,
      Ops.PWrites law I (ShiftedQR.shIterationWith SE)
        (Ops.Env.frame [n + 1, q, k, n0, 12, T, ws, i * (k + 1 + n0)]
          [w, (p.1, p.2 + 1), (p.1, p.2 + 2), (p.1, p.2 + 3), (p.1, p.2 + 4), (p.1, p.2 + 5),
            (p.1, p.2 + 6), (p.1, p.2 + 7), (p.1, p.2 + 10), (p.1, p.2 + (ps.length - 12)), w, f,
            lg])
        (Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock f.1 f.2 1 ⊔
          Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * ws)))
        (fun μ ↦
          ShiftedQR.DecoupleLoopCtx n L w p f ps μ ∧
            ShiftedQR.DecoupleLoopState u k H tL c E w (L, 0) i lg ns ws (k + 1 + n0) μ ∧
              μ.store.get L 3 = some 0)
        (fun μ' ↦
          ShiftedQR.DecoupleLoopCtx n L w p f ps μ' ∧
            ShiftedQR.DecoupleLoopMid u k H tv c E w (i + 1) lg ns ws (k + 1 + n0) μ')
        φ) :
  Ops.PWrites law I (ShiftedQR.roundedDecoupleLoopWith SE)
    (Ops.Env.frame [n + 1, k, ps.length, F, T, q, n0, ws] [w, p, (L, 0), w, f, lg])
    (Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock f.1 f.2 1 ⊔
        Ops.Store.inBlock L 0 5 ⊔
      Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * ws)))
    (fun μ ↦
      ShiftedQR.DecoupleLoopCtx n L w p f ps μ ∧
        HoldsMatrix w H μ.store ∧ HoldsSlottedLog lg ns ws [] [] μ.store)
    (fun μ' ↦
      μ'.store.get f.1 f.2 = some 0 ∧
        ∃ Ls H',
          Ls.length = ns ∧
            (∀ x ∈ slotEntries ws Ls, x.1 + 1 < n + 1) ∧
              HoldsSlottedLog lg ns ws Ls [] μ'.store ∧
                IsPerturbedUnitarySimilarBy (givensLog (n + 1) (slotEntries ws Ls)) H H' (↑F * E) ∧
                  IsUpperHessenberg H' ∧
                    (∃ j, n ≤ ↑j + k ∧ ‖H' j.succ j.castSucc‖ ≤ ωD) ∧ HoldsMatrix w H' μ'.store)
    (↑F * φ)

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedDecouple.