Warning
This is an experimental and incomplete proof-of-concept!
A syntax extension for Lean 4 that adds support for interactive holes1. The goal is to make it easier to interactively construct programs and direct-style proofs in a type directed way.
Holes can be introduced using following custom syntax:
syntax "?" : term
syntax "{!" (term)? "!}" : term
For examples, see Examples/Sample.lean.
A series of code actions are provided:
- Fill with contents
- Fill with elaborated contents
- Automatically fill a hole (NOTE: rudimentary support2)
- Refine hole
- Split hole
- Make definition
The same actions have been added to _
, ?_
, and sorry
.
This was inspired by this conversation with David Christiansen on Mastodon.
Agda docs:
- Agda: A Taste of Agda – Holes and case splitting
- Agda: Lexical structure – Holes
- Agda: Emacs Mode – Commands in the context of a goal
- Agda: Automatic Proof Search (Auto)
Idris: