@@ -8,7 +8,7 @@ Variable A B: Type.
88
99CoFixpoint map (f: A->B) (s: infseq A): infseq B :=
1010 match s with
11- Cons x s => Cons (f x) (map f s)
11+ | Cons x s => Cons (f x) (map f s)
1212 end .
1313
1414Lemma map_Cons: forall (f:A->B) x s, map f (Cons x s) = Cons (f x) (map f s).
@@ -340,29 +340,6 @@ induction ev as [(b, sB) QbsB | b sB ev induc_hyp].
340340 constructor 2. apply induc_hyp. exact al.
341341Qed .
342342
343- Lemma eventually_map_conv :
344- forall (f: A->B) (P: infseq A->Prop) (Q: infseq B->Prop),
345- extensional P -> extensional Q ->
346- (forall s, Q (map f s) -> P s) ->
347- forall s, eventually Q (map f s) -> eventually P s.
348- Proof .
349- intros f P Q extP extQ QP s ev.
350- assert (efst: eventually P (map fstAB (zip s (map f s)))).
351- - assert (evzip : eventually (fun sc => Q (map f (map fstAB sc))) (zip s (map f s))).
352- * clear extP QP P.
353- assert (alzip : (always (now (fun c : A * B => let (x, y) := c in y = f x)) (zip s (map f s)))).
354- + clear ev extQ. generalize s; clear s. cofix cf. intros (x, s). constructor.
355- -- simpl. reflexivity.
356- -- simpl. apply cf.
357- + apply (eventually_map_conv_aux f Q extQ s (map f s) alzip ev).
358- * clear ev. induction evzip as [((a, b), sAB) QabsAB | c sAB _ induc_hyp].
359- + constructor 1; simpl. apply QP. assumption.
360- + rewrite map_Cons. constructor 2. apply induc_hyp.
361- - genclear efst. apply extensional_eventually.
362- exact extP.
363- apply exteq_fst_zip.
364- Qed .
365-
366343Lemma eventually_map_conv_ext :
367344 forall (f: A->B) (P: infseq A->Prop) (Q: infseq B->Prop) (J : infseq A -> Prop),
368345 extensional P -> extensional Q -> extensional J ->
@@ -403,6 +380,18 @@ assert (efst: J (map fstAB (zip s (map f s))) -> eventually P (map fstAB (zip s
403380 + apply exteq_fst_zip.
404381Qed .
405382
383+ Lemma eventually_map_conv :
384+ forall (f: A->B) (P: infseq A->Prop) (Q: infseq B->Prop),
385+ extensional P -> extensional Q ->
386+ (forall s, Q (map f s) -> P s) ->
387+ forall s, eventually Q (map f s) -> eventually P s.
388+ Proof .
389+ intros f P Q extP extQ QP s.
390+ apply eventually_map_conv_ext with (J := True_tl); auto.
391+ - apply extensional_True_tl.
392+ - intros. apply E0. apply QP. assumption.
393+ Qed .
394+
406395Lemma eventually_map_monotonic :
407396 forall (f: A->B) (P Q J: infseq A->Prop) (K : infseq B -> Prop),
408397 (forall x s, J (Cons x s) -> J s) ->
@@ -506,14 +495,17 @@ Arguments next_map_conv [A B f P Q] _ [s] _.
506495Arguments consecutive_map [A B f P s] _.
507496Arguments consecutive_map_conv [A B f P s] _.
508497Arguments always_map [A B f P Q] _ [s] _.
498+ Arguments always_map_conv_ext [A B f P Q J] _ _ [s] _ _.
509499Arguments always_map_conv [A B f P Q] _ [s] _.
510500Arguments weak_until_map [A B f J P K Q] _ _ [s] _.
511501Arguments weak_until_map_conv [A B f J P K Q] _ _ [s] _.
512502Arguments until_map [A B f J P K Q] _ _ [s] _.
513503Arguments release_map [A B f J P K Q] _ _ [s] _.
514504Arguments release_map_conv [A B f J P K Q] _ _ [s] _.
515505Arguments eventually_map [A B f P Q] _ [s] _.
506+ Arguments eventually_map_conv_ext [A B f P Q J] _ _ _ _ _ [s] _ _.
516507Arguments eventually_map_conv [A B f P Q] _ _ _ [s] _.
508+ Arguments eventually_map_monotonic [A B f P Q] _ _ _ _ _ [s] _ _ _.
517509Arguments inf_often_map [A B f P Q] _ [s] _.
518510Arguments inf_often_map_conv [A B f P Q] _ _ _ [s] _.
519511Arguments continuously_map [A B f P Q] _ [s] _.
0 commit comments