Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterative execution of proofs #6

Open
zhangir-azerbayev opened this issue May 2, 2023 · 2 comments
Open

Iterative execution of proofs #6

zhangir-azerbayev opened this issue May 2, 2023 · 2 comments

Comments

@zhangir-azerbayev
Copy link

A common use case for the repl is writing proofs tactic by tactic. Currently, this requires re-executing the entire head of the source file. It would be great if we could iteratively execute tactic proofs. For example, I would want to be able to input

{ "cmd" : "import Mathlib.Algebra.Order.Ring.Abs\nimport Mathlib.Data.Nat.Order.Basic\nimport Mathlib.Tactic.Ring\n\nopen List\n\nexample (α : Type) (L M : List α) : (L ++ M ++ L).length = (M ++ L ++ L).length := by\n  simp\n" }

followed by

{ "cmd" : "  ring" , "env" : 0 }

Currently, the latter returns

{"sorries": [],
 "messages":
 [{"severity": "error",
   "pos": {"line": 2, "column": 2},
   "endPos": null,
   "data": "expected command"}],
 "env": 1}
@kim-em
Copy link
Contributor

kim-em commented May 5, 2023

What have the repl remember whatever the last command was for each environment, and then have an additional instruction add or something, which just appends a line to the previous command and re-runs it?

@zhangir-azerbayev
Copy link
Author

That is basically what I'm doing in pySagredo. However doing it this way squares runtime.

I haven't run into any scalability issues yet, so this issue isn't high priority. However, I assume I eventually will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants