(* 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 ->
if lookup_mem_table s args is Some v
then f args = Some v else True.