JetBrains / arend-lib

Apache License 2.0
79 stars 23 forks source link

Allow additional arguments for \case in mcases #30

Closed valis closed 3 years ago

valis commented 3 years ago

mcases generates expressions of the form \case a_1 \as x_1, ... a_n \as x_n \return T \with { ... }. We can allow additional arguments for \case, i.e., generate expressions of the form \case a_1 \as x_1, ... a_n \as x_n, b_1 : B_1, ... b_k : B_k \return T \with { ... }. These expressions won't be matched in the \case and are needed only because their type will changes in each clause.

I'm not sure about syntax yet. Also, we can have a separate syntax for the special case when b_i : B_i is idp : a_j = x_j.