{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW4-SOLUTIONS

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

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.

Unformatted text preview: Sheet1 Page 1 Homework 4 Solutions Skip to #: 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 import Stdm import Hw3Thms import Lecture5Thms import Lecture7Thms import Lecture9Thms cp = check_proof {- Problem 1 -} p1 = Theorem[A `Imp` B] ((Not A) `Or` B) proof1 = (([Assume(A `Imp` B), [Assume(Not((Not A) `Or` B))] {---------------------} `deMorganOrFwd` ((Not (Not A)) `And` (Not B)) {-------------------------} `AndER` (B `Imp` FALSE)]) {-------------------------------------} `impChainRule` (A `Imp` FALSE) {---------------------} `OrIL` ((Not A) `Or` B), Assume(Not((Not A) `Or` B))) {-----------------------------------------------------} `ImpE` FALSE {----------------} `RAA` ((Not A) `Or` B) {------------------------------------------------------------------------------------------------} {- Problem 2 -} p2 = Theorem[A `Imp` B, A `Imp` (Not B)] ((Not A)) proof2 = ((Assume(A), Assume(A `Imp` B)) {---------------------------} `ImpE` (B), (Assume(A), Assume(A `Imp` (Not B))) {-------------------------------} `ImpE` (Not B)) {-----------------------------------------------------}`ImpE` (FALSE) {-----------}`ImpI` (A `Imp` FALSE) {------------------------------------------------------------------------------------------------} Sheet1 Page 2 {- Problem 3 -} p3 = Theorem[Not A] ((A `Imp` B) `And` (A `Imp` (Not B))) proof3 = (((Assume(A), Assume(A `Imp` FALSE)) {-------------------------------} `ImpE` (FALSE) {------}`CTR` (B) {------}`ImpI` (A `Imp` B), (Assume(A), Assume(A `Imp` FALSE)) {--------------------------------}`ImpE` (FALSE) {-----}`CTR` (Not B) {-----}`ImpI` (A `Imp` (Not B))) {--------------------------------------------------}`AndI`...
View Full Document

{[ snackBarMessage ]}