Propositional logic consists of:
- The logical values true and false (T and F)
- Propositions: "Sentences," which
- Operators, both unary and binary; when applied to logical values, yield logical values- The logical values true and false (T and F)
- Propositions: "Sentences," which
- Are atomic (that is, they must be treated as indivisible units, with no internal structure), and
- Have a single logical value, either true and false
- The usual operators are and, or, not, and implies
- Logic, like arithmetic, has operators, which apply to one, two, or more values (operands)
- A truth table lists the results for each possible arrangement of operands
- The rows in a truth table list all possible sequences of truth values for n operands, and specify a result for each sequence
Propositional Logic
- Propositional logic isn't powerful enough as a general knowledge representation language.
- Impossible to make general statements. E.g., "all students sit exams" or "if any student sits an exam they either pass or fail".
- So we need predicate logic.
Predicate Logic
Propositional logic combines atoms
- An atom contains no propositional connectives
- Have no structures (today_is_wet, john_likes_apples)
Predicates allow us to talk about objects
- Properties: is_wet(today)
- Relations: likes(john, apples)
- True or false
Predicate
- Every complete sentence contains two prates: a "subject" and a "predicate"
- The subject is what (or whom) the sentence is about
- The predicate tells something about the subject
- Predicate is a very phrase template that describes a property of object or a relation among objects represented by the variables.
- The car Tom is driving is blue;
- The sky is blue;
- The cover of this book is blue
- Predicate is "is blue" describes property
- Predicates are given names; let P is name for predicate "is blue"
- Sentence is represented as B(x), as "x is blue"
- Symbol "x" represents an arbitrary object
Predicate logic expressions
- The logical operators &&, | |
- Quantifiers < >
- Universal quantifiers
- Existential quantifiers
- e.g. first order logic, higher-order logic
No comments:
Post a Comment