LectureRvwMid1 - CS 2603 Applied Logic for Hardware and...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 1 CS 2603 Applied Logic for Hardware and Software Review of Propositional Calculus / Digital Circuits Natural Deduction, and Equation-based Reasoning
Background image of page 1

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

View Full Document Right Arrow Icon
CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 2 Truth Tables for Logical Operators P Q P Q False False False False True False True False False True True True P Q False True True True P Q False True True False P Q True True False True P Q True False False True ¬ P True False
Background image of page 2
CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 3 Semantic Reasoning with Truth Tables Proposition (WFF): ((P Q) (( ¬ P) Q)) P Q False False False True True False True True False True True True ( P Q) ( ¬ P) True True False False (( ¬ P) Q) False True True True ( ( P Q) (( ¬ P) Q)) False True True True Some True: prop is Satisfiable If they were all True: Tautology All False: Contradiction (not satisfiable) P Q( ( ¬ P) Q)) ( ( P Q) (( ¬ P) Q)) PQ P Q Verifying that a formula is a WFF
Background image of page 3

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

View Full Document Right Arrow Icon
CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 4 Rules of Inference Fig 2.1, Hall/O’Donnell Discrete Mathem ati cs with a Computer Springer, 2000
Background image of page 4
CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 5 Some Intrinsic Data Structures in Haskell ± Sequences (aka lists — in primitive PLs, done as linked lists) ² [x 1 , x 2 , …] all x’s must have same type ² Examples: [t] means a sequence with elements of type t 9 [1, 9, 3, 27] type: [Integer] 9 [And A B, Or P Q, B] type: [Prop] ± Tuples (like structs or records in other programming languages) ² (c 1 , c 2 ) pair – components may have different types ² (c 1 , c 2 , c 3 ) 3-tuple (longer tuples OK—must be at least 2 components) ² Examples: (t 1 , t 2 ) means a pair where component k has type t k 9 (7, And A B) type: (Integer, Prop) 9 (AndEL (Assume(A `And` B)) A, Assume B) type: (Proof, Proof) Proof Proof Prop Integer
Background image of page 5

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

View Full Document Right Arrow Icon
CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 6 Some Theorems in Rule Form a ¬ a ⎯⎯⎯⎯ { +&- } False NeverBoth ¬ (a b) ⎯⎯⎯⎯⎯ { ¬ ( )Comm} ¬ (b a) Not Or Commutes a b ¬ b ⎯⎯⎯⎯⎯⎯⎯ {modTol} ¬ a Modus Tollens a b ⎯⎯⎯ { Comm} b a Or Commutes a b ⎯⎯⎯ { Comm} b a And Commutes a b b c ⎯⎯⎯⎯⎯⎯ { Chain} a c Implication Chain Rule
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 23

LectureRvwMid1 - CS 2603 Applied Logic for Hardware and...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online