Propositional logic. First order logic. Alexander Clark. Autumn 2014

Size: px
Start display at page:

Download "Propositional logic. First order logic. Alexander Clark. Autumn 2014"

Transcription

1 Propositional logic First order logic Alexander Clark Autumn 2014

2 Formal Logic Logical arguments are valid because of their form. Formal languages are devised to express exactly that relevant form and to disregard all the rest. We will consider 2 formal languages Sentential Logic (also known as Propositional Logic) First-order Predicate Logic.

3 Motivations (Meta)-mathematics: Hilbert s program Linguistics Computer science There is in my opinion no important theoretical difference between natural languages and the artificial languages of logicians; indeed, I consider it possible to comprehend the syntax and semantics of both kinds of language within a single natural and mathematically precise theory. On this point I differ from a number of philosophers, but agree, I believe, with Chomsky and his associates. (Montague, 1970)

4 Deductive validity in these languages can be defined in terms of truth-preservation and in terms of formal deduction or proof. We formalize truth -consequence by means of a semantics. We formalize formal deductive -consequence by means of a syntactic calculus Soundness: all formal deductive-consequences are truth-consequences. Completeness: all truth-consequences are formal deductive-consequences.

5 Defining a Logic involves: 1. Defining a language an alphabet, the primitive symbols of the language, a syntax, giving the well-formed formulas of the language. 2. Defining a semantics for the language, an interpretation of the well-formed formulas (and, sometimes, an interpretation of the primitive symbols)

6 Generally, the set of well-formed formulas of a language and its semantics are inductively defined. An inductive definition typically has three parts: 1. a basic step in which certain objects are explicitly defined to be of the desired kind, 2. one or more inductive steps defining complex objects to be of the desired kind, given that the component objects have already been defined, 3. a concluding step determining that nothing that cannot be defined by a finite number of basic and inductive steps is an object of the desired kind.

7 Sentential Logic The Language of Sentential Logic. The primitive symbols of the language (the alphabet) consist of 1. a countably infinite set L of sentence symbols, A 1,...., A n,..., A 10 15,.... (we will also use the symbols A, B, C, D,... Z for the first 26 sentence symbols.) 2. five propositional/boolean connectives,,,,, called the negation, conjunction, disjunction, conditional and the biconditional symbol respectively, 3. a left parenthesis, (, and a right parenthesis, ).

8 An L-string is a finite sequence of connectives, parentheses, and sentence symbols from L. Example The string of symbols )A 1 ( A It has 7 symbols: ) A 1 ( A 4

9 L-formulas, or well-formed formulas, (wffs), are Lstrings constructed according to the following rules: 1. A string consisting of a single occurrence of a sentence symbol is an L-formula. 2. If β is an L-formula then ( β) is an L-formula. 3. If β and γ are L-formulas then (β γ) is an L-formula. (β γ) is an L-formula. (β γ) is an L-formula. (β γ) is an L-formula. 4. Nothing else is an L-formula.

10 Examples of wff A 1 ( B) ( ( B)) (A 1 A 17 ) ((A B) C) ((( A) B) (A B)) (( A) A)

11 Expressions that are not wff AB A B (A B (A B(( ((A B))

12 Construction tree ((A B) (B ( A))) (A B) (B ( A)) A B B ( A) A

13 Inductive proof How do you prove that all wffs have some property? Prove that all sentence symbols have the desired property (Base case) Prove that the formula construction methods preserve that property (Inductive step) We have then proven that all wffs have the desired property. If you define something inductively, then typically it is easiest to use inductive proofs.

14 Notation We will use α, β as variables that range over wff.

15 Show by induction on the construction of α. In every wff there occur only a finite number of sentence symbols. Every wff has as many left as right parentheses. A proper initial segment of a wff contains an excess of left-parentheses. So no such segment can be a wff.

16 Unique readability Theorem Every wff is constructed in a unique way from the sentence symbols and the formula construction operations. That is, every wff can be associated with a unique construction tree.

17 Without parentheses A B B A A B B A A B B A A B B A A B B A B B A A B A A

18 Natural language ambiguities You can have tempura and udon or sushi. The chicken is ready to eat I saw the man on the hill with the telescope Volunteers needed to help torture victims Everybody in this room speaks two languages.

19 A truth assignment for a set of sentence symbols L is a function v v : L {T, F} That is, if A is a sentence symbol from L then v(a) {T, F} (T stands for true and F stands for false.) For n different sentence symbols from L, there are 2 n different truth valuations. Have I used a symbol that is unfamiliar?

20 Suppose v(a) = T, v(b) = F, v(c) = F,... α = ((A B) (B ( A))) Intuitively the truth assignment of α is computed from: ((T F) (F ( T)))

21 Given a truth assignment v we define by recursion the unique function v mapping all wffs over L to {T, F} by 1. v(α) = v(α) if α L { T if v(α) = F 2. v(( α)) = F if v(α) = T { T if v(α) = T and v(β) = T 3. v((α β)) = F otherwise { F if v(α) = F and v(β) = F 4. v((α β)) = T otherwise { F if v(α) = T and v(β) = F 5. v((α β)) = T otherwise

22 ((A B) (B ( A))) (A B) (B ( A)) A B B ( A) A

23 A B B A

24 v(a) v(b) v(b) T F F T F F F v(a) T T T T F T F T T F F F T F F F T F F F T T T

25 Homomorphic extensions Suppose we want to define a function from the set of wff to natural numbers. Example Number of symbols in a wff: the length n(a) = 1 n(( A)) = 4 etc Homomorphic property If x, y are two expressions, and x y is the result of concatenating them: n(x y) = n(x) + n(y) (Monoid-homomorphism from strings under concatenation to numbers under addition.)

26 Alternative way of defining this Define n on the individual symbols: n(a) = 1, n( ) = 1,... Extend it to a function on strings of symbols n If u is a string of length 1, then n(u) = n(u) Otherwise u = v w, and n(u) = n(v) + n(w) (unique homomorphic extension of n as a monoid homomorphism)

27 Alternative way of defining this Define n on the sentence symbols: n(a) = 1 Extend it to a function on wff n If α is a sentence symbol then n(α) = n(α) = 1 Otherwise If α = ( β) then n(α) = n(β) + 3 If α = (β γ) then n(α) = n(β) + n(γ) + 3

28 Satisfiability Definitions If v(α) = T then truth assignment v satisfies α. If Φ is a set of wffs, then truth assignment v satisfies Φ if v satisfies every element of Φ. A set Φ is satisfiable if there is a truth assignment v satisfying Φ. Φ is unsatisfiable if it is not satisfiable.

29 Examples {( A), (A B)} is satisfiable. {( A), ( B), (A B)} is unsatisfiable.

30 Comments We write Φ; α for Φ {α}. Every set Φ of sentence symbols is satisfiable. So every unsatisfiable set must have at least one complex wff. No set containing α and ( α) is satisfiable. If Φ is satisfiable, and α is a wff, then either Φ; α is satisfiable or Φ; ( α) is satisfiable.

31 Logical consequence Semantic entailment α is a tautological consequence of Φ, written Φ α if every truth assignment satisfying Φ also satisfies α Examples {A, (A B)} B {A, ( A)} B {A, B} B {A, (B A)} B

32 Tautologies α is a tautology if it is a tautological consequence of the empty set: α also written as α In other words it is true for every truth assignment. Example (A ( A))

33 Monotonicity If Σ α then Σ Φ α. Note that we normally reason in a way that violates this condition. Birds can fly and X is a bird implies X can fly. Birds can fly and X is a bird and X is a penguin implies that X cannot fly.

34 Some facts: {α 1,..., α n } β if and only if {α 1,..., α n 1 } α n β Φ; α β if and only if Φ (α β) {α} β if and only if (α β) Φ α if and only if Φ; ( α) is unsatisfiable.

35 Truth tables Take a wff α Take the set of all wff that are subformula of α; (substrings of α that are wffs) Construct a table whose columns are the subformula; ordered by length. Add 2 n rows corresponding to the possible truth assignments.

36 Truth tables A T F ( A) F T A B (A B) T T T T F F F T T F F T A B (A B) T T T T F F F T F F F T

37 A B (A B) T T T T F T F T T F F F A B (A B) T T T T F F F T F F F F

38

39 ((A B) (B ( A))) (A B) (B ( A)) A B B ( A) A

40 The method of truth tables Example ((A B) (B ( A))) A B ( A) (A B) (B ( A)) ((A B) (B ( A))) T T F T F F T F F F T T F T T T T T F F T T T T

41 Tautologies in truth tables Example ((A B) (B A)) is a tautology. A B (A B) (B A) ((A B) (B A)) T T T T T T F F F T F T F F T F F F F T

42 Entailment Example {A, (A B)} B A B (A B) Satisfies A and A B T T T yes T F F no F T T no F F T no

43 Effective procedures Informal definition Exact set of instructions Not requiring any originality or inspiration Terminates after a finite sequence of steps and returns an answer The Church-Turing thesis. An abstraction of a computer program Unbounded memory Unbounded time No errors

44 Decidability Definition A set Σ of expressions is decidable iff there is an effective procedure that given an expression α will decide whether or not α Σ. In other words, it will return true if α Σ and will return false if α Σ Examples: The set of all wffs is decidable. Any finite set of expressions is decidable There are some non decidable sets of expressions

45 Effective enumerability A slightly weaker property. Definition A set Σ of expressions is effectively enumerable iff there is an effective procedure that given an expression α will return true iff α Σ. Alternative definition iff there is an effective procedure that lists in some order the elements of Σ

46 Finiteness Lemma Finiteness Lemma If two truth assignments agree on all sentence symbols in wff α then they agree on α We have proven already that every wff uses only a finite number of sentence symbols. So if α has n sentence symbols, then there are, essentially, only 2 n different truth valuations. So the differences between the truth assignments on the infinite number of sentence symbols not occurring in α are irrelevant. We prove the finiteness lemma by induction on the construction of α

47 We will see that this lemma makes Truth-Tables an effective decision procedure. A Truth Table analyzes the truth value of a wff α in terms of only the truth values of its subformulas (the segments of the string α that are themselves wffs).

48 Test for satisfiability and tautological consequence If Φ is a finite set of wffs, then whether α is a tautological consequence of Φ and whether Φ; α is satisfiable can be effectively tested. Construct a truth table from all subformula of all wff in Φ or Φ; α Because is a finite set, it can be effectively tested whether a wff α is a tautology or not.

49 Testing satisfiability If there are n sentence symbols involved in the wff of Φ, then satisfiability can be tested by a truth-table with 2 n rows. Φ is satisfiable iff there is some row in the truth table assigning T to all elements of Φ.

50 Example Is Φ = {A, (A B), (B ( A))} satisfiable? A B ( A) (A B) (B ( A)) T T F T F T F F F T F T T T T F F T T T Not satisfiable!

51 Testing consequence If there are n sentence symbols involved in the wff of Φ; α, then tautological consequence can be tested by a truth-table T with 2 n rows. Φ α iff every row in T that assigns T to all elements of Φ assigns T to α. Iff Φ; ( α) is unsatisfiable. Theorem If Φ is a finite set of wff, then the set of tautological consequences of Φ is decidable.

52 Size of truth tables Suppose Σ is a finite set of clauses with n distinct sentence symbols. There are 2 n rows in the truth table. n rows Are there better algorithms than truth tables?

53 Fortnow, 2009 As we solve larger and more complex problems with greater computational power and cleverer algorithms, the problems we cannot tackle begin to stand out. The theory of NP-completeness helps us understand these limitations and the P versus NP problem begins to loom large not just as an interesting theoretical question in computer science, but as a basic principle that permeates all the sciences.

54 SAT Definition SAT is the problem of determining whether a finite set of boolean formula is satisfiable and finding a satisfying assignment if one exists. Computationally, this is an NP-complete problem (the first one) Given an assignment v we can check easily if v satisfies all the formulas of Σ It is as hard as any other NP-problem to find such a v if one exists.

55 1-SAT Definition A literal is a formula which is either a sentence symbol, or the negation of a sentence symbol. A 1, ( A 3 ), A 5,... Suppose every element of Σ is a literal. Can we solve SAT easily in this case?

56 2-SAT vs 3-SAT 2-SAT Suppose every element of Σ is a disjunction of two literals. E.g. Σ = {(A B), (B C),... }. Can we solve this efficiently? Yes in linear time. 3-SAT Suppose every element of Σ is a disjunction of at most three literals. This is NP-complete.

57 Functional Completeness An n-ary truth function is a function Z of the form 2 0-ary truth functions (?), 4 1-ary truth functions Z (T) = T, Z (F) = T Z (T) = T, Z (F) = F Z (T) = F, Z (F) = T Z (T) = F, Z (F) = F Z : {T, F} n {T, F}

58 16 2-ary truth functions Z (T, T) = T, Z (T, F) = T,Z (F, T) = T,Z (F, F) = T Z (T, T) = T, Z (T, F) = T,Z (F, T) = T,Z (F, F) = F Z (T, T) = T, Z (T, F) = T,Z (F, T) = F,Z (F, F) = T... These are just the 16 possible ways of filling in a column in a truth table with n sentence symbols. A B Z T T? T F? F T? F F?

59 Functional Completeness If Z is an n-ary truth function, then there is a wff α in the sentence symbols A 1,..., A n such that for every truth assignment v: Z (v(a 1 ),..., v(a n )) = v(α) Proof: By the finiteness lemma, there are only 2 n essentially different truth assignments: v 1, v 2,..., v 2n. For any sequence of arguments s to Z there is exactly one truth assignment v i such that s = v i (A 1 ),... v i (A n ). These valuations correspond to the 2 n rows in a truth table for a formula with n sentence symbols. The desired wff α will be constructed from these symbols.

60 β i j = { A j ( A j ) if v i (A j ) = T otherwise Define α i = (β i 1 βi n). α i just codes one row of the truth table. Finally, pick just those rows α i such that Z (v i (A 1 ),..., v i (A n )) = T, and call these α 1,..., α k Then the required formula is: α = (α 1 α k )

61 Example A B C Z T T T T T T F F T F T T T F F F F T T F F T F F F F T F F F F T (A B C) (A B C) ( A B C)

62 Disjunctive normal form A set of connectives if functionally complete if we can express any truth function using them. We have just proved that {,, } is a functional complete set of connectives. {, } is also functionally complete as: (α β) ( (( α) ( β))) {, } is also functionally complete as: (α β) ( (( α) ( β))) {, } is also functionally complete as: (α β) ( (α ( β)))

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

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

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

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

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 Predicate Logic - II

Propositional and Predicate Logic - II Propositional and Predicate Logic - II Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - II WS 2016/2017 1 / 16 Basic syntax Language Propositional logic

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

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

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

Truth-Functional Logic

Truth-Functional Logic Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence

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

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

Propositional Language - Semantics Propositional Language - Semantics Lila Kari University of Waterloo Propositional Language - Semantics CS245, Logic and Computation 1 / 41 Syntax and semantics Syntax Semantics analyzes Form analyzes Meaning

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

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

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

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

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

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

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

Predicate Logic: Sematics Part 1

Predicate Logic: Sematics Part 1 Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with

More information

Introduction to Metalogic 1

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

More information

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring 109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment

More information

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4 INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4 Neil D. Jones DIKU 2005 Some slides today new, some based on logic 2004 (Nils Andersen), some based on kernebegreber (NJ 2005) PREDICATE LOGIC:

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

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

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

SAT Solvers: Theory and Practice

SAT Solvers: Theory and Practice Summer School on Verification Technology, Systems & Applications, September 17, 2008 p. 1/98 SAT Solvers: Theory and Practice Clark Barrett barrett@cs.nyu.edu New York University Summer School on Verification

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

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

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims Introduction INTRODUCTION TO LOGIC 2 Syntax and Semantics of Propositional Logic Volker Halbach In what follows I look at some formal languages that are much simpler than English and define validity of

More information

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic Mathematics 114L Spring 2018 D.A. Martin Mathematical Logic 1 First-Order Languages. Symbols. All first-order languages we consider will have the following symbols: (i) variables v 1, v 2, v 3,... ; (ii)

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

Chapter 11: Automated Proof Systems

Chapter 11: Automated Proof Systems Chapter 11: Automated Proof Systems SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems are

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

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

1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology

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

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic Propositional logic Logical connectives Rules for wffs Truth tables for the connectives Using Truth Tables to evaluate

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

GÖDEL S COMPLETENESS AND INCOMPLETENESS THEOREMS. Contents 1. Introduction Gödel s Completeness Theorem

GÖDEL S COMPLETENESS AND INCOMPLETENESS THEOREMS. Contents 1. Introduction Gödel s Completeness Theorem GÖDEL S COMPLETENESS AND INCOMPLETENESS THEOREMS BEN CHAIKEN Abstract. This paper will discuss the completeness and incompleteness theorems of Kurt Gödel. These theorems have a profound impact on the philosophical

More information

10 Propositional logic

10 Propositional logic 10 The study of how the truth value of compound statements depends on those of simple statements. A reminder of truth-tables. and A B A B F T F F F F or A B A B T F T F T T F F F not A A T F F T material

More information

Chapter 4: Classical Propositional Semantics

Chapter 4: Classical Propositional Semantics Chapter 4: Classical Propositional Semantics Language : L {,,, }. Classical Semantics assumptions: TWO VALUES: there are only two logical values: truth (T) and false (F), and EXTENSIONALITY: the logical

More information

Lecture 7. Logic. Section1: Statement Logic.

Lecture 7. Logic. Section1: Statement Logic. Ling 726: Mathematical Linguistics, Logic, Section : Statement Logic V. Borschev and B. Partee, October 5, 26 p. Lecture 7. Logic. Section: Statement Logic.. Statement Logic..... Goals..... Syntax of Statement

More information

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

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

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning Raffaella Bernardi Università degli Studi di Trento e-mail: bernardi@disi.unitn.it Contents 1 What we have said

More information

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65 Undecidable Problems Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, 2018 1/ 65 Algorithmically Solvable Problems Let us assume we have a problem P. If there is an algorithm solving

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

Propositional Logic and Semantics Propositional Logic and Semantics English is naturally ambiguous. For example, consider the following employee (non)recommendations and their ambiguity in the English language: I can assure you that no

More information

Chapter 11: Automated Proof Systems (1)

Chapter 11: Automated Proof Systems (1) Chapter 11: Automated Proof Systems (1) SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems

More information

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step. Propositional Logic Yimei Xiang yxiang@fas.harvard.edu 11 February 2014 1 Review Recursive definition Set up the basis Generate new members with rules Exclude the rest Subsets vs. proper subsets Sets of

More information

Computation and Logic Definitions

Computation and Logic Definitions Computation and Logic Definitions True and False Also called Boolean truth values, True and False represent the two values or states an atom can assume. We can use any two distinct objects to represent

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

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

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Introduction to Artificial Intelligence Propositional Logic & SAT Solving UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Today Representation in Propositional Logic Semantics & Deduction

More information

Lecture 4: Proposition, Connectives and Truth Tables

Lecture 4: Proposition, Connectives and Truth Tables Discrete Mathematics (II) Spring 2017 Lecture 4: Proposition, Connectives and Truth Tables Lecturer: Yi Li 1 Overview In last lecture, we give a brief introduction to mathematical logic and then redefine

More information

Decidability: Church-Turing Thesis

Decidability: Church-Turing Thesis Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there

More information

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω 1 Preliminaries In this chapter we first give a summary of the basic notations, terminology and results which will be used in this thesis. The treatment here is reduced to a list of definitions. For the

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

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence SYNTAX dictionary Literal any propositional VARIABLE a or negation of a variable a, a VAR, Example

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

CONTENTS. Appendix C: Gothic Alphabet 109

CONTENTS. Appendix C: Gothic Alphabet 109 Contents 1 Sentential Logic 1 1.1 Introduction............................ 1 1.2 Sentences of Sentential Logic................... 2 1.3 Truth Assignments........................ 7 1.4 Logical Consequence.......................

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

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

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

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom. Knowledge representation Introduction Knowledge is the progression that starts with data which s limited utility. Data when processed become information, information when interpreted or evaluated becomes

More information

1. Propositional Calculus

1. Propositional Calculus 1. Propositional Calculus Some notes for Math 601, Fall 2010 based on Elliott Mendelson, Introduction to Mathematical Logic, Fifth edition, 2010, Chapman & Hall. 2. Syntax ( grammar ). 1.1, p. 1. Given:

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

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

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

1. Propositional Calculus

1. Propositional Calculus 1. Propositional Calculus Some notes for Math 601, Fall 2010 based on Elliott Mendelson, Introduction to Mathematical Logic, Fifth edition, 2010, Chapman & Hall. 2. Syntax ( grammar ). 1.1, p. 1. Given:

More information

Chapter 2: Introduction to Propositional Logic

Chapter 2: Introduction to Propositional Logic Chapter 2: Introduction to Propositional Logic PART ONE: History and Motivation Origins: Stoic school of philosophy (3rd century B.C.), with the most eminent representative was Chryssipus. Modern Origins:

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

Propositional Languages

Propositional Languages Propositional Logic Propositional Languages A propositional signature is a set/sequence of primitive symbols, called proposition constants. Given a propositional signature, a propositional sentence is

More information

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming A Little Logic International Center for Computational Logic Technische Universität Dresden Germany Propositional Logic Satisfiability Problems Solving Sudokus First Order Logic Logic Programming A Little

More information

Logic Background (1A) Young W. Lim 12/14/15

Logic Background (1A) Young W. Lim 12/14/15 Young W. Lim 12/14/15 Copyright (c) 2014-2015 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any

More information

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic Dieter Fensel and Dumitru Roman www.sti-innsbruck.at Copyright 2008 STI INNSBRUCK www.sti-innsbruck.at Where are we? # Title 1 Introduction 2 Propositional Logic

More information

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS 1 Language There are several propositional languages that are routinely called classical propositional logic languages. It is due to the functional dependency

More information

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer Artificial Intelligence Propositional Logic Copyright 2011 Dieter Fensel and Florian Fischer 1 Where are we? # Title 1 Introduction 2 Propositional Logic 3 Predicate Logic 4 Reasoning 5 Search Methods

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

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

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction Jacques Fleuriot jdf@inf.ed.ac.uk Logic Puzzles 1. Tomorrow will be sunny or rainy. Tomorrow will not be sunny. What will the weather

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

CSCE 222 Discrete Structures for Computing. Propositional Logic. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker

CSCE 222 Discrete Structures for Computing. Propositional Logic. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker CSCE 222 Discrete Structures for Computing Propositional Logic Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Propositions A proposition is a declarative sentence that is either true or false

More information

1.3. BASIC COMPUTER SCIENCE PREREQUISITES 15

1.3. BASIC COMPUTER SCIENCE PREREQUISITES 15 1.3. BASIC COMPUTER SCIENCE PREREQUISITES 15 For example, if L is reducible to L and L P then L P. A decision problem is NP-hard if every problem in NP is polynomial time reducible to it. A decision problem

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

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

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

Logical Agents: Propositional Logic. Chapter 7

Logical Agents: Propositional Logic. Chapter 7 Logical Agents: Propositional Logic Chapter 7 Outline Topics: Knowledge-based agents Example domain: The Wumpus World Logic in general models and entailment Propositional (Boolean) logic Equivalence, validity,

More information

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14 0/0/4 Knowledge based agents Logical Agents Agents need to be able to: Store information about their environment Update and reason about that information Russell and Norvig, chapter 7 Knowledge based agents

More information

Normal Forms of Propositional Logic

Normal Forms of Propositional Logic Normal Forms of Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 12, 2017 Bow-Yaw Wang (Academia Sinica) Normal Forms of Propositional Logic September

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

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook) Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or

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