File tree Expand file tree Collapse file tree 5 files changed +11
-110
lines changed Expand file tree Collapse file tree 5 files changed +11
-110
lines changed Original file line number Diff line number Diff line change 4848apps /coercion /src /coq_elpi_coercion_hook.ml
4949.filestoinstall
5050apps /tc /src /coq_elpi_tc_hook.ml
51+ apps /cs /src /coq_elpi_cs_hook.ml
Original file line number Diff line number Diff line change @@ -4,16 +4,16 @@ The `canonical_solution` app enables to program Coq canonical structure solution
44
55This app is experimental.
66
7- ## The canonical-solution predicate
7+ ## The cs predicate
88
9- The ` canonical-solution ` predicate lives in the database ` cs.db `
9+ The ` cs ` predicate lives in the database ` cs.db `
1010
1111``` elpi
12- % predicate [canonical-solution Ctx Lhs Rhs] used to unify Lhs with Rhs, with
12+ % predicate [cs Ctx Lhs Rhs] used to unify Lhs with Rhs, with
1313% - [Ctx] is the context
1414% - [Lhs] and [Rhs] are the terms to unify
1515:index (0 6 6)
16- pred canonical-solution i:goal-ctx, o:term, o:term.
16+ pred cs i:goal-ctx, o:term, o:term.
1717```
1818
1919By addings rules for this predicate one can recover from a CS instance search failure
@@ -34,7 +34,7 @@ Structure S : Type :=
3434
3535Elpi Accumulate cs.db lp:{{
3636
37- canonical-solution _ {{ sort lp:Sol }} {{ nat }} :-
37+ cs _ {{ sort lp:Sol }} {{ nat }} :-
3838 Sol = {{ Build_S nat }}.
3939
4040}}.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Structure S : Type :=
88
99Elpi Accumulate cs.db lp:{{
1010
11- canonical-solution _ {{ sort lp:Sol }} {{ nat }} :-
11+ cs _ {{ sort lp:Sol }} {{ nat }} :-
1212 Sol = {{ Build_S nat }}.
1313
1414}}.
@@ -28,7 +28,7 @@ Check eq_refl _ : (sort1 _) = nat1.
2828
2929Elpi Accumulate cs.db lp:{{
3030
31- canonical-solution _ {{ sort lp:Sol }} {{ bool }} :-
31+ cs _ {{ sort lp:Sol }} {{ bool }} :-
3232 % typing is wired in , do we want this?
3333 std.spy(Sol = {{ Prop }}).
3434
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Elpi Db cs.db lp:{{
77% - [Ctx] is the context
88% - [Lhs] and [Rhs] are the terms to unify
99:index (0 6 6)
10- pred canonical-solution i:goal-ctx, o:term, o:term.
10+ pred cs i:goal-ctx, o:term, o:term.
1111
1212}}.
1313
@@ -17,8 +17,8 @@ Elpi Tactic canonical_solution.
1717Elpi Accumulate lp:{{
1818
1919solve (goal Ctx _ {{ @eq lp:T lp:Lhs lp:Rhs }} _P []) _ :-
20- canonical-solution Ctx Lhs Rhs,
21- % std.assert! (P = {{ eq_refl lp:Lhs }}) "canonical-solution wrong solution".
20+ cs Ctx Lhs Rhs,
21+ % std.assert! (P = {{ eq_refl lp:Lhs }}) "cs: wrong solution".
2222 true.
2323
2424}}.
You can’t perform that action at this time.
0 commit comments