lean4-htt/tests/lean/run/simp_lemma_issue.lean
Leonardo de Moura 694e6f47dc fix(library/init/meta/smt/ematch,library/tactic/simp_lemmas): trick for adding equations of a definition to a simp/hinst lemma set
Before this commit, if we declared an equational lemma using 'def',
then it would not be correctly added to the simp/hinst lemma set.
The new test exposes the problem.
2017-01-18 02:05:04 -08:00

16 lines
348 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.

universe variables u
def ex {α : Type u} [comm_semiring α] (a : α) : 0 + a = a :=
zero_add a
local attribute [-simp] zero_add add_zero
attribute [simp] ex
example (a b : nat) : 0 + 0 + a = a :=
by simp
local attribute [-ematch] zero_add add_zero
attribute [ematch] ex
example (a b : nat) : 0 + 0 + a = a :=
by using_smt $ smt_tactic.eblast