The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Widget.Calc
15 declarations. Mathlib docs · Source
Calc widget
This file redefines the calc tactic so that it displays a widget panel allowing to create
new calc steps with holes specified by selected sub-expressions in the goal.
def CalcParams.ctorIdx E1 #
CalcParams → ℕ
theorem CalcParams.mk.injEq E0 #
∀ (toSelectInsertParams : SelectInsertParams) (isFirst : Bool) (indent : ℕ)
(toSelectInsertParams_1 : SelectInsertParams) (isFirst_1 : Bool) (indent_1 : ℕ),
({ toSelectInsertParams := toSelectInsertParams, isFirst := isFirst, indent := indent } =
{ toSelectInsertParams := toSelectInsertParams_1, isFirst := isFirst_1, indent := indent_1 }) =
(toSelectInsertParams = toSelectInsertParams_1 ∧ isFirst = isFirst_1 ∧ indent = indent_1)
theorem CalcParams.mk.inj E1 #
∀ {toSelectInsertParams : SelectInsertParams} {isFirst : Bool} {indent : ℕ}
{toSelectInsertParams_1 : SelectInsertParams} {isFirst_1 : Bool} {indent_1 : ℕ},
{ toSelectInsertParams := toSelectInsertParams, isFirst := isFirst, indent := indent } =
{ toSelectInsertParams := toSelectInsertParams_1, isFirst := isFirst_1, indent := indent_1 } →
toSelectInsertParams = toSelectInsertParams_1 ∧ isFirst = isFirst_1 ∧ indent = indent_1
def createCalc E1 #
Batteries.CodeAction.TacticCodeAction
Code action to create a calc tactic from the current goal.
structure CalcParams E1 #
Type
Parameters for the calc widget.
abbrev CalcParams.toSelectInsertParams E1 #
CalcParams → SelectInsertParams
ctor CalcParams.mk E0 #
SelectInsertParams → Bool → ℕ → CalcParams
abbrev CalcParams.isFirst E1 #
CalcParams → Bool
Is this the first calc step?
abbrev CalcParams.indent E1 #
CalcParams → ℕ
indentation level of the calc block.
instance instRpcEncodableCalcParams E0 #
Lean.Server.RpcEncodable CalcParams
instance instSelectInsertParamsClassCalcParams E0 #
SelectInsertParamsClass CalcParams
def suggestSteps E1 #
Array Lean.SubExpr.GoalsLocation →
Lean.Expr → CalcParams → Lean.MetaM (String × String × Option (String.Pos.Raw × String.Pos.Raw))
Return the link text and inserted text above and below of the calc widget.
def CalcPanel.rpc E1 #
CalcParams → Lean.Server.RequestM (Lean.Server.RequestTask ProofWidgets.Html)
Rpc function for the calc widget.
def CalcPanel E1 #
ProofWidgets.Component CalcParams
The calc widget.
def Lean.Elab.Tactic.tacticCalc? E1 #
Lean.ParserDescr
Create a calc proof.