Section sec_classical.
Variable T : Type.
Proof using.
intros J P s.
case (classic (eventually P s)).
- intros evP wu.
left.
induction evP.
* apply U0. assumption.
* apply weak_until_Cons in wu.
case wu.
+ intros PC.
apply U0. assumption.
+ intros [Js wu'].
apply U_next; trivial.
apply IHevP.
assumption.
- intros evP wu.
right.
apply not_eventually_always_not in evP.
apply weak_until_always_not_always in wu; trivial.
Qed.
Proof using.
intros J P.
cofix c.
intros s.
case (classic (P s)).
- intros Ps un.
contradict un.
apply U0.
assumption.
- intros Ps.
case (classic (J s)); destruct s as [x s].
* intros Js un.
apply W_tl.
+ unfold and_tl, not_tl.
split; trivial.
+ simpl.
apply c.
intros unn.
contradict un.
apply U_next; trivial.
* intros Js un.
apply W0.
split; trivial.
Qed.
Proof using.
intros J P s wun.
case (classic (until (J /\_ ~_ P) (~_ J /\_ ~_ P) s)); trivial.
intros un.
contradict wun.
revert s un.
cofix c.
intros s.
case (classic (P s)).
- intros Ps un.
apply W0.
assumption.
- intros Ps.
case (classic (J s)); destruct s as [x s].
* intros Js un.
apply W_tl; trivial.
simpl.
apply c.
intros unn.
contradict un.
apply U_next; trivial.
split; trivial.
* intros Js un.
contradict un.
apply U0.
split; trivial.
Qed.

Lemma not_eventually_not_always :
forall (P : infseq T -> Prop) (s : infseq T),
~ eventually (~_ P) s -> always P s.