leanprover-community / leanprover-community/repl
Iterative execution of proofs
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 228
- Forks
- 69
- Avg merge
- 15m
- Merged PRs (30d)
- 4
Description
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}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the REPL handling of the JSON cmd and env fields and trace how the first proof input establishes environment 0. Reproduce the second input containing ring; done means tactic text can be executed incrementally against that environment without the current “expected command” error.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100