This PR factors out the `have`-telescope support used in `simp`, and implements it using the `MonadSimp` interface. The goal is to use this nice infrastructure for both `Meta.simp` and `Sym.simp`.
25 lines
549 B
Text
25 lines
549 B
Text
/-
|
||
Copyright (c) 2026 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||
Released under Apache 2.0 license as described in the file LICENSE.
|
||
Authors: Leonardo de Moura
|
||
-/
|
||
module
|
||
prelude
|
||
public import Lean.Expr
|
||
public section
|
||
namespace Lean.Meta
|
||
/-!
|
||
Abstract simplifier API
|
||
-/
|
||
|
||
inductive MonadSimp.Result where
|
||
| rfl
|
||
| step (e : Expr) (h : Expr)
|
||
deriving Inhabited
|
||
|
||
class MonadSimp (m : Type → Type) where
|
||
withNewLemmas (xs : Array Expr) (k : m α) : m α
|
||
dsimp : Expr → m Expr
|
||
simp : Expr → m MonadSimp.Result
|
||
|
||
end Lean.Meta
|