(* Lookup tables *)
Fixpoint lookup_mem_table (s : Sstate) args : option nat :=
match s with
| x :: xs => if x.1 == args
then Some x.2
else lookup_mem_table xs args
| [::] => None
end.

(* Specifications: *)
Lemma lookup_valid' s args :
state_wf s ->
forall v, lookup_mem_table s args = Some v ->
f args = Some v.
Lemma lookup_valid s args :
state_wf s ->
if lookup_mem_table s args is Some v
then f args = Some v else True.