lean4-htt/src/Lean/Elab/GenInjective.lean
Sebastian Ullrich 2833c61a60 fix: respect preresolved names at resolveConst*
This makes sure we can properly quote e.g. `deriving` clauses and avoids
a suspicious `eraseMacroScopes` call (though not at `Elab.Syntax`, since
categories do not have to be declaration names)
2021-07-30 07:17:50 -07:00

16 lines
489 B
Text

/-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Lean.Elab.Command
import Lean.Meta.Injective
namespace Lean.Elab.Command
@[builtinCommandElab genInjectiveTheorems] def elabGenInjectiveTheorems : CommandElab := fun stx => do
let declName ← resolveGlobalConstNoOverload stx[1]
liftTermElabM none do
Meta.mkInjectiveTheorems declName
end Lean.Elab.Command