| 1 |
Inductive loop := L { deloop : loop }. |
| 2 |
|
| 3 |
Module M1. |
| 4 |
(* succeeds producing fix f := f0 _ with f0 := f0 _ for f *) |
| 5 |
Definition f := fix f (t : loop) : False := f (deloop t) with f (t : loop) := f (deloop t) for f. |
| 6 |
End M1. |
| 7 |
Module M2. |
| 8 |
(* Warning: Not a fully mutually defined fixpoint (f and f are not mutually dependent). |
| 9 |
then fails with "f already exists" (because we try to add 2 constants named f) *) |
| 10 |
Fail Fixpoint f (t : unit) := 0 with f (t : unit) := 1. |
| 11 |
End M2. |
| 12 |
|
| 13 |
Module M3. |
| 14 |
(* stack overflow *) |
| 15 |
Fail Fixpoint f _ := _ with f _ := _. |
| 16 |
End M3. |
| 17 |
Module M4. |
| 18 |
(* stack overflow *) |
| 19 |
Fail Fixpoint f (t : loop) := f (deloop t) with f (t : loop) := f (deloop t). |
| 20 |
End M4. |