Section sec_modal_op_lemmas.
Variable T : Type.
Proof using.
now destruct ex.
Qed.
(* always facts *)
Proof using.
intros P invP.
cofix c.
intros [x s] Pxs; apply Always; trivial.
apply c; apply invP in Pxs.
assumption.
Qed.
Proof using.
intros x s P al. change (P (Cons x s) /\ always P (tl (Cons x s))).
destruct al. split; assumption.
Qed.
Proof using.
intros x s P al. case (always_Cons x s P al); trivial.
Qed.
Proof using.
destruct ex.
apply always_now.
Qed.
Proof using.
intros x s P al. case (always_Cons x s P al); trivial.
Qed.
Proof using.
intros (x, s). simpl. apply always_invar.
Qed.
Proof using.
cofix c.
intros [x s].
apply Always.
- unfold not_tl, False_tl; auto.
- apply c.
Qed.
Proof using.
cofix c.
intros [x s].
apply Always.
- unfold True_tl; trivial.
- apply c.
Qed.
Proof using.
intros P Q.
cofix c.
intros s alP alQ.
destruct alP.
destruct alQ.
apply Always.
- split; assumption.
- apply c; assumption.
Qed.
Proof using.
intro P.
cofix c.
constructor.
- auto.
- do 2 destruct s.
constructor; eauto using always_invar.
Qed.
Proof using.
intros P.
cofix alwn.
intros s a; case a; clear a s. intros (x, s); simpl. constructor.
- assumption.
- apply alwn; assumption.
Qed.
Proof using.
intros P.
cofix alwn. destruct 1. constructor; simpl.
- assumption.
- apply alwn; assumption.
Qed.
Proof using.
intros J P.
cofix c.
intros [x s] alJ.
apply W_tl.
- apply always_now in alJ.
assumption.
- apply c.
apply always_invar in alJ.
assumption.
Qed.
Proof using.
intros J P.
cofix c.
intros [x s] al.
apply R_tl.
- apply always_now in al.
assumption.
- simpl.
apply c.
apply always_invar in al.
assumption.
Qed.
Proof using.
intros P. cofix f. intros s a. destruct a. constructor.
- constructor 1. assumption.
- apply f. assumption.
Qed.
Proof using.
intros P s alP.
apply E0.
assumption.
Qed.
(* weak_until and eventually facts *)

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).