| 1 |
From elpi Require Export elpi. |
| 2 |
|
| 3 |
Elpi Tactic constructor. |
| 4 |
Elpi Accumulate lp:{{ |
| 5 |
|
| 6 |
solve (goal _ _ Ty _ _ as G) GS :- std.do! [ |
| 7 |
@ltacfail! _ => |
| 8 |
std.assert! (whd Ty [] (global (indt GR)) _) "The goal is not an inductive type", |
| 9 |
coq.env.indt GR _ _ _ _ Ks Kt, |
| 10 |
std.exists2 Ks Kt (k\ t\ sigma P\ |
| 11 |
coq.saturate t (global (indc k)) P, |
| 12 |
refine P G GS) |
| 13 |
]. |
| 14 |
|
| 15 |
solve _ _ :- coq.error "eltac.constructor: this should never happen". |
| 16 |
|
| 17 |
}}. |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
Tactic Notation "eltac.constructor" := elpi constructor. |