Zulip Chat Archive

Stream: general

Topic: induction variables


Thorsten Altenkirch (Feb 21 2021 at 13:55):

What is the recommended way to supply variable name to induction and cases? I have been using with but this becomes unwieldy for more complicated inductive types.

Mario Carneiro (Feb 21 2021 at 14:10):

You can also use case, which reads better especially for big inductive types

Mario Carneiro (Feb 21 2021 at 14:12):

inductive foo
| a :   foo
| b :     foo
| c : foo    foo

example : foo  false :=
begin
  intro x,
  induction x,
  case a : n {
    sorry, },
  case b : m n {
    sorry, },
  case c : x n IH {
    sorry, },
end

Last updated: Dec 20 2023 at 11:08 UTC