Skip to content

Commit c97a077

Browse files
committed
more inf_often and continuously lemmas
1 parent 47568ee commit c97a077

3 files changed

Lines changed: 89 additions & 42 deletions

File tree

classical.v

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,27 @@ apply E_next.
5454
assumption.
5555
Qed.
5656

57+
Lemma not_continously_inf_often_not :
58+
forall (P : infseq T -> Prop) (s : infseq T),
59+
~ continuously P s -> inf_often (~_ P) s.
60+
Proof.
61+
intros P.
62+
cofix c.
63+
intros [x s] cnyP.
64+
apply Always.
65+
unfold continuously in cnyP.
66+
apply not_eventually_always_not in cnyP.
67+
apply always_now in cnyP.
68+
unfold not_tl in cnyP.
69+
apply not_always_eventually_not in cnyP.
70+
assumption.
71+
apply c.
72+
intros cnynP.
73+
contradict cnyP.
74+
apply E_next.
75+
assumption.
76+
Qed.
77+
5778
Lemma not_tl_and_tl_or_tl :
5879
forall (P Q : infseq T -> Prop) (s : infseq T),
5980
(~_ (P /\_ Q)) s -> ((~_ P) \/_ (~_ Q)) s.
@@ -67,4 +88,5 @@ End sec_classical.
6788
Implicit Arguments not_eventually_not_always [T P s].
6889
Implicit Arguments not_always_eventually_not [T P s].
6990
Implicit Arguments not_inf_often_continuously_not [T P s].
91+
Implicit Arguments not_continously_inf_often_not [T P s].
7092
Implicit Arguments not_tl_and_tl_or_tl [T P Q s].

infseq.v

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -381,30 +381,6 @@ Qed.
381381

382382
(* not_tl inside operators *)
383383

384-
Lemma continuously_not_inf_often :
385-
forall (P : infseq T -> Prop) (s : infseq T),
386-
continuously (~_ P) s -> ~ inf_often P s.
387-
Proof.
388-
intros P s cnyP.
389-
induction cnyP.
390-
destruct s as [e s].
391-
intros ifP.
392-
apply always_now in ifP.
393-
induction ifP.
394-
destruct s0 as [e0 s0].
395-
apply always_now in H.
396-
unfold not_tl in H.
397-
contradict H.
398-
trivial.
399-
apply always_invar in H.
400-
contradict IHifP.
401-
trivial.
402-
intro ioP.
403-
apply always_invar in ioP.
404-
contradict IHcnyP.
405-
trivial.
406-
Qed.
407-
408384
Lemma not_eventually_always_not :
409385
forall (P : infseq T -> Prop) (s : infseq T),
410386
~ eventually P s <-> always (~_ P) s.
@@ -493,6 +469,52 @@ apply always_invar in alP.
493469
assumption.
494470
Qed.
495471

472+
Lemma continuously_not_inf_often :
473+
forall (P : infseq T -> Prop) (s : infseq T),
474+
continuously (~_ P) s -> ~ inf_often P s.
475+
Proof.
476+
intros P s cnyP.
477+
induction cnyP.
478+
destruct s as [e s].
479+
intros ifP.
480+
apply always_now in ifP.
481+
induction ifP.
482+
destruct s0 as [e0 s0].
483+
apply always_now in H.
484+
unfold not_tl in H.
485+
contradict H.
486+
trivial.
487+
apply always_invar in H.
488+
contradict IHifP.
489+
trivial.
490+
intro ioP.
491+
apply always_invar in ioP.
492+
contradict IHcnyP.
493+
trivial.
494+
Qed.
495+
496+
Lemma inf_often_not_continuously :
497+
forall (P : infseq T -> Prop) (s : infseq T),
498+
inf_often (~_ P) s -> ~ continuously P s.
499+
Proof.
500+
intros P s ioP cnyP.
501+
induction cnyP.
502+
destruct s as [x s].
503+
apply always_now in ioP.
504+
induction ioP.
505+
destruct s0 as [x' s0].
506+
apply always_now in H.
507+
unfold not_tl in H0.
508+
contradict H0.
509+
assumption.
510+
apply always_invar in H.
511+
contradict IHioP.
512+
assumption.
513+
apply inf_often_invar in ioP.
514+
contradict IHcnyP.
515+
assumption.
516+
Qed.
517+
496518
(* connector facts *)
497519

498520
Lemma and_tl_comm :
@@ -572,11 +594,12 @@ Implicit Arguments eventually_monotonic_simple [T P Q s].
572594
Implicit Arguments inf_often_monotonic [T P Q s].
573595
Implicit Arguments continuously_monotonic [T P Q s].
574596

575-
Implicit Arguments continuously_not_inf_often [T P s].
576597
Implicit Arguments not_eventually_always_not [T P s].
577598
Implicit Arguments eventually_not_always [T P s].
578599
Implicit Arguments until_always_not_always [T J P s].
579600
Implicit Arguments always_not_eventually_not [T P s].
601+
Implicit Arguments continuously_not_inf_often [T P s].
602+
Implicit Arguments inf_often_not_continuously [T P s].
580603

581604
Implicit Arguments and_tl_comm [T P Q s].
582605
Implicit Arguments and_tl_assoc [T P Q R s].

map.v

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ CoFixpoint map (f: A->B) (s: infseq A): infseq B :=
1212
end.
1313

1414
Lemma map_Cons: forall (f:A->B) x s, map f (Cons x s) = Cons (f x) (map f s).
15+
Proof.
1516
intros. pattern (map f (Cons x s)). rewrite <- recons. simpl. reflexivity.
1617
Qed.
1718

18-
End sec_map.
19+
End sec_map.
20+
1921
Implicit Arguments map [A B].
2022
Implicit Arguments map_Cons [A B].
2123

@@ -41,7 +43,7 @@ Implicit Arguments zip [A B].
4143
Implicit Arguments zip_Cons [A B].
4244

4345
(* --------------------------------------------------------------------------- *)
44-
(* map and_tl temporal logic *)
46+
(* map and_tl temporal logic *)
4547

4648
Section sec_map_modalop.
4749

@@ -293,45 +295,45 @@ genclear efst. apply extensional_eventually.
293295
apply exteq_fst_zip.
294296
Qed.
295297

296-
Lemma continuously_map :
298+
Lemma inf_often_map :
297299
forall (f: A->B) (P: infseq A->Prop) (Q: infseq B->Prop),
298300
(forall s, P s -> Q (map f s)) ->
299-
forall (s: infseq A), continuously P s -> continuously Q (map f s).
301+
forall (s: infseq A), inf_often P s -> inf_often Q (map f s).
300302
Proof.
301303
intros f P Q PQ.
302-
apply eventually_map; apply always_map; assumption.
304+
apply always_map; apply eventually_map; assumption.
303305
Qed.
304306

305-
Lemma continuously_map_conv :
307+
Lemma inf_often_map_conv :
306308
forall (f: A->B) (P: infseq A->Prop) (Q: infseq B->Prop),
307309
extensional P -> extensional Q ->
308310
(forall s, Q (map f s) -> P s) ->
309-
forall (s: infseq A), continuously Q (map f s) -> continuously P s.
311+
forall (s: infseq A), inf_often Q (map f s) -> inf_often P s.
310312
Proof.
311313
intros f P Q eP eQ QP.
312-
apply eventually_map_conv.
313-
- apply extensional_always; assumption.
314-
- apply extensional_always; assumption.
315-
- apply always_map_conv; assumption.
314+
apply always_map_conv; apply eventually_map_conv; trivial.
316315
Qed.
317316

318-
Lemma inf_often_map :
317+
Lemma continuously_map :
319318
forall (f: A->B) (P: infseq A->Prop) (Q: infseq B->Prop),
320319
(forall s, P s -> Q (map f s)) ->
321-
forall (s: infseq A), inf_often P s -> inf_often Q (map f s).
320+
forall (s: infseq A), continuously P s -> continuously Q (map f s).
322321
Proof.
323322
intros f P Q PQ.
324-
apply always_map; apply eventually_map; assumption.
323+
apply eventually_map; apply always_map; assumption.
325324
Qed.
326325

327-
Lemma inf_often_map_conv :
326+
Lemma continuously_map_conv :
328327
forall (f: A->B) (P: infseq A->Prop) (Q: infseq B->Prop),
329328
extensional P -> extensional Q ->
330329
(forall s, Q (map f s) -> P s) ->
331-
forall (s: infseq A), inf_often Q (map f s) -> inf_often P s.
330+
forall (s: infseq A), continuously Q (map f s) -> continuously P s.
332331
Proof.
333332
intros f P Q eP eQ QP.
334-
apply always_map_conv; apply eventually_map_conv; trivial.
333+
apply eventually_map_conv.
334+
- apply extensional_always; assumption.
335+
- apply extensional_always; assumption.
336+
- apply always_map_conv; assumption.
335337
Qed.
336338

337339
(* Some corollaries *)

0 commit comments

Comments
 (0)