2015-01-03 06:07:31 +00:00
|
|
|
inductive day :=
|
2015-02-26 01:00:10 +00:00
|
|
|
monday | tuesday | wednesday | thursday | friday | saturday | sunday
|
2015-01-03 06:07:31 +00:00
|
|
|
|
|
|
|
open day
|
|
|
|
|
2015-02-26 00:20:44 +00:00
|
|
|
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
|
2015-01-03 06:07:31 +00:00
|
|
|
|
|
|
|
example : next_weekday (next_weekday monday) = wednesday :=
|
|
|
|
rfl
|