Conv widget #
This is a slightly improved version of one of the examples that used to be
in the ProofWidget 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 : Nat) (all : Bool) (next : Path) : Path
- fun (depth : Nat) : 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.
Equations
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 =>.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Return the syntax to insert for the conv widget.
Factored out of insertEnter for easy testing.
Equations
- One or more equations did not get rendered due to their size.
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Rpc function for the conv widget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The conv widget.
Equations
- One or more equations did not get rendered due to their size.
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.
Equations
- Mathlib.Tactic.Conv.tacticConv? = Lean.ParserDescr.node `Mathlib.Tactic.Conv.tacticConv? 1024 (Lean.ParserDescr.nonReservedSymbol "conv?" false)