induction s; intros; auto.
simpl fold'.
remember (fold' (list key) (@cons key)) as g.
rewrite <- Heqg.
rewrite <- IHs2.
f_equal. simpl.
f_equal.
apply IHs1.
Qed.

Lemma mem_add_valid:
forall x s, valid s -> forall s', Some s' = mem_add' x s -> valid s'.