fact: Fixpoint f_sos (r:env)(i:instr) {struct i} : option (env*instr) := match i with skip => None | assign x e => bind (bind (af r e) (fun n => uf r x n)) (fun r' => Some(r', skip)) | sequence i1 i2 => if eq_skip i1 then Some(r, i2) else bind2 (f_sos r i1) (fun r' i' => Some(r', sequence i' i2)) | while b i => bind (bf r b) (fun v => if v then Some(r, sequence i (while b i)) else Some(r, skip)) end.
imports: ZArith List syntax Lia