fact: Definition step (M: Mpm2) (x: Config) : option Config := match nth_error M (state x) with | None => None | Some halt => None | Some (zero b) => Some (1 + (state x), ((if b then (value1 x) else 0), (if b then 0 else (value2 x)))) | Some (inc b) => Some (1 + (state x), ((if b then 0 else 1) + (value1 x), (if b then 1 else 0) + (value2 x))) | Some (dec b y) => Some ( if b then match value2 x with | 0 => (y, (value1 x, 0)) | S n => (1 + (state x), (value1 x, n)) end else match value1 x with | 0 => (y, (0, value2 x)) | S n => (1 + (state x), (n, value2 x)) end) end.
imports: List ssrfun