ILP = Logic, CS, ML Stop counting, start reasoning

Size: px
Start display at page:

Download "ILP = Logic, CS, ML Stop counting, start reasoning"

Transcription

1 ILP = Logic, CS, ML Stop counting, start reasoning Gilles Richard AOC team

2 The story so far Several actors K. Brouwer K. Godel J. Herbrand A. Colmerauer R. Kowalski S. Muggleton L. Brouwer ( ) K. Godel ( ) J. Herbrand( ) H. Colmerauer (1941) R. Kowalski (1941) S. Muggleton (1959)

3 Let us start from PAC PAC model (L. Valiant ) A class of concepts (functions) C = {c i i I } over X with proba. P A target concept (function) c C A training set TS X cardinal n An algo A such that A(TS) = h TS C with disagreement set : e TS = c h TS (true error set)(e TS TS : empirical error) Our hope : ɛ, δ ]0, 1[, P(µ(e TS ) > ɛ) < δ (B ɛ,δ ) C PAC learnable iff A polynomial w.r.t. 1 ɛ, 1 δ, n such that : ɛ, δ, c, n s.t. TS > n = B ɛ,δ Conclusion : Well suited to functional approach

4 Leads to standard proba/stat/optim approaches Yes Choose a class of functions F = {c i i I } over X Pray for the target class to be PAC learnable (VC-dim) Pray for the empirical error e emp to be not too far from the true error e true Get an analytical expression for e emp Minimize via optimization techniques (SGD, batch, etc.)

5 Leads to standard proba/stat/optim approaches Yes Choose a class of functions F = {c i i I } over X Pray for the target class to be PAC learnable (VC-dim) Pray for the empirical error e emp to be not too far from the true error e true Get an analytical expression for e emp Minimize via optimization techniques (SGD, batch, etc.) What if... The target class is not a function BUT a relation between objects R(x, y) - one to many instead one to one The target object is not a number BUT a set of structured objects like lists, trees, etc. (ex. : list permutations) We have no clean analytical expression for e emp

6 Leads to standard proba/stat/optim approaches Yes Choose a class of functions F = {c i i I } over X Pray for the target class to be PAC learnable (VC-dim) Pray for the empirical error e emp to be not too far from the true error e true Get an analytical expression for e emp Minimize via optimization techniques (SGD, batch, etc.) What if... The target class is not a function BUT a relation between objects R(x, y) - one to many instead one to one The target object is not a number BUT a set of structured objects like lists, trees, etc. (ex. : list permutations) We have no clean analytical expression for e emp Conclusion : another approach needed

7 Move to logic Basic material 1 A language to build formulas ; A, a,,,,, etc. 2 A way to give a meaning to formulas : semantics 3 A way to derive new formulas : inference via proof system or syntax

8 Move to logic Basic material 1 A language to build formulas ; A, a,,,,, etc. 2 A way to give a meaning to formulas : semantics 3 A way to derive new formulas : inference via proof system or syntax 3 types of logic (at least) 1 Propositional Logic (0 order) : (A B) ( B A) A, B : propositional variables falsity 2 Predicate Logic (First Order Logic) : x y P(x, y) Q(f (x), a), x individual variable, P, Q : predicate symbols, f : functional symbol, a constant, quantifiers 3 Higher Order Logic (mainly Second Order Logic) : X, x f, X (x, f (x)), X : predicative variable, f functional variable

9 Semantics and Syntax Semantics = Models notion of truth via compositional semantics principle Propositional logic : Boolean interpretation - truth table FOL : more sophisticated with domains (mathematical sets) and interpretations SOL : similar to FOL T F : F is true in any model of T.

10 Semantics and Syntax Semantics = Models notion of truth via compositional semantics principle Propositional logic : Boolean interpretation - truth table FOL : more sophisticated with domains (mathematical sets) and interpretations SOL : similar to FOL T F : F is true in any model of T. Syntax = Inference A computable set of rules to deduce new formulas starting from a set of formulas (theory) T and a relation T F : F is deducible/provable from T T = : F and F is a theorem 2 styles of presentation : Hilbert-style and Gentzen-style

11 Propositional Logic (PL) : proof system Gentzen style : introduction and elimination rules per connector A := A Context A B A B intro A B A elim1 A B B elim2 [A] B A A B A B intro B elim (Modus Ponens) A A B intro1 A A identity B A B intro1 [ A] A A B [A] C C [B] C elim elim(absurd classical logic)

12 Propositional Logic (PL) : proof system Gentzen style : introduction and elimination rules per connector A := A Context A B A B intro A B A elim1 A B B elim2 [A] B A A B A B intro B elim (Modus Ponens) A A B intro1 A A identity B A B intro1 [ A] A A B [A] C C [B] C elim elim(absurd classical logic) How it works A (B A) : to be done A A : to be done

13 First Order Logic (FOL) : proof system The rules PL + 2 rules : A x, A GEN(x non free in proof of A) x, A(x) A([t/x]) elim

14 First Order Logic (FOL) : proof system The rules PL + 2 rules : A x, A GEN(x non free in proof of A) x, A(x) A([t/x]) elim How it works ( x, P(x)) x, (P(x)) Horn clauses : x, y, z, p(x, y) q(f (y), z) r(x, z) equivalent to : p(x, y) q(f (y), z) r(x, z) x, y, p(x, y) is a fact HORNSAT (in PL) : linear time

15 Second Order Logic (SOL) : proof system only 1 connector needed then := X, X - X := X A B := X, ((A (B X )) X ) A B := X, (A (X (B X ))) xa := X, ( x, (A X ) X ) x = y := X, (X (x) X (y))

16 Second Order Logic (SOL) : proof system only 1 connector needed then := X, X - X := X A B := X, ((A (B X )) X ) A B := X, (A (X (B X ))) xa := X, ( x, (A X ) X ) x = y := X, (X (x) X (y)) The rules FOL reduced to 5 rules + 2 rules for on predicate variables A F, A GEN(X non free in proof of A) elim X, A A([F /X ])

17 Second Order Logic (SOL) : proof system only 1 connector needed then := X, X - X := X A B := X, ((A (B X )) X ) A B := X, (A (X (B X ))) xa := X, ( x, (A X ) X ) x = y := X, (X (x) X (y)) The rules FOL reduced to 5 rules + 2 rules for on predicate variables A F, A GEN(X non free in proof of A) elim How it works X, A A([F /X ]) P, P(0) x(p(x) P(x + 1)) x P(x) x, y, P(x, y) f, P(x, f (x)) (AC)

18 What do we expect? 1 soundness : if T A (provable), then T A (true) 2 completeness : if T A (true), T A (provable) 3 inconsistency : A s.t.t A and T A 4 consistency : the opposite! 5 satisfiability : T has a model (SAT ) 6 A (closed) decidable : T A or T A (K(s) = n, Goldbach conjecture?, etc.) 7 T decidable iff Th(T ) is a recursive set.

19 What do we expect? 1 soundness : if T A (provable), then T A (true) 2 completeness : if T A (true), T A (provable) 3 inconsistency : A s.t.t A and T A 4 consistency : the opposite! 5 satisfiability : T has a model (SAT ) 6 A (closed) decidable : T A or T A (K(s) = n, Goldbach conjecture?, etc.) 7 T decidable iff Th(T ) is a recursive set. Examples PL : sound - complete - decidable FOL : sound - complete (Gödel 1929) - only semi-decidable (Church-Turing) SOL : sound - not complete - not decidable (Gödel) For any consistent theory which is capable of expressing arithmetic, there is a true non decidable formula A (Gödel )

20 (Classical logic versus intuitionnistic logic) A standard example Proof : to be done + analysis Issues a, b R \ Q s.t. a b Q No clue about 2 2 Q! Rule of excluded middle has to be fired! Leading to intuitionnistic logic Hilbert problem and Gödel theorem 2 words only

21 Automatic deduction in FOL... why not? 2 ideas at least Bad : - Reduce non determinism by reducing the number of rules - No way to keep completeness Good : Consider a fragment of FOL where one rule is enough

22 Automatic deduction in FOL... why not? 2 ideas at least Prolog Bad : - Reduce non determinism by reducing the number of rules - No way to keep completeness Good : Consider a fragment of FOL where one rule is enough Fragment : Definite Horn clauses only x, y, z, p(x, y) q(f (y), z) r(x, z) Inference rule : Resolution (M. Davis - H. Putnam ) c1 a c2 σ(a) σ(c1 c2) where σ = MGU(a, b) Main tool to be implemented : Unification (A. Robinson )

23 Unification example : integration by parts The big deal b a b u(x)v (x)dx = [u(x)v(x)] a b u (x)v(x)dx a

24 Unification example : integration by parts The big deal Example b a b u(x)v (x)dx = [u(x)v(x)] a b u (x)v(x)dx b 2 options at least (substitutions) a xln(x)dx u(x) x and v (x) ln(x) : Then u (x) = 1 and v(x) = xln(x) x u(x) ln(x) and v (x) x : Then u (x) = 1 x2 x and v(x) = 2 a

25 Resolution example The big deal Resolve a b c Against d e f a Leads to : d e f c

26 Resolution example The big deal Resolve a b c Against d e f a Leads to : d e f c Lesson learned To prove c (c is our goal) Try to prove a and b Then try to prove d, e, f and b When do we stop? If we have a fact like d (asserting d is true), d is removed, But e, f and b remain And we have to carry on with the remaining clauses until nothing else to be proved

27 Logic as a programming language : Prolog Main characteristic - A. Colmerauer (1972) Non procedural : problem description only No type Reversibility : no input/output Non determinism Backtracking Syntax : d e f c written c : d, e, f.

28 Logic as a programming language : Prolog Main characteristic - A. Colmerauer (1972) Non procedural : problem description only No type Reversibility : no input/output Non determinism Backtracking Syntax : d e f c written c : d, e, f. Learning by doing! list membership and concatenation live

29 Logic as a programming language : Prolog Main characteristic - A. Colmerauer (1972) Non procedural : problem description only No type Reversibility : no input/output Non determinism Backtracking Syntax : d e f c written c : d, e, f. Learning by doing! list membership and concatenation live Well suited to AI problem

30 N-queens problem First setting : 1848 First solution : 1850 Researcher : C. F. Gauss, E. Dijkstra (1972) n = 8 : 4,426,165,368 combinations reduced to 8 8 > 16M with background knowledge - 92 solutions Reduce to 12 fundamental solutions (symmetry)

31 N-queens solution with Prolog : 10lines! queen at position (i,j) represented as q(i,j) sol ([ q(1, J1),q(2, J2),q(3, J3),q(4, J4),q(5, J5),q(6, J6),q(7, J7),q(8, J8 )]) :- permut ([1,2,3,4,5,6,7,8],[ J1,J2,J3,J4,J5,J6,J7,J8 ]), safe ([ q(1, J1),q(2, J2),q(3, J3),q(4, J4),q(5, J5),q(6, J6),q(7, J7),q(8, J8 )]). safe ([]). safe ([Q L]) :- noattack (Q,L), safe (L). noattack (Q, []). noattack (Q,[ X L]) :- peace (Q,X), noattack (Q,L). peace (q(i,j),q(k,l)): - I =\=K,J =\=L,I-K =\=J-L,I-K =\=L-J. DEMO?

32 N-queens solution with Prolog : 10lines! queen at position (i,j) represented as q(i,j) sol ([ q(1, J1),q(2, J2),q(3, J3),q(4, J4),q(5, J5),q(6, J6),q(7, J7),q(8, J8 )]) :- permut ([1,2,3,4,5,6,7,8],[ J1,J2,J3,J4,J5,J6,J7,J8 ]), safe ([ q(1, J1),q(2, J2),q(3, J3),q(4, J4),q(5, J5),q(6, J6),q(7, J7),q(8, J8 )]). safe ([]). safe ([Q L]) :- noattack (Q,L), safe (L). noattack (Q, []). noattack (Q,[ X L]) :- peace (Q,X), noattack (Q,L). peace (q(i,j),q(k,l)): - I =\=K,J =\=L,I-K =\=J-L,I-K =\=L-J. DEMO? BUT WE DO ML NOT AI!

33 Progol : learn a Prolog program Logical framework Input : TS = TS + TS (examples), a set of facts Background B, a consistent set of formulas B /TS + Find H such that B H consistent, B H TS +, B H /TS and H "simpler than" TS. How to do it Equivalent to B TS + H (contraposition) Let be, the conjunction of all ground literals s.t. B TS + Necessarily H i.e. H THEN H can be chosen as a subset of clauses subsuming

34 Progol : internal mechanism Algorithm init : H = While TS + { Choose e TS + - construct for e then select h from H = H {h} TS + = TS + \ {e TS + s.t. B H e} }

35 Progol : internal mechanism Algorithm init : H = While TS + { Choose e TS + - construct for e then select h from H = H {h} TS + = TS + \ {e TS + s.t. B H e} } The magic : tuning Introducing types Introducing input/output via mode declaration Limit the number of resolution step r Limit the stack depth h before backtracking No theoretical results regarding these numbers (core of good practices)

36 Progol : learning by seeing...

37 Progol : learning by seeing...

38 Progol : learning by seeing...

39 Progol : learning by doing... LEARNING SET MEMBERSHIP OR CONCAT OR...

40 Progol : learning by doing... LEARNING SET MEMBERSHIP OR CONCAT OR... Some options Progol is not alone! FOIL ( R. Quinlan - http :// Aleph ( A Learning Engine for Proposing Hypotheses - A. Srinivasan - Oxford) quickfoil ( Univ. of Wisconsin-Madison)

41 Bottou intro? crystal clear now Success of optim/proba/stat based methods 1 Very old domain 2 Very large community of mathematicians 3 Nvidia with linear algebra as core business

42 Bottou intro? crystal clear now Success of optim/proba/stat based methods 1 Very old domain 2 Very large community of mathematicians 3 Nvidia with linear algebra as core business (relative) failure of logic-based methods 1 Recent domain (20th century for FOL and SOL) 2 Sparse community of mathematicians (especially France) 3 No Nvidia with unification as core business

43 Bottou intro? crystal clear now Success of optim/proba/stat based methods 1 Very old domain 2 Very large community of mathematicians 3 Nvidia with linear algebra as core business (relative) failure of logic-based methods 1 Recent domain (20th century for FOL and SOL) 2 Sparse community of mathematicians (especially France) 3 No Nvidia with unification as core business BUT the future is...

44 XAI! darpa.mil/program/explainable-artificial-intelligence

45 Thank you for your time

Logic: The Big Picture

Logic: The Big Picture Logic: The Big Picture A typical logic is described in terms of syntax: what are the legitimate formulas semantics: under what circumstances is a formula true proof theory/ axiomatization: rules for proving

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

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

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

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning Logic Knowledge Representation & Reasoning Mechanisms Logic Logic as KR Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning Logical inferences Resolution and Theorem-proving Logic

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

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

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

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

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2016/17 (slides based on Stuart Russell s AI course) Motivation: Most students will have learnt about propositional

More information

AI Programming CS S-09 Knowledge Representation

AI Programming CS S-09 Knowledge Representation AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering

More information

CHAPTER 11. Introduction to Intuitionistic Logic

CHAPTER 11. Introduction to Intuitionistic Logic CHAPTER 11 Introduction to Intuitionistic Logic Intuitionistic logic has developed as a result of certain philosophical views on the foundation of mathematics, known as intuitionism. Intuitionism was originated

More information

1. Courses are either tough or boring. 2. Not all courses are boring. 3. Therefore there are tough courses. (Cx, Tx, Bx, )

1. Courses are either tough or boring. 2. Not all courses are boring. 3. Therefore there are tough courses. (Cx, Tx, Bx, ) Logic FOL Syntax FOL Rules (Copi) 1. Courses are either tough or boring. 2. Not all courses are boring. 3. Therefore there are tough courses. (Cx, Tx, Bx, ) Dealing with Time Translate into first-order

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

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

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

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

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

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula: Logic: The Big Picture Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and

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

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

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

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

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

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

07 Equational Logic and Algebraic Reasoning

07 Equational Logic and Algebraic Reasoning CAS 701 Fall 2004 07 Equational Logic and Algebraic Reasoning Instructor: W. M. Farmer Revised: 17 November 2004 1 What is Equational Logic? Equational logic is first-order logic restricted to languages

More information

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference quantifiers x P(x) P(x) is true for every x in the domain read as for all x, P of x x P x There is an x in the

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:

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

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

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 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

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy Reasoning in First Order Logic FBK-IRST, Trento, Italy April 12, 2013 Reasoning tasks in FOL Model checking Question: Is φ true in the interpretation I with the assignment a? Answer: Yes if I = φ[a]. No

More information

Propositional Resolution Introduction

Propositional Resolution Introduction Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE

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

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1 Revised by Hankui Zhuo, March, 08 Logical agents Chapter 7 Chapter 7 Outline Wumpus world Logic in general models and entailment Propositional (oolean) logic Equivalence, validity, satisfiability Inference

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

Propositional Logic: Syntax

Propositional Logic: Syntax Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic

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

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

Bound and Free Variables. Theorems and Proofs. More valid formulas involving quantifiers:

Bound and Free Variables. Theorems and Proofs. More valid formulas involving quantifiers: Bound and Free Variables More valid formulas involving quantifiers: xp(x) x P(x) Replacing P by P, we get: x P(x) x P(x) Therefore x P(x) xp(x) Similarly, we have xp(x) x P(x) x P(x) xp(x) i(i 2 > i) is

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

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

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

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

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

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

Adam Blank Spring 2017 CSE 311. Foundations of Computing I Adam Blank Spring 2017 CSE 311 Foundations of Computing I Pre-Lecture Problem Suppose that p, and p (q r) are true. Is q true? Can you prove it with equivalences? CSE 311: Foundations of Computing Lecture

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

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

CS 730/730W/830: Intro AI

CS 730/730W/830: Intro AI CS 730/730W/830: Intro AI 1 handout: slides 730W journal entries were due Wheeler Ruml (UNH) Lecture 9, CS 730 1 / 16 Logic First-Order Logic The Joy of Power Wheeler Ruml (UNH) Lecture 9, CS 730 2 / 16

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

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

Foundations of Logic Programming

Foundations of Logic Programming Foundations of Logic Programming Deductive Logic e.g. of use: Gypsy specifications and proofs About deductive logic (Gödel, 1931) Interesting systems (with a finite number of axioms) are necessarily either:

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

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

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P. First-Order Logic Syntax The alphabet of a first-order language is organised into the following categories. Logical connectives:,,,,, and. Auxiliary symbols:.,,, ( and ). Variables: we assume a countable

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

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19. Intelligent Agents First Order Logic Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University last change: 19. Mai 2015 U. Schmid (CogSys) Intelligent Agents last change: 19. Mai 2015

More information

Propositional Logic: Review

Propositional Logic: Review Propositional Logic: Review Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Wrapping parentheses: ( ) Sentences are combined by connectives:...and...or

More information

7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7.

7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7. COMP944/984/34 6s Logic COMP944/ 984/ 34: rtificial Intelligence 7. Logical gents Outline Knowledge-based agents Wumpus world Russell & Norvig, Chapter 7. Logic in general models and entailment Propositional

More information

Nonclassical logics (Nichtklassische Logiken)

Nonclassical logics (Nichtklassische Logiken) Nonclassical logics (Nichtklassische Logiken) VU 185.249 (lecture + exercises) http://www.logic.at/lvas/ncl/ Chris Fermüller Technische Universität Wien www.logic.at/people/chrisf/ chrisf@logic.at Winter

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

Closed Book Examination. Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science

Closed Book Examination. Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science Closed Book Examination COMP60121 Appendix: definition sheet (3 pages) Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE M.Sc. in Advanced Computer Science Automated Reasoning Tuesday 27 th

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

The Legacy of Hilbert, Gödel, Gentzen and Turing

The Legacy of Hilbert, Gödel, Gentzen and Turing The Legacy of Hilbert, Gödel, Gentzen and Turing Amílcar Sernadas Departamento de Matemática - Instituto Superior Técnico Security and Quantum Information Group - Instituto de Telecomunicações TULisbon

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

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

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural

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

Propositional and First-Order Logic

Propositional and First-Order Logic Propositional and First-Order Logic Chapter 7.4 7.8, 8.1 8.3, 8.5 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer Logic roadmap overview Propositional logic (review) Problems with

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

Principles of Knowledge Representation and Reasoning

Principles of Knowledge Representation and Reasoning Principles of Knowledge Representation and Reasoning Modal Logics Bernhard Nebel, Malte Helmert and Stefan Wölfl Albert-Ludwigs-Universität Freiburg May 2 & 6, 2008 Nebel, Helmert, Wölfl (Uni Freiburg)

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

Last update: March 4, Logical agents. CMSC 421: Chapter 7. CMSC 421: Chapter 7 1

Last update: March 4, Logical agents. CMSC 421: Chapter 7. CMSC 421: Chapter 7 1 Last update: March 4, 00 Logical agents CMSC 4: Chapter 7 CMSC 4: Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general models and entailment Propositional (oolean) logic Equivalence,

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

Logic. Propositional Logic: Syntax. Wffs

Logic. Propositional Logic: Syntax. Wffs Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about

More information

First-Order Logic (FOL)

First-Order Logic (FOL) First-Order Logic (FOL) Also called Predicate Logic or Predicate Calculus 2. First-Order Logic (FOL) FOL Syntax variables x, y, z, constants a, b, c, functions f, g, h, terms variables, constants or n-ary

More information

First Order Logic: Syntax and Semantics

First Order Logic: Syntax and Semantics CS1081 First Order Logic: Syntax and Semantics COMP30412 Sean Bechhofer sean.bechhofer@manchester.ac.uk Problems Propositional logic isn t very expressive As an example, consider p = Scotland won on Saturday

More information

Computational Logic Chapter 2. Propositional Logic

Computational Logic Chapter 2. Propositional Logic 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

More information

Propositional and Predicate Logic - XIII

Propositional and Predicate Logic - XIII Propositional and Predicate Logic - XIII Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - XIII WS 2016/2017 1 / 22 Undecidability Introduction Recursive

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

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

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL

More information

Classical First-Order Logic

Classical First-Order Logic Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2008/09

More information

Artificial Intelligence. Propositional logic

Artificial Intelligence. Propositional logic Artificial Intelligence Propositional logic Propositional Logic: Syntax Syntax of propositional logic defines allowable sentences Atomic sentences consists of a single proposition symbol Each symbol stands

More information

MAI0203 Lecture 7: Inference and Predicate Calculus

MAI0203 Lecture 7: Inference and Predicate Calculus MAI0203 Lecture 7: Inference and Predicate Calculus Methods of Artificial Intelligence WS 2002/2003 Part II: Inference and Knowledge Representation II.7 Inference and Predicate Calculus MAI0203 Lecture

More information

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018 cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018 Chapter 7 Introduction to Intuitionistic and Modal Logics CHAPTER 7 SLIDES Slides Set 1 Chapter 7 Introduction to Intuitionistic and Modal Logics

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

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

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

22c:145 Artificial Intelligence

22c:145 Artificial Intelligence 22c:145 Artificial Intelligence Fall 2005 Propositional Logic Cesare Tinelli The University of Iowa Copyright 2001-05 Cesare Tinelli and Hantao Zhang. a a These notes are copyrighted material and may not

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

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017 3. The Logic of Quantified Statements Summary Aaron Tan 28 31 August 2017 1 3. The Logic of Quantified Statements 3.1 Predicates and Quantified Statements I Predicate; domain; truth set Universal quantifier,

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

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s Summary Summary Last Lecture Computational Logic Π 1 Γ, x : σ M : τ Γ λxm : σ τ Γ (λxm)n : τ Π 2 Γ N : τ = Π 1 [x\π 2 ] Γ M[x := N] Georg Moser Institute of Computer Science @ UIBK Winter 2012 the proof

More information

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning.

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning. CS 730/830: Intro AI 3 handouts: slides, asst 6, asst 7 Wheeler Ruml (UNH) Lecture 12, CS 730 1 / 16 Logic First-Order Logic The Joy of Power in First-order Logic Wheeler Ruml (UNH) Lecture 12, CS 730

More information

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2 PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2 Neil D. Jones DIKU 2005 12 September, 2005 Some slides today new, some based on logic 2004 (Nils

More information

cis32-ai lecture # 18 mon-3-apr-2006

cis32-ai lecture # 18 mon-3-apr-2006 cis32-ai lecture # 18 mon-3-apr-2006 today s topics: propositional logic cis32-spring2006-sklar-lec18 1 Introduction Weak (search-based) problem-solving does not scale to real problems. To succeed, problem

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