Documentation

Complexity.Computability.Ram.Compiler.Language.Session.PhaseTimeBound

Separate uniform bounds for initialization and each callback #

Initialization and each request have their own asymptotic envelope on the same persistent execution. An expensive first request cannot spend unused setup budget. The envelopes and width multiplier are global, independent of the configuration, history and machine width.

The fixed raw request-word presentation contributes only to machine admission. Initialization still receives only the registered configuration, with its existing heap and memory. Each later entry receives just the current request and its actual retained state. Input fitting, allocation capacity and termination are obligations on every legal history, not assumptions excluding hard inputs.

These bounds count actual preloaded RAM invocations, including their wrappers. They do not charge an external streaming driver, port transport, serialization, initial input loading or arena preparation. Source correctness is independent.

def Complexity.Language.Session.PhaseTimeO {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} (session : Session (Program.Input.params α) request response) (encode : ι → Env request) (requestWords : ι → Array ℕ) (valid : α → List ι → Prop) (initSize : α → ℕ) (stepSize : α → ι → ℕ) (initGrowth stepGrowth : ℕ → ℕ) :

Separate uniform time bounds for actual initialization and each invocation. The interface author fixes both the current-request encoding and its raw words; neither may supply computed advice or candidate-selected padding. Reference loading requires its own justified protocol, not a proof-side request encoder.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[reducible, inline]
    abbrev Complexity.Language.Session.PhaseTimeOOn {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} (session : Session (Program.Input.params α) request response) (encode : ι → Env request) (requestWords : ι → Array ℕ) (valid : α → List ι → Prop) (initGrowth : α → ℕ) (stepGrowth : α → ι → ℕ) :

    State the two possibly multivariate growth expressions directly. In particular, a constant step growth gives one uniform per-request bound, not an amortized total bound. Neither expression is evaluated by the source program.

    Equations
    • session.PhaseTimeOOn encode requestWords valid initGrowth stepGrowth = session.PhaseTimeO encode requestWords valid initGrowth stepGrowth id id
    Instances For
      theorem Complexity.Language.Session.PhaseTimeO.mono_valid {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} {session : Session (Program.Input.params α) request response} {encode : ι → Env request} {requestWords : ι → Array ℕ} {valid valid' : α → List ι → Prop} {initSize : α → ℕ} {stepSize : α → ι → ℕ} {initGrowth stepGrowth : ℕ → ℕ} (time : session.PhaseTimeO encode requestWords valid initSize stepSize initGrowth stepGrowth) (restrict : ∀ (x : α) (inputs : List ι), valid' x inputs → valid x inputs) :
      session.PhaseTimeO encode requestWords valid' initSize stepSize initGrowth stepGrowth

      Restrict legal histories while retaining both global bounds, the width policy, the actual stateful computation and its separately charged phases.