| 1 |
Set Primitive Projections. |
| 2 |
|
| 3 |
Module M. |
| 4 |
|
| 5 |
CoInductive foo := Foo { |
| 6 |
foo0 : foo; |
| 7 |
foo1 : bar; |
| 8 |
} |
| 9 |
with bar := Bar { |
| 10 |
bar0 : foo; |
| 11 |
bar1 : bar; |
| 12 |
}. |
| 13 |
|
| 14 |
CoFixpoint f : foo := Foo f g |
| 15 |
with g : bar := Bar f g. |
| 16 |
|
| 17 |
Check (@eq_refl _ g.(bar0) <: f.(foo0).(foo0) = g.(bar0)). |
| 18 |
Check (@eq_refl _ g <: g.(bar1).(bar0).(foo1) = g). |
| 19 |
|
| 20 |
End M. |
| 21 |
|
| 22 |
Module N. |
| 23 |
|
| 24 |
Inductive foo := Foo { |
| 25 |
foo0 : option foo; |
| 26 |
foo1 : list bar; |
| 27 |
} |
| 28 |
with bar := Bar { |
| 29 |
bar0 : option bar; |
| 30 |
bar1 : list foo; |
| 31 |
}. |
| 32 |
|
| 33 |
Definition f_0 := Foo None nil. |
| 34 |
Definition g_0 := Bar None nil. |
| 35 |
|
| 36 |
Definition f := Foo (Some f_0) (cons g_0 nil). |
| 37 |
|
| 38 |
Check (@eq_refl _ f.(foo1) <: f.(foo1) = cons g_0 nil). |
| 39 |
|
| 40 |
End N. |