Definition now (P: T->Prop) (s: infseq T) : Prop :=
  match s with Cons x s => P x end.Definition next (P: infseq T -> Prop) (s: infseq T) : Prop :=
  match s with Cons x s => P s end.Definition consecutive  (R: T -> T -> Prop) (s: infseq T) : Prop :=
  match s with Cons x1 (Cons x2 s) => R x1 x2 end.CoInductive always1 (P: T->Prop) : infseq T -> Prop :=
  | Always1 : forall x s, P x -> always1 P s -> always1 P (Cons x s).CoInductive always1 (P: T->Prop) : infseq T -> Prop :=
  | Always1 : forall x s, P x -> always1 P s -> always1 P (Cons x s).CoInductive always (P: infseq T->Prop) : infseq T -> Prop :=
  | Always : forall s, P s -> always P (tl s) -> always P s.CoInductive always (P: infseq T->Prop) : infseq T -> Prop :=
  | Always : forall s, P s -> always P (tl s) -> always P s.CoInductive weak_until (J P: infseq T->Prop) : infseq T -> Prop :=
  | W0 : forall s, P s -> weak_until J P s
  | W_tl : forall s, J s -> weak_until J P (tl s) -> weak_until J P s.CoInductive weak_until (J P: infseq T->Prop) : infseq T -> Prop :=
  | W0 : forall s, P s -> weak_until J P s
  | W_tl : forall s, J s -> weak_until J P (tl s) -> weak_until J P s.CoInductive weak_until (J P: infseq T->Prop) : infseq T -> Prop :=
  | W0 : forall s, P s -> weak_until J P s
  | W_tl : forall s, J s -> weak_until J P (tl s) -> weak_until J P s.Inductive until (J P: infseq T->Prop) : infseq T -> Prop :=
  | U0 : forall s, P s -> until J P s
  | U_next : forall x s, J (Cons x s) -> until J P s -> until J P (Cons x s).Inductive until (J P: infseq T->Prop) : infseq T -> Prop :=
  | U0 : forall s, P s -> until J P s
  | U_next : forall x s, J (Cons x s) -> until J P s -> until J P (Cons x s).Inductive until (J P: infseq T->Prop) : infseq T -> Prop :=
  | U0 : forall s, P s -> until J P s
  | U_next : forall x s, J (Cons x s) -> until J P s -> until J P (Cons x s).CoInductive release (J P: infseq T->Prop) : infseq T -> Prop :=
  | R0 : forall s, P s -> J s -> release J P s
  | R_tl : forall s, P s -> release J P (tl s) -> release J P s.CoInductive release (J P: infseq T->Prop) : infseq T -> Prop :=
  | R0 : forall s, P s -> J s -> release J P s
  | R_tl : forall s, P s -> release J P (tl s) -> release J P s.CoInductive release (J P: infseq T->Prop) : infseq T -> Prop :=
  | R0 : forall s, P s -> J s -> release J P s
  | R_tl : forall s, P s -> release J P (tl s) -> release J P s.Inductive eventually (P: infseq T->Prop) : infseq T -> Prop :=
  | E0 : forall s, P s -> eventually P s
  | E_next : forall x s, eventually P s -> eventually P (Cons x s).Inductive eventually (P: infseq T->Prop) : infseq T -> Prop :=
  | E0 : forall s, P s -> eventually P s
  | E_next : forall x s, eventually P s -> eventually P (Cons x s).Inductive eventually (P: infseq T->Prop) : infseq T -> Prop :=
  | E0 : forall s, P s -> eventually P s
  | E_next : forall x s, eventually P s -> eventually P (Cons x s).Definition inf_often (P: infseq T->Prop) (s: infseq T) : Prop :=
  always (eventually P) s.Definition continuously (P: infseq T->Prop) (s: infseq T) : Prop :=  
  eventually (always P) s.(* temporal logic connectors *)
Definition impl_tl (P Q: infseq T -> Prop) : infseq T -> Prop :=
  fun s => P s -> Q s.Definition and_tl (P Q: infseq T -> Prop) : infseq T -> Prop :=
  fun s => P s /\ Q s.Definition or_tl (P Q: infseq T -> Prop) : infseq T -> Prop :=
  fun s => P s \/ Q s.Definition not_tl (P : infseq T -> Prop) : infseq T -> Prop := 
  fun s => ~ P s.(* constants *)
Definition True_tl : infseq T -> Prop := fun _ => True.Definition False_tl : infseq T -> Prop := fun _ => False.Notation "A ->_ B" := (impl_tl A B) (right associativity, at level 90).Notation "A /\_ B" := (and_tl A B) (right associativity, at level 80).Notation "A \/_ B" := (or_tl A B) (right associativity, at level 85).Notation "~_ A" := (not_tl A) (right associativity, at level 75).

(* Specifications: *)
Lemma now_hd : forall (P : T -> Prop) ex, now P ex -> P (hd ex).
Lemma always_inv : forall (inv: infseq T -> Prop), (forall x s, inv (Cons x s) -> inv s) -> forall s, inv s -> always inv s.
Lemma always_Cons : forall (x: T) (s: infseq T) P, always P (Cons x s) -> P (Cons x s) /\ always P s.
Lemma always_now : forall (x: T) (s: infseq T) P, always P (Cons x s) -> P (Cons x s).
Lemma always_now' : forall (P : infseq T -> Prop) ex, always P ex -> P ex.
Lemma always_invar : forall (x: T) (s: infseq T) P, always P (Cons x s) -> always P s.
Lemma always_tl : forall (s: infseq T) P, always P s -> always P (tl s).
Lemma always_not_false : forall s : infseq T, always (~_ False_tl) s.
Lemma always_true : forall s : infseq T, always True_tl s.
Lemma always_and_tl : forall (P Q : infseq T -> Prop), forall s, always P s -> always Q s -> always (P /\_ Q) s.
Lemma always_always : forall (P : infseq T -> Prop) s, always P s -> always (always P) s.
Lemma always_always1 : forall P (s: infseq T), always (now P) s -> always1 P s.
Lemma always1_always : forall P (s: infseq T), always1 P s -> always (now P) s.
Lemma always_weak_until : forall (J P : infseq T -> Prop) (s : infseq T), always J s -> weak_until J P s.
Lemma always_release : forall (J P : infseq T -> Prop) (s : infseq T), always P s -> release J P s.
Lemma always_inf_often : forall (P: infseq T -> Prop) (s : infseq T), always P s -> inf_often P s.
Lemma always_continuously : forall (P: infseq T -> Prop) (s : infseq T), always P s -> continuously P s.
Lemma weak_until_Cons : forall (x: T) (s: infseq T) J P, weak_until J P (Cons x s) -> P (Cons x s) \/ (J (Cons x s) /\ weak_until J P s).
Lemma weak_until_always : forall (J J' P : infseq T -> Prop) s, weak_until J P s -> always J' s -> weak_until (J' /\_ J) P s.
Lemma until_weak_until : forall (J P : infseq T -> Prop) (s : infseq T), until J P s -> weak_until J P s.
Lemma eventually_Cons : forall (x: T) (s: infseq T) P, eventually P (Cons x s) -> P (Cons x s) \/ eventually P s.
Lemma eventually_trans : forall (P Q inv: infseq T -> Prop), (forall x s, inv (Cons x s) -> inv s) -> (forall s, inv s -> P s -> eventually Q s) -> forall s, inv s -> eventually P s -> eventually Q s.
Lemma not_eventually : forall (P : infseq T -> Prop), forall x s, ~ eventually P (Cons x s) -> ~ eventually P s.
Lemma eventually_next : forall (s: infseq T) P, eventually (next P) s -> eventually P s.
Lemma eventually_always_cumul : forall (s: infseq T) P Q, eventually P s -> always Q s -> eventually (P /\_ always Q) s.
Lemma eventually_weak_until_cumul : forall (s: infseq T) P J, eventually P s -> weak_until J P s -> eventually (P /\_ weak_until J P) s.
Lemma weak_until_eventually : forall (P Q J: infseq T -> Prop), (forall s, J s -> P s -> Q s) -> forall s, J s -> weak_until J Q s -> eventually P s -> eventually Q s.
Lemma eventually_or_tl_intror : forall (P Q : infseq T -> Prop) s, eventually Q s -> eventually (P \/_ Q) s.
Lemma eventually_or_tl_introl : forall (P Q : infseq T -> Prop) s, eventually P s -> eventually (P \/_ Q) s.
Lemma eventually_or_tl_or : forall (P Q : infseq T -> Prop) s, eventually (P \/_ Q) s -> eventually P s \/ eventually Q s.
Lemma until_Cons : forall (x: T) (s: infseq T) J P, until J P (Cons x s) -> P (Cons x s) \/ (J (Cons x s) /\ until J P s).
Lemma until_eventually : forall (J P : infseq T -> Prop), forall s, until J P s -> eventually P s.
Lemma release_Cons : forall (x: T) (s: infseq T) J P, release J P (Cons x s) -> P (Cons x s) /\ (J (Cons x s) \/ release J P s).
Lemma inf_often_invar : forall (x: T) (s: infseq T) P, inf_often P (Cons x s) -> inf_often P s.
Lemma continuously_invar : forall (x: T) (s: infseq T) P, continuously P (Cons x s) -> continuously P s.
Lemma continuously_and_tl : forall (P Q : infseq T -> Prop) (s : infseq T), continuously P s -> continuously Q s -> continuously (P /\_ Q) s.
Lemma continuously_inf_often : forall (P : infseq T -> Prop) (s : infseq T), continuously P s -> inf_often P s.
Lemma now_monotonic : forall (P Q: T -> Prop), (forall x, P x -> Q x) -> forall s, now P s -> now Q s.
Lemma next_monotonic : forall (P Q: infseq T -> Prop), (forall s, P s -> Q s) -> forall s, next P s -> next Q s.
Lemma consecutive_monotonic : forall (P Q: T -> T -> Prop), (forall x y, P x y -> Q x y) -> forall s, consecutive P s -> consecutive Q s.
Lemma always_monotonic : forall (P Q: infseq T -> Prop), (forall s, P s -> Q s) -> forall s, always P s -> always Q s.
Lemma weak_until_monotonic : forall (P Q J K: infseq T -> Prop), (forall s, P s -> Q s) -> (forall s, J s -> K s) -> forall s, weak_until J P s -> weak_until K Q s.
Lemma until_monotonic : forall (P Q J K: infseq T -> Prop), (forall s, P s -> Q s) -> (forall s, J s -> K s) -> forall s, until J P s -> until K Q s.
Lemma release_monotonic : forall (P Q J K: infseq T -> Prop), (forall s, P s -> Q s) -> (forall s, J s -> K s) -> forall s, release J P s -> release K Q s.
Lemma eventually_monotonic : forall (P Q J: infseq T -> Prop), (forall x s, J (Cons x s) -> J s) -> (forall s, J s -> P s -> Q s) -> forall s, J s -> eventually P s -> eventually Q s.
Lemma eventually_monotonic_simple : forall (P Q: infseq T -> Prop), (forall s, P s -> Q s) -> forall s, eventually P s -> eventually Q s.
Lemma inf_often_monotonic : forall (P Q : infseq T -> Prop), (forall s, P s -> Q s) -> forall s, inf_often P s -> inf_often Q s.
Lemma cumul_eventually_always : forall (P Q : infseq T -> Prop) s, always P s -> eventually Q s -> eventually (P /\_ Q) s.
Lemma cumul_inf_often_always : forall (P Q : infseq T -> Prop) s, always P s -> inf_often Q s -> inf_often (P /\_ Q) s.
Lemma inf_often_monotonic_invar : forall (invariant P Q : infseq T -> Prop), (forall s, invariant s -> P s -> Q s) -> forall ex, always invariant ex -> inf_often P ex -> inf_often Q ex.
Lemma continuously_monotonic : forall (P Q : infseq T -> Prop), (forall s, P s -> Q s) -> forall s, continuously P s -> continuously Q s.
Lemma not_eventually_always_not : forall (P : infseq T -> Prop) (s : infseq T), ~ eventually P s -> always (~_ P) s.
Lemma always_not_eventually : forall (P : infseq T -> Prop) (s : infseq T), always (~_ P) s -> ~ eventually P s.
Lemma eventually_not_always : forall (P : infseq T -> Prop) (s : infseq T), eventually (~_ P) s -> ~ always P s.
Lemma weak_until_always_not_always : forall (J P : infseq T -> Prop) (s : infseq T), weak_until J P s -> always (~_ P) s -> always J s.
Lemma weak_until_latch_eventually : forall (P Q : infseq T -> Prop) ex, weak_until (P /\_ ~_ Q) (P /\_ Q) ex -> eventually Q ex -> eventually (P /\_ Q) ex.
Lemma always_not_eventually_not : forall (P : infseq T -> Prop) (s : infseq T), always P s -> ~ eventually (~_ P) s.
Lemma continuously_not_inf_often : forall (P : infseq T -> Prop) (s : infseq T), continuously (~_ P) s -> ~ inf_often P s.
Lemma inf_often_not_continuously : forall (P : infseq T -> Prop) (s : infseq T), inf_often (~_ P) s -> ~ continuously P s.
Lemma release_not_until : forall (J P : infseq T -> Prop) (s : infseq T), release J P s -> ~ until (~_ J) (~_ P) s.
Lemma until_not_release : forall (J P : infseq T -> Prop) (s : infseq T), until J P s -> ~ release (~_ J) (~_ P) s.
Lemma weak_until_not_until : forall (J P : infseq T -> Prop) (s : infseq T), weak_until (J /\_ ~_ P) (~_ J /\_ ~_ P) s -> ~ until J P s.
Lemma until_not_weak_until : forall (J P : infseq T -> Prop) (s : infseq T), until (J /\_ ~_ P) (~_ J /\_ ~_ P) s -> ~ weak_until J P s.
Lemma and_tl_comm : forall (P Q : infseq T -> Prop) (s : infseq T), (P /\_ Q) s <-> (Q /\_ P) s.
Lemma and_tl_assoc : forall (P Q R : infseq T -> Prop) (s : infseq T), ((P /\_ Q) /\_ R) s <-> (P /\_ Q /\_ R) s.
Lemma or_tl_comm : forall (P Q : infseq T -> Prop) (s : infseq T), (P \/_ Q) s <-> (Q \/_ P) s.
Lemma or_tl_assoc : forall (P Q R : infseq T -> Prop) (s : infseq T), ((P \/_ Q) \/_ R) s <-> (P \/_ Q \/_ R) s.
Lemma not_tl_or_tl : forall (P Q : infseq T -> Prop) (s : infseq T), (~_ (P \/_ Q)) s <-> ((~_ P) /\_ (~_ Q)) s.
Lemma not_tl_or_tl_and_tl : forall (P Q : infseq T -> Prop) (s : infseq T), ((~_ P) \/_ (~_ Q)) s -> (~_ (P /\_ Q)) s.