Lecture 5 CS 1813 – Discrete Mathematics

Slides:



Advertisements
Similar presentations
Differentiation – Product, Quotient and Chain Rules
Advertisements

Introduction to Proofs
Introduction to Theorem Proving
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
1 Introduction to Abstract Mathematics Valid AND Invalid Arguments 2.3 Instructor: Hayk Melikya
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 3 CS 1813 – Discrete Mathematics Truth Inference and the Logical Way.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
From Chapter 4 Formal Specification using Z David Lightfoot
Reading: Chapter 4, section 4 Nongraded Homework: Problems at the end of section 4. Graded Homework #4 is due at the beginning of class on Friday. You.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
C OURSE : D ISCRETE STRUCTURE CODE : ICS 252 Lecturer: Shamiel Hashim 1 lecturer:Shamiel Hashim second semester Prepared by: amani Omer.
Intro to Discrete Structures
MATH 224 – Discrete Mathematics
1 Inference Rules and Proofs (Z); Program Specification and Verification Inference Rules and Proofs (Z); Program Specification and Verification.
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 10 CS 1813 – Discrete Mathematics Quantify What? Reasoning with Predicates.
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 7 CS 1813 – Discrete Mathematics Equational Reasoning Back to the Future:
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
CS6133 Software Specification and Verification
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 2 CS 1813 – Discrete Mathematics Proofs Propositions and Calculuses.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Proof Tactics, Strategies and Derived Rules CS 270 Math Foundations of CS Jeremy Johnson.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 14 CS 1813 – Discrete Mathematics A Little Bit of Set Theory.
Today’s Topics Argument forms and rules (review)
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Sound Arguments and Derivations. Topics Sound Arguments Derivations Proofs –Inference rules –Deduction.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
March 23 rd. Four Additional Rules of Inference  Constructive Dilemma (CD): (p  q) (r  s) p v r q v s.
Chapter 7. Propositional and Predicate Logic
2. The Logic of Compound Statements Summary
Lecture Notes 8 CS1502.
Formal Logic CSC 333.
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
Lecture 4 CS 1813 – Discrete Mathematics
Lecture 15 CS 1813 – Discrete Mathematics
CS 1813 – Discrete Mathematics
Lecture 12 CS 1813 – Discrete Mathematics
Chapter 10: Mathematical proofs
Lecture 6 CS 1813 – Discrete Mathematics
Lecture 13 CS 1813 – Discrete Mathematics
Elementary Metamathematics
7.1 Rules of Implication I Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.
Sets and Logic…. Chapter 3
CS 1813 – Discrete Mathematics
Lecture 16 CS 1813 – Discrete Mathematics
CS201: Data Structures and Discrete Mathematics I
Quizzes CS 1813 – Discrete Mathematics
Mathematical Reasoning
Methods of Proof. Methods of Proof Definitions A theorem is a valid logical assertion which can be proved using Axioms: statements which are given.
Lecture 9 CS 1813 – Discrete Mathematics
Lecture 1 CS 1813 – Discrete Mathematics
CS 270 Math Foundations of CS
Lecture 11 CS 1813 – Discrete Mathematics
Applied Discrete Mathematics Week 1: Logic
Propositional Logic.
Computer Security: Art and Science, 2nd Edition
Chapter 7. Propositional and Predicate Logic
Lecture 8 CS 1813 – Discrete Mathematics
Foundations of Discrete Mathematics
Proof Tactics, Strategies and Derived Rules
Mathematical Reasoning
CS201: Data Structures and Discrete Mathematics I
Chapter 8 Natural Deduction
Presentation transcript:

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1st premises ImpI :: Proof -> Prop -> Proof 2nd 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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page

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