Dense public input with a sparse mutable overlay -- proof internals #
theorem
Complexity.RAM.RegisterStore.DenseOverlay.write_coversZero_internal
(overlay : Store)
(hcanonical : Canonical overlay)
(hcovers : CoversZero overlay)
(address value : ℕ)
:
CoversZero (write overlay address value)
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.initial_coversZero_internal
(input : List Bool)
:
CoversZero (initial input).overlay
theorem
Complexity.RAM.RegisterStore.DenseOverlay.write_length_le_internal
(overlay : Store)
(address value : ℕ)
:
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.length_stepInstr_le_internal
(input : List Bool)
(instruction : Instr)
(snapshot : Snapshot)
:
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.length_run_le_internal
(program : Program)
(input : List Bool)
(fuel : ℕ)
(snapshot : Snapshot)
(hcanonical : Canonical snapshot.overlay)
:
List.length (run program input fuel snapshot).overlay ≤ List.length snapshot.overlay + unitTimeUpto program fuel (decode input snapshot)
theorem
Complexity.RAM.RegisterStore.DenseOverlay.encodedStoreLength_write_le_internal
(overlay : Store)
(address value : ℕ)
:
encodedStoreLength (write overlay address value) ≤ encodedStoreLength overlay + (Entry.encode (address, value + 1)).length
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.encodedStoreLength_stepInstr_le_internal
(input : List Bool)
(instruction : Instr)
(snapshot : Snapshot)
:
encodedStoreLength (stepInstr input instruction snapshot).overlay ≤ encodedStoreLength snapshot.overlay + 2 * (Instr.staticWidth instruction + instruction.logCost (decode input snapshot) + 1)
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.encodedStoreLength_step_le_internal
(program : Program)
(input : List Bool)
(snapshot : Snapshot)
:
encodedStoreLength (step program input snapshot).overlay ≤ encodedStoreLength snapshot.overlay + 2 * (programStaticWidth program + stepLogCost program (decode input snapshot) + 1)
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.encodedStoreLength_run_le_internal
(program : Program)
(input : List Bool)
(fuel : ℕ)
(snapshot : Snapshot)
(hcanonical : Canonical snapshot.overlay)
:
encodedStoreLength (run program input fuel snapshot).overlay ≤ encodedStoreLength snapshot.overlay + 2 * (unitTimeUpto program fuel (decode input snapshot) * (programStaticWidth program + 1) + logTimeUpto program fuel (decode input snapshot))
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.initial_length_run_le_internal
(program : Program)
(input : List Bool)
(fuel : ℕ)
:
List.length (run program input fuel (initial input)).overlay ≤ 1 + unitTimeUpto program fuel (initCfg input)
theorem
Complexity.RAM.RegisterStore.DenseOverlay.Snapshot.initial_encodedStoreLength_run_le_internal
(program : Program)
(input : List Bool)
(fuel : ℕ)
:
encodedStoreLength (run program input fuel (initial input)).overlay ≤ 2 * bitlen (input.length + 1) + 2 + 2 * (unitTimeUpto program fuel (initCfg input) * (programStaticWidth program + 1) + logTimeUpto program fuel (initCfg input))