-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from LPCIC/multigoal
msolve
- Loading branch information
Showing
21 changed files
with
457 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From elpi.apps Require Import eltac.cycle. | ||
|
||
Goal True /\ False /\ 1=1. | ||
split;[|split]. | ||
all: eltac.cycle 1. | ||
admit. | ||
reflexivity. | ||
exact I. | ||
Abort. | ||
|
||
Goal True /\ False /\ 1=1. | ||
split;[|split]. | ||
all: eltac.cycle -1. | ||
reflexivity. | ||
exact I. | ||
admit. | ||
Abort. | ||
|
||
Goal True /\ False /\ 1=1. | ||
split;[|split]. | ||
Fail all: eltac.cycle 3. | ||
Abort. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From elpi Require Export elpi. | ||
|
||
Elpi Tactic cycle. | ||
Elpi Accumulate lp:{{ | ||
|
||
pred read-arg i:sealed-goal, o:list argument. | ||
read-arg (nabla G) X :- pi x\ read-arg (G x) X. | ||
read-arg (seal (goal _ _ _ _ A)) A. | ||
|
||
pred cycle i:int, i:list sealed-goal, o:list sealed-goal. | ||
cycle N L PL :- N > 0, | ||
std.length L M, | ||
std.assert! (N < M) "not enough goals", | ||
std.split-at N L B A, | ||
std.append A B PL. | ||
cycle N L PL :- N < 0, | ||
std.length L M, | ||
N' is M + N, | ||
cycle N' L PL. | ||
|
||
msolve GL GS :- | ||
GL = [G|_], | ||
read-arg G [int N], | ||
if (N = 0) (GS = GL) (cycle N GL GS). | ||
|
||
}}. | ||
|
||
Elpi Typecheck. | ||
|
||
Tactic Notation "eltac.cycle" int(n) := elpi cycle ltac_int:(n). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ From elpi.apps.eltac Require Export | |
generalize | ||
fail | ||
clear | ||
cycle | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.