Documentation

Batteries.Lean.Meta.Simp

Helper functions for using the simplifier. #

[TODO] Reunification of mkSimpContext' with core.

def Lean.Meta.Simp.mkEqSymm (e : Expr) (r : Result) :
MetaM Result

Flip the proof in a Simp.Result.

Equations
  • Lean.Meta.Simp.mkEqSymm e r = (fun (x : Option Lean.Expr) => { expr := e, proof? := x }) <$> match r.proof? with | none => pure none | some p => some <$> Lean.Meta.mkEqSymm p
Instances For
    def Lean.Meta.Simp.mkCast (r : Result) (e : Expr) :
    MetaM Expr

    Construct the Expr cast h e, from a Simp.Result with proof h.

    Equations
    Instances For
      def Lean.Meta.Simp.mkDischargeWrapper (optDischargeSyntax : Syntax) :
      Elab.Tactic.TacticM Elab.Tactic.Simp.DischargeWrapper

      Construct a Simp.DischargeWrapper from the Syntax for a simp discharger.

      Equations
      Instances For
        def Lean.Meta.Simp.mkSimpContext' (simpTheorems : SimpTheorems) (stx : Syntax) (eraseLocal : Bool) (kind : Elab.Tactic.SimpKind := Elab.Tactic.SimpKind.simp) (ctx ignoreStarArg : Bool := false) :
        Elab.Tactic.TacticM Elab.Tactic.MkSimpContextResult

        If ctx == false, the config argument is assumed to have type Meta.Simp.Config, and Meta.Simp.ConfigCtx otherwise. If ctx == false, the discharge option must be none

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For