Zulip Chat Archive

Stream: lean4

Topic: Rpc error on hole in `cases with` tactic


Yakov Pechersky (Oct 31 2022 at 03:59):

The error I get in the goal view is Error updating: Error fetching goals: Rpc error: InternalError: unknown metavariable '?_uniq.138'., from:

theorem foo : True := by
  have :  x, x = 0 := 0, rfl
  cases this with | intro x h => _

Is cases incompatible with _ to see the goal?

Mario Carneiro (Oct 31 2022 at 04:52):

cases has special handling for _ (which can be surprising if you are using the _ tactic from mathlib/std which is shorthand for {}), it will just return the subgoal after the cases instead of inside the match arm

Mario Carneiro (Oct 31 2022 at 04:53):

that may be affecting the goal annotations

Kevin Buzzard (Oct 31 2022 at 04:59):

Can you put sorry and click just before the s?

Mario Carneiro (Oct 31 2022 at 05:00):

tested: you can, it works fine. It is only the _ itself that is messed up

Mario Carneiro (Oct 31 2022 at 05:00):

same thing happens with ?_ in that position

Mario Carneiro (Oct 31 2022 at 05:01):

same thing also happens with ?a in

theorem foo : True := by
  have :  x, x = 0 := 0, rfl
  cases this with | intro x h => ?a
  case a => sorry

Mario Carneiro (Oct 31 2022 at 05:02):

my guess is that cases isn't registering the metavars created for the subgoals here in the metavar context


Last updated: Dec 20 2023 at 11:08 UTC