correction of typos etc.

* mainly in `week4`
* also revised syntax and minor semantics
* modified some formulas to be more consistent with lecture
* reformatted homework assignments