| 1 |
CoInductive P : nat -> Prop := |
| 2 |
| Pintro : forall n, P 0 -> P 0 -> P (S n) -> P n. |
| 3 |
|
| 4 |
Lemma P_any : forall n, P n. |
| 5 |
Proof. |
| 6 |
cofix IH. intros. |
| 7 |
assert (H: P 0). { apply IH. } Guarded. (*Guarded: anomaly*) |
| 8 |
apply Pintro. { apply H. } { apply H. } { apply IH. } |
| 9 |
Qed. (*Guard checker happy *) |