[Merged by Bors] - feat(Tactic/ExtractGoal + test/ExtractGoal): port extract_goal tactic#4595
[Merged by Bors] - feat(Tactic/ExtractGoal + test/ExtractGoal): port extract_goal tactic#4595
extract_goal tactic#4595Conversation
Co-authored-by: Alex J Best <alex.j.best@gmail.com>
…/mathlib4 into adomani_extractGoal
extract_goal tactic
extract_goal tacticextract_goal tactic
|
I'm sorry I don't have time to make this comment more precise right now (so maybe its just a useless comment), but part of me can't help feeling some of this approach is a bit low-tech somehow? e.g. there is a lot of manual matching on and joining of strings. Although I don't know precisely how to do it immediately I would quite like to see a version of this PR that targets |
|
Alex, I see what you are saying, although I do not really know how to actually put it in practice. I'm all for learning how to work with Syntax, but I am not really sure where to start. When you have the time, I'd be happy to hear some suggestions! In the meantime, I'll see that I can find! |
|
I will add a test that the extracted goal proves the given goal and emit a warning otherwise. However, I do not have time to do it right now! |
|
I tried and failed. I am unable to get my hands on the output of
I have added a couple of examples to the docs-module containing examples that would form good tests, if the above were implemented. Still, I think that the tactic already works very well as is and these improvements could come later on. An option would be to add something like |
|
@kmill, CI failed to build the tests, since I am running CI again to test this, but maybe you already know what the issue it! |
|
I'm not sure this is a CI issue per se, since it could be a difference between Lean in an editor and Lean on the command line. Maybe the options aren't actually guaranteed to be propagated into the pretty printer at line 135? I can take a look later. |
|
I looked closer at the diff: the current hypothesis is that
|
|
Yes, it seems to be this: on my local version, |
|
Ok, that's a known issue then. Add |
|
Thanks! bors r+ In a followup PR, feel free to add this to |
…ic (#4595) This is a first PR porting some of the functionality of the `extract_goal` tactic from mathlib3. Co-authored-by: Alex J Best <alex.j.best@gmail.com>
|
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
extract_goal tacticextract_goal tactic
…ic (#4595) This is a first PR porting some of the functionality of the `extract_goal` tactic from mathlib3. Co-authored-by: Alex J Best <alex.j.best@gmail.com>
…ic (#4595) This is a first PR porting some of the functionality of the `extract_goal` tactic from mathlib3. Co-authored-by: Alex J Best <alex.j.best@gmail.com>
As suggested in the now-merged #4595, introducing `extract_goal`, this PR adds `extract_goal` to the list of "Common" tactics.
…ic (#4595) This is a first PR porting some of the functionality of the `extract_goal` tactic from mathlib3. Co-authored-by: Alex J Best <alex.j.best@gmail.com>
As suggested in the now-merged #4595, introducing `extract_goal`, this PR adds `extract_goal` to the list of "Common" tactics.
This is a first PR porting some of the functionality of the
extract_goaltactic from mathlib3.It is my first attempt at porting a tactic, so do not restrain yourself from providing copious comments!