lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

`split` fails on Array matches

Open digama0 opened this issue 1 year ago • 0 comments

def foo {α} : Array α → Array α 
  | #[a] => #[a]
  | as => as

theorem foo_eq {α} (as : Array α) : foo as = as := by
  unfold foo; split <;> rfl -- split failed

Using simp [foo] instead gives the more helpful error message failed to generate equality theorems for `match` expression `foo.match_1` .

Tested on Lean (version 4.7.0-nightly-2024-02-23, x86_64-unknown-linux-gnu, commit 5a32473f6695, Release)

digama0 avatar Feb 23 '24 19:02 digama0