lean4-htt/tests/lean/run/2018.lean
James Gallicchio 37650f9147
fix: add done alternative to decreasing_with (#2019)
Previously `decreasing_with` failed if `simp_wf` closes the goal on its
own. This can cause undesired regressions when new `simp` lemmas are
introduced.

Closes #2018.
2023-01-09 09:46:37 -08:00

25 lines
524 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def works (l : List α) : List α :=
match l with
| [] => []
| _::tail =>
works tail
decreasing_by decreasing_tactic -- to force well-founded recursion
-- Both of these appear in mathlib
@[simp]
theorem add_zero (n : Nat) : n + 0 = n := by sorry
@[simp]
theorem lt_add_iff_pos_left (a : Nat) {b : Nat} :
a < b + a ↔ 0 < b
:= by sorry
-- Breaking this:
def should_still_work (l : List α) : List α :=
match l with
| [] => []
| _::tail =>
should_still_work tail
decreasing_by decreasing_tactic