NLA-lib Explorer

NLAlib.SpectralBisection.downwardPass_kernelWeight_le_of_exec

Library · theorem

The actual downward pass adds at most one root-size matrix-kernel charge per level. The model, stored inputs and finite arena capacities are ordinary semantic assumptions; the counted execution starts from arbitrary prior history.

NLAlib.SpectralBisection.downwardPass_kernelWeight_le_of_exec {K : Type} [Inhabited K]
  (M : Ops.Machine K) (dec : K → ℝ) (mm : MatMulMap (K × K)) (qr : QRMap (K × K))
  {I : Ops.Interp Ops.DenseOp (Ops.CmpTst ⊕ Ops.IdxTst) K} {τ : Ops.Tape K} {μ : Ops.Mem K}
  {n L fuel base : ℕ} {par lv su sg ma ua qa ea sz kd kp c : ℕ × ℕ} (R0 eps0 beta : K)
  (A : Matrix (Fin n) (Fin n) (K × K)) (hS : Ops.IsScalar M I) (hL : Ops.IsIndexLit M I)
  (hC : Ops.IsCmp dec I) (hMM : Ops.IsMatrixMul (Ops.EntryCodec.pair K) (fun {l m n} ↦ mm) I)
  (hQR : Ops.IsMatrixQR (Ops.EntryCodec.pair K) (fun {m n} ↦ qr) I) (hQ : Ops.IsToNat dec I)
  (hSample : Ops.IsSample I) (hexact : Ops.IsExactNatLit dec M (max n 4))
  (hl : μ.Live [par, lv, su, sg, ma, ua, qa, ea, sz, kd, kp, c]) (hPos : μ.pos = base)
  (hLevel :
    SpectralBisection.StoresLevel M
      (SpectralBisection.tapeMachine M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) n base τ) n fuel R0
      beta { k := n, A := A, R := R0, ε := eps0, ℓ := L } 0 ma sz lv μ)
  (hpar : μ.store.readBlock par.1 par.2 3 = some [R0, eps0, beta])
  (hc :
    μ.store.readBlock c.1 c.2 5 =
      some [M.lit 1, M.lit 2, M.div (M.lit 1) (M.lit 2), M.neg (M.lit 1), M.sqrtHalf])
  (hZero :
    ∀ (e : ℕ), 1 ≤ e → e ≤ L + 1 → ∀ lo < n, μ.store.get sz.1 (sz.2 + n * e + lo) = some (M.lit 0))
  (hRoom :
    μ.Room (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
      (SpectralBisection.arenaLengths n L))
  (hAP :
    Ops.Fp.Apart (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
      (SpectralBisection.arenaLengths n L))
  (hPar :
    Ops.Fp.Disj (Ops.Store.inBlock par.1 par.2 3)
      (Ops.Fp.blocks (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
        (SpectralBisection.arenaLengths n L)))
  (T : ℕ → ℕ) (hT : Monotone T) (hadd : ∀ (a b : ℕ), T a + T b ≤ T (a + b))
  (W : Ops.DenseOp → List ℕ → ℕ) {a b : Ops.St Ops.DenseOp (Ops.CmpTst ⊕ Ops.IdxTst) K}
  (hmem : a.mem = μ)
  (hr :
    Ops.evalCounted I W τ (SpectralBisection.downwardPass SpectralBisection.node)
        (Ops.Env.frame [n, L, fuel] [par, lv, su, sg, ma, ua, qa, ea, sz, kd, kp, c]) a =
      some b) :
  (Ops.Dense.kernelWeight T) b.cost ≤
    (Ops.Dense.kernelWeight T) a.cost + (L + 1) * ((2 * fuel + 9) * T n)

Full source on GitHub

Import NLAlib.Eigensolvers.SpectralBisection.DownwardWork.