(* 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.

Lemma lookup_valid' s args :
state_wf s ->
forall v, lookup_mem_table s args = Some v ->
f args = Some v.