Given a definition `foo`, they were previously called `foo._unfold` until 4.7.0. We tried to rename them to `foo.def`, but it created too many issues in the Mathlib repo. We decided to rename it again to `foo.eq_def`. The new name is also consistent with the `eq_<idx>` theorems generated for different "cases". That is, `foo.eq_def` is the equality theorem for the whole definition, and `foo.eq_<idx>` is the equality theorem for case `<idx>`. cc @semorrison
20 lines
420 B
Text
20 lines
420 B
Text
import Lean
|
||
|
||
open Lean
|
||
open Lean.Meta
|
||
def tst (declName : Name) : MetaM Unit := do
|
||
IO.println (← getUnfoldEqnFor? declName)
|
||
|
||
inductive Wk: Nat -> Nat -> Type 0 where
|
||
| id: Wk n n
|
||
| step: Wk m n -> Wk (Nat.succ m) n
|
||
|
||
def wk_comp : Wk n m → Wk m l → Wk n l
|
||
| Wk.id, σ => σ
|
||
| Wk.step ρ, σ => Wk.step (wk_comp ρ σ)
|
||
|
||
#eval tst ``wk_comp
|
||
|
||
#check @wk_comp.eq_1
|
||
#check @wk_comp.eq_2
|
||
#check @wk_comp.eq_def
|