Modeling and reasoning in propositional calculus Modeling and reasoning in propositional calculus Lecture 01 The problem Consider the following rules specifying robot’s behavior: CUGS: Logic II 1 if the surface is not dry then slow down or turn on the safe mode Lecture 01 2 if the speed is not reduced then keep signal turned on 3 if signal is on and the surface is not dry then do not turn on the safe mode 4 if the surface is not dry then slow down. Lecture 01 Slide 1 of 36 Lecture 01 Slide 2 of 36 Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 The problem Modeling Modeling A good model is a more or less simplified description of reality. It should allow to derive conclusions valid in the modeled reality. Usually the goal is to use as elementary formal tools as possible The task is to verify whether: to specify the model at the required level of simplification. (i) the conjunction of (1), (2) and (3) implies (4) Example (ii) the conjunction of (1), (2) and (4) implies (3). Model of a car: • a driver’s point of view: e.g., steering wheel, gears, starter, light switches, etc. • a designer’s point of view: e.g., model of aerodynamical flows, models of materials’ strength, etc. • a dealer’s point of view: shape, color, price, etc. Lecture 01 Slide 3 of 36 Lecture 01 Slide 4 of 36
Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 Typical environments of intelligent systems Quantitative and symbolic reasoning Quantitative reasoning . . . • algorithmic methods K 1 K 2 K n • analytical/numerical methods R ˚ AÆ ⁀ ooΛ iTY EaLit y • probabilistic/statistical methods perception R e Al i t y language • fuzzy logic. logic Symbolic reasoning • classical logic and logic programming • three- and many-valued logics REALITY • modal and temporal logics REALITY REALITY • nonmonotonic reasoning REALITY • approximate reasoning Lecture 01 Slide 5 of 36 Lecture 01 Slide 6 of 36 Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 From sensors to higher level reasoning What are logics? . . . ✻ ✻ ✻ ✻ ✻ ✻ Qualitative reasoning ✻ ✻ Logic (approximately) is the tool allowing us to perceive (specify Incomplete, Qualitative . . . and reason about) the world through truth level of properties inconsistent Databases (formulas) expressed in a given language with well defined syntax ✻ ✻ data and semantics. Quantitative reasoning ✻ ✻ Logic ≈ language + semantics/models (semantically) Quantitative . . . Noisy, ≈ language + deduction (syntactically) Databases incomplete ✣ ✣ ✣ ❪ ❪ data � . . . Sensors, cameras,... Lecture 01 Slide 7 of 36 Lecture 01 Slide 8 of 36
Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 Modeling in logics Fixing the language • fix a formal language (dictionary, grammar) The language is adjusted to a given application area. For example, • fix methods of correct reasoning 1 talking about politics we use concepts like “political party”, “prime minister”, “parliament”, “program”, etc. • specify properties of the investigated reality the chosen language – obtaining a model 2 talking about computer science we use concepts like “software”, “database”, “program”, etc. • test the model by reasoning about properties of the reality We may have different vocabularies, although some names can be • investigate the reality solely through the level of truth of the the same having different meanings. expressed properties. Lecture 01 Slide 9 of 36 Lecture 01 Slide 10 of 36 Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 Semantical presentation of logics Example Assume that in a model M we have three objects: o 1 being a red Semantical presentation depends on choosing models and car, o 2 being a brown car and o 3 being a red bicycle. Assume attaching interpretation of formulas in models. further that in our language we have propositions: If A is a formula and M is a model then we write M | = A to indicate that A is true in M and M �| = A to indicate that A is not car , bicycle , red , brown . true in M . Let proposition car be t for o 1 , o 2 , bicycle be t for o 3 , red be t for If S is a set of formulas then M | = S denotes the fact that o 1 , o 3 and brown be t for o 2 . for all A ∈ S , M | = A . Then: We say that a formula A is a consequence of a set of formulas S if for any model M we have that M | = S implies that M | = A . • M | = red or brown • M �| = if car then brown Lecture 01 Slide 11 of 36 Lecture 01 Slide 12 of 36
Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 Logical language Logical language Logical language is defined by fixing logical connectives, operators, Elements of a logical language – continued dictionaries and syntax rules how to form formulas. Logical • individual constants ( constants ), representing objects connectives and operators have a fixed meaning. Dictionaries – e.g., 0 , 1 , John reflect concepts of a given application area and are flexible. • individual variables , representing obiects, e.g., x , y , m , n • function symbols , representing functions, e.g., + , ∗ , father () Elements of a logical language • propositional connectives and operators allow one to create • logical constants : true, false , denoting logical values t , f ; more complex formulas from simpler formulas, sometimes also another, – examples of connectives: “and”, “or”, “implies”, – e.g., unknown , inconsistent – examples of operators: “for all”, “exists”, “knows”, • logical ( propositional ) variables ( letters, atoms ), “always” representing logical unknowns, – e.g.,: p , q • auxiliary symbols , making notation easier to read • relation symbols , representing relations, – examples: “(”, “)”, “[”, “]”. – e.g., = , ≤ , � Lecture 01 Slide 13 of 36 Lecture 01 Slide 14 of 36 Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 Logical language Bnf notation Bnf notation allows us to define syntax of languages. There are Why “function/relation symbols” rather two forms of rules: than “functions/relations”? In natural language names are not objects they denote. rule meaning In logics symbols correspond to names. S ::= S 1 . . . S n symbol S may be replaced by sequence Function/relation symbol is not a function/relation, but a name. S 1 . . . S n Comparing to natural language, – in logic: S ::= S 1 | . . . | S n symbol S may be replaced by one of a symbol denotes a unique object. S 1 , . . . , S n Lecture 01 Slide 15 of 36 Lecture 01 Slide 16 of 36
Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 Propositional calculus Propositional calculus Propositional calculus investigates the validity of complex sentences on the basis of truth values of sub-sentences. Examples of propositional formulas Let P denote the set of propositional variables. Truth values: t , f break pedal pressed → slow down Formulas: P | ¬ fml | fml ∨ fml | fml ∧ fml | fml ::= engine on fml → fml | fml ≡ fml | ( fml ) | [ fml ] ∧ gear on → motion ∧ gas pedal pressed Convention Brackets are used to make the notation unambiguous. To simplify � � � � ¬ gear on → ¬ motion ∨ slow down notation we often omit brackets, assuming that the order of . . . precedence from high to low is: ¬ , ∧ , ∨ , ≡ , → . For example, A ∨ ¬ B ∧ C → ¬ D ≡ E ∨ F abbreviates � � �� � � A ∨ ( ¬ B ) ∧ C → ( ¬ D ) ≡ ( E ∨ F ) . Lecture 01 Slide 17 of 36 Lecture 01 Slide 18 of 36 Modeling and reasoning in propositional calculus Lecture 01 Modeling and reasoning in propositional calculus Lecture 01 Towards solving the initial problem (see slide 2) Solving the initial problem Atomic sentences The first task is to verify: • dry – standing for “the surface is dry” • slow – standing for “slow down” (i.e., “reduce speed”) [( ¬ dry ) → ( slow ∨ safe )] • safe – standing for “turn on safe mode” ∧ [( ¬ slow ) → sig ] → [( ¬ dry ) → slow ] • sig – standing for “signal on”. ∧ [( sig ∧ ¬ dry ) → ¬ safe ] Translation of the considered sentences The second task is to verify: 1 ( ¬ dry ) → ( slow ∨ safe ) [( ¬ dry ) → ( slow ∨ safe )] 2 ( ¬ slow ) → sig ∧ [( ¬ slow ) → sig ] → [( sig ∧ ¬ dry ) → ¬ safe ] 3 ( sig ∧ ¬ dry ) → ¬ safe ∧ [( ¬ dry ) → slow ] 4 ( ¬ dry ) → slow . Lecture 01 Slide 19 of 36 Lecture 01 Slide 20 of 36
Recommend
More recommend