Equations
- Lean.Meta.Simp.instInhabitedResult = { default := { expr := default, proof? := default } }
@[inline]
- config : Lean.Meta.Simp.Config
- simpLemmas : Lean.Meta.SimpLemmas
- congrLemmas : Lean.Meta.CongrLemmas
- parent? : Option Lean.Expr
- dischargeDepth : Nat
Equations
- Lean.Meta.Simp.instInhabitedContext = { default := { config := default, simpLemmas := default, congrLemmas := default, parent? := default, dischargeDepth := default } }
Equations
- Lean.Meta.Simp.Context.mkDefault = do let a ← liftM Lean.Meta.getSimpLemmas let a_1 ← Lean.Meta.getCongrLemmas pure { config := { maxSteps := Lean.Meta.Simp.defaultMaxSteps, maxDischargeDepth := 2, contextual := false, memoize := true, singlePass := false, zeta := true, beta := true, eta := true, etaStruct := true, iota := true, proj := true, decide := true }, simpLemmas := a, congrLemmas := a_1, parent? := none, dischargeDepth := 0 }
@[inline]
Equations
- Lean.Meta.Simp.instMonadBacktrackSavedStateSimpM = { saveState := liftM Lean.Meta.saveState, restoreState := fun s => liftM (Lean.Meta.SavedState.restore s) }
- visit: Lean.Meta.Simp.Result → Lean.Meta.Simp.Step
- done: Lean.Meta.Simp.Result → Lean.Meta.Simp.Step
Equations
- Lean.Meta.Simp.instInhabitedStep = { default := Lean.Meta.Simp.Step.visit default }
Equations
- Lean.Meta.Simp.Step.result x = match x with | Lean.Meta.Simp.Step.visit r => r | Lean.Meta.Simp.Step.done r => r
- pre : Lean.Expr → Lean.Meta.SimpM Lean.Meta.Simp.Step
- post : Lean.Expr → Lean.Meta.SimpM Lean.Meta.Simp.Step
- discharge? : Lean.Expr → Lean.Meta.SimpM (Option Lean.Expr)
Equations
- Lean.Meta.Simp.instInhabitedMethods = { default := { pre := default, post := default, discharge? := default } }
@[inline]
Equations
- Lean.Meta.Simp.pre e = do let a ← read liftM (Lean.Meta.Simp.Methods.pre a e)
Equations
- Lean.Meta.Simp.post e = do let a ← read liftM (Lean.Meta.Simp.Methods.post a e)
Equations
- Lean.Meta.Simp.discharge? e = do let a ← read liftM (Lean.Meta.Simp.Methods.discharge? a e)
Equations
- Lean.Meta.Simp.getConfig = do let a ← readThe Lean.Meta.Simp.Context pure a.config
@[inline]
Equations
- Lean.Meta.Simp.withParent parent f = withTheReader Lean.Meta.Simp.Context (fun ctx => { config := ctx.config, simpLemmas := ctx.simpLemmas, congrLemmas := ctx.congrLemmas, parent? := some parent, dischargeDepth := ctx.dischargeDepth }) f
Equations
- Lean.Meta.Simp.getSimpLemmas = do let a ← readThe Lean.Meta.Simp.Context pure a.simpLemmas
Equations
- Lean.Meta.Simp.getCongrLemmas = do let a ← readThe Lean.Meta.Simp.Context pure a.congrLemmas
@[inline]
Equations
- Lean.Meta.Simp.withSimpLemmas s x = do let a ← get let cacheSaved : Lean.Meta.Simp.Cache := a.cache modify fun s => { cache := ∅, numSteps := s.numSteps } tryFinally (withTheReader Lean.Meta.Simp.Context (fun ctx => { config := ctx.config, simpLemmas := s, congrLemmas := ctx.congrLemmas, parent? := ctx.parent?, dischargeDepth := ctx.dischargeDepth }) x) (modify fun s => { cache := cacheSaved, numSteps := s.numSteps })