120 likes | 253 Views
Introduction to Formal Logic. CSC 333. Why isn’t English a programming language?. Ambiguity! Words with double meanings. Meanings of clauses depend on Punctuation Spoken emphasis Context Order of words Lack of precision And so forth. Formal Logic. Eliminates ambiguity.
E N D
Introduction to Formal Logic CSC 333
Why isn’t English a programming language? • Ambiguity! • Words with double meanings. • Meanings of clauses depend on • Punctuation • Spoken emphasis • Context • Order of words • Lack of precision • And so forth
Formal Logic • Eliminates ambiguity. • Provides a means of conveying information clearly. • Uses capital letters to represent statements. For example, A could represent “CSC 333 is fun” and B could represent “CSC 333 is easy.” • Uses logical connectives to connect statements. • Λ means “and”.
Is A Λ B true? • If CSC 333 is indeed fun and CSC 333 is easy, then we could agree that A Λ B is true. • If CSC 333 isn’t fun, but it’s easy, is A Λ B true? • If CSC 333 is hard, but it’s fun, is A Λ B true? • If CSC 333 is boring and you can’t pass it, is A Λ B true?
Is A Λ B true? • A Λ B is true only when A is true and B is true. • The truth value of A Λ B really depends on whether the truth value of A and the truth value of B, which can vary depending on the student, the teacher, the book, and other variables. • We can show the situations that determine the truth or falsity of A Λ B in a truth table.
Is A Λ B true? • A truth table should contain all possible combinations of truth values for its statement letters. • For example, AB t t t f f t f t
Is A Λ B true? • We can see that all possible combinations of truth values are represented. AB A Λ B t tt t f f f t f f t f • The table shows what we already know! That A Λ B is true only when both A is true and B is true.
Terms • Proposition • A statement (basic logical component) that is either true or false. • Logical connective • Binary - Logical operator connecting propositions. • Conjunction (and); disjunction (or); implication (if-then); equivalence (is the same as). • Unary – Logical operator acting on one logical component. • negation (not). • Compound statement • A statement composed of multiple propositions connected by logical connectives.
More terms • Antecedent • Consequent • wff – well-formed formula • Tautology • Contradiction • Hypothesis • Algorithm
Truth tables • Each row in a table shows a unique combination of truth values. • A truth table must contain all possible combinations of truth values. • A table with n statements must have how many rows? • 2n
Truth tables • Consider the truth table on page 7. • Note that there are 2 statements and, thus, 22 rows. • Also, note the role that precedence plays in interpretation of the wff. • In English, how can we summarize this situation? When is the wff true?
To be continued . . . • Notable terms: • Modus ponens • Modus tollens • Valid argument • Equivalence rules • De Morgan’s laws • Hypothetical syllogism • Quantifiers