Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- simp: Lean.Elab.Tactic.SimpKind
- simpAll: Lean.Elab.Tactic.SimpKind
- dsimp: Lean.Elab.Tactic.SimpKind
Instances For
Equations
Equations
Implement a simp
discharge function using the given tactic syntax code.
Recall that simp
dischargers are in SimpM
which does not have access to Term.State
.
We need access to Term.State
to store messages and update the info tree.
Thus, we create an IO.ref
to track these changes at Term.State
when we execute tacticCode
.
We must set this reference with the current Term.State
before we execute simp
using the
generated Simp.Discharge
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- default: Lean.Elab.Tactic.Simp.DischargeWrapper
- custom: IO.Ref Lean.Elab.Term.State → Lean.Meta.Simp.Discharge → Lean.Elab.Tactic.Simp.DischargeWrapper
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.Simp.DischargeWrapper.default.with x = x none
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.elabSimpConfig optConfig Lean.Elab.Tactic.SimpKind.simp = Lean.Elab.Tactic.elabSimpConfigCore optConfig
- Lean.Elab.Tactic.elabSimpConfig optConfig Lean.Elab.Tactic.SimpKind.simpAll = do let __do_lift ← Lean.Elab.Tactic.elabSimpConfigCtxCore optConfig pure __do_lift.toConfig
Instances For
- ctx : Lean.Meta.Simp.Context
- simprocs : Lean.Meta.Simp.SimprocsArray
- starArg : Bool
Instances For
- none: Lean.Elab.Tactic.ResolveSimpIdResult
- expr: Lean.Expr → Lean.Elab.Tactic.ResolveSimpIdResult
- simproc: Lake.Name → Lean.Elab.Tactic.ResolveSimpIdResult
- ext: (ext₁? : Option Lean.Meta.SimpExtension) →
(ext₂? : Option Lean.Meta.Simp.SimprocExtension) →
(ext₁?.isSome || ext₂?.isSome) = true → Lean.Elab.Tactic.ResolveSimpIdResult
Recall that when we declare a
simp
attribute usingregister_simp_attr
, we automatically create asimproc
attribute. However, if the user createssimp
andsimproc
attributes programmatically, then one of them may be missing. Moreover, when we writesimp [seval]
, we want to retrieve both the simp and simproc sets. We want to hide from users thatsimp
andsimproc
sets are stored in different data-structures.
Instances For
Elaborate extra simp theorems provided to simp
. stx
is of the form "[" simpTheorem,* "]"
If eraseLocal == true
, then we consider local declarations when resolving names for erased theorems (- id
),
this option only makes sense for simp_all
or *
is used.
When recover := true
, try to recover from errors as much as possible so that users keep seeing
the current goal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.elabSimpArgs.isSimproc? e = pure none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- ctx : Lean.Meta.Simp.Context
- simprocs : Lean.Meta.Simp.SimprocsArray
- dischargeWrapper : Lean.Elab.Tactic.Simp.DischargeWrapper
Instances For
Create the Simp.Context
for the simp
, dsimp
, and simp_all
tactics.
If kind != SimpKind.simp
, the discharge
option must be none
TODO: generate error message if non rfl
theorems are provided as arguments to dsimp
.
The argument simpTheorems
defaults to getSimpTheorems
,
but allows overriding with an arbitrary mechanism to choose
the simp theorems besides those specified in the syntax.
Note that if the syntax includes simp only
, the simpTheorems
argument is ignored.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If stx
is the syntax of a simp
, simp_all
or dsimp
tactic invocation, and
usedSimps
is the set of simp lemmas used by this invocation, then mkSimpOnly
creates the syntax of an equivalent simp only
, simp_all only
or dsimp only
invocation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
simpLocation ctx discharge? varIdToLemmaId loc
runs the simplifier at locations specified by loc
,
using the simp theorems collected in ctx
optionally running a discharger specified in discharge?
on generated subgoals.
Its primary use is as the implementation of the
simp [...] at ...
and simp only [...] at ...
syntaxes,
but can also be used by other tactics when a Syntax
is not available.
For many tactics other than the simplifier,
one should use the withLocation
tactic combinator
when working with a location
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.Tactic.withSimpDiagnostics x = do let stats ← x liftM (Lean.Meta.Simp.reportDiag stats)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The following parsers for simp
arguments are not actually used at present in the
implementation of simp
above, but are useful for further tactics which need
to parse simp
arguments.
Extract the arguments from a simpArgs
syntax as an array of syntaxes
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extract the arguments from a dsimpArgs
syntax as an array of syntaxes
Equations
- One or more equations did not get rendered due to their size.