Definition trace (state: Type): Type := stream (state * MetaState state).
Identity Coercion trace_stream: trace >-> stream.
Definition singleton_trace {state: Type} s ms: trace state :=
fin_stream ((s, ms) :: nil).
Definition sequential_trace {state: Type} (tr: trace state) : Prop :=
forall k s ms s' ms',
tr k = Some (s, ms) ->
tr (S k) = Some (s' , ms') ->
ms = Terminating s'.
Definition sound_trace {state: Type} (R: state -> MetaState state -> Prop) (tr: trace state) : Prop :=
forall k s ms,
tr k = Some (s, ms) ->
R s ms.

Lemma sound_trace_and {state: Type}: forall R1 R2 (tr: trace state),
sound_trace (fun s ms => R1 s ms /\ R2 s ms) tr <->
sound_trace R1 tr /\ sound_trace R2 tr.