Documentation

CslibFrontier.Algorithms.WordRAM.VariableElimination.Horner

Factor Entry Capacity (capFactor, stateCap) and Horner Scope Evaluation #

Multiplicative capacity bounds (capFactor and stateCap) bounding intermediate table values and bucket products, paired with evalScopeIdx implementing Horner mixed-radix index evaluation.

Main definitions #

Multiplicative factor capacity and Horner scope evaluation #

Multiplicative upper bound max 1 (maxEntry f) on entries of factor f.

theorem Cslib.Algorithms.WordRAM.VariableElimination.holdsFactor_read_entry_le {descAddr : ℕ} {f : Logic.PL.CSP.FactorTable ℕ ℕ} {s : DataStructure.Memory.State} (hf : HoldsFactor descAddr f s) (fIdx : ℕ) :
(if fIdx < s.mem (descAddr + 3) then s.mem (s.mem (descAddr + 2) + fIdx) else 0) ≤ capFactor f

Arguments for evaluating a factor's radix index via Horner's rule.

Instances For

    Read-only environment record forwarded into Horner scope-index iteration.

    Instances For

      Compute the flat table index of f.scope under an assignment via Horner.

      theorem Cslib.Algorithms.WordRAM.VariableElimination.evalScopeIdx_result {args : EvalScopeArgs} {outScope fScope : List ℕ} {s : DataStructure.Memory.State} (hout : WordRAM.Block.HoldsList args.outPtr outScope s.mem) (hout_len : outScope.length = args.outLen) (hsc : WordRAM.Block.HoldsList args.scopePtr fScope s.mem) (hsc_len : fScope.length = args.scopeLen) :
      (DataStructure.Memory.spec 0).clientResult s (evalScopeIdx args) = Nat.ofDigits args.dom (List.map (fun (v : ℕ) => if v = args.x then args.a else Lean.CSP.assignScope outScope (Logic.PL.CSP.lsbDecode args.dom outScope.length args.idx) v) fScope)

      Multiplicative state-capacity budget (stateCap), elimVarProg, and elimOrderLoop #