lean4-htt/tests/lean/run/wfEqns3.lean
Joachim Breitner f0b2621047
test: add guard_msgs to wfEqns tests (#4024)
otherwise we would not catch changes to the shape of these equational
lemmas.

Also, no need to manually trigger the generation of these lemmas.
2024-04-29 12:45:53 +00:00

20 lines
409 B
Text

def f (x : Nat) : Nat :=
if h : x = 0 then
1
else
f (x - 1) * 2
decreasing_by
apply Nat.pred_lt
exact h
/-- info: f.eq_1 (x : Nat) : f x = if h : x = 0 then 1 else f (x - 1) * 2 -/
#guard_msgs in
#check f.eq_1
/-- info: f.eq_def (x : Nat) : f x = if h : x = 0 then 1 else f (x - 1) * 2 -/
#guard_msgs in
#check f.eq_def
/-- error: unknown identifier 'f.eq_2' -/
#guard_msgs in
#check f.eq_2