CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 7 CS 1813 – Discrete Mathematics Equational Reasoning Back to the Future:

Slides:



Advertisements
Similar presentations
L14: Boolean Logic and Basic Gates
Advertisements

CSE 20 Lecture 9 Boolean Algebra: Theorems and Proofs CK Cheng April 26, 2011 Lecture notes 1.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
1 CSE 20 – Discrete Math Lecture 10 CK Cheng 4/28/2010.
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 3 CS 1813 – Discrete Mathematics Truth Inference and the Logical Way.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
מבנה המחשב + מבוא למחשבים ספרתיים תרגול 1#
Boolean Algebra Module M4.1 Section 5.1. Boolean Algebra and Logic Equations Switching Algebra Theorems Venn Diagrams.
Chapter 9: Boolean Algebra
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Digital Logic Design ESGD2201
9/15/09 - L5 Boolean AlgebraCopyright Joanne DeGroat, ECE, OSU1 Boolean Algebra.
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Formal Theories SIE 550 Lecture Matt Dube Doctoral Student - Spatial.
CHAPTER 2 Boolean Algebra
Lecture 7 Topics –Boolean Algebra 1. Logic and Bits Operation Computers represent information by bit A bit has two possible values, namely zero and one.
CS1502 Formal Methods in Computer Science
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Laws (Theorems) of Boolean algebra Laws of Complementation oThe term complement means, to invert or to change 1's to 0's and 0's to 1's, for which purpose.
Boolean Algebras Lecture 27 Section 5.3 Wed, Mar 7, 2007.
+ CS 325: CS Hardware and Software Organization and Architecture Gates and Boolean Algebra Part 3.
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 2 CS 1813 – Discrete Mathematics Proofs Propositions and Calculuses.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Logic Circuits Lecture 3 By Amr Al-Awamry. Basic Definitions Binary Operators  AND z = x y = x yz=1 if x=1 AND y=1  OR z = x + y z=1 if x=1 OR y=1 
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Laws (Theorems) of Boolean algebra Laws of Complementation oThe term complement means, to invert or to change 1's to 0's and 0's to 1's, for which purpose.
ELEC Digital Logic Circuits Fall 2015 Boolean Algebra (Chapter 2) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 14 CS 1813 – Discrete Mathematics A Little Bit of Set Theory.
Using Number Sense to Solve One-Step Equations Lesson 2-5.
Today’s Topics Argument forms and rules (review)
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Introduction to Digital Electronics Lecture.
Boolean Algebra How gates get picked. Boolean Arithmetic Boolean ≠ Binary – Boolean – 1/0 only, no places Boolean addition:
Hoda Roodaki Boolean Algebra Hoda Roodaki
Using Number Sense to Solve One-Step Equations
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
Boolean Algebra.
Propositional Equivalence
Using Number Sense to Solve One-Step Equations
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
CHAPTER 2 Boolean Algebra
CHAPTER 1 : INTRODUCTION
Algebra substitution.
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Boolean Algebra.
Boolean Algebra.
FIGURES FOR CHAPTER 2 BOOLEAN ALGEBRA
Lecture 4 CS 1813 – Discrete Mathematics
Lecture 15 CS 1813 – Discrete Mathematics
CS 1813 – Discrete Mathematics
Lecture 12 CS 1813 – Discrete Mathematics
Propositional Calculus: Boolean Algebra and Simplification
Lecture 6 CS 1813 – Discrete Mathematics
Lecture 13 CS 1813 – Discrete Mathematics
CS 1813 – Discrete Mathematics
Boolean Algebra.
Quizzes CS 1813 – Discrete Mathematics
Number Properties Magic Book Foldable
Lecture 1 CS 1813 – Discrete Mathematics
Boolean Algebra Introduction CSCI 240
Lecture 11 CS 1813 – Discrete Mathematics
Boolean Algebra.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
Lecture 5 CS 1813 – Discrete Mathematics
Discrete Mathematics Lecture # 3.
Boolean Algebra How gates get picked.
Number Properties Magic Book Foldable
Lecture 8 CS 1813 – Discrete Mathematics
Linear Algebra Lecture 11.
Laws & Rules of Boolean Algebra
Presentation transcript:

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 7 CS 1813 – Discrete Mathematics Equational Reasoning Back to the Future: High-School Algebra

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 2 Some Laws of Algebra  a + 0 = a{+ identity}  (-a) + a = 0{+ complement}  a  1 = a{  identity}  a  0 = 0{  null}  a + b = b + a{+ commutative}  a + (b+c) = (a+b) + c{+ associative}  a  (b+c) = a  b + a  c {distributive law} Equations go both ways

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 3 Theorem (-1)  (-1) = 1 (-1)  (-1) = ((-1)  (-1)) + 0{+ id} = ((-1)  (-1)) + ((-1) + 1){+ comp} = (((-1)  (-1)) + (-1)) + 1{+ assoc} = (((-1)  (-1)) + (-1)  1) + 1{  id} = ((-1)  ((-1) + 1)) + 1{dist law} = ((-1)  0) + 1{+ comp} = 0 + 1{  null} = 1 + 0{+ comm} = 1{+ id} QED proof by equational reasoning

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 4 Laws of Boolean Algebra page 1 From Fig 2.1, Hall & O’Donnell, Discrete Math with a Computer, Springer, 2000

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 5 Laws of Boolean Algebra page 2 From Fig 2.1, Hall & O’Donnell, Discrete Math with a Computer, Springer, 2000

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 6 Theorem (a  False)  (b  True) = b equations {rule}substitution [formula in eqn / variable in rule] (p  False)  (q  True) names changed to clarify substitutions = False  (q  True) {  null}[p /a] = (q  True)  False {  comm} [False /a] [q  True /b] = q  True {  id}[q  True /a] = q {  id}[q /a] QED

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 7 Using Equational Proof Checker import Stdm th7 = (P `And` FALSE) `Or` ( Q `And` TRUE) `thmEq` Q pr7 = startProof ((P `And` FALSE) `Or` (Q `And` TRUE)) (FALSE `Or` (Q `And` TRUE), andNull) ((Q `And` TRUE) `Or` FALSE, orComm) (Q `And` TRUE, orID) (Q, andID) Notepad window Prelude> :cd DMf00 Prelude> :cd Lectures Prelude> :load lecture07.hs Reading file "lecture07.hs": Reading file "Stdm.lhs": Reading file "lecture07.hs": Hugs session for: C:\HUGS98\lib\Prelude.hs Stdm.lhs lecture07.hs Main> check_equation th7 pr7 The proof is correct Hugs Session Importing tools Green indicates cmd from user

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 8 Equations the Proof Checker Knows andNull orNull andID orID andIdempotent orIdempotent andComm orComm andAssoc orAssoc andDistOverOr orDistOverAnd deMorgansLawAnd deMorgansLawOr negTrue negFalse andCompl orCompl dblNeg currying implication contrapositive absurdity

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 9 Theorem (a  b)  b = b  absorption equations {rule}substitution [formula in eqn / variable in rule] (p  q)  q names changed to clarify substitutions = (p  q)  (q  True) {  id} [q /a] = (q  p)  (q  True) {  comm} [p /a] [q /b] = q  (p  True) {  dist over  }[q /a] [True /b] [p /c] = q  True {  null} [p /a] = q {  id}[q/a] QED

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 10 Theorem (a  b)  b = b  absorption equations {rule}substitution [formula in eqn / variable in rule] (p  q)  q names changed to clarify substitutions … exercise … = q

CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 11 Consistent, But Not Minimal redundancy among laws of Boolean algebra equations {rule}substitution [formula in eqn / variable in rule] p  q = (  p)  q {imp} [p /a] [q /b] =  (  ((  p)  q)) {dbl neg} [(  p)  q /a] =  ((  (  p))  (  q)) {DeMorgan  } [  p /a] [q /b] =  (p  (  q)) {dbl neg} [p /a] = (  p)  (  (  q)) {DeMorgan  } [p /a] [  q /b] = (  (  q))  (  p) {  comm} [  p /a] [  (  (q)) /b] = (  q)  (  p) {imp} [  q /a] [  p /b] QED Deriving the contrapositive law Theorem (contrapositive): a  b =  b   a A proof using laws other than the contrapositive law This proof is sloppy! Where’s the shortcut?

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