HW5 - Applied Logic Homework 5 Due Tuesday, Feb 19, 2:59pm...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Applied Logic Homework 5 Due Tuesday, Feb 19, 2:59pm (in class) Late Homework not accepted FAQ Special Rules for this assignment - Read before proceeding with your proofs 1. Use equational reasoning to prove that the following equations are valid. 2. Allowed citations. Your proofs may cite only the equations listed under "equations you may cite", or other equations that you prove before you cite them to justify steps in new proofs. 3. Citing theorems from previous problems. In your proof for problem n, you may cite the equation from problem m, where m < n, even if you did not succeed in doing problem m. 4. Each of the equations stated in the "Problems" section states an equation that the proof-checker already knows by a different name. You must not use the name the proof-checker already knows. That would amount to citing the equation in its own proof, which would render the proof vacuous. Besides, Haskell doesn't permit names to be redefined. A particular name can have only one meaning, and that meaning cannot change after it has been defined. Equations that you may cite 1. DeMorgan's law for "or" {deMorgansLawOr}: (not(a or b)) = ((not a) and (not b)) 2. Double negation {dblNeg}: (not(not a)) = a 3. Null law for "or" {orNull}: (a or True) = True 4. Identity law for "or" {orID}: (a or False) = a 5. Idempotent law for "or" {orIdempotent}: (a or a) = a 6. Commutative law for "or" {orComm}: (a or b) = (b or a) 7. Associative law for "or" {orAssoc}: ((a or b) or c) = (a or (b or c)) 8. "Or" distributes over "and" {orDistOverAnd}: (a or (b and c)) = ((a or b) and (a or c)) 9. Implication {implication}: (a -> b) = ((not a) or b) 10. Self-implication {impSelf}: (a -> a) = True [Note: impSelf is not defined in proof checker - use thmEq to define it] Notes 1. The proof checker has other names for most of the following equations. 2. Those names are listed along with the new names that you must use in your solutions. 3. Don't use the proof-checker names for these equations, and don't use the proof-checker names to cite these equations. 4. For example, if you want to cite de Morgan's law for "and" in your solution to problem 2, use the name "deMAnd". Problems 1. DeMorgan's law for "and" {deMAnd} [proof-checker name: deMorgansLawAnd]: (not(a and b)) = ((not a) or (not b)) 2. Law of the excluded middle {exclMiddle} [proof-checker name: orCompl]: (a or (not a)) = True 3. Negate True {negT}[proof-checker name: negTrue]: (not True) = False 4. Negate False {negF}[proof-checker name: negFalse]: (not False) = True 5. Null law for "and" {andF} [proof-checker name: andNull]: (a and False) = False 6. Identity law for "and" {andId} [proof-checker name: andID]: (a and True) = a 7. "And" distributes over "or" {andDist} [proof-checker name: andDistOverOr]: (a and (b or c)) = ((a and b) or (a and c)) What To Turn In * On Paper Equational proofs. A paper with the required proofs citing the allowed equations. Proof Check Transcript. A printed transcript of a Hugs session in which the proof-checker is invoked once for each equation/proof. Staple. Fasten multiple sheets with a proper staple, not a paper clip or other binding method. * In Digital Dropbox Proofs for Automated Checking. A .hs file submitted to digital dropbox on course website. The .hs file should contain, for problems 1, 2, 3, and 4 (you don't have to run the proof checker on the other problems), named expressions for (1) the equation the problem asks you to prove and (2) a proof of the theorem. Use the equation names in the problems to avoid conflicts with names already defined in the proof checker. File name. Name the file with the homework number (example: hw5), your given name, and your family name (example: hw5JaneSmith.hs). Put your name in a comment near the top of the file. Flagging. Use comments to mark each part of the file clearly to show which problem it solves. ...
View Full Document

Ask a homework question - tutors are online