Skip to content

Commit 559eec7

Browse files
committed
standard equivalence for release
1 parent 8a18be3 commit 559eec7

2 files changed

Lines changed: 63 additions & 6 deletions

File tree

classical.v

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,37 @@ contradict alP.
6464
assumption.
6565
Qed.
6666

67+
Lemma not_until_release :
68+
forall (J P : infseq T -> Prop) (s : infseq T),
69+
~ until (~_ J) (~_ P) s -> release J P s.
70+
Proof.
71+
intros J P.
72+
cofix c.
73+
intros s.
74+
case (classic (J s)).
75+
intros Js un.
76+
destruct s as [x s].
77+
apply R0; trivial.
78+
case (classic (P (Cons x s))); trivial.
79+
intros Ps.
80+
contradict un.
81+
apply U0.
82+
apply Ps.
83+
intros Js un.
84+
destruct s as [x s].
85+
apply R_tl.
86+
case (classic (P (Cons x s))); trivial.
87+
intros Ps.
88+
contradict un.
89+
apply U0.
90+
apply Ps.
91+
simpl.
92+
apply c.
93+
intros unn.
94+
contradict un.
95+
apply U_next; trivial.
96+
Qed.
97+
6798
Lemma not_inf_often_continuously_not :
6899
forall (P : infseq T -> Prop) (s : infseq T),
69100
~ inf_often P s -> continuously (~_ P) s.
@@ -112,6 +143,7 @@ End sec_classical.
112143
Arguments weak_until_until_or_always [T J P s] _.
113144
Arguments not_eventually_not_always [T P s] _.
114145
Arguments not_always_eventually_not [T P s] _.
146+
Arguments not_until_release [T J P s] _.
115147
Arguments not_inf_often_continuously_not [T P s] _.
116148
Arguments not_continously_inf_often_not [T P s] _.
117149
Arguments not_tl_and_tl_or_tl [T P Q s] _.

infseq.v

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,24 @@ contradict IHcnyP.
651651
assumption.
652652
Qed.
653653

654+
Lemma release_not_until :
655+
forall (J P : infseq T -> Prop) (s : infseq T),
656+
release J P s -> ~ until (~_ J) (~_ P) s.
657+
Proof.
658+
intros J P s rl un.
659+
induction un as [s Ps |x s Js IHun IH].
660+
destruct s as [x s].
661+
unfold not_tl in Ps.
662+
apply release_Cons in rl.
663+
destruct rl as [Psr rl].
664+
contradict Ps.
665+
assumption.
666+
apply release_Cons in rl.
667+
destruct rl as [Ps rl].
668+
unfold not_tl in Js.
669+
case rl; trivial.
670+
Qed.
671+
654672
(* connector facts *)
655673

656674
Lemma and_tl_comm :
@@ -745,6 +763,7 @@ Arguments weak_until_always_not_always [T J P s] _ _.
745763
Arguments always_not_eventually_not [T P s] _ _.
746764
Arguments continuously_not_inf_often [T P s] _ _.
747765
Arguments inf_often_not_continuously [T P s] _ _.
766+
Arguments release_not_until [T J P s] _ _.
748767

749768
Arguments and_tl_comm [T P Q s].
750769
Arguments and_tl_assoc [T P Q R s].
@@ -755,14 +774,20 @@ Arguments not_tl_or_tl_and_tl [T P Q s] _ _.
755774

756775
Ltac monotony :=
757776
match goal with
758-
| [ |- now ?P ?s -> now ?Q ?s ] => apply now_monotonic
759-
| [ |- next ?P ?s -> next ?Q ?s ] => apply next_monotonic
777+
| [ |- now ?P ?s -> now ?Q ?s ] =>
778+
apply now_monotonic
779+
| [ |- next ?P ?s -> next ?Q ?s ] =>
780+
apply next_monotonic
760781
| [ |- consecutive ?P ?s -> consecutive ?Q ?s ] =>
761782
apply consecutive_monotonic
762-
| [ |- always ?P ?s -> always ?Q ?s ] => apply always_monotonic
763-
| [ |- weak_until ?J ?P ?s -> weak_until ?K ?Q ?s ] => apply weak_until_monotonic
764-
| [ |- until ?J ?P ?s -> until ?K ?Q ?s ] => apply until_monotonic
765-
| [ |- release ?J ?P ?s -> release ?K ?Q ?s ] => apply release_monotonic
783+
| [ |- always ?P ?s -> always ?Q ?s ] =>
784+
apply always_monotonic
785+
| [ |- weak_until ?J ?P ?s -> weak_until ?K ?Q ?s ] =>
786+
apply weak_until_monotonic
787+
| [ |- until ?J ?P ?s -> until ?K ?Q ?s ] =>
788+
apply until_monotonic
789+
| [ |- release ?J ?P ?s -> release ?K ?Q ?s ] =>
790+
apply release_monotonic
766791
| [ |- ?J ?s -> eventually ?P ?s -> eventually ?Q ?s ] =>
767792
apply eventually_monotonic
768793
| [ |- continuously ?P ?s -> continuously ?Q ?s ] =>

0 commit comments

Comments
 (0)