Logic Lesson 3: Tables and Models Flavio Zelazek flavio.zelazek@gmail.com October 22, 2014 Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 1 / 29
Previous lessons You can download previous lessons slides from: http://tiny.cc/logic2014 Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 2 / 29
Truth tables Lesson 3 1 Truth tables Summary Evaluation of sentences Evaluation of arguments 2 Predicate Logic Introduction Quantifiers The language L 3 Transcription into L 3 3 Models Substitutions Truth Validity Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 3 / 29
Summary Truth tables Summary X Y X X Y X Y X Y X Y T T F T T T T T F F F T F F F T T F T T F F F T F F T T Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 4 / 29
Truth tables Evaluation of complex sentences Evaluation of sentences A B C (A (B C)) ((A B) (A C)) T T T? T T F? T F T? T F F? F T T? F T F? F F T? F F F? Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 5 / 29
Truth tables Evaluation of arguments Evaluation of arguments How would you evaluate, for example, the argument: (1) The killer is Albert or Benjamin. (2) Benjamin is innocent. Therefore, (3) Albert is the killer. by using truth tables? Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 6 / 29
Exercise 1 Truth tables Evaluation of arguments (1) If I am not bored and I am not tired, I ll go to the theme park. (2) I am not either bored or tired. (3) I ll go to the theme park. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 7 / 29
Exercise 2 Truth tables Evaluation of arguments (1) I will lose the contest, unless I do a lot of exercise before it starts. (2) If I don t have enough time before the contest starts, I will not do a lot of exercise. (3) I will lose the contest, unless I have enough time before it starts. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 8 / 29
Exercise 3 Truth tables Evaluation of arguments (1) I ll stay focused on the lesson, unless Alexis distracts me. (2) Alexis distracts me if she wears a cyan shirt. (3) I ll stay focused on the lesson, unless Alexis wears a cyan shirt. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 9 / 29
Predicate Logic Lesson 3 1 Truth tables Summary Evaluation of sentences Evaluation of arguments 2 Predicate Logic Introduction Quantifiers The language L 3 Transcription into L 3 3 Models Substitutions Truth Validity Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 10 / 29
Predicate Logic Introduction Example 3.1: I can get no satisfaction (1) If Adam will sign up for Aerospace Engineering, Beatrix will do it as well. (2) Adam will sign up for Aerospace Engineering. Therefore, (3) Beatrix will sign up for Aerospace Engineering. (4) The firm SmartAssumption will assume Charles or Delilah. (5) The firm SmartAssumption will assume Charles. So, (6) The firm SmartAssumption will not assume Delilah. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 11 / 29
Predicate Logic Introduction Example 3.2: I (still) can get no satisfaction (1) Every man is mortal. (2) Socrates is a man. Therefore, (3) Socrates is mortal. (4) Some cats are black. (5) Fritz is a cat. Therefore, (6) Fritz is black. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 12 / 29
Predicate Logic Introduction Example 3.3: names and predicates Transcription guide: s : Socrates f : Fritz Mx : x is a man Cx : x is a cat Lxy : x loves y Socrates is a man. Fritz loves Socrates. Socrates loves Fritz only if Fritz is a cat. Ms Lfs Lsf Cf Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 13 / 29
Predicate Logic Quantifiers Example 3.4: variables and quantifiers Transcription guide: f : Fritz Cx : x is a cat Bx : x is black Lxy : x loves y Everything is black. Fritz loves something. Every cat is black. Some cats are black. No cats are loved. x Bx x Lfx x (Cx Bx) x (Cx Bx) x (Cx y Lyx) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 14 / 29
Predicate Logic The language L 3 The alphabet of L 3 The Alphabet of language L 3 for Predicate Logic contains: Names: a, b, c,... Variables: x, y, z,... Predicates: A, B, C,... Connectives,,,, Quantifiers:, Parentheses: (, ) (The name L 3 is from [Bencivenga 1984].) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 15 / 29
Predicate Logic The language L 3 The alphabet of L 3 The Alphabet of language L 3 for Predicate Logic contains: Names: a, b, c,... Variables: x, y, z,... Predicates: A, B, C,... Connectives,,,, Quantifiers:, Parentheses: (, ) (The name L 3 is from [Bencivenga 1984].) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 15 / 29
Predicate Logic The language L 3 The alphabet of L 3 The Alphabet of language L 3 for Predicate Logic contains: Names: a, b, c,... Variables: x, y, z,... Predicates: A, B, C,... Connectives,,,, Quantifiers:, Parentheses: (, ) (The name L 3 is from [Bencivenga 1984].) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 15 / 29
Predicate Logic The language L 3 The alphabet of L 3 The Alphabet of language L 3 for Predicate Logic contains: Names: a, b, c,... Variables: x, y, z,... Predicates: A, B, C,... Connectives,,,, Quantifiers:, Parentheses: (, ) (The name L 3 is from [Bencivenga 1984].) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 15 / 29
Predicate Logic The language L 3 The alphabet of L 3 The Alphabet of language L 3 for Predicate Logic contains: Names: a, b, c,... Variables: x, y, z,... Predicates: A, B, C,... Connectives,,,, Quantifiers:, Parentheses: (, ) (The name L 3 is from [Bencivenga 1984].) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 15 / 29
Predicate Logic The language L 3 The alphabet of L 3 The Alphabet of language L 3 for Predicate Logic contains: Names: a, b, c,... Variables: x, y, z,... Predicates: A, B, C,... Connectives,,,, Quantifiers:, Parentheses: (, ) (The name L 3 is from [Bencivenga 1984].) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 15 / 29
Predicate Logic The language L 3 The alphabet of L 3 The Alphabet of language L 3 for Predicate Logic contains: Names: a, b, c,... Variables: x, y, z,... Predicates: A, B, C,... Connectives,,,, Quantifiers:, Parentheses: (, ) (The name L 3 is from [Bencivenga 1984].) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 15 / 29
Predicate Logic The language L 3 Formation rules for L 3 Definition of Sentence of L 3 : i) If X is an n-ary predicate and each one of t 1,..., t n is a name or a variable, then Pt 1... t n is a sentence of L 3. ii) If X is a sentence of L 3, so is X. iii) If X and Y are sentences of L 3, so are (X Y ), (X Y ), (X Y ), and (X Y ). iv) If X is a sentence of L 3 and u is a variable, then u X and u X are sentence of L 3. v) Nothing else is a sentence of L 3. [Teller 2014, Vol. II, p. 9 (PDF p. 65)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 16 / 29
Predicate Logic The language L 3 Formation rules for L 3 Definition of Sentence of L 3 : i) If X is an n-ary predicate and each one of t 1,..., t n is a name or a variable, then Pt 1... t n is a sentence of L 3. ii) If X is a sentence of L 3, so is X. iii) If X and Y are sentences of L 3, so are (X Y ), (X Y ), (X Y ), and (X Y ). iv) If X is a sentence of L 3 and u is a variable, then u X and u X are sentence of L 3. v) Nothing else is a sentence of L 3. [Teller 2014, Vol. II, p. 9 (PDF p. 65)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 16 / 29
Predicate Logic The language L 3 Formation rules for L 3 Definition of Sentence of L 3 : i) If X is an n-ary predicate and each one of t 1,..., t n is a name or a variable, then Pt 1... t n is a sentence of L 3. ii) If X is a sentence of L 3, so is X. iii) If X and Y are sentences of L 3, so are (X Y ), (X Y ), (X Y ), and (X Y ). iv) If X is a sentence of L 3 and u is a variable, then u X and u X are sentence of L 3. v) Nothing else is a sentence of L 3. [Teller 2014, Vol. II, p. 9 (PDF p. 65)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 16 / 29
Predicate Logic The language L 3 Formation rules for L 3 Definition of Sentence of L 3 : i) If X is an n-ary predicate and each one of t 1,..., t n is a name or a variable, then Pt 1... t n is a sentence of L 3. ii) If X is a sentence of L 3, so is X. iii) If X and Y are sentences of L 3, so are (X Y ), (X Y ), (X Y ), and (X Y ). iv) If X is a sentence of L 3 and u is a variable, then u X and u X are sentence of L 3. v) Nothing else is a sentence of L 3. [Teller 2014, Vol. II, p. 9 (PDF p. 65)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 16 / 29
Predicate Logic The language L 3 Formation rules for L 3 Definition of Sentence of L 3 : i) If X is an n-ary predicate and each one of t 1,..., t n is a name or a variable, then Pt 1... t n is a sentence of L 3. ii) If X is a sentence of L 3, so is X. iii) If X and Y are sentences of L 3, so are (X Y ), (X Y ), (X Y ), and (X Y ). iv) If X is a sentence of L 3 and u is a variable, then u X and u X are sentence of L 3. v) Nothing else is a sentence of L 3. [Teller 2014, Vol. II, p. 9 (PDF p. 65)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 16 / 29
Predicate Logic The language L 3 Formation rules for L 3 Definition of Sentence of L 3 : i) If X is an n-ary predicate and each one of t 1,..., t n is a name or a variable, then Pt 1... t n is a sentence of L 3. ii) If X is a sentence of L 3, so is X. iii) If X and Y are sentences of L 3, so are (X Y ), (X Y ), (X Y ), and (X Y ). iv) If X is a sentence of L 3 and u is a variable, then u X and u X are sentence of L 3. v) Nothing else is a sentence of L 3. [Teller 2014, Vol. II, p. 9 (PDF p. 65)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 16 / 29
Bound and free variables Predicate Logic The language L 3 The Scope of a quantifier is the shortest full sentence which follows it. Everything inside this shortest full following sentence is said to be in the scope of the quantifier. A variable u is Bound just in case it occurs in the scope of a quantifier u or u. A variable is Free just in case it is not bound. [Teller 2014, Vol. II, p. 30 (PDF p. 77)] A sentence with one or more free variables is called an Open Sentence. A sentence which is not open is called a Closed Sentence. [Teller 2014, Vol. II, p. 34 (PDF p. 79)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 17 / 29
Predicate Logic Transcription into L 3 Exercise 4 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Cid loves Eve if he is taller than she is. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 18 / 29
Predicate Logic Transcription into L 3 Exercise 4 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Cid loves Eve if he is taller than she is. Tce Lce Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 18 / 29
Predicate Logic Transcription into L 3 Exercise 5 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Either Adam loves Eve or Eve loves Adam, but both love Cid. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 19 / 29
Predicate Logic Transcription into L 3 Exercise 5 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Either Adam loves Eve or Eve loves Adam, but both love Cid. (Lae Lea) (Lac Lec) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 19 / 29
Predicate Logic Transcription into L 3 Exercise 6 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Only if Cid is a cat does Eve love him. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 20 / 29
Predicate Logic Transcription into L 3 Exercise 6 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Only if Cid is a cat does Eve love him. Lec Cc Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 20 / 29
Predicate Logic Transcription into L 3 Exercise 7 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Everyone is loved by either Cid or Adam. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 21 / 29
Predicate Logic Transcription into L 3 Exercise 7 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Everyone is loved by either Cid or Adam. x (Lcx Lax) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 21 / 29
Predicate Logic Transcription into L 3 Exercise 8 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Either everyone is loved by Adam or everyone is loved by Cid. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 22 / 29
Predicate Logic Transcription into L 3 Exercise 8 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y Either everyone is loved by Adam or everyone is loved by Cid. x Lax x Lcx Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 22 / 29
Predicate Logic Transcription into L 3 Exercise 9 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y No one loves both Adam and Cid. Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 23 / 29
Predicate Logic Transcription into L 3 Exercise 9 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y No one loves both Adam and Cid. x (Lxa Lxc) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 23 / 29
Predicate Logic Transcription into L 3 Exercise 9 Transcription guide: a : Adam e : Eve c : Cid Cx : x is a cat Lxy : x loves y Txy : x is taller than y No one loves both Adam and Cid. x (Lxa Lxc) (also: x (Lxa Lxc)) Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 23 / 29
Models Lesson 3 1 Truth tables Summary Evaluation of sentences Evaluation of arguments 2 Predicate Logic Introduction Quantifiers The language L 3 Transcription into L 3 3 Models Substitutions Truth Validity Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 24 / 29
Models Interpretations An Interpretation, or a Model, consists of: a) A collection of objects, called the interpretation s Domain D. The domain always has at least one object. b) A name for each object in D. An object may have just one name or more than one name. c) A list of predicates. d) A specification of the objects of which each predicate is true and the objects of which each predicate is false. In this way every atomic sentence formed from predicates and names gets a truth value. e) Possibly some atomic propositions (or atomic sentence letters), that is zero place predicates. The interpretation specifies a truth value for any included atomic proposition. [Teller 2014, Vol. II, p. 16 (PDF p. 70)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 25 / 29
Substitutions Models Substitutions For any universally quantified sentence u X or existentially quantified sentence u X, the Substitution Instance of the sentence, with the name s substituted for the variable u (written X[s/u]), is the sentence formed by dropping the initial universal or existential quantifier and writing s for all free occurrences of u in X. [Teller 2014, Vol. II, p. 33 (PDF p. 78)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 26 / 29
Models Truth Truth in an interpretation A universally quantified closed sentence is true in an interpretation just in case all of the sentence s substitution instances, formed with names in the interpretation, are true in the interpretation. An existentially quantified closed sentence is true in an interpretation just in case at least one of the sentence s substitution instances, formed with names in the interpretation, is true in the interpretation. [Teller 2014, Vol. II, p. 35 (PDF p. 79)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 27 / 29
Validity Models Validity A Predicate Logic Argument, that is an argument expressed with sentences of L 3, is Valid if and only if the conclusion is true in every interpretation in which all the premises are true. [Teller 2014, Vol. II, p. 25 (PDF p. 74)] A Counterexample to a predicate logic argument is an interpretation in which the premises are all true but the conclusion is false. [Teller 2014, Vol. II, p. 26 (PDF p. 75)] Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 28 / 29
Example 3.5 Models Validity M 1 M 2 M 3 D = everything N N {0, 1} Lxy x loves y x y x < y Cxy x causes y x divides y x divides y s Socrates 6 6 p philosophy 3 3 f Fritz 2 2 g God 1 10 Is x y Cxy true in M 1? Is y x Cxy true in M 1? Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 29 / 29
Example 3.5 Models Validity M 1 M 2 M 3 D = everything N N {0, 1} Lxy x loves y x y x < y Cxy x causes y x divides y x divides y s Socrates 6 6 p philosophy 3 3 f Fritz 2 2 g God 1 10 Is x y Cxy true in M 1? Is y x Cxy true in M 1? Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 29 / 29
Example 3.5 Models Validity M 1 M 2 M 3 D = everything N N {0, 1} Lxy x loves y x y x < y Cxy x causes y x divides y x divides y s Socrates 6 6 p philosophy 3 3 f Fritz 2 2 g God 1 10 Is x y Cxy true in M 1? Is y x Cxy true in M 1? Flavio Zelazek (flavio.zelazek@gmail.com) Logic (Lesson 3: Tables and Models) October 22, 2014 29 / 29