1 / 23

Logic 1 Statements and Logical Operators

Logic 1 Statements and Logical Operators. Logic Propositional Calculus Using statements to build arguments Arguments are based on statements or propositions Statement or Proposition A declarative statement Can be either true or false, but must be one Examples (are they propositions?)

conlan
Télécharger la présentation

Logic 1 Statements and Logical Operators

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. Logic 1Statements and Logical Operators

  2. Logic • Propositional Calculus • Using statements to build arguments • Arguments are based on statements or propositions • Statement or Proposition • A declarative statement • Can be either true or false, but must be one • Examples (are they propositions?) • The sky is blue • It will rain tomorrow • 2+2=4 • Solve the following equation for x

  3. “Famous” propositions • “If I am Buddha, then I am not Buddha” • Equivalent to the statement “I am not Buddha”. How? • “This statement is false” • If true, it must be false. If false, it must be true. • If a statement is a logical contradiction, it is considered not a statement. • The following two are not considered statements. Why? • “I am lying” • “This statement is true” • Both are self-referential, which are considered not statements.

  4. Notation • Propositions are denoted by letters; p, q, r , s • p: “the moon is round” means p is the statements “the moon is round” • The negation of a proposition, “not p” is denoted p.  is a logical operator • A truth table relates the truth of a proposition and its negation:

  5. Examples Negation Statement 2+2=4 10 All economists are liberal 2+24 1=0 Not all economists are liberal All economists are not liberal If p is true then p is false. But if q is false then q is true. Be wary of quantifiers like “all” or “some” which can be tricky.

  6. Form new propositions from old by combining them. • A conjunction of two propositions p and q, denoted pqrequires both p and q to be true to be true. • Find a conjunction for the statements “All economists are liberal” and “2+2=4”. • Exercise – find the truth table for the conjunction pq. • Exercise – show pq is equivalent to pqusing a truth table

  7. More exercises 1. p: This chapter is interesting q: logic is an interesting subject Express the statement “This chapter is not interesting even though logic is an interesting subject” using symbolic logic. p: This chapter is not interesting. Hence: (p)q 2. r: Life is interesting Express the statement “This chapter is interesting even though logic is not an interesting subject, but life is interesting too” using symbolic logic. (p (q))r “but” is considered an emphatic “and”

  8. 3. For example 2, state p ((q)r) in words. This chapter is interesting, but logic is not an interesting subject even though life is interesting too” Different ways of expressing a conjunction In English • And • But • Yet All the following say the same thing:

  9. Disjunction • The disjunction of p and q, which we read “p or q” is denoted pq. • It is inclusive, so it is true if p or q or both are true. • The only way for a disjunction to be false is if both p and q are false.

  10. Examples p: the sun is luminescent (emits light without heat) q: LEDs are luminescent. pq: The sun is luminescent or LEDs are luminescent. This statement is true. Exercise: State pq and pq. Are they true? pq: The sun is luminescent orLEDsare not. False: Both parts are false pq: The sun is not luminescent orLEDsare. True: The “or both” is implied.

  11. An exclusive statement says p or q but not both. (pq)  (p  q) Exercise: Using the statements from the last example/exercises, state (p  q)  (pq)and(pq)(pq) (p  q)  (pq): The sun is luminescent or LEDs are luminescent but both are not. (p  q)  (pq): The sun is luminescent or LEDs are luminescent but it is not the case that both are not luminescent.

  12. Exercises Do truth tables for the exclusive statements in the previous exercises: (p  q)  (pq)

  13. (pq)(pq) Notice it is the same as (pq)

  14. Equivalence, Tautologies and Contradictions • In the previous exercise you found that the truth table for (pq)(pq) is the same as (pq). • When truth tables are equivalent, we say they have “logical equivalence.” • We will also find certain statements are self-evident (called “tautologies”) meaning they are always true • And other statements which are evidently false (always false) called “contradictions.”

  15. Logical Equivalence • Statements that are the same • Construct the Truth Tables: • p(p) • p(pq)

  16. Logical equivalence (continued) • We see from the first example, a double negation is always an equivalent statement to the original. • “I am a graduate student” is equivalent to “I am not not a graduate student”. • “It is not true that I am not a male” is equivalent to saying “I am a male.”

  17. DeMorgan’s Law • Expressed in words: “The statement (pq) means “it is not the case that both p and q are true” or more simply “p and q are not both true.” • This is equivalent to saying that Either p is false or q is false (or the implied “or both”). • Notice, this is different from say either p or q (pq). • Exercise: Show that (pq) is not the same as (pq)

  18. DeMorgan’s Law: (pq)(p)(q)Exercise, construct the truth table

  19. This leads us to DeMorgan’s Law • If we distribute a negation sign, it reverses  and  and the negation applies to both parts. If p and q are statements then (pq)(p)(q) (pq)(p)(q) exercise: Come up with some verbal examples of DeMorgan’s Law. exercise: Show DeMorgan’s Law holds in both constructs.

  20. Logical Equivalences relate two statements • Tautologies and Contradictions are about single statements • Tautologies are always true, and the truth value is independent of the value of the statement Example: p(p) • Contradictions are always false, again the truth value is independent of the value of the statement Example: p(p) In common usage, sometimes we say two statements are contradictory, in that they can’t both be true, but in Logic that means they are exclusive (see above)

  21. Common Logical Equivalences The double negative (p)p The Commutative Law for conjunction pqqp The Commutative Law for disjunction pqqp The Associative Law for conjunction (pq)r p(qr) The Associative Law for disjunction (pq)r p(qr) The Distributive Laws p(qr) (pq)(pr) p(qr) (pq)(pr) The Absorption Laws ppp ppp DeMorgan’s Laws (pq)(p)(q) (pq)(p)(q)

  22. Simplifying • Using logical equivalences to find a simpler statement: • Example: The double negative can be expressed as a positive. “2+24 is false” is equivalent to saying “2+2=4”. Proofs show two statements are logical equivalences. • Example: Prove 2+2=6-2 2+2=4 6-2=4 4=4 hence 2+2=6-2 More on proofs later.

More Related