1 / 16

Propositional Logic

Propositional Logic. Rather than jumping right into FOL, we begin with propositional logic A logic involves: Language (with a syntax) Semantics Proof (Inference) System. Example of k-rep in prop calc. R : “It is raining” B : “Take the bus to class” W : “Walk to class”

margorie
Télécharger la présentation

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 Rather than jumping right into FOL, we begin with propositional logic A logic involves: • Language (with a syntax) • Semantics • Proof (Inference) System

  2. Example of k-rep in prop calc • R : “It is raining” • B : “Take the bus to class” • W : “Walk to class” • Some things to tell our agent • R  B (“If it is raining, (then) take the bus to class”) • R  W (“If it is not raining, (then) walk to class”) • Ideally, we would like our agent to sense that it is raining & then decide to take the bus

  3. Alphabet Non-Logical Symbols (meaning given by interpretation) Propositions P, Q, R,… atomic statements (facts) about the world R : it’s-raining-now needn’t be a single letter Logical Symbols (fixed meaning)

  4. Alphabet Logical Symbols • Connectives: not () and () or () implies () equivalent () • Punctuation Symbols: ( , ) • Truth symbols: TRUE, FALSE

  5. Well-formed formulae (wffs) • Sentences • just like in a programming language, there are rules (syntax) for legally creating compound statements • remember: we’re always stating a truth about the world, hence every wff is something that has a Boolean value (it is either a true or a false statement about the world)

  6. Syntax rules • Propositions (P, Q, R, …) are wffs • Truth symbols (TRUE, FALSE) are wffs • If A is a wff, so is A • If A and B are wffs, so are • A  B • A  B • A B • A  B There are no other wffs. • Language: set of all wffs

  7. Are these WFFs? • P Q R • (P  Q)  (R  S) • P   (Q  R)

  8. Semantics KB |= Q KB - Set of wffs Q- a wff |= Entailment Compositional Two-Valued

  9. What is an interpretation? • An interpretation gives meaning to the non-logical symbols of the language. • An assignment of facts to atomic wffs • a fact is taken to be either true or false about the world • thus, by providing an interpretation, we also provide the truth value of each of the atoms example • P : it-is-raining-here-now • since this is either a true or false statement about the world, the value of P is either true or false a function that maps atomic formulas to truth values

  10. Truth tables Connectives Semantics

  11. How to evaluate a wff • ((P  U)  R)  (S  V) • First, we need an interpretation • P : T; U : F; R : T; S : F; V : T • Then using this interpretation, evaluate formula according to the fixed meanings of the connectives • P  U : T • (P  U)  R : T • S  V : F • whole formula : F

  12. Satisfiability and Models • An interpretation I satisfies a wff iff I assigns the wff the value T • An interpretation I satisfies a set of S of wffs iff I satisfies every wff in S. • An interpretation that satisfies a (set of) wff is said to be a model of it. • A (set of) wff is satisfiable iff there exists some interpretation that satisfies it

  13. Examples: • P is satisfiable • simply let P be true • P P is unsatisfiable • if P is false, the formula is false • if P is true, P is false, the formula is false • P  Q is satisfiable • three ways: P is true, Q is true; etc. • A wff that is unsatisfiable is called a contradiction • for example, a model for {A  B, B  C} is • A : true, B : true, C : true • note: there may be more than one model for a (set of) wff

  14. Entailment (Logical Consequence) • KB |= Q iff for every interpretation I, • If I satisfies KB then I satisfies Q. • That is, if every model of KB is also a model of Q. • For example: • A  B, A |= B

  15. Validity • A formula G is valid if it is true for every interpretation • P  P is valid • if P is true, then the formula is true • if P is false, then ~P is true and the formula is true • (P Q)  (P  Q) isn’t valid • when P is true & Q is true, the formula isn’t true • in order to not be valid, there only need exist one counter-example • also called a tautology

  16. Some important Theorems a) KB |= Q iff KB U { Q} is unsatisfiable b) KB , A |= B iff KB |= (A  B) c) Monotonicity: if KB  KB’ then {Q | KB |= Q}  {Q | KB’ |= Q}

More Related