Record funspec (B:Type) :=
{ fs_A  : B -> Type
; fs_t  : B -> termMeas
; fs_P  : forall b, fs_A b -> pred world
; fs_Q  : forall b, fs_A b -> pred world
}.
Definition funspec_assumptions B b n (fss:list (label*funspec B) ) : pred prog :=
ALL l:_, ALL fs:_, !!(In (l,fs) fss) -->
let P' a := fs_P B fs b a &&
store_op (fun r => exists n', proj1_sig (fs_t B fs b) r n' /\ n' < n)
in funptr l (fs_A B fs b) (fs_t B fs b) P' (fs_Q B fs b).

Lemma verify_func_simple : forall psi l (G:pred prog) (A:Type) (P Q:A -> pred world) i (t:termMeas),
psi#l = Some i ->
(forall a n,
let Pr  := P a && store_op (fun r' => proj1_sig t r' n) in
let Pr' a' := P a' && store_op (fun r' => exists n', proj1_sig t r' n' /\ n' < n) in
hoare n (funptr l A t Pr' Q && G) (Q a) Pr i FF) ->
verify_prog psi G ->
verify_prog psi (funptr l A t P Q && G).