mathlib icon indicating copy to clipboard operation
mathlib copied to clipboard

nth_rewrite incorrectly unifies universe variables

Open fpvandoorn opened this issue 3 years ago • 0 comments

In the following example, nth_rewrite incorrectly instantiates the universe metavariable of h with 0, but still rewrites with the hypothesis. Note that rw does this correctly.

def foo (h : ∀ {α : Type*} (x : α), id x = x) : id tt = tt :=
begin
  nth_rewrite 0 [h], -- error in resulting proof term
  -- rw [h], -- works
end

fpvandoorn avatar Jun 27 '22 09:06 fpvandoorn