Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 5 CS 1813 – Discrete Mathematics

Similar presentations


Presentation on theme: "Lecture 5 CS 1813 – Discrete Mathematics"— Presentation transcript:

1 Lecture 5 CS 1813 – Discrete Mathematics
Lecture 5 - CS 1813 Discrete Math, University of Oklahoma 2/22/2019 Lecture 5 CS 1813 – Discrete Mathematics What Not and Rules Galore CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

2 Or Introduction and Or Elimination
Theorem (Or Commutes) a  b |– b  a a {IL} a  b Or Intro Left b {IR} a  b Or Intro Right a  b a |– c b |– c {E} c Or Elimination Suppose We could prove the formula b  a assuming a alone And we could prove b  a again, assuming b alone Then we could apply E to prove b  a assuming a  b assumptions temporarily admitted discharged by E a {IR} b  a b {IL} b  a remaining assumption a  b {E} b  a conclusion CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

3 CS 1813 Discrete Mathematics, Univ Oklahoma
What is Not? Definition of the Not Operator a means aFalse Rationale You don’t want False to follow from True So, if aFalse is True, then a better be False Which means, a must be True True means False - Right? So, True means FalseFalse (def’n of True) Consistent with definition of the Not operator All this stuff is rigged for consistency Countless logicians worked it out a long time ago Proofs of WFFs containing Not use this def’n CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

4 CS 1813 Discrete Mathematics, Univ Oklahoma
Modus Tollens Theorem (Modus Tollens) a  b, b |– a Proof This is a homework problem Proved in text, too Your job Express in natural deduction form Convert to proof-checker notation We will take it as a proven theorem Counting on you to succeed CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

5 Inference Rules Galore
Theorems become new inference rules thm cited on right (like a rule) premises above the line a  b b {modTol} a conclusion below a  b {Comm} b  a a  b {Comm} b  a ab bc {Chain} ac CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

6 Or Commutes Inside Not (a  b) |– (b  a)
Plan Prove b  a  a  b Cite Modus Tollens a  b, b |– a (a  b) {()Comm} (b  a) Not Or Commutes as rule assumption temporarily admitted Using Or-Commutes Theorem discharged by I b  a {Comm} a  b Using Modus Tollens {I} b  a  a  b (a  b) {modTol} remaining assumption (b  a) conclusion CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

7 Using Theorems as Inference Rules in the Proof Checker
andCommThm = Theorem [A `And` B] (B `And` A) andComm = Use andCommThm Prototype Citation — [Proof] `andComm` Prop conclusion here premises go here infix citation Just like ordinary rule-citation Except premises are in a sequence instead of a tuple CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

8 CS 1813 Discrete Mathematics, Univ Oklahoma
Curried Constructors Use - another constructor for the type Proof Use :: Theorem -> [Proof ] -> Prop -> Proof three arguments Familiar constructors for the type Proof AndI :: (Proof, Proof) -> Prop -> Proof two arguments AndEL :: Proof -> Prop -> Proof st premises ImpI :: Proof -> Prop -> Proof nd conclusion How many arguments do these require? Use (Theorem [A `And` B] (B `And` A)) Use andCommThm where andCommThm = Theorem [A `And` B] (B `And` A) Two arguments remain to be supplied First argument is specified (the theorem being cited) That leaves two other arguments Premises and conclusion remain to be supplied by citation CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

9 Preparing Theorems for Citation as Rules
define module in file named Lecture4Thms.hs import Lecture4Thms (to use def’ns elsewhere) module Lecture4Thms where andCommThm = Theorem [A `And` B] (B `And` A) andComm = Use andCommThm name for theorem name for citing theorem as inference rule orCommThm = Theorem [A `Or` B] (B `Or` A) orComm = Use orCommThm impChainThm = Theorem [A `Imp` B, B `Imp` C] (A `Imp` C) impChain = Use impChainThm import Lecture4Thms -- to cite theorems from Lecture4Thms.hs CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

10 Or-Commutes-In-Not Theorem and Proof in Proof-Checker Notation
Lecture 5 - CS 1813 Discrete Math, University of Oklahoma 2/22/2019 Or-Commutes-In-Not Theorem and Proof in Proof-Checker Notation orCommInNotFwdThm = Theorem [Not(A `Or` B)] (Not(B `Or` A)) proofOrCommInNotFwdThm = [ ( [ Assume(B `Or` A) ] { }`orComm` (A `Or` B)) { }`ImpI` ((B `Or` A) `Imp` (A `Or` B)) , Assume(Not(A `Or` B)) ] { }`modTol` (Not(B `Or` A)) Premise sequence for orComm [Proof] Assumption discharged by ImpI premises for modTol [Proof, Proof] At this point, again go to the Haskell session with lecture04.hs and again demonstrate use of proof checker. CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

11 Not Or Elimination – Left (a  b) |– a
Plan – Assume a Derive False Cite {I} (a  b) {()EL} a Not Or Elimination (Left) as rule assumption temporarily admitted means (a  b) (assumption of theorem) discharged by I a {IL} a  b Cite what rule? (a  b)  False {E} False Now what? {I} a  False means a (conclusion of theorem) CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

12 Not Or Elimination – Right (a  b) |– b
{()ER} b Not Or Elimination (Right) as rule Plan – Flip it around with {()Comm} Cite {()EL} (a  b) {()Comm} (b  a) Cite what rule? {()EL} b CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

13 DeMorgan’s Law for Or (Forward Half) (a  b) |– (a)  (b)
{DeMF} (a)(b) DeMorgan Or Fwd as rule Plan Derive halves of conclusion separately Cite {I} (a  b) {()EL} a (a  b) {()ER} b {I} (a)  (b) CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

14 DeMorgan’s Law for Or (Backward Half) (a)  (b) |– (a  b)
Plan Use {E} to derive False from a  b Cite {I} to conclude (a  b)False Hold onto your seat This proof is supercharged prove this as an exercise Admit for planned {E} Admit for planned {I} (a)  (b) (a)  (b) {EL} a {ER} b Discharged by {I} a  b Discharged by {E} a b { +&- } { +&- }  False  False {E} False {I} (a  b)  False CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

15 Rules Galore! — Theorems in Rule Form
(a  b) {DeMF} (a)(b) DeMorgan Or Fwd (a)(b) {DeMB} (a  b) DeMorgan Or Bkw a  b {Comm} b  a And Commutes a  b {Comm} b  a Or Commutes ab, bc {Chain} ac Implication Chain Rule (a  b) {()Comm} (b  a) Not Or Commutes a  b b {modTol} a Modus Tollens a a { +&- } False NeverBoth CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

16 CS 1813 Discrete Mathematics, Univ Oklahoma
What Is Discrete Math? discrete math An area of mathematics dealing with countable collections of entities Example Topics Logic Trees and graphs Functions and relations Grammars Combinatorics Number theory et cetera discreet math A math that shows good judgment in conduct Not covered in discrete math CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

17 CS 1813 Discrete Mathematics, Univ Oklahoma
End of Lecture CS Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page


Download ppt "Lecture 5 CS 1813 – Discrete Mathematics"

Similar presentations


Ads by Google