(** Proofs about validation. **)

(* Validation, interesting case.  We wish to add the proof of a new function to the proved set.  To do so, we must produce the appropriate hoare tuple which demonstrates the correctness of the function body. *)
Lemma validate_add : forall pu ps' ps i fs fd,
pu i = Some fd ->
satisfies_spec pu ps' |--
All a:(fs_A fs), hoare_ pu (func_post fs a) (func_pre fd fs a) (fnd_cmd fd) FF ->
validate ps' pu ps ->
validate ps' pu (fun i' => if eq_nat_dec i i' then Some fs else ps i').