@@ -63,7 +63,7 @@ CoInductive until (J P: infseq T->Prop) : infseq T -> Prop :=
6363
6464Inductive eventually (P: infseq T->Prop ) : infseq T -> Prop :=
6565 | E0 : forall s, P s -> eventually P s
66- | E_next : forall x s, eventually P s -> eventually P (Cons x s).
66+ | E_next : forall x s, eventually P s -> eventually P (Cons x s).
6767
6868Definition inf_often (P: infseq T->Prop ) (s: infseq T) : Prop :=
6969 always (eventually P) s.
@@ -208,6 +208,27 @@ Proof.
208208intros x s P al. change (P (Cons x s) \/ eventually P (tl (Cons x s))). case al; auto.
209209Qed .
210210
211+ Lemma eventually_trans :
212+ forall (P Q inv: infseq T -> Prop),
213+ (forall x s, inv (Cons x s) -> inv s) ->
214+ (forall s, inv s -> P s -> eventually Q s) ->
215+ forall s, inv s -> eventually P s -> eventually Q s.
216+ Proof .
217+ intros P Q inv is_inv PeQ s invs ev. induction ev as [s Ps | x s ev IHev].
218+ apply PeQ; assumption.
219+ constructor 2. apply IHev. apply is_inv with x; assumption.
220+ Qed .
221+
222+ Lemma not_eventually :
223+ forall (P : infseq T -> Prop),
224+ forall x s, ~ eventually P (Cons x s) -> ~ eventually P s.
225+ Proof .
226+ intros P x s evCP evP.
227+ contradict evCP.
228+ apply E_next.
229+ assumption.
230+ Qed .
231+
211232Lemma eventually_next :
212233 forall (s: infseq T) P, eventually (next P) s -> eventually P s.
213234Proof .
@@ -256,17 +277,6 @@ induction ev as [s Ps | x s ev induc_hyp].
256277 apply induc_hyp; assumption.
257278Qed .
258279
259- Lemma eventually_trans :
260- forall (P Q inv: infseq T -> Prop),
261- (forall x s, inv (Cons x s) -> inv s) ->
262- (forall s, inv s -> P s -> eventually Q s) ->
263- forall s, inv s -> eventually P s -> eventually Q s.
264- Proof .
265- intros P Q inv is_inv PeQ s invs ev. induction ev as [s Ps | x s ev IHev].
266- apply PeQ; assumption.
267- constructor 2. apply IHev. apply is_inv with x; assumption.
268- Qed .
269-
270280(* inf_often and continuously facts *)
271281
272282Lemma inf_often_invar :
@@ -587,12 +597,13 @@ Implicit Arguments always_inf_often [T s P].
587597Implicit Arguments always_continuously [T s P].
588598
589599Implicit Arguments until_Cons [T x s J P].
590- Implicit Arguments eventually_Cons [T x s P].
600+ Implicit Arguments eventually_Cons [T x s P].
601+ Implicit Arguments eventually_trans [T P Q inv s].
602+ Implicit Arguments not_eventually [T P x s].
591603Implicit Arguments eventually_next [T P s].
592604Implicit Arguments eventually_always_cumul [T s P Q].
593605Implicit Arguments eventually_until_cumul [T s P J].
594606Implicit Arguments until_eventually [T P Q s J].
595- Implicit Arguments eventually_trans [T P Q inv s].
596607
597608Implicit Arguments inf_often_invar [T x s P].
598609Implicit Arguments continuously_invar [T x s P].
0 commit comments