Zulip Chat Archive
Stream: mathlib4
Topic: rw!: unknown free variable _fvar.423
Shubakur Mitra (Jan 06 2026 at 20:40):
After updating Lean from v4.24.0 to v4.27.0-rc1 and mathlib from a77a0aea to 1723eba8, tactic rw! started failing with unknown free variable _fvar.423
MWE:
import Mathlib.Tactic
example {xs : List (ℕ × ℕ)} (h₁ : xs.map (·.1) = [0])
(h₂ : 0 < (xs.map (·.1)).length) (h₃ : (xs.map (·.1))[0] = 0) : True := by
rw! [h₁] at h₃ -- unknown free variable `_fvar.423`
Snir Broshi (Jan 06 2026 at 20:48):
A bit more minimized:
import Mathlib.Tactic.DepRewrite
/-- error: unknown free variable `_fvar.28` -/
#guard_msgs in
example {x : Bool} (h : x = x) : x = x := by
rw! [h] at h
cc @Aaron Liu
Aaron Liu (Jan 06 2026 at 21:24):
oh I'll take a look
Aaron Liu (Jan 06 2026 at 21:25):
@𝚠𝚘𝚓𝚌𝚒𝚎𝚌𝚑 𝚗𝚊𝚠𝚛𝚘𝚌𝚔𝚒 might want to take a look too
Aaron Liu (Jan 06 2026 at 21:26):
looks like it's a problem with cleanup casts
Aaron Liu (Jan 06 2026 at 21:26):
until it's fixed you can use rewrite! instead
Aaron Liu (Jan 06 2026 at 21:32):
ah I fixed it
Aaron Liu (Jan 06 2026 at 21:36):
Last updated: Feb 28 2026 at 14:05 UTC