fix: unfold x<y in discrimination tree module

This commit is contained in:
Gabriel Ebner 2021-11-23 15:31:46 +01:00 committed by Leonardo de Moura
parent e15a656fd2
commit 7537fa7795
2 changed files with 15 additions and 1 deletions

View file

@ -259,7 +259,7 @@ where
step (e : Expr) := do
let e ← whnfCore e
match (← unfoldDefinition? e) with
| some e' => if isBadKey e' then return e else step e'
| some e' => if isBadKey e'.getAppFn then return e else step e'
| none => return e
/-- whnf for the discrimination tree module -/

View file

@ -0,0 +1,14 @@
example {x y : Nat} (h : y > x) : x < y := by
-- simp should unfold `>` when inserting into the discrimination tree
simp [h]
abbrev good (n : Nat) :=
n > 42
example (h : good n) : n > 42 := by
-- simp should unfold `good` when inserting into the discrimination tree
simp [h]
example {x y : Nat} (h : x ≠ y) : x ≠ y := by
-- ≠ is also an abbreviation
simp [h]