Files
G4G0-2/AI & Data Mining/Week 20/Week 20 - Intro to Propositional Logic.md
2025-03-16 18:59:42 +00:00

4.6 KiB
Raw Blame History

Propositions

  • Declarative sentences with truth values (T or F)
  • Atomic propositions (basic building blocks)
  • Compound propositions (combinations of atomic propositions)

Argument Form: Modus Ponens (Affirming the Antecedent)

  • Content: If its raining, then the ground is wet. The ground is wet. Therefore, it was raining.

Argument Form: Disjunctive Syllogism

  • Content: Either its raining or the plants need water. Its not raining. Therefore, the plants need water.

Propositional Connectives

  • Negation (¬): p is true if and only if ¬p is false
  • Conjunction (∧): p ∧ q is true if and only if both p and q are true
  • Disjunction (): p q is true if and only if at least one of p or q is true
  • Implication (⇒): p ⇒ q is false if and only if p is true and q is false
  • Equivalence (⇔): p ⇔ q is true if and only if p and q have the same truth value

Precedence Order of Connectives

  1. Negation (¬)
  2. Conjunction (∧)
  3. Disjunction ()
  4. Implication (⇒)
  5. Equivalence (⇔)

This means that in a formula without parentheses, ¬ takes precedence over ∧ and , ∧ and have the same precedence but associativity to the left, and ⇒ and ⇔ also have the same precedence but associativity to the right. For example, p ∧ q ⇒ r is equivalent to (p ∧ q) ⇒ r, not p ∧ (q ⇒ r).

Propositions and Connectives (Examples)

Atomic Propositions:

  • p: The cat is on the mat.
  • q: The dog is sleeping.

Compound Propositions Using Connectives:

  • p ∧ q: The cat is on the mat and the dog is sleeping.
  • ¬p: Its not the case that the cat is on the mat.
  • p q: Either the cat is on the mat or the dog is sleeping (or both).
  • p ⇒ q: If the cat is on the mat, then the dog is sleeping.
  • p ⇔ q: The cat is on the mat if and only if the dog is sleeping.

Natural Language Statements

  • Natural language statement: If you study hard, then you will pass the exam.
    • Formalized as: p ⇒ q
  • Natural language statement: Either you will go to the party or stay home and study.
    • Formalized as: p ¬q

Logic Formulae

  • Formula: (p ∧ q) ⇒ ¬r
    • Interpretation: If both p and q are true, then r is false.
  • Formula: ¬(p ¬q)
    • Interpretation: Its not the case that either p is true or q is false.

Truth Tables for Connectives

  • Negation: T|F, F|T
  • Conjunction: T&T|TT, F&F|FT, TT|T
  • Disjunction: TT|TT, FF|FF, TF|TF
  • Implication: T⇒T|TT, F⇒T|FT, TT|F
  • Equivalence: T⇔T|TT, F⇔F|FF, TT|T

Truth Table for P ⇒ Q:

P Q P ⇒ Q
T T T
T F F
F T T
F F T

Classes of Propositions

  • Tautologies: Always true (e.g., p ¬p)
  • Contradictions: Always false (e.g., p ∧ ¬p)
  • Contingent propositions: Neither tautology nor contradiction

Logical Equivalence (≡)

  • Two formulae are logically equivalent if their equivalence is a tautology

Examples

  • p ∧ q ≡ q ∧ p
  • ¬(p q) ≡ ¬p ∧ ¬q

Logical Implication or Entailment (|=)

  • Formula p entails q if and only if the implication p ⇒ q is a tautology

Examples

  • p ∧ q |= q
  • ¬(p ¬q) |= ¬p ⇒ q

Ambiguous and Vague Sentences

  • Ambiguity: A sentence with multiple distinct meanings.
    • Ambiguous sentence: “I want to have dinner with you or your friend.”
      • Interpretation 1: You can choose between having dinner with me or my friend.
      • Interpretation 2: I want to have dinner with you and your friend together.
  • Vagueness: A sentence with only one meaning, but the distinction between truth and falsity is unclear.
    • Vague sentence: “The book is heavy.”
      • Vague because no quantitative measure of heaviness is provided.

Logic as a Formal Language

  • Alphabet: Symbols for denoting propositions, identifiers, punctuation symbols ((), propositional connectives).
  • Syntax: Rules defining the order of symbols in sentences, precedence order of connectives.
  • Semantics: Assignment of meaning to correctly written sentences.

Examples of Logical Structures

  • Argument: If the train has six carriages and serves a rural community, then it is not overcrowded.
    • Formalized as: p ∧ q ⇒ ¬r
  • Argument: If Bob eats carrots, then he will be able to see in the dark. Therefore, if Bob cant see in the dark, then he hasnt eaten carrots.
    • Formalized as: p ⇒ q ≡ ¬q ⇒ ¬p

Summary

  • Logicians focus on argument form
  • Deduction involves justifying conclusions based solely on premises
  • Connectives join atomic propositions to form compound propositions