| 1 |
(* |
| 2 |
This test is sensitive to changes in which let-ins are expanded when checking |
| 3 |
for dependencies in constructors. |
| 4 |
If the (x := X) is not reduced, Foo1 won't be recognized as a conjunction, |
| 5 |
and if the (y := X) is reduced, Foo2 will be recognized as a conjunction. |
| 6 |
|
| 7 |
This tests the behavior of engine/termops.ml : prod_applist_assum, |
| 8 |
which is currently specified to reduce exactly the parameters. |
| 9 |
|
| 10 |
If dtauto is changed to reduce lets in constructors before checking dependency, |
| 11 |
this test will need to be changed. |
| 12 |
*) |
| 13 |
|
| 14 |
Parameter (P Q : Type). |
| 15 |
Inductive Foo1 (X : Type) (x := X) := foo1 : let y := X in P -> Q -> Foo1 x. |
| 16 |
Inductive Foo2 (X : Type) (x := X) := foo2 : let y := X in P -> Q -> Foo2 y. |
| 17 |
|
| 18 |
Goal P -> Q -> Foo1 nat. |
| 19 |
solve [dtauto]. |
| 20 |
Qed. |
| 21 |
|
| 22 |
Goal P -> Q -> Foo2 nat. |
| 23 |
Fail solve [dtauto]. |
| 24 |
Abort. |