@kha I had to add yet another hack to fix this issue. In notation declarations, names are resolved at notation declaration time. So, users do not expect them to be resolved again at tactic execution time. I addressed this problem by wrapping constants occurring in notation declarations with a "frozen_name" annotation. This transformation is only performed if m_in_quote is true. Then resolve_names_fn at elaborator.cpp will not try to resolve the names again. This change broke two other modules. `-` notation for inverting equations at `rw`, and `calc` expressions inside quotes. The broke for the same reason. They were not expecting the constants to be wrapped with an annotation.
17 lines
293 B
Text
17 lines
293 B
Text
local infix * := _root_.mul
|
||
|
||
namespace Y
|
||
def mul : bool → bool := λ b, b
|
||
|
||
example (m n : ℕ) : true :=
|
||
begin
|
||
definev k : ℕ := m * n,
|
||
definev a : bool := mul tt,
|
||
trivial
|
||
end
|
||
end Y
|
||
|
||
|
||
meta def is_mul : expr → option (expr × expr)
|
||
| ```(%%a * %%b) := some (a, b)
|
||
| _ := none
|