Ltac vard_unfold :=
unfold runHandler,
getk,
setk,
delk,
resp in *; monad_unfold.

(* Specifications: *)
Lemma trace_well_formed :
forall st st' trace,
step_1_star st st' trace ->
(trace = [] \/ exists t i o, trace = t ++ [(i, o)]).
Lemma inputs_with_key_plus_key :
forall l k i o,
input_key i = k ->
inputs_with_key (l ++ [(i, o)]) k =
(inputs_with_key l k) ++ [i].
Lemma inputs_with_key_plus_not_key :
forall l k i o,
input_key i <> k ->
inputs_with_key (l ++ [(i, o)]) k =
(inputs_with_key l k).
Theorem step_1_star_trace_state_correct :
forall st st' trace,
step_1_star st st' trace ->
trace_state_correct trace st st'.
Lemma trace_state_correct_trace_correct :
forall st st' st'' trace t,
trace_state_correct trace st st' ->
trace_correct' st trace ->
step_1 st' st'' t ->
trace_correct' st (trace ++ t).
Theorem step_1_star_trace_correct' :
forall st st' trace,
step_1_star st st' trace ->
trace_correct' st trace.
Theorem step_1_star_trace_correct :
forall st trace,
step_1_star init st trace ->
trace_correct trace.