HW5-SOLUTIONS

# HW5-SOLUTIONS - Homework 5 Solutions Thanks to Sean Lavelle...

This preview shows pages 1–2. Sign up to view the full content.

Sheet1 Page 1 Homework 5 Solutions Thanks to Sean Lavelle for providing these solutions. Skip to #: 1 - 2 - 3 - 4 - 5 - 6 - 7 import Stdm impSelf = thmEq (Imp A A) TRUE {- Problem 1 -} --deMorgansLawAnd: (not(a and b)) = ((not a) or (not b)) thm1 = (Not(A `And` B)) `thmEq` ((Not A) `Or` (Not B)) prf1 = startProof (Not(A `And` B)) <-> (Not((Not(Not A)) `And` B), dblNeg) <-> (Not((Not(Not A)) `And` (Not(Not B))), dblNeg) <-> (Not(Not((Not A) `Or` (Not B))), deMorgansLawOr) <-> ((Not A) `Or` (Not B), dblNeg) {------------------------------------------------------------------------------------------------} {- Problem 2 -} --exclMiddle: (a or (not a)) = True thm2 = (A `Or` (Not A)) `thmEq` TRUE prf2 = startProof (A `Or` (Not A)) <-> ((Not A) `Or` A, orComm) <-> (A `Imp` A, implication) <-> (TRUE, impSelf) {------------------------------------------------------------------------------------------------} {- Problem 3 -} --negT: (not True) = False thm3 = (Not TRUE) `thmEq` FALSE prf3 = startProof(Not TRUE)

This preview has intentionally blurred sections. Sign up to view the full version.

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

### Page1 / 2

HW5-SOLUTIONS - Homework 5 Solutions Thanks to Sean Lavelle...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online