Computational Logic Chapter 2. Propositional Logic

Size: px
Start display at page:

Download "Computational Logic Chapter 2. Propositional Logic"

Transcription

1 Computational Logic Chapter 2. Propositional Logic Pedro Cabalar Dept. Computer Science University of Corunna, SPAIN December 14, 2010 P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

2 Outline 1 Syntax and Semantics 2 Semantic proof 3 Syntactic proof Hilbert s Axiomatic Method Gnetzen s Natural Deduction Gentzen s Sequent Calculus P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

3 Syntax and Semantics 1 Syntax and Semantics 2 Semantic proof 3 Syntactic proof Hilbert s Axiomatic Method Gnetzen s Natural Deduction Gentzen s Sequent Calculus P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

4 Syntax and Semantics Syntax Def. Propositional Signature Σ: set of propositions or atoms. E.g. Σ = {p, q, r, s}. Def. Propositional language L Σ, set of well formed formulae (wff). Any of the expressions: i) vi) α β ii) vii) α β iii) p viii) α β iv) α ix) α β v) (α) wtih p Σ y α, β L Σ. Precedence:,,,, (left associative). Alternative notations: implication,, ; equivalence, =,, Def. theory: is a set of formulae Γ L Σ. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

5 Semantics Syntax and Semantics Def. interpretation is a function I : Σ {T, F} We can also use I Σ so that, for instance, I = {p, r} means I(p) = T, I(q) = F, I(r) = T, etc. We extend its use I : L Σ {T, F}. I(α) = replace each p Σ in α by I(p) and apply: I( ) = T I( ) = F T F F T F F F F T T F T F T T F T F F T F F T T T T T T P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

6 Semantics Syntax and Semantics Def. I satisfies α, written I = α, iffi(α) = T. i) I = T and I = F. ii) I = p iff I(p) = T. iii) I = α iff I = α. iv) I = α β iff I = α and I = β. v) I = α β iff I = α or I = β (or both). vi) I = α β iff (I = α iff I = β). I is a model of Γ, written I = Γ, iff it satisfies all its formulae. Def. inconsistency or unsatisfiable formula: a formula that has no models. Def. α is a tautology or is valid iff any interpretation is a model of α. Examples: T, p p, b c d (d b) α is a logical consequence of or is entailed by Γ, written Γ = α, iff any model of Γ satisfies α. Therefore, when Γ =, what does = α mean? P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

7 Syntax and Semantics Semantics Alternative viewpoint: think about the set of models of a given formula α, call it M(α). M( ) = M( ) = S (all the possible ones) M(a b) = {{a, b}, {a}, {b}} We will usually identify α with M(α) and vice versa. From a set S of interpretations: How can we get a formula α s.t. M(α) = S? Does this formula α always exist? How many theories (modulo equivalence) can we build with n atoms? P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

8 Semantics Syntax and Semantics Definition (Weaker/stronger formula) If = α β, that is, if M(α) M(β), then α is stronger than β (or β is weaker α). Which are the strongest and weakest possible formulae? Examples: p p q p p q p q p q p (q p) p q p q. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

9 Syntax and Semantics From human to formal language... A B A B A B A B A implies B A is a sufficient condition for B B is a necessary condition for A if A then B B if A A only if B no A unless B B given that A B provided that A A is equivalent to B A if and only if (iff) B A or B (inclusive or) A or B (exclusive or) P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

10 Syntax and Semantics Del lenguaje humano al formal... A B A B A B A B A implica B A es suficiente para B B es necesario para A si A entonces B B si A A sólo si B no A a no ser que B no A a menos que B B siempre que A A equivale a B A si y sólo si B A ó B (inclusivo) A ó B (exclusivo) P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

11 Propositional Logic Syntax and Semantics Nice but... can you really do anything practical using propositional logic? You can explain in a simple way most fundamental concepts of the different existing logics. We will focus on this next, but also... SAT problem: decide whether a propositional formula has at least one model. It is an NP-complete problem. Furthermore, it was the first problem identified problem in this class, and crucial for proving that other problems belong to it. SAT keypoint: instead of designing an ad hoc search algorithm, encode the problem into propositional logic and use SAT as a backend. Nowadays, SAT is an outstanding state-of-the-art research area for search algorithms. There exist many efficient tools and commercial applications. See Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

12 Syntax and Semantics Small Remark on Complexity A B q 4 A Turing Machine (TM) is a theoretical device that operates on an infinite tape with cells containing symbols in a finite alphabet (including the blank or 0 ) The TM has a current state S i among a finite set of states (including Halt ), and a head pointing to the current cell in the tape. It has an associated transition function that describes the next step. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

13 Syntax and Semantics Small Remark on Complexity Example: with scanned symbol 0 and state q 4, write 1, move Left and go to state q 2. That is: A B q 4 0 t(0, q 4 ) = (1, Left, q 2 ) A B q 2. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

14 Syntax and Semantics Small Remark on Complexity A decision problem consists in providing a given tape input and asking the Turing Machine for a final output symbol answering Yes or No. Example: SAT = given (an encoding of) a propositional formula, does it have at least one model? A decision problem is in complexity class P iff the number of steps carried out by the TM is polynomial on the size n of the input.. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

15 Syntax and Semantics Small Remark on Complexity Now, a non-deterministic Turing Machine (NDTM) is such that the transition function is replaced by a transition relation. We may have different possibilities for the next step. Example: t(0, q 4, 1, Left, q 2 ), t(0, q 4, 0, Right, q 3 ) A B q A B A B q 2 q 3 P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

16 Syntax and Semantics Small Remark on Complexity Keypoint: an NDTM provides an affirmative answer to a decision problem when at least one of the executions for the same input answers Yes. A decision problem is in class NP iff the number of steps carried out by the NDTM is polynomial on the size n of the input. For SAT, we can build an NDTM that performs two steps: 1 For each atom, generate 1 or 0 nondeterministically. This provides an arbitrary interpretation in linear time. 2 Test whether the current interpretation is a model or not. The sequence of these two steps takes polynomial time. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

17 Syntax and Semantics Small Remark on Complexity Unsolved problem P? = NP The most accepted conjecture is that P NP. But remains unproved. It is one of the 7 Millenium Prize Problems The Clay Mathematics Institute designated $1 million prize for its solution!. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

18 Syntax and Semantics Small Remark on Complexity A problem X is C-complete, for some complexity class C, iff any problem Y in C is reducible to X in polynomial-time. A complete problem is a representative of the class. Example: if an NP-complete problem happened to be in P then P = NP. SAT was the first problem to be identified as NP-complete (Cook s theorem, 1971). SAT is commonly used nowadays for showing that a problem X is at least as complex as NP. To this aim, just encode SAT into X. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

19 Syntax and Semantics Exercise Programming the satisfaction relation = in Prolog: :- op(210, yfx, &). :- op(220, yfx, v). :- op(1060, yfx, <->). sat(_i, false) :-!, fail. sat(_i, true) :-!. sat(i, P) :- atom(p),!,member(p,i),!. sat(i, -A) :- \+ sat(i, A). sat(i, A & B) :- sat(i, A), sat(i, B). sat(i, A v B) :- sat(i,a),! ; sat(i, B). sat(i, A -> B) :- sat(i,-a v B). sat(i, A <-> B) :- sat(i,(a -> B)&(B -> A)). P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

20 Syntax and Semantics Exercise Testing whether a formula is a tautology: tautology(s, F) :- \+ (subset(s,i), \+ sat(i,f)). subset([],[]) :-!. subset([x Xs],S) :- subset(xs,s). subset([x Xs],[X S]) :- subset(xs,s). P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

21 Syntax and Semantics Using propositional logic: an example From Lady or the Tiger? And Other Logic Puzzles Including a Mathematical Novel That Features Godel s Great Discovery (Raymond M. Smullyan) Behind each door we may have either a lady or a tiger. One sign tells the truth but the other one no. Which door shall we open? 1. A lady is in this room and a tiger is in the other 2. There is a lady in one room and a tiger in the other P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

22 Another variation Syntax and Semantics There are one lady and two tigers. At most, one sign tells the truth. Which door shall we open? 1. There is a tiger in this room 2. There is a lady in this room 3. There is a tiger in room 2 P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

23 Semantic proof 1 Syntax and Semantics 2 Semantic proof 3 Syntactic proof Hilbert s Axiomatic Method Gnetzen s Natural Deduction Gentzen s Sequent Calculus P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

24 Semantic proof Semantic proof How can you know whether = α? direct option: try with all possible interpretations. The truth table Example: α = b c d (d b) b c d b c d d b α F F F F T T F F T F F T F T F F T T F T T F F T T F F F T T T F T F T T T T F F T T T T T T T T. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

25 Semantic proof Semantic Proof The truth table is brute force: 2 n interpretations. Unfeasible as a practical method but... in the worst case that complexity can t be avoided! Semantic Tableaux: between semantic and syntactic method. Goal: prove whether a formula is inconsistent Can be easily automatized Well behaved when α has a low connective (operator) nesting degree It is frequently used in modal logics (mainly, to guarantee its decidability). We define a literal as any atom p or its negation p.. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

26 Semantic tableaux Semantic proof Unfolding rules: Formula Branch 1 Branch 2 α β α β α β α, β (α β) α, β (α β) α β α β α β (α β) α, β α β α, β α, β (α β) α, β α, β α α P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

27 Semantic proof Semantic tableaux To know whether = α we build a tree with α in its root. We expand the tree applying all the possible unfoldings. How would the leaves look like? They ll just contain literals. If a tree path contains both p and p we say that the path is closed. The root is inconsistent iff all the paths in the tree are closed. Additional advantages: An open branch points out a counterexample. The resulting formula is in Disjunctive Normal Form (DNF). The literals in each branch from a clause. Try with the examples: p (p q) p, (p q) (p q p), (p q) p q. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

28 Exercise Semantic proof Prolog program :- op(210, yfx, &). :- op(220, yfx, v). :- op(1060, yfx, <->). valid(f) :- openbranch([-f],[],m),!, write(m),nl,fail. valid(_). openbranch(_fs,ls,_m) :- member(-x,ls), member(x,ls),!,fail. openbranch([f Fs],Lits,M) :- unfold(f,gs),!, member(g,gs), append(g,fs,hs), openbranch(hs,lits,m),! ; openbranch(fs,[f Lits],M). openbranch([],lits,lits). P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

29 Semantic proof Exercise Prolog program unfold( - - A, [ [A] ]). unfold( A & B, [ [A,B] ]). unfold( -(A v B), [ [-A,-B] ]). unfold( A v B, [ [A], [B] ]). unfold( -(A & B), [ [-A], [-B] ]). unfold( (A -> B), [ [-A], [B] ]). unfold(-(a -> B), [ [A,-B] ]). unfold((a <-> B), [ [A,B],[-A,-B] ]). unfold(-(a <-> B), [ [A,-B],[-A,B] ]). P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

30 Syntactic proof 1 Syntax and Semantics 2 Semantic proof 3 Syntactic proof Hilbert s Axiomatic Method Gnetzen s Natural Deduction Gentzen s Sequent Calculus P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

31 Inference Methods Syntactic proof Inference or formal proof: we make syntactic manipulation of formulae. To do so, we use: An initial set of formulae: axioms. Syntactic manipulation rules: inference rules. As a result of applying these rules, we go obtaining new formulae: theorems Best known proof methods: Axiomatic Method (Hilbert) Resolution Natural Deduction / Sequent Calculus (Gentzen) P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

32 Syntactic proof Inference methods Notation: Γ α means that formula α can be derived or inferred from theory Γ. Usually, axioms are not represented inside Γ. Thus, α means that α is a theorem (from logic L). Given a language L, a logic L is a subset of L. It can be defined: Semantically: L = {α L = α}. Syntactically: L = {α L α}. What should we expect from an inference method? Soundness (or correctness): if α then = α Completeness: if = α then α All methods we ll see for classical propositional calculus are sound and complete. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

33 Syntactic proof Hilbert s Axiomatic Method Hilbert s Axiomatic Method Put the emphasis on the set of axioms. The simplest axiomatisation (Jan Łukasziewick) just uses these 3 axioms: α (β α) (α (β γ)) ((α β) (α γ)) ( α β) (β α) plus the inference rule of Modus Ponens {α, α β} β. Uncomfortable for direct use. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

34 Syntactic proof Hilbert s Axiomatic Method Hilbert s Axiomatic Method Example: prove that p p is a theorem. α (β α) (1) (α (β γ)) ((α β) (α γ)) (2) ( α β) (β α) (3) 1. p ((p p) p) (1) 2. (p ((p p) p)) (p (p p)) (p p)) (2) 3. (p (p p)) (p p) MP 1, 2 4. p (p p) (1) 5. p p MP3, 4 P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

35 Syntactic proof Hilbert s Axiomatic Method Hilbert s Axiomatic Method Normally, we handle other derived axioms and inference rules. Examples: Modus tollens { β, α β} α, Hypothetical Syllogism {α β, β γ} α γ,... Deduction (meta)theorem: if Γ {α} β then Γ α β. (The opposite also holds).. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

36 Resolution Syntactic proof Hilbert s Axiomatic Method Allows deciding whether α is inconsistent. As a first step, we obtain an equivalent conjunctive normal form (CNF) representation. CNF is a conjunction of disjunctions of literals. Each disjunction is called a clause. To get CNF: (1) replace, by their definitions in terms of,, ; (2) move la negation until only applied to atoms (Negation Normal Form, NNF); (3) apply distributivity,. See PROLOG example. Warning: transformation into CNF may have an exponential cost.. Example (a b) (c d) (e f ) (h i) Some techniques [Egly96] allow generating a CNF in polynomial time but introducing new auxiliary atoms. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

37 Syntactic proof Hilbert s Axiomatic Method Example: we first describe how to get the NNF :- op(210, yfx, &). :- op(220, yfx, v). nnf(-(a & B),NA v NB):-!,nnf(-A,NA),nnf(-B,NB). nnf(-(a v B),NA & NB):-!,nnf(-A,NA),nnf(-B,NB). nnf(-(a -> B), A1 & NB):-!,nnf(A,A1),nnf(-B,NB). nnf(- - A,A1):-!,nnf(A,A1). nnf(a,a). P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

38 Syntactic proof Hilbert s Axiomatic Method... and then the CNF cnf(a -> B,Zs):-!, cnf(-a v B,Zs). cnf(a & B,Zs):-!, cnf(a,xs),cnf(b,ys), merge_set(xs,ys,zs). cnf(a v B,Zs):-!, cnf(a,xs),cnf(b,ys), findall(z, (member(x,xs),member(y,ys), merge_set(x,y,z) ), Zs). cnf(a,[ [A] ]). P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

39 Resolution Syntactic proof Hilbert s Axiomatic Method The resolution rule is defined as: {α p, β p} α β The resulting clause α β is called the resolvent. An empty disjunction (or empty clause) corresponds to. Main result [Robinson65]: α is unsatisfiable iff there exists a derivation of from CNF[α] applying resolution. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

40 Resolution Syntactic proof Hilbert s Axiomatic Method Example: prove that α : ( p q) (q r) ( r p) is a theorem. We first negate the formula and get its CNF ( ( p q) (q r) ( r p) ) ( (( p q) ( q r)) ( r p) ) ((p q) ( q r)) (r p) (p q) ( q r) }{{}}{{}}{{} r p }{{} C 1 C C 2 3 C 4. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

41 Resolution Syntactic proof Hilbert s Axiomatic Method A possible application of resolution... C 1 : p q C 2 : q r C 5 : p r C 3 : r C 6 : p C 4 : p C 7 : P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

42 Syntactic proof Hilbert s Axiomatic Method Resolution Problem: generating all possible resolvents is unfeasible. Important: heuristics to explore only a part of the search tree. Small optimisations... Removing tautologies: p p α Subsumption: seeing clauses as sets of literals, if C 1 C 2 we say that C 1 subsumes C 2 and we can remove the latter. Pure literals: a literal is pure iff its complement does not occur in any clause. A pure literals does not affect satisfiability: we can arbitrarily fix a truth value for its associated atom. Unit propagation: a unit clause is such that it just contains one literal. Its atom has a fixed truth value which can be simplified in the rest of clauses.. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

43 Resolution Syntactic proof Hilbert s Axiomatic Method Davis-Putnam: choose some atom p and apply resolution on it in all possible ways. The resulting set of clauses will not contain atom p any more. Davis-Putnam-Logemann-Loveland (DPLL): backtracking on an atom value (assume first true and then backtrack to false). Used by most SAT provers. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

44 Resolution: strategies Syntactic proof Hilbert s Axiomatic Method Linear Resolution: in each application, one of the clauses must be the last obtained resolvent. If α is unsatisfiable, there exists some clause C in CNF(α) such that we can derive from C exclusively using linear resolution. Input Resolution: we always use one of the original clause in CNF (α) (it is not a complete method). Unit resolution: we always use a unit clause (it is not complete).. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

45 Resolution: strategies Syntactic proof Hilbert s Axiomatic Method Set of support: fix some S CNF (α) s.t. CNF(α) \ S is satisfiable. Typical example: we want to know whether γ follows from β, while we know β consistent. That is: β γ inconsistent? When negated CNF(β) CNF( γ). }{{} support Resolution with set of support S: we use at least one clause C S. It is a complete methods. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

46 Resolution Syntactic proof Hilbert s Axiomatic Method Horn clause: it contains at most one positive literal. It s the basis for Prolog. We can see each Horn clause as a rule: p q 1 q 2 q 3 p q 1 q 2 q 3 p:- q 1, q 2, q 3. (a rule) p (a fact) q 1 q 2 q 3 q 1 q 2 q 3?- q 1, q 2, q 3. (the goal or query) P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

47 Resolution Syntactic proof Hilbert s Axiomatic Method If CNF (α) exclusively contains Horn clauses, deciding its satisfiability (HORNSAT) is a polynomial problem (in fact, P-complete). Unit, input and linear strategies are all complete for Horn clauses. Furthermore, the set of negative clauses (goals) can be used as a set of support. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

48 Natural Deduction Syntactic proof Gnetzen s Natural Deduction We reason about judgements like Γ α. No axioms. Instead, several inference rules per each connective. We have rules for connective introduction: α β α β I α α β I1 β α β I2 and elimination: α β α E1 α β β E2 α α E α α β β E a.k.a. Modus Ponens. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

49 Natural Deduction Syntactic proof Gnetzen s Natural Deduction Simple example: prove that {A B} B A. A B A B B E2 A B A E1 I Another example {P Q R, Q P, Q} R 1. P Q R premise 2. Q P premise 3. Q premise 4. P E on 2, 3 5. P Q I on 4, 3 6. R E on 5, 1 P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

50 Natural Deduction Syntactic proof Gnetzen s Natural Deduction Other rules use hypothetical reasoning: they use derivations α β as conditions of an inference rule. α β α β I α β α γ γ β γ E α β β respectively called conditional reasoning, reasoning by cases and Reductio Ad Absurdum. For their application, we introduce hypotheses: these are local w.r.t. a given subderivation. α I. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

51 Natural Deduction Syntactic proof Gnetzen s Natural Deduction Example : {P (Q R)} Q (P R). 1 P (Q R) 2 Q 3 P 4 Q R E, 1, 3 5 R E, 4, 2 6 P R I, Q (P R) I, 2 6 P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

52 Sequent Calculus Syntactic proof Gentzen s Sequent Calculus Instead of handling formulae, we transform expressions (judgements) like Γ that become metalanguage objects. Γ and are sets of formulae: intuitively Γ represents a conjunction of its elements and a disjunction. Created by Gentzen to prove properties of Natural Deduction. Very useful for Type Theory; it also allows a nice characterisation of Intuitionistic Logic. We have one axiom and rules that work on the left (L) or the right (R) side of plus logical and structural rules.. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

53 Sequent Calculus Syntactic proof Gentzen s Sequent Calculus Rules: Γ, α, α (ax) Γ, α α, Γ Γ, Γ, (cut) Logical rules: Γ, α Γ, α β L 1 Γ, β Γ, α β L 2 Γ α, Γ α β, R 1 Γ β, Γ α β, R 2 P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

54 Sequent Calculus Syntactic proof Gentzen s Sequent Calculus More logical rules: Γ, α Γ, β Γ, Γ, α β, L Γ α, Γ, β Γ, Γ, α β, L Γ α, Γ β, Γ, Γ α β,, R Γ, α Γ β, Γ, Γ α β,, R Γ α, Γ, α L Γ, α Γ α, R P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

55 Sequent Calculus Syntactic proof Gentzen s Sequent Calculus Structural rules (Weakening, Contraction, Permutation): Γ Γ, α WL Γ Γ α, WR Γ, α, α Γ, α CL Γ α, α, Γ α, Γ, α, β Γ, β, α PL Γ α, β, Γ β, α, CR PR P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

56 Sequent Calculus Syntactic proof Gentzen s Sequent Calculus Example A A (tertium non datur): P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

57 Sequent Calculus Syntactic proof Gentzen s Sequent Calculus A proof is said to be analytical iff it doesn t make use of cut. Main Theorem (Hauptsatz) cut elimination: any judgement with a non-analytical proof, also has an analytical one. Still, in the general case, an analytical sequent calculus can be exponentially worse in proving some sequents than an equivalent one allowing cut.. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

58 Sequent Calculus Syntactic proof Gentzen s Sequent Calculus Another example { A B} (A B): A A A, A A B, A B B B, B A B, B A B, A B A B (A B) P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

59 Syntactic proof Sequent Calculus vs Tableaux Gentzen s Sequent Calculus Any analytical cut-free sequent calculus has a dual tableaux method. Idea: reverse the sequent proof from bottom to top. This can be seen as a tableau tree. Given Γ we think about its refutation. We define an associated set Γ, i.e., Γ { α α }. Different judgements may have the same associated set: both A B and A, B are associated to { A, B}. To obtain the tableaux, take the sequent proof, replace judgements by associated sets, and reverse the diagram. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

60 Syntactic proof Sequent Calculus vs Tableaux Gentzen s Sequent Calculus Example becomes what?... A A A, A A B, A B B B, B A B, B A B, A B A B (A B) A B, (A B) A B, A B A B, A A B, B A, A B, B. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

61 Syntactic proof Sequent Calculus vs Tableaux Gentzen s Sequent Calculus There exist non-analytical tableaux systems, counterpart of non-analytical sequent calculi. They don t satisfy the subformula property, i.e., each node in the tableaux need not be a subformula of the root. P. Cabalar ( Dept. Ch2. Computer Propositional ScienceLogic University of Corunna, SPAIN December ) 14, / 64

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural

More information

Linear-time Temporal Logic

Linear-time Temporal Logic Linear-time Temporal Logic Pedro Cabalar Department of Computer Science University of Corunna, SPAIN cabalar@udc.es 2015/2016 P. Cabalar ( Department Linear oftemporal Computer Logic Science University

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing

More information

LOGIC PROPOSITIONAL REASONING

LOGIC PROPOSITIONAL REASONING LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1

More information

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

More information

Deductive Systems. Lecture - 3

Deductive Systems. Lecture - 3 Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Propositional Logic: Evaluating the Formulas

Propositional Logic: Evaluating the Formulas Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere

More information

3 Propositional Logic

3 Propositional Logic 3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists

More information

Propositional and Predicate Logic. jean/gbooks/logic.html

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

More information

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic Propositional Logic Reading: Chapter 7.1, 7.3 7.5 [ased on slides from Jerry Zhu, Louis Oliphant and ndrew Moore] Logic If the rules of the world are presented formally, then a decision maker can use logical

More information

Propositional Reasoning

Propositional Reasoning Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS

More information

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876

More information

Intelligent Agents. Pınar Yolum Utrecht University

Intelligent Agents. Pınar Yolum Utrecht University Intelligent Agents Pınar Yolum p.yolum@uu.nl Utrecht University Logical Agents (Based mostly on the course slides from http://aima.cs.berkeley.edu/) Outline Knowledge-based agents Wumpus world Logic in

More information

Introduction to Artificial Intelligence. Logical Agents

Introduction to Artificial Intelligence. Logical Agents Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based

More information

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna The Calculus of Computation: Decision Procedures with Applications to Verification Part I: FOUNDATIONS by Aaron Bradley Zohar Manna 1. Propositional Logic(PL) Springer 2007 1-1 1-2 Propositional Logic(PL)

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 10, 5/9/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Logical Agents Chapter 7

More information

6. Logical Inference

6. Logical Inference Artificial Intelligence 6. Logical Inference Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder University of Zagreb Faculty of Electrical Engineering and Computing Academic Year 2016/2017 Creative Commons

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

Logic and Inferences

Logic and Inferences Artificial Intelligence Logic and Inferences Readings: Chapter 7 of Russell & Norvig. Artificial Intelligence p.1/34 Components of Propositional Logic Logic constants: True (1), and False (0) Propositional

More information

Propositional logic. Programming and Modal Logic

Propositional logic. Programming and Modal Logic Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness

More information

Natural Deduction for Propositional Logic

Natural Deduction for Propositional Logic Natural Deduction for Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 10, 2018 Bow-Yaw Wang (Academia Sinica) Natural Deduction for Propositional Logic

More information

Logical agents. Chapter 7. Chapter 7 1

Logical agents. Chapter 7. Chapter 7 1 Logical agents Chapter 7 Chapter 7 1 Outline Knowledge-based agents Logic in general models and entailment Propositional (oolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS Santiago Ontañón so367@drexeledu Summary of last day: Logical gents: The can reason from the knowledge they have They can make deductions from their perceptions,

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

More information

CS 380: ARTIFICIAL INTELLIGENCE

CS 380: ARTIFICIAL INTELLIGENCE CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS 11/8/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logical gents: The can

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

Propositional Logic: Deductive Proof & Natural Deduction Part 1

Propositional Logic: Deductive Proof & Natural Deduction Part 1 Propositional Logic: Deductive Proof & Natural Deduction Part 1 CS402, Spring 2016 Shin Yoo Deductive Proof In propositional logic, a valid formula is a tautology. So far, we could show the validity of

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

Inference in Propositional Logic

Inference in Propositional Logic Inference in Propositional Logic Deepak Kumar November 2017 Propositional Logic A language for symbolic reasoning Proposition a statement that is either True or False. E.g. Bryn Mawr College is located

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 31. Propositional Logic: DPLL Algorithm Malte Helmert and Gabriele Röger University of Basel April 24, 2017 Propositional Logic: Overview Chapter overview: propositional

More information

Lecture 11: Measuring the Complexity of Proofs

Lecture 11: Measuring the Complexity of Proofs IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 11: Measuring the Complexity of Proofs David Mix Barrington and Alexis Maciel July

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

More information

Propositional logic (revision) & semantic entailment. p. 1/34

Propositional logic (revision) & semantic entailment. p. 1/34 Propositional logic (revision) & semantic entailment p. 1/34 Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.)

More information

Language of Propositional Logic

Language of Propositional Logic Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called

More information

15414/614 Optional Lecture 1: Propositional Logic

15414/614 Optional Lecture 1: Propositional Logic 15414/614 Optional Lecture 1: Propositional Logic Qinsi Wang Logic is the study of information encoded in the form of logical sentences. We use the language of Logic to state observations, to define concepts,

More information

Propositional logic. Programming and Modal Logic

Propositional logic. Programming and Modal Logic Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness

More information

Proof Methods for Propositional Logic

Proof Methods for Propositional Logic Proof Methods for Propositional Logic Logical equivalence Two sentences are logically equivalent iff they are true in the same models: α ß iff α β and β α Russell and Norvig Chapter 7 CS440 Fall 2015 1

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 Artificial Intelligence Spring 2018 Propositional Logic Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

Kecerdasan Buatan M. Ali Fauzi

Kecerdasan Buatan M. Ali Fauzi Kecerdasan Buatan M. Ali Fauzi Artificial Intelligence M. Ali Fauzi Logical Agents M. Ali Fauzi In which we design agents that can form representations of the would, use a process of inference to derive

More information

Propositional Logic Sequent Calculus

Propositional Logic Sequent Calculus 1 / 16 Propositional Logic Sequent Calculus Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 16 1 Intuition 2 The LK system 3 Derivation 4 Summary 5 Exercises Outline 3 / 16 1 Intuition

More information

Artificial Intelligence Chapter 7: Logical Agents

Artificial Intelligence Chapter 7: Logical Agents Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent State University February 20, 2006 AI: Chapter 7: Logical Agents 1 Contents Knowledge Based Agents

More information

Logical agents. Chapter 7. Chapter 7 1

Logical agents. Chapter 7. Chapter 7 1 Logical agents Chapter 7 Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules

More information

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008 Chapter 3: Propositional Calculus: Deductive Systems September 19, 2008 Outline 1 3.1 Deductive (Proof) System 2 3.2 Gentzen System G 3 3.3 Hilbert System H 4 3.4 Soundness and Completeness; Consistency

More information

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (previous lecture, Part I) Chapter 7.5 (this lecture, Part II) (optional: 7.6-7.8)

More information

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel Propositional Logic Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1 Přednáška 12 Důkazové kalkuly Kalkul Hilbertova typu 11/29/2006 Hilbertův kalkul 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: A. a language B. a set of axioms C. a set of

More information

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz ) Logic in AI Chapter 7 Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz ) 2 Knowledge Representation represent knowledge about the world in a manner that

More information

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Description Logics. Foundations of Propositional Logic.   franconi. Enrico Franconi (1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

TDT4136 Logic and Reasoning Systems

TDT4136 Logic and Reasoning Systems TDT436 Logic and Reasoning Systems Chapter 7 - Logic gents Lester Solbakken solbakke@idi.ntnu.no Norwegian University of Science and Technology 06.09.0 Lester Solbakken TDT436 Logic and Reasoning Systems

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg

More information

Marie Duží

Marie Duží Marie Duží marie.duzi@vsb.cz 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: 1. a language 2. a set of axioms 3. a set of deduction rules ad 1. The definition of a language

More information

Logical Agents. Outline

Logical Agents. Outline Logical Agents *(Chapter 7 (Russel & Norvig, 2004)) Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability

More information

Propositional Logic: Methods of Proof. Chapter 7, Part II

Propositional Logic: Methods of Proof. Chapter 7, Part II Propositional Logic: Methods of Proof Chapter 7, Part II Inference in Formal Symbol Systems: Ontology, Representation, ti Inference Formal Symbol Systems Symbols correspond to things/ideas in the world

More information

Classical Propositional Logic

Classical Propositional Logic Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a

More information

Formal Verification Methods 1: Propositional Logic

Formal Verification Methods 1: Propositional Logic Formal Verification Methods 1: Propositional Logic John Harrison Intel Corporation Course overview Propositional logic A resurgence of interest Logic and circuits Normal forms The Davis-Putnam procedure

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT The Wumpus Game Stench Stench Gold Stench Start 1 The Wumpus Game Stench in the square containing the wumpus and in the directly adjacent squares in the squares directly adjacent to a pit Glitter in the

More information

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel Propositional Logic Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

Logic for Computer Science - Week 4 Natural Deduction

Logic for Computer Science - Week 4 Natural Deduction Logic for Computer Science - Week 4 Natural Deduction 1 Introduction In the previous lecture we have discussed some important notions about the semantics of propositional logic. 1. the truth value of a

More information

Inference Methods In Propositional Logic

Inference Methods In Propositional Logic Lecture Notes, Artificial Intelligence ((ENCS434)) University of Birzeit 1 st Semester, 2011 Artificial Intelligence (ENCS434) Inference Methods In Propositional Logic Dr. Mustafa Jarrar University of

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen 2005 References: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 7 2. S. Russell s teaching materials Introduction The representation

More information

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

Description Logics. Deduction in Propositional Logic.   franconi. Enrico Franconi (1/20) Description Logics Deduction in Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/20) Decision

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Outline Knowledge-based agents Wumpus world Logic in general

More information

Propositional logic II.

Propositional logic II. Lecture 5 Propositional logic II. Milos Hauskrecht milos@cs.pitt.edu 5329 ennott quare Propositional logic. yntax yntax: ymbols (alphabet) in P: Constants: True, False Propositional symbols Examples: P

More information

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World School of Informatics, University of Edinburgh 26/01/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Outline Knowledge-based

More information

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/ Computer-Aided Reasoning for Software CSE507 courses.cs.washington.edu/courses/cse507/17wi/ Introduction Emina Torlak emina@cs.washington.edu Today What is this course about? Course logistics Review of

More information

Deliberative Agents Knowledge Representation I. Deliberative Agents

Deliberative Agents Knowledge Representation I. Deliberative Agents Deliberative Agents Knowledge Representation I Vasant Honavar Bioinformatics and Computational Biology Program Center for Computational Intelligence, Learning, & Discovery honavar@cs.iastate.edu www.cs.iastate.edu/~honavar/

More information

Logic. proof and truth syntacs and semantics. Peter Antal

Logic. proof and truth syntacs and semantics. Peter Antal Logic proof and truth syntacs and semantics Peter Antal antal@mit.bme.hu 10/9/2015 1 Knowledge-based agents Wumpus world Logic in general Syntacs transformational grammars Semantics Truth, meaning, models

More information

Logical Agents (I) Instructor: Tsung-Che Chiang

Logical Agents (I) Instructor: Tsung-Che Chiang Logical Agents (I) Instructor: Tsung-Che Chiang tcchiang@ieee.org Department of Computer Science and Information Engineering National Taiwan Normal University Artificial Intelligence, Spring, 2010 編譯有誤

More information

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber 15-414 Aug 31, 2011 Why study SAT solvers? Many problems reduce to SAT. Formal verification CAD, VLSI Optimization AI, planning, automated

More information

Lecture 2 Propositional Logic & SAT

Lecture 2 Propositional Logic & SAT CS 5110/6110 Rigorous System Design Spring 2017 Jan-17 Lecture 2 Propositional Logic & SAT Zvonimir Rakamarić University of Utah Announcements Homework 1 will be posted soon Propositional logic: Chapter

More information

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca October 4, 2015 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5 rtificial Intelligence Topic 12 Logical Inference Reading: Russell and Norvig, Chapter 7, Section 5 c Cara MacNish. Includes material c S. Russell & P. Norvig 1995,2003 with permission. CITS4211 Logical

More information

Lecture 1: Logical Foundations

Lecture 1: Logical Foundations Lecture 1: Logical Foundations Zak Kincaid January 13, 2016 Logics have two components: syntax and semantics Syntax: defines the well-formed phrases of the language. given by a formal grammar. Typically

More information

Class Assignment Strategies

Class Assignment Strategies Class Assignment Strategies ì Team- A'ack: Team a'ack ì Individualis2c: Search for possible ì Poli2cal: look at others and make decision based on who is winning, who is loosing, and conversa;on ì Emo2on

More information

ECE473 Lecture 15: Propositional Logic

ECE473 Lecture 15: Propositional Logic ECE473 Lecture 15: Propositional Logic Jeffrey Mark Siskind School of Electrical and Computer Engineering Spring 2018 Siskind (Purdue ECE) ECE473 Lecture 15: Propositional Logic Spring 2018 1 / 23 What

More information

Propositional Logic Part 1

Propositional Logic Part 1 Propositional Logic Part 1 Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [Based on slides from Louis Oliphant, Andrew Moore, Jerry Zhu] slide 1 5 is even

More information

Classical Propositional Logic

Classical Propositional Logic The Language of A Henkin-style Proof for Natural Deduction January 16, 2013 The Language of A Henkin-style Proof for Natural Deduction Logic Logic is the science of inference. Given a body of information,

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

On the Complexity of the Reflected Logic of Proofs

On the Complexity of the Reflected Logic of Proofs On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,

More information

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World Agenda Artificial Intelligence 10. Propositional Reasoning, Part I: Principles How to Think About What is True or False 1 Introduction Álvaro Torralba Wolfgang Wahlster 2 Propositional Logic 3 Resolution

More information

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic CHAPTER 10 Gentzen Style Proof Systems for Classical Logic Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. By humans, not mentioning

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 19, 2013 This is a preliminary draft of these notes. Please do not distribute without

More information

Inference Methods In Propositional Logic

Inference Methods In Propositional Logic Lecture Notes, Advanced Artificial Intelligence (SCOM7341) Sina Institute, University of Birzeit 2 nd Semester, 2012 Advanced Artificial Intelligence (SCOM7341) Inference Methods In Propositional Logic

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 10, 2014 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information