test(tests/lean/run): add basic pattern matching compilation test
This commit is contained in:
parent
7f7d318b22
commit
c66826787a
1 changed files with 16 additions and 0 deletions
16
tests/lean/run/eq1.lean
Normal file
16
tests/lean/run/eq1.lean
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
inductive day :=
|
||||||
|
monday, tuesday, wednesday, thursday, friday, saturday, sunday
|
||||||
|
|
||||||
|
open day
|
||||||
|
|
||||||
|
definition next_weekday : day → day,
|
||||||
|
next_weekday monday := tuesday,
|
||||||
|
next_weekday tuesday := wednesday,
|
||||||
|
next_weekday wednesday := thursday,
|
||||||
|
next_weekday thursday := friday,
|
||||||
|
next_weekday friday := monday,
|
||||||
|
next_weekday saturday := monday,
|
||||||
|
next_weekday sunday := monday
|
||||||
|
|
||||||
|
example : next_weekday (next_weekday monday) = wednesday :=
|
||||||
|
rfl
|
Loading…
Reference in a new issue