Zulip Chat Archive

Stream: lean4

Topic: split with named hypotheses


Freddie Nash (Jun 11 2024 at 13:03):

Is standard lib variant of the split tactic that allows you name the per-branch hypothesis all at once in the same manner as rcases ... with ...? (currently I would use rename_i on each branch as necessary, but I'd much prefer juxtaposing the hypotheses at the top)

Jannis Limperg (Jun 11 2024 at 13:40):

You can use

split
next h1 =>
  ...
next h2 =>
  ...

as a slightly less ugly workaround.

Freddie Nash (Jun 11 2024 at 13:41):

Thanks, not seen next before

Freddie Nash (Jun 11 2024 at 14:14):

Patterned decomposition is another nice feature of rcases

Freddie Nash (Jun 11 2024 at 15:44):

next naturally doesn't allow the neat juxtaposition, and seems it doesn't seem to have quite the same behaviour with e.g. the else part of an if, but still good to know and I'll keep playing around with it

Jannis Limperg (Jun 11 2024 at 16:21):

Related issue: lean4#2745


Last updated: May 02 2025 at 03:31 UTC