Créer une présentation
Télécharger la présentation

Télécharger la présentation
## We began class…

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**We began class…**• With a discussion about the RP deliverable and how we recognize “good” papers. • This was nearly 15 minutes of unplanned discussion and it was a good discussion to have.**Review - What is a logic?**• A formal language • Syntax – what expressions are legal • Semantics – what legal expressions mean**Propositional Logic - Basics**• A statement (or logical expression) in propositional logic is similar to a sentenceused in the English language • It is a sentence that can be categorized with a truth value of true or false • Lower-case letters from the middle of the alphabet such as p, q, and r are used to denote propositional logic variables • These variables are the primitives, or basic building blocks in this logic**Basics / cont.**Table 5.2: Compound expressions formed by using logical connectives**What is a logic?**• A formal language • Syntax – what expressions are legal • Semantics – what legal expressions mean • Proof system – a way of manipulating syntactic expressions to get other syntactic expressions (which will tell us something new)**Truth Tables**• In a truth table, F is used to denote false and T is used to denote true, sometimes 0 and 1, respectively • and – true only when both variables are true • or – true when one or both variables are true • p \/ q (p or q) is false only when both p and q are false • XOR (exclusive or)– true when either variable is true, but false when both variables are true**Truth Tables / cont.**• Unlike the and, or, and exclusive or functions, the not function requires only one variable • not false is true and not true is false • ~p (not p) • implication (⇒) • p ⇒ q (“p implies q” or “if p then q”) • If p is true, then q will result (ex. “If it rains, then the streets will be wet”)**Truth Tables / cont.**• biconditional(⇔) • p ⇔ q (“p if and only if q” or “p iff q”) • p ⇔ q is true whenever both p and q have the same truth value • i.e., both are true or both are false • Since both variables need to have the same truth value for the biconditional to be true, the biconditional operator is sometimes called the equivalence operator**Truth Tables / cont.**• The left side of an implication is referred to as the antecedent • The right side of an implication is referred to as the consequent • The converse of an implication is formed by reversing the antecedent and the consequent • The converseof p ⇒ q is q ⇒ p**Truth Tables /cont.**• The inverse of an implication is formed by negating both the antecedent and consequent • The inverse of p ⇒ q is ~p ⇒ ~q • A useful proof technique in mathematics is a proof by contrapositive • The contrapositive is formed by taking the inverse of the converse of an implication • The contrapositive of p ⇒ q is ~q ⇒ ~p**Truth Tables / cont.**Table 5.6: Truth table for an implication (column 3) as well as its converse (column 4), inverse (column 5), and contrapositive (column 6), where columns are numbered for ease of reference.**Truth Tables /cont.**• The symbol ≡ is used to denote that two logical expressions are equivalent by definition (for example, (p ⇒ q) ≡ ~p \/ q) • Such a compound expression is referred to as a tautology or a theorem Table 5.7: Two tautologies in the propositional logic. Observe that in the last two columns, all the entries are true.**Truth Tables / cont.**• Using a truth table to demonstrate that a logical expression is a tautology and is therefore always true is referred to as a proof by perfect induction • As shown in Table 5.7 (~p \/ ~q) and ~(p /\ q) are always identical in truth value • This theorem is one form of De Morgan’s law • Table 5.8 in the textbook lists additional theorems in propositional logic