Conv widget #
This is a slightly improved version of one of the examples that used to be
in the ProofWidgets library. It defines a conv? tactic that displays a widget panel
allowing to generate a conv call zooming to the subexpression selected in the goal.
A path to a subexpression from a root expression.
The constructors are chosen to be easily translatable into conv directions.
- arg (arg : â„•) (all : Bool) (next : Path) : Path
- fun (depth : â„•) : Path
- type
(next : Path)
: Path
Traverses into the binder type of a forall, let, or lambda. Currently out of these three options
convonly supports going into the binder type of a forall, but in the future ifconvgets support for going into let or lambda binding types with differentconvtactics we may add additional arguments to specify whether the binder is a forall, let, or lambda. Corresponds to theconvtacticslhsorarg. - body
(name : Lean.Name)
(next : Path)
: Path
Traverses into the body of a forall, let, or lambda. Corresponds to the
convtacticsintroorext.
Instances For
Given an e : Expr and pos : SubExpr.Pos, Path.ofSubExprPos expr pos generates
the Path corresponding to traversing pos starting at the reference expression e.
Instances For
Given a path : Path and xs : TSepArray ``enterArg ",", generate the conv syntax
corresponding to enter [xs,*] followed by traversing path. If loc is some fvar,
start with conv at fvar =>, otherwise if loc is none start with conv =>.
Instances For
Return the syntax to insert for the conv widget.
Factored out of insertEnter for easy testing.
Instances For
Return the text for the link in the conv widget that inserts the replacement,
and also return the replacement, and the range within the file to highlight after the
replacement is inserted. The highlighted range will always be the trailing skip.
Instances For
Rpc function for the conv widget.
Instances For
The conv widget.
Instances For
Display a widget panel allowing to generate a conv call zooming to the subexpression selected
in the goal or in the type of a local hypothesis or let-decl.