NLA-lib Explorer

NLAlib.SpectralBisection.boundedBisectionAlgorithm

Library · def

Uniform model Work: closed

Canonical total certification for the fixed dense program. Bounded natural literals are exact on every admitted dimension. The five independent resource claims refer to the same fixed tree and supplied resource profile; no execution or whole-program hypothesis is assumed.

NLAlib.SpectralBisection.boundedBisectionAlgorithm {K : Type} [Inhabited K] (M : Ops.Machine K)
  (dec : K → ℝ) (mm : MatMulMap (K × K)) (qr : QRMap (K × K)) (domain : (Fin 3 → ℕ) → Prop)
  (admitted : ∃ d, domain d) (matrixWork matrixWorkspace : Ops.MatrixOp → List ℕ → ℕ)
  (budget : (Fin 3 → ℕ) → Ops.Count (Ops.DenseOp ⊕ Ops.Bookkeeping) (Ops.CmpTst ⊕ Ops.IdxTst))
  (scratch work span memory : (Fin 3 → ℕ) → ℕ)
  (hLit : ∀ (d : Fin 3 → ℕ), domain d → Ops.IsExactNatLit dec M (max (d 0) 4))
  (hCost : ∀ (d : Fin 3 → ℕ), domain d → SpectralBisection.staticBudget d ≤ budget d)
  (hScratch :
    ∀ (d : Fin 3 → ℕ),
      domain d →
        Ops.staticPeak (Ops.Dense.resources matrixWork matrixWorkspace)
            SpectralBisection.bisectionProgram d ≤
          scratch d)
  (hWork :
    ∀ (d : Fin 3 → ℕ),
      domain d → (Ops.Dense.resources matrixWork matrixWorkspace).work (budget d) ≤ work d)
  (hSpan :
    ∀ (d : Fin 3 → ℕ),
      domain d → (Ops.Dense.resources matrixWork matrixWorkspace).span (budget d) ≤ span d)
  (hMemory : ∀ (d : Fin 3 → ℕ), domain d → 4 * (d 0 * d 0) + d 0 + 3 + scratch d ≤ memory d) :
  Ops.Algorithm
    (Ops.Dense.functionalModel (SpectralBisection.problem domain admitted) M dec
      (Ops.EntryCodec.pair K) (fun {l m n} ↦ mm) (fun {m n} ↦ qr)
      (Ops.Dense.resources matrixWork matrixWorkspace))
    (SpectralBisection.wordSpecification M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) domain admitted
      budget scratch work span memory)

Full source on GitHub

Import NLAlib.Eigensolvers.SpectralBisection.Certification.