To play this document inside your browser use ALT-N and ALT-P.
You can
save your edits
inside your browser and
load them back
(edits are also saved when you close the window). Finally you can
download
the file for offline editing.
Exercise 1.
Question 1. Define a small hierarchy with Semigroups and Monoids.
Question 2. Show that bool is a SemiGroup and then a Monoid.
Question 3. Add Magmas to the hierarchy.
- You will need to ammend the code before the start of question 1.
- However, Everything after HB.structure Definition SemiGroup must be left untouched.
Question 3 bis. Also add Unital Magmas
Exercise 2.
Question 1. Define Lie Algebras
Uncomment this when you're done
Question 2.
Show that square matrices form a lie algebra.
Exercise 3. Monads!
- Define monads and show that some classic monads are monads
- Also redefine monads with ret, bind and join, and define factories with
just ret and bind or ret and join.