1 / 25

Propositional Logic

Propositional Logic. School of Athens Fresco by Raphael Wikimedia Common s. Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois. Mathematical logic (symbolic logic).

amory
Download Presentation

Propositional Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Propositional Logic School of Athens Fresco by Raphael Wikimedia Commons Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois

  2. Mathematical logic (symbolic logic) Study of inference using abstract rules that does not assume any particular knowledge of things or of properties. E.g.: All men are mortal Socrates is a man Inference: Socrates is mortal. E.g. All pigs are boisterous Alfred is a pig. Inference: Alfred is boisterous

  3. All snarks are frabjous Yeti is a snark. Inference: Yeti is frabjous Key idea: Inference is independent of the subjects (men, pigs, snarks) and properties (mortality, boisterousness, frabjousness). Inference follows simply from language!

  4. All p’s are q. h is a p. Inference: h is q. Inference: q(h)

  5. But inference rules needn’t hold in natural language! … quirks of English Sam and Sally are programmers. Inference: Sam is a programmer Sam and Sally are together. Inference: Sam is together! So we need a formal language…. logic! x

  6. Propositional logic A proposition is a statement that is either true or false. Examples: • Socrates is a man • This car is purple • 43 is prime Non-examples: • Trucks • Hello • Trkjkjugirtu

  7. Propositional logic Propositional logic talks about Boolean combinations of propositions and inferences we can make about them. E.g., If it is raining, then it is cloudy. It is not cloudy. Inference: It is not raining. Abstraction: p: it is raining q: it is cloudy Inference:

  8. Propositional logic Propositions: p, q, r, s, …. Constants: T, FOperators (boolean): bi-implication; iff Syntax: Any formula that combines propositions and constants using these operators

  9. Propositional logic: Semantics A formula f, in general, doesn’t have a “truth” value associated to it. Model: M - Assigns truth/falsehood to each proposition Any formula f evaluates to true/false in such a model.

  10. Implication can be non-intuitive says “if p is true then q is true” If the model sets p to true, and q to true, then evaluates to true. If the model sets p to true, and q to false, then evaluates to false. If the model sets p to false and q to true, then evaluates to true. If the model sets p to false and q to false, then evaluates to true! (vacuosly)

  11. Implication So is really the same as “If p then q” is same as “either p is false or q is true”

  12. Tautology A formula is a tautology if it evaluates to true in every model. E.g. If model sets p to true, then formula is true. If model sets p to false, then formula is true. E.g., ( Why? “Do you like this or not?” --- “Yes” Non-example:

  13. Equivalence Formulas f and g are equivalent () if in every model M, either both f and g evaluate to true in M or both evaluate to false in M. E.g.,

  14. Some important equivalences De Morgan’s laws

  15. Some important equivalences Distributive laws: Commutativity Associativity

  16. Contrapositive, converse, negation Proposition: “If the sky is green, then I’m a monkey’s uncle.” • Converse • If I’m a monkey’s uncle, then the sky is green. • Contrapositive • If I’m not a monkey’s uncle, then the sky is not green. • Negation • The sky is green, but I am not a monkey’s uncle.

  17. Contrapositive, converse, negation Proposition: “If the sky is green, then I’m a monkey’s uncle.” • Converse • If I’m a monkey’s uncle, then the sky is green. • Contrapositive • If I’m not a monkey’s uncle, then the sky is not green. • Negation • The sky is green, but I am not a monkey’s uncle.

  18. More manipulation examples Show that these are tautologies:

  19. Logistics • If you’re not registered yet and • Sign sheet at end of class (again) • Sign up for moodle and piazza • Keep on top of homeworks • only mini-homework for next week • will be released by Friday • No discussion sections this week

  20. See you next week! • Tuesday • More logic • Predicate logic • Quantifiers • Binding and scope • Direct proofs • Thursday • More proof practice and strategies

More Related