lean4-htt/tests/lean/run/1026.lean
Leonardo de Moura 22b5c957e9
chore: rename automatically generated "unfold" theorems (#3767)
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
2024-03-25 21:41:26 +00:00

23 lines
386 B
Text

def foo (n : Nat) : Nat :=
if n = 0 then 0 else
let x := n - 1
have := match () with | _ => trivial
foo x
termination_by n
decreasing_by sorry
theorem ex : foo 0 = 0 := by
unfold foo
sorry
/--
info: foo.eq_def (n : Nat) :
foo n =
if n = 0 then 0
else
let x := n - 1;
let_fun this := foo.proof_4;
foo x
-/
#guard_msgs in
#check foo.eq_def