Documentation

Complexity.Computability.Ram.Compiler.Language.Session.SpaceBound

Physical-word bounds for session executions #

These bounds use the same domain, width admission and information boundary as the corresponding time interface. A fixed initial seed is the preloaded arena prefix, including metadata, not a purported exact set of reachable live cells. Every actual invocation unions its heap accesses into that seed; reused addresses count once. Registers, code, oracle work and external driver/transport are out. The time-and-space interface bounds one and the same decorated execution, not two separately selected successful histories. No change to source execution or runtime is made. Correctness and termination remain independent obligations.

def Complexity.Language.Session.SpaceO {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} (session : Session (Program.Input.params α) request response) (encode : ι → Env request) (valid : α → List ι → Prop) (size : α → List ι → ℕ) (growth : ℕ → ℕ) :

Uniform cumulative physical words on the same actual initialized trace.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Complexity.Language.Session.TimeSpaceO {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} (session : Session (Program.Input.params α) request response) (encode : ι → Env request) (valid : α → List ι → Prop) (size : α → List ι → ℕ) (timeGrowth spaceGrowth : ℕ → ℕ) :

    Actual instruction counts and physical words on one shared execution. Independent time and space witnesses must not be substituted for this claim.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Complexity.Language.Session.TimeSpaceO.space {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} (session : Session (Program.Input.params α) request response) (encode : ι → Env request) (valid : α → List ι → Prop) (size : α → List ι → ℕ) (timeGrowth spaceGrowth : ℕ → ℕ) (bounded : session.TimeSpaceO encode valid size timeGrowth spaceGrowth) :
      session.SpaceO encode valid size spaceGrowth

      Project the space bound without changing the accepted execution.

      theorem Complexity.Language.Session.TimeSpaceO.time {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} (session : Session (Program.Input.params α) request response) (encode : ι → Env request) (valid : α → List ι → Prop) (size : α → List ι → ℕ) (timeGrowth spaceGrowth : ℕ → ℕ) (bounded : session.TimeSpaceO encode valid size timeGrowth spaceGrowth) :
      session.TimeO encode valid size timeGrowth

      Project the actual time bound of this same physical-footprint trace.

      @[reducible, inline]
      abbrev Complexity.Language.Session.SpaceOOn {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} (session : Session (Program.Input.params α) request response) (encode : ι → Env request) (valid : α → List ι → Prop) (growth : α → List ι → ℕ) :

      State the mathematical physical-space scale directly on the protocol data.

      Equations
      Instances For
        theorem Complexity.Language.Session.SpaceO.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) (valid valid' : α → List ι → Prop) (size : α → List ι → ℕ) (growth : ℕ → ℕ) (space : session.SpaceO encode valid size growth) (restrict : ∀ (x : α) (inputs : List ι), valid' x inputs → valid x inputs) :
        session.SpaceO encode valid' size growth

        Restrict legality without changing admission, footprint or source entries.

        theorem Complexity.Language.Session.SpaceO.source {α : Type u} [Program.Input α] [Program.RamInput α] {ι : Type v} {request : List Ty} {response : Ty} {session : Session (Program.Input.params α) request response} {encode : ι → Env request} {valid : α → List ι → Prop} {size : α → List ι → ℕ} {growth : ℕ → ℕ} (space : session.SpaceO encode valid size growth) {x : α} {inputs : List ι} (legal : valid x inputs) :
        ∃ (replies : List (Value response × Heap)) (finish : Value session.stateTy) (finalHeap : Heap), session.Runs (Program.Input.args x) (Program.Input.heap x) (List.map encode inputs) replies finish finalHeap

        The given uniform word-space requirement supplies the same initialized source execution, without requiring a proposed source time budget.