Revision on propositional logic: Propositions. Logical Connectives. - - PowerPoint PPT Presentation

revision on propositional logic propositions logical
SMART_READER_LITE
LIVE PREVIEW

Revision on propositional logic: Propositions. Logical Connectives. - - PowerPoint PPT Presentation

Revision on propositional logic: Propositions. Logical Connectives. Truth values and truth tables. Propositional formulae. Tautologies. Logical equivalence. Logical consequence. Logical correctness of propositional arguments. Valentin Goranko


slide-1
SLIDE 1

V Goranko

Revision on propositional logic:

  • Propositions. Logical Connectives.

Truth values and truth tables. Propositional formulae. Tautologies. Logical equivalence. Logical consequence. Logical correctness of propositional arguments.

Valentin Goranko DTU Informatics August 2010

slide-2
SLIDE 2

V Goranko

Propositions and propositional logical connectives

Proposition: statement which can be assigned a (unique) truth value: true or false. Propositional logical connectives:

  • negation: not, denoted by ¬;
  • conjunction: and, denoted by ∧ (or, sometimes by &);
  • disjunction: or, denoted by ∨;
  • implication: if . . . then . . . , denoted by →;
  • biconditional: . . . if and only if . . . , denoted by ↔.

Examples of composite propositions:

  • “It is not the case that two plus two equals five.”
  • “Two plus two equals five and/or the sun is hot.”
  • “If two plus two equals five then the sun is hot.”
  • “Two plus two equals five if and only if the sun is hot.”

“Mary is not clever or, if Mary likes logic then Mary is clever and Mary is not lazy.”

slide-3
SLIDE 3

V Goranko

The propositional connectives as truth value functions

Each propositional connective acts on the truth values of the component propositions in a precise way:

  • ¬A is true if and only if A is false.
  • A ∧ B is true if and only if both A and B are true.
  • A ∨ B is true if and only if either of A or B (possibly both) is

true.

  • A → B is true if and only if A is false or B is true, i.e. if the

truth of A implies the truth of B.

  • A ↔ B is true if and only if A and B have the same

truth-values.

slide-4
SLIDE 4

V Goranko

Truth tables

These rules can be summarized in the following truth tables, where T stands for ‘true’ and stands for ’false’: p ¬p T F F T p q p ∧ q p ∨ q p → q p ↔ q T T T T T T T F F T F F F T F T T F F F F F T T

slide-5
SLIDE 5

V Goranko

Computing the truth value of a proposition

Suppose that “Mary is clever.”: T; “Mary is lazy.”: F; “Mary likes logic.”: T To compute the truth value of the composite proposition: “Mary is not clever or, if Mary likes logic then Mary is clever and Mary is not lazy.” we first write it in a symbolic form, by introducing symbolic names for the atomic propositions occurring in it: A: “Mary is clever.” B: “Mary is lazy.” C: “Mary likes logic.”

slide-6
SLIDE 6

V Goranko

Then, the proposition can be written symbolically as: (¬A) ∨ (C → (A ∧ ¬B)). Now, we compute its truth value step by step, applying the truth-tables of the respective logical connectives: (¬T) ∨ (T → (T ∧ ¬F)) = F ∨ (T → (T ∧ T)) = F ∨ (T → T) = F ∨ T = T.

slide-7
SLIDE 7

V Goranko

Propositional formulae

Propositional constants: ⊤ which represents a true proposition, and ⊥ which represents a false proposition. Propositional variables: variables that range over propositions. Usually denoted by p, q, r, possibly with indices. Inductive definition of propositional formulae:

  • 1. Every propositional constant and every propositional variable

is a propositional formula.

  • 2. If A is a propositional formula then ¬A is a propositional

formula.

  • 3. If A, B are propositional formulae then (A ∨ B), (A ∧ B) ,

(A → B), (A ↔ B) are propositional formulae. Examples: ⊤, ¬⊤, p, ¬p, ¬¬p, (p ∨ ¬q), (p1 ∧ ¬(p2 → ¬p1)) Outermost pairs of parentheses will often be omitted.

slide-8
SLIDE 8

V Goranko

Construction trees, subformulae, main connectives

Construction tree: a tree with nodes labelled with propositional constants, variables, and propositional connectives, such that:

  • 1. Every leaf is labelled by a propositional constant or variable.
  • 2. Propositional constants and variables label only leaves.
  • 3. Every node labelled with ¬ has exactly one successor node.
  • 4. Every node labelled with any of ∧, ∨, →, ↔ has exactly two

successor nodes - left and right successor. Every construction tree defines a formula C, built starting from the leaves and going towards the root, by applying at every node the formula construction rule corresponding to the label at that node. The formulae constructed in the process are the subformulae of C. The propositional connective labelling the root of the construction tree of a formula C is the main connective of C.

slide-9
SLIDE 9

V Goranko

Truth tables of propositional formulae

Example: (p ∨ ¬(q ∧ ¬r)) → ¬¬r

p q r ¬r ¬¬r q ∧ ¬r ¬(q ∧ ¬r) p ∨ ¬(q ∧ ¬r) (p ∨ ¬(q ∧ ¬r)) → ¬¬r T T T F T F T T T T T F T F T F T F T F T F T F T T T T F F T F F T T F F T T F T F T T T F T F T F T F F T F F T F F F

slide-10
SLIDE 10

V Goranko

Simplified truth tables

p q r (p ∨ ¬ (q ∧ ¬ r)) → ¬ ¬ r T T T T T T T F F T T T F T T T F T T F T T T F F F T F T F T T T T F F F T T T F T T F F T T T F F T F F F T F F T T F T T T F F T T T F T F T F F F F T T T F T F T F F F T F F F

slide-11
SLIDE 11

V Goranko

Tautologies

Tautology (or, propositionally valid formula): a formula that

  • btains truth value T for every assignment of truth values to the
  • ccurring variables. Notation: |

= A. Examples: | = p ∨ ¬p, | = ¬(p ∧ ¬p), | = ((p ∧ (p → q)) → q) Testing tautologies with truth-tables: p q p → q p ∧ (p → q) (p ∧ (p → q)) → q T T T T T T F F F T F T T F T F F T F T

slide-12
SLIDE 12

V Goranko

Contradictions, satisfiable formulae

Contradiction is a formula that always takes truth value F. Examples: p ∧ ¬p, ¬((p ∧ q) → p) Thus, the negation of a tautology is a contradiction and the negation of a contradiction is a tautology. A formula is satisfiable if it is not a contradiction. Example: p, p ∧ ¬q, etc.

slide-13
SLIDE 13

V Goranko

Logical equivalence of propositional formulae

Propositional formulae A and B are logically equivalent, denoted A ≡ B, if they obtain the same truth value under any truth valuation (of the variables occurring in them). Examples: ¬(p ∧ q) ≡ ¬p ∨ ¬q p q ¬ (p ∧ q) ¬ p ∨ ¬ q T T F T T T F T F F T T F T T F F F T T T F F T T F F T T F T F T F F T F F F T F T T F p ∧ (p ∨ q) ≡ p ∧ p ≡ p p q p ∧ (p ∨ q) p ∧ p T T T T T T T T T T T F T T T T F T T T F T F F F T T F F F F F F F F F F F F F

slide-14
SLIDE 14

V Goranko

Some basic properties of logical equivalence

◮ A ≡ B iff | = A ↔ B. ◮ ≡ is an equivalence relation. ◮ Moreover, ≡ is a congruence with respect to the propositional connectives, i.e.: ⊲ if A ≡ B then ¬A ≡ ¬B, and ⊲ if A1 ≡ B1 and A2 ≡ B2 then (A1 • A2) ≡ (B1 • B2), where • ∈ {∧, ∨, →, ↔}. Theorem for equivalent replacement: Let A, B, C be any propositional formulae p be a propositional

  • variable. If A ≡ B then C(A/p) ≡ C(B/p).
slide-15
SLIDE 15

V Goranko

Some important logical equivalences

  • Idempotency:

p ∧ p ≡ p; p ∨ p ≡ p.

  • Commutativity:

p ∧ q ≡ q ∧ p; p ∨ q ≡ q ∨ p.

  • Associativity:

(p ∧ (q ∧ r)) ≡ ((p ∧ q) ∧ r); (p ∨ (q ∨ r)) ≡ ((p ∨ q) ∨ r). Note that this property allows us to omit the parentheses in multiple conjunctions and disjunctions.

  • Absorption:

p ∧ (p ∨ q) ≡ p; p ∨ (p ∧ q) ≡ p.

  • Distributivity:

p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r); p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r).

slide-16
SLIDE 16

V Goranko

Other useful logical equivalences

  • A ∨ ¬A ≡ ⊤; A ∧ ¬A ≡ ⊥;
  • A ∧ ⊤ ≡ A; A ∧ ⊥ ≡ ⊥;
  • A ∨ ⊤ ≡ ⊤; A ∨ ⊥ ≡ A.
  • A → B ≡ ¬A ∨ B.
  • A ↔ B ≡ (A → B) ∧ (B → A).
  • A → B ≡ ¬B → ¬A.
slide-17
SLIDE 17

V Goranko

Propositional logical consequence

A propositional formula C is a logical consequence from the propositional formulae A1, . . . , An, denoted A1, . . . , An | = C, if C is true whenever all A1, . . . , An are true, i.e., every assignment of truth-values to the variables occurring in A1, . . . , An, C which renders the formulae A1, . . . , An true, renders the formula C true, too. If A1, . . . , An | = C, we also say that C follows logically from A1, . . . , An, and that A1, . . . , An logically imply C. Logical consequence is reducible to validity: A1, . . . , An | = C iff A1 ∧ . . . ∧ An | = C iff | = (A1 ∧ . . . ∧ An) → C.

slide-18
SLIDE 18

V Goranko

Testing propositional consequence with truth tables

◮ p, p → q | = q p q p p → q q T T T T T T F T F F F T F T T F F F T F ◮ p → r, q → r | = (p ∨ q) → r p q r p → r q → r p ∨ q (p ∨ q) → r T T T T T T T T T F F F T F T F T T T T T T F F F T T F F T T T T T T F T F T F T F F F T T T F T F F F T T F T

slide-19
SLIDE 19

V Goranko

Valid rules of propositional inference

A rule of propositional inference (for short, inference rule) is a scheme: P1, . . . , Pn C , where P1, . . . , Pn, C are propositional formulae. The formulae P1, . . . , Pn are called premises of the inference rule, and C is its conclusion. An inference rule is valid if its conclusion logically follows from the premises. A propositional inference is an instance of a rule, where propositions are uniformly replaced by the propositional variables. A propositional inference is logically correct (or, valid) if it is an instance of a valid inference rule.

slide-20
SLIDE 20

V Goranko

Propositional inference: examples

◮ Consider the propositional inference: Mary is singing. If Mary is singing, then Mary is happy. Mary is happy. It is obtained from the following rule, called Modus Ponens: p, p → q q This rule is valid, therefore, the inference is logically correct. ◮ Now consider the propositional inference: 2 plus 2 equals 4. If 5 is greater than 3, then 2 plus 2 equals 4. 5 is greater than 3. It is based on the rule p, q → p q which is not valid. Therefore, the inference is not logically correct.