Download presentation
Presentation is loading. Please wait.
Published byMargaretMargaret Holmes Modified over 8 years ago
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 l R B (“If it is raining, (then) take the bus to class”) l 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 l 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 l just like in a programming language, there are rules (syntax) for legally creating compound statements l 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 l A B l A B l A B l 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 l a fact is taken to be either true or false about the world l 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 l P : T; U : F; R : T; S : F; V : T §Then using this interpretation, evaluate formula according to the fixed meanings of the connectives l P U : T l (P U) R : T l S V : F l 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: l P is satisfiable simply let P be true l P P is unsatisfiable if P is false, the formula is false if P is true, P is false, the formula is false l P Q is satisfiable three ways: P is true, Q is true; etc. l A wff that is unsatisfiable is called a contradiction l 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
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 Entailment (Logical Consequence)
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 l (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 l 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}
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.