Reassociating structured native execution proofs #
Main results #
WordRAM.ExecWithin.seq_iff: split a block at its actual intermediate state and stage budgets.WordRAM.ExecWithin.seq_assoc: compose an already proved instruction block with the surrounding right-associated program, without repeating its execution proof.
Reassociation preserves the same data states and charged bound. This narrow proof-rule module avoids extending the interface of the widely imported structured-code core.
theorem Cslib.WordRAM.ExecWithin.seq_iff {B : Basis} {r w T : ℕ} {a b : Code B r} {x z : Data r} :
ExecWithin w (a.seq b) x z T ↔ ∃ (y : Data r) (T₁ : ℕ) (T₂ : ℕ), ExecWithin w a x y T₁ ∧ ExecWithin w b y z T₂ ∧ T₁ + T₂ ≤ T
Split sequential execution into actual intermediate data and charged stage budgets.
theorem Cslib.WordRAM.ExecWithin.seq_assoc {B : Basis} {r w T : ℕ} {a b c : Code B r} {x y : Data r} :
Sequential blocks may be regrouped while preserving every instruction charge.