Skip to content

unknown free variable in the info-view with rcases patterns #12369

@SnirBroshi

Description

@SnirBroshi

Prerequisites

Description

When using tactics that accept an rcases-like pattern such as rcases/obtain/ext placing the cursor inside the pattern sometimes shows unknown free variable errors in the info view.

Context

Zulip: 1 2

Steps to Reproduce

example (h : ∃ a : Nat, (∃ b, a = b + 1) ∧ 0 ≤ a) : True := by
  rcases h with ⟨_, ⟨b, rfl⟩, put_your_cursor_here_and_look_at_the_infoview⟩
  trivial

Place the cursor in the middle of the identifier put_your_cursor_here_and_look_at_the_infoview

Expected behavior: The info view should show the state and the expected type

Actual behavior: The info view shows:
Error updating: Error fetching goals: Rpc error: InternalError: unknown free variable `_fvar.136`.

Versions

Lean 4.29.0-nightly-2026-02-05
Target: x86_64-unknown-linux-gnu

Additional Information

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions