5. Propositional Logic Truth Functions
Total Page:16
File Type:pdf, Size:1020Kb
5. Propositional Logic Truth functions The Lecture What are truth functions? ! Truth functions are generalizations of the familiar connectives ¬, ∧, ∨, →, !. ! Computers are ultimately based on truth functions that are welded into microprosessors inside the computer. ! Truth functions have interesting mathematical properties. Last Jouko Väänänen: Propositional logic viewed Truth function ! A truth function (also called a connective) is any function f from the set {0,1}n to the set {0,1}, for some n.. ! A truth function of n variables is called n-ary. A 2-ary truth function is called binary. ! Truth functions can be identified with truth tables. ! We have already defined the connectives ¬, ∧, ∨, →, ! ! We identify these with the corresponding truth functions. Last Jouko Väänänen: Propositional logic viewed More binary truth functions x y f(x,y) x y f(x,y) 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 x y f(x,y) x y f(x,y) 0 0 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed There are exactly 16 binary truth functions ¬ ∧ ! → v 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Last Jouko Väänänen: Propositional logic viewed A ternary truth function x y z f 1 1 1 (x,y,z)0 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 Last Jouko Väänänen: Propositional logic viewed A new connective: Sheffer stroke, also known as NAND Last Jouko Väänänen: Propositional logic viewed Definability of truth functions ! Disjunction can be defined in terms of negation and conjunction: A ∨ B = ¬(¬A ∧ ¬B) ! Sheffer stroke A|B can be defined in terms of negation and conjunction: A|B = ¬(A ∧ B) ! Negation and conjunction can be defined in terms of the Sheffer stroke: ¬A = A|A A∧B = (A|B)|(A|B) Last Jouko Väänänen: Propositional logic viewed Universal sets of connectives ! A set T of truth functions is universal if every truth function can be defined in terms of functions in T.