Symbolic Logic Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February 5 6, 20182018 Alice E. Fischer Symbolic Logic... 1/19
1 2 3 Alice E. Fischer Symbolic Logic... 2/19
Symbolic Logic Outline This lecture begins the study of symbolic logic and clear reasoning. Symbolic and valid reasoning are the philosophical bases of clear reasoning. A first-year law student studies logic. Digital circuits and program-control statements evolved from philosophical logic. The laws of logic are closely related to the laws of set algebra. Sets and logic are the foundations of databases. Alice E. Fischer Symbolic Logic... 3/19
Alice E. Fischer Symbolic Logic... 4/19
Symbolic Logic Outline Algebra is a field of mathematics where operators are used to do computations on numbers. In set theory, set relations and operators are used to do computations on sets. In symbolic logic, boolean functions are applied to statements (not number or sets). All three fields have their own sets of symbols and follow a set of laws and relationships. The laws and relationships of all three areas are much the same and often have the same names, although the symbols used make them look different. Alice E. Fischer Symbolic Logic... 5/19
Statements Outline In logic, a statement is: A meaningful declarative sentence that is either true or false. or some other formulation that expresses the same meaning. Examples of Statements: Bridges can fall down. Dams last forever. Computer systems malfunction eventually. Some aircraft crash, some disappear, and some land safely. The word proposition is a synonym for logical statement. Alice E. Fischer Symbolic Logic... 6/19
What is NOT a Statement? It is not a statement (proposition) if it is... Neither true nor false: The King of France is wise. Truth depends on a pronoun: She is ready now. Opinion, not fact: Broccoli tastes good. Not declarative: Are you ready? Not declarative: Run! Meaningless: Greenness perambulates. Meaningless: I had one grunch but the eggplant over there. Not a sentence: This sentence no verb. Alice E. Fischer Symbolic Logic... 7/19
Ambiguity can Confound Reasoning. When you use logic, you must be very careful that your initial propositions have one meaning and only one meaning in your universe. Consider the word bipedal. X is bipedal can have three meanings: 1 X is a member of an animal species that has two feet. 2 X has two feet. 3 X walks on two feet. Suppose X refers to me. Then all three interpretations are true. Now suppose X is a 1-legged man in a wheelchair. Number 1 is true but numbers 2 and 3 are false. Alice E. Fischer Symbolic Logic... 8/19
Ambiguity Leads to Trouble. Suppose you are writing a business contract or specifying safety requirements or proving a theorem. If you use the same word twice, it must have the same meaning. Failure to ensure a consistent meaning has led to disaster. This incident earned a Darwin Award: There was a group of terrorists in Palestine. They planned to set off a car bomb in Jerusalem at 10:00 am. The bomb maker set the bomb s timer to explode at 10:00, Jerusalem time. The car drivers planned to get there just before 10:00. But they used Palestine time, which was 1 hour different. All three terrorists died when the bomb went off a half-hour outside Jerusalem. Alice E. Fischer Symbolic Logic... 9/19
Talking about Statements and Propositions In order to talk about propositions, we frequently define a symbol to be a name for a proposition. Example: Let A be the proposition: The World Trade Center collapsed. Then we can say that A terrorist attack caused A. Using symbols makes it much easier for us to talk and reason about logical issues, just as using variable names in a program makes it easier for us to talk about calculations. The Boolean functions have names in symbolic logic that are older than the names used for logic gates. Alice E. Fischer Symbolic Logic... 10/19
Alice E. Fischer Symbolic Logic... 11/19
Negation and Conjunction:, and, && is Logic s symbol for the not or! operator. Let S be the proposition I am skinny. Then this is a proposition: S means I am not skinny. is Logic s symbol for and or && operator. Let C be the proposition Aircraft C53 crashed Let S be the proposition The alien spaceship exploded Then this is a proposition: C S Aircraft C53 crashed the alien spaceship exploded. Alice E. Fischer Symbolic Logic... 12/19
Disjunction:, or, is Logic s symbol for the or, Let P be the proposition I will buy the pink dress. Let L be the proposition I will buy the lavender hat. Then P L is a proposition. Or has two common meanings in English, inclusive and exclusive. The logical symbol stands for Inclusive-Or. Inclusive: The P L uses inclusive-or. It means that I will buy something. It might be a dress. It might be a hat. It might be both. Exclusive: Consider the proposition that Lee will walk the dog or grade papers. This uses the Exclusive-Or. He certainly cannot do both at the same time. Alice E. Fischer Symbolic Logic... 13/19
Operator Precedence If you see an expression with multiple operators in it like S P Q, how do you know which operation to do first? In formal logic Negation has the highest precedence and should be done first. Conjunction and Disjunction have the same precedence. Therefore, in formal logic, if you have a sequence of conjunctions and disjunctions you must include parentheses to designate the proper order to remove ambiguity. Alice E. Fischer Symbolic Logic... 14/19
Translating from English to Symbolic Logic-1 Presume we start with a sentence or paragraph, in English. For example, There was a meeting on Friday and I was not sick, so I went to work. First, identify and name the statements: Let M = There was a meeting on Friday. Let S = I was sick. Let W = I went to work. Then restate the sentence(s) using symbols: M S so W We will soon see that so translates as in logic, giving: M S W Alice E. Fischer Symbolic Logic... 15/19
Translating from English to Symbolic Logic 2 Sunday is a weekend day but I went to work. Use wedge (and) to translate BUT. Let E be Sunday is a weekend day. Let W be I went to work. E W Use (not) with (or) to symbolize neither... nor. Today is a neither a weekend day nor is it a work day for me. (E W ) Alice E. Fischer Symbolic Logic... 16/19
Alice E. Fischer Symbolic Logic... 17/19
Using a Truth Table John is designing the logic for an elevator. The safety specifications require the doors to be closed (that is, not open). when the elevator is moving. Also, the doors must open when the elevator stops. Let O be The elevator doors are open. Let M be The elevator is moving. Then the requirements are: M and not O or not M and O We can symbolize the requirements as: ( O M) (O M) Alice E. Fischer Symbolic Logic... 18/19
A Truth Table for the Elevator The requirements are: ( O M) (O M) Make a truth table to evaluate the proposition. ( O M) O M O M O M O M (O M) T T F F F F F T F F T F T T F T T F T F T F F T T F F F The elevator controller must keep the system in a safe state. We see safe states on the second and third line of the table. So the controller must keep the system in one of these states. Alice E. Fischer Symbolic Logic... 19/19