closes #1279 Originally reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/case.20in.20dependent.20match.20not.20triggering.20.28.3F.29/near/288328239
13 lines
342 B
Text
13 lines
342 B
Text
inductive Arrow : Type → Type → Type 1
|
||
| id : Arrow a a
|
||
| unit : Arrow Unit Unit
|
||
| comp : Arrow β γ → Arrow α β → Arrow α γ
|
||
deriving Repr
|
||
|
||
def Arrow.compose (f : Arrow β γ) (g : Arrow α β) : Arrow α γ :=
|
||
match f, g with
|
||
| id, g => g
|
||
| f, id => f
|
||
| f, g => comp f g
|
||
|
||
#eval Arrow.compose Arrow.unit Arrow.id
|