(* ------------------------------------------------------------------------- *)
(* General tactics *)
Ltac genclear H := generalize H; clear H.
Ltac clearall :=
repeat
match goal with [H : _ |- _ ] => clear H end
|| match goal with [H : _ |- _ ] => genclear H end.
(* ------------------------------------------------------------------------- *)
(* Infinite traces *)
Section sec_infseq.
Variable T: Type.
CoInductive infseq : Type := Cons : T -> infseq -> infseq.
Definition hd (s:infseq) : T := match s with Cons x _ => x end.
Definition tl (s:infseq) : infseq := match s with Cons _ s => s end.

(* Specifications: *)
Lemma recons : forall s, Cons (hd s) (tl s) = s.
Proof using.