Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Inductive day : Type :=
  2. | monday
  3. | tuesday
  4. | wednesday
  5. | thursday
  6. | friday
  7. | saturday
  8. | sunday.
  9.  
  10. Definition next_weekday (d:day) : day :=
  11. match d with
  12. | monday => tuesday
  13. | tuesday => wednesday
  14. | wednesday => thursday
  15. | thursday => friday
  16. | friday => saturday
  17. | saturday => sunday
  18. | sunday => monday
  19. end.
  20.  
  21. Example test_next_weekday:
  22. (next_weekday (next_weekday tuesday)) = friday
  23. Proof. simpl. reflexivity. Qed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement