Propositional calculus

Slides:



Advertisements
Similar presentations
Some important properties Lectures of Prof. Doron Peled, Bar Ilan University.
Advertisements

Resolution Proof System for First Order Logic
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Logic Use mathematical deduction to derive new knowledge.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
Logic.
Logic Concepts Lecture Module 11.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution.
Inference and Resolution for Problem Solving
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution 3.7. Natural Deduction.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
1 Propositional calculus versions. 2 3-value (Lukasziewicz) logic Truth values T,F,N(unknown)
I NTRO TO L OGIC Dr Shlomo Hershkop March
Relation, function 1 Mathematical logic Lesson 5 Relations, mappings, countable and uncountable sets.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Satisfiability Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Introduction to Logic1 Introduction to Logic 3. lecture Propositional Logic Continuing Marie Duží.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
Propositional Equivalences
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Propositional Calculus – Methods of Proof Predicate Calculus Math Foundations of Computer Science.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
CS6133 Software Specification and Verification
Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
English for Economic Informatics I Tomáš Foltýnek Theoretical Foundations of Informatics.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
2. The Logic of Compound Statements Summary
Knowledge Representation and Reasoning
ARTIFICIAL INTELLIGENCE
Proposition & Predicates
Logical Inference: Through Proof to Truth
Lecture 2 Propositional Logic
Propositional Calculus: Boolean Algebra and Simplification
Elementary Metamathematics
Lesson 5 Relations, mappings, countable and uncountable sets
Logic Use mathematical deduction to derive new knowledge.
CS 270 Math Foundations of CS
Propositional Equivalences
CS 416 Artificial Intelligence
Lesson 5 Relations, mappings, countable and uncountable sets
Back to “Serious” Topics…
PROPOSITIONAL LOGIC - SYNTAX-
Methods of Proof Chapter 7, second half.
Presentation transcript:

Propositional calculus Propositional formula: We have a non-empty set A of propositional variables 1. Each variable is a formula 2. When α,β are variables, than (¬α), (α  β), (α  β), (α  β), (α  β) are formulas. 3. Anything other is not a formula Such definition is called recursive or inductive

Evaluation ≡ is a mapping of A into {FALSE, TRUE}. Propositional calculus basic terms Evaluation ≡ is a mapping of A into {FALSE, TRUE}. Evaluation of the formula runs after the common rules for logical couplings. Propositional formula with s n logical variables has 2n possible truth values depanding on evaluation of the varibles The formula is tautology iff it is TRUE for all possible evaulations of the variables The formula is contradiction iff it is FALSE for all possible evaulations of the variables The formula is satisfable iff there exist at least one evaluation under which it is TRUE

Semantic consequence • The formula Φ is the semantic consequence of the set of formulas Ψ={Ψ1,Ψ2,…Ψn} iff Φ has value TRUE in all evaluations in which all the formulas {Ψ1,Ψ2,…Ψn} have evaluation TRUE. The notation is Ψ Φ • The formulas Φ and Ψ are tautologicaly equivalent iff Ψ is semantic consequence of Φ and Φ is semantic consequence of Ψ.

Full system of logical couplings 0-ary couplings: TRUE (tautology) and FALSE (constradiction) Unary couplings: Identity and negation For logical function of 2 variables we can obtain 24 Possible logical functions, so there are 14 possible logical couplings Possible full system could be form by couplings ¬,  and  or ¬and  or |

All logical couplings F F F F F F x y F F 1 F 2 F 3 F 4 F 5 F 6 F 7 F F 1 F 2 F 3 F 4 F 5 F 6 F 7 F 8 F 9 F 10 F 11 F 12 F 13 F 14 F 15 F  x y  ¬ x ¬y T | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 F0 = contradiction F1 = AND, F2 = (inhibition) F4 = (back inhibition) F6 = XOR F7 = OR F8 = NOR, Peirce arrow F9 = equivalence F10 = not x F11 = back implication F12 = not y F13 = implication F14 = NAND, (Sheffers stroke) F15 tautology

Normal forms Conjunctive normal form (CNF) The formula is conjunction of one or finite couple of literals or disjunction of literals. Example: (x ∨¬y)∧(¬y ∨z )∧(x ∨¬r ∨z ) Disjunctive normal form (DNF) The formula is disjunction of one or finite couple of literals or conjunction of literals. Example: (x ∧¬y)∨(¬y ∧z )∨(x ∧¬r ∧z ) The formula in conjunction in CNF is called clause. Clause is disjunction of literals or one literal. There exist also empty clause with no literal which is not satisfable. For any logical formula there exist tautologicaly equivalent DNF formula and also tautologicaly equivalent CNF formula.

Inference system By inference system it is possible to derive conclusions from assumptions. For any logical coupling we have I-rule for definition and E-rule for elimination.

Formal (syntactic, logic) deduction Operation of deriving formula from a set of formulas S we notate →. By using this operation we can obtain a new set of formulas containing assumptions and formulas derived by several sequence of the inference rules from the assumptions. We call derived formula β to be logical consequence of S. The set of formulas S is contradictory , iff there exist the formula α such that both α and ¬α could be logicaly derived from S. In the other situation we call the set S non-contradictory or health.

Completness of propositional calculus Formula ϕ is semantic consequence of the set of formulas S if in each evaluation in which all formulas in S are TRUE the formula ϕ is also TRUE. Formula ϕ is logical consequence of the set of formulas S if it could be derived from the set S by sequence of inference rules (there exist a proof). If the set S is non-contradictory the each formula which is a logical consequence is also a semantic consequence. For the propositional calculus there holds also a conversion. Any formula which is a semantic consequence of S is also a logical consequence of S. Everything what is TRUE could be proved. This property is called completness.

Resolution principe We have a set of formulas S and a inference systém. Let α be a formula. We are interestred in a question wheather α is a logical consequence of S. The resolution principe is based on the fact that α logicaly follows from S iff S∪{¬α} is not satisfiable. It is equivalent with the well known fact that α⇒β and ¬α∨β are tautologicaly equivalent. The resolution principe is a foundation of logical programming.

Resolution principe We will asume CNF. We will write {x,¬y,¬z,v,¬w} instead of x∧¬y∧¬z∧v∧¬w. The empty clause will be notated as []. The resolution principe consist in the elimination of two complementary literals from the clauses: (x ∨ y) ∧ (¬x ∨ z) ⇒ y ∨ z. We will call D to be a resolvent of the clause C1 and C2 by the literal iff there exist a literal p such that: p∈C1, ¬p∈C2 and D= (C1 ÷{p}) ∪(C1 ÷{¬p}).

Resolution principe In resolution principe we repeatedly form resolventas: R0(S) = S, Rj+1(S) = R(Rj(S)) for j= 1, 2, ... . Let R*(S) be union of all Rj(S) for j= 1, 2, ... S = R0(S) ⊆R1(S) ⊆... ⊆Rk(S)⊆... . As the set of all variables is finite we can make only finite amount of disjunction and there exist a number n such that Rn+1(S)=Rn(S) = R*(S). The empty clause is contained in the set R*(S) in the case that S or some of the Rk(S) contains both {x} and {¬x} for some variable x. Resolution principe: The set of clases S is satisfiable iff the result of resolventa aplications does not contain empty clause []. To decide wheather formula ϕ is a semantic consequence of the set of formulas S is equivalent to the decision wheather set of formulas S∪{¬ϕ} je unsatisfiable, it means wheather it is possible to derive the empty clause from the set of formulas S∪{¬ϕ} .

Procedure of the resolution principe For any formula in S find tautologicaly equivalent CNF formula. We replace all formulas in the assumption. We obtain a set of disjunctions which must be TRUE together. If there are any tautologies we skip them. If the set is now empty it contained only tautologies and it was satisfable. In the other case we apply resolution principe (we look for complementary literals). We add (in arbitary order) new resolventas. If we during the procedure find the empty clause, the original set S was unsitisfiable. If the procedure stops and R*(S) does not contain the empty clause the original set S was satisfiable.

Example The set S = {x ∨ y ∨ z, z ∨ t ∨ v, z ⇒ (x ∨ y), y ⇒ x, w ⇒ t, v ∨ w} Is x semantic consequence of S? We will convert this problem into problem of satisfiability of the set S ∪ {¬x} Procedure: Convert S into CNF: {x∨y∨z, z∨t∨v, ¬z∨x∨y, ¬y∨x, ¬w∨t, v∨w}

Example We derived the empty formula, so the set is unsatifiable and so x is the semantic consequence of S.