Mathematical Logic and Programming Languages Exercise #1

This is the first exercise. A solution should be about 45 lines of code. It is due in two days, that is Wednesday October 1, by class time (2:00 PM). You must submit your solution. It will not be graded, but it I will check that it is submitted and will glance over it. Be prepared to discuss what you have done. We will spend considerable time discussing this in class on Wednesday. You may be called upon to elaborate your submission.

In this exercise you will implement some simple algorithms for propositional logic in Haskell. You will use the file SimpleProp.hs that implements the data structures for propositional logic (Prop n) a pretty printer for propositional logic (pp), and a valuation function (value) for propositional logic. You may want to study these functions before you begin the exercise below.

Write the following functions

Put all these functions into a file called Ex1.hs, test your functions and submit it to D2L.