mathlib icon indicating copy to clipboard operation
mathlib copied to clipboard

refine_struct: case tags not working?

Open bryangingechen opened this issue 5 years ago • 2 comments

MWE:

import tactic

structure blah : Type :=
(f1 : ℕ)
(f2 : ℕ)

example : blah :=
begin
  refine_struct {..},
  case f1 {},
  /-
Invalid `case`: there is no goal tagged with suffix [f1].
state:
2 goals
case blah, f1
⊢ ℕ

case blah, f2
⊢ ℕ
-/
end

Also, the case tags don't show up in the widget view of the tactic state in VS Code (they still show up if I switch to the plain text view).

bryangingechen avatar Oct 25 '20 19:10 bryangingechen

@cipher1024 notes on Zulip that field f1 works instead.

Leaving this open for now since the tactic doc entry doesn't mention this (and the (text mode) tactic state says case), so there's still some potential for confusion here.

bryangingechen avatar Nov 07 '20 06:11 bryangingechen

field indeed lacks documentation: https://github.com/leanprover-community/mathlib/blob/master/src/tactic/interactive.lean#L437

cipher1024 avatar Nov 07 '20 06:11 cipher1024