First Order Logic: Syntax and Semantics

Size: px
Start display at page:

Download "First Order Logic: Syntax and Semantics"

Transcription

1 irst Order Logic: Syntax and Semantics COMP30412 Sean Bechhofer Logic Recap You should already know the basics of irst Order Logic (OL) It s a prerequisite of this course! he next two lectures provide a brief refresher But we won t go over everything in detail You re strongly advised to do some background reading if this isn t familiar territory Much of the remainder of the course will rely on an understanding of this material. E.g. he Language of irst Order Logic, Jon Barwise & John Etchemendy, CSLI Lecture Notes, University of Manchester,

2 What is a Logic? When people talk about logic they often mean propositional or firstorder predicate logic. However there are many other logics, for example modal and temporal logics and description logics. We ll meet some of these later on. A logic usually has a well defined syntax, semantics and proof theory. he syntax of a logic defines the syntactically acceptable objects of the logic, or well-formed formulae. he semantics of a logic associates each formula with a meaning. he proof theory is concerned with manipulating formulae according to certain rules. 3 Coming Up Over the course of the next few lectures, we ll look in some detail at the syntax, semantics and proof theory of propositional logic. We ll then move on to predicate logic, seeing how this extends propositional logic and touch on some of the key characteristics of such languages. 4 University of Manchester,

3 An Example: Cloth Weaves [Maier & Warren, Computing with Logic, 1988] An example showing how we can represent the qualities and characteristics of cloth types using a simple propositional logic knowledge base. 5 Cloth Woven fabrics consist of two sets of threads interlaced at right angles. he warp threads run the length of the fabric he weft (fill, pick or woof) threads are passed back and forth between the warp threads. When weaving, the warp threads are raised or lowered in patterns, leading to different weaves. actors include: he pattern in which warps and wefts cross Relative sizes of threads Relative spacing of threads Colours of threads 6 University of Manchester,

4 Plain Weave Over and under in a regular fashion 7 will Weave Warp end passes over more than one weft Known as floats Successive threads offset by 1 8 University of Manchester,

5 Satin Weave Longer floats Offsets larger than 1 9 Classifying Cloth he example provides a number of rules that describe how particular kinds of cloth are described. alternatingwarp! plainweave If a piece of cloth has alternating warp, then it s a plain weave. hasloats, warpoffseteq1! twillweave If a piece of cloth has floats and a warp offset of 1, then it s a twill weave. here are many other properties concerning the colour of threads, spacings etc. 10 University of Manchester,

6 Using the Rules We could use these rules to build a system that would be able to recognise different kinds of cloth through recognising the individual characteristics. he example given shows that once we have recognised the following characteristics diagonalexture floatgsink colouredwarp whiteill hen we can determine that this cloth is denim. 11 Knowledge Representation Although this is relatively simple (in terms of both the expressivity of the language used and the number of facts), this really is an example of Knowledge Representation. he rules represent some knowledge about cloth A machine can make use of this knowledge to deduce consequences. his particular example makes use of propositional logic. 12 University of Manchester,

7 Propositional Logic he syntax of propositional logic is constructed from propositions and connectives. A proposition is a statement that is either true or false but not both. Examples: the following are propositions George Burley is Scotland Manager = 5 abio Capello is Scotland Manager = 6 the reactor is in a stable state whereas the following are not What's the time? antastic Goal! 2+3 antelope 13 Propositions In general, we can determine whether any given statement is a proposition by prefixing it with It is true that and seeing whether the result makes grammatical sense. Propositions are often abbreviated using propositional variables eg p, q, r. hus we must associate the propositional variable with its meaning i.e. Let p be Gordon Brown is Prime Minister. Alternatively we might write something like reactor_is_in_a_stable_state so that the intended meaning of the propositional variable is clearer. But we need to be very careful here that we don t encode too much information in the names of the propositions. 14 University of Manchester,

8 Connectives Connectives allow us to form compound propositions by combining propositions. Æ and conjunction & Ç or disjunction not negation ~ ) if then implies!, if and only if iff $ 15 And (Conjunction) he conjunction p and q, written p q of two propositions is true when both p and q are true, false otherwise. p q p q It s Monday It s raining It s Monday and it s raining 16 University of Manchester,

9 ruth ables ruth tables provide a summary of a connective. he truth table shows all possible combinations of the inputs to the connective, along with the outcome. Rows in the table give all possible settings of the propositions to true () or false (). or a connective with n inputs, we need 2 n rows in our truth table. A truth table for is: p q p q 17 Or (Disjunction) he disjunction p or q, written p q, of two propositions is true when p or q (or both) are true, false otherwise. his is sometimes called inclusive or, as we don t require that only one of the propositions is true. p q p q p q p q It s Monday It s raining It s Monday or it s raining 18 University of Manchester,

10 Not (Negation) he negation not p of a proposition p is true when p is false and is false otherwise. Can also be read as it is false that p p p p Logic is easy p It s false that logic is easy It s not the case that logic is easy Logic isn t easy 19 If then (Implication) he implication p implies q, written p q, of two propositions is true when either p is false or q is true, and false otherwise. p q p q p q p q I study hard I get rich If I study hard then, I get rich When I study hard, I get rich 20 University of Manchester,

11 If then (Implication) We need to be careful with as it may not quite capture our intuitions about implication. In particular (taking the previous example), p q is true in the following situations: I study hard and I get rich; or I don't study hard and I get rich; or I don't study hard and I don't get rich. Note the last two situations, where the implication is true regardless of the truth of p. he one thing we can say is that if I've studied hard but failed to become rich then the proposition is clearly false. 21 Iff (Bi-implication) he bi-implication p iff q (p if and only if q), written as p q, of two propositions is true when both p and q are true or when both p and q are false, and false otherwise. p q p q p q p q Sean is happy It s the weekend Sean is happy iff it s the weekend 22 University of Manchester,

12 Propositional Logic: More formally he language of propositional logic consists of the following symbols. A set PROP, of proposition symbols, p, q, r etc A set of propositional connectives:- nullary connectives true and false; unary connective binary connectives,,, he symbols ( and ) these are used to avoid ambiguity. 23 Well ormed ormulae he set of Well-ormed ormulae (W) is defined as: Any propositional symbols is in W he nullary connectives true and false are in W If A and B are in W then so are A (A) A B A B A B A B 24 University of Manchester,

13 Examples p (p) (()) true p true p q p q (p q) true false p q (p q) r p q r 25 ruth ables We can extend the basic truth tables to show interpretations of compound propositions. o draw up a truth table, construct a column for each proposition involved. We need 2 n rows for n propositions in order to record all possible ways of setting the propositions to and. If we have 3 propositions,, i.e. we need 2 3 = 8 rows. Construct a column for each connective, the most deeply nested first. Evaluate each column using values for propositions or previous columns. 26 University of Manchester,

14 Example p q r I eat eggs for breakfast I eat cereal for breakfast I eat toast for breakfast (p q) r p q r p q (p q) r Compound proposition is true if I eat eggs, cereal and toast; or I eat eggs and toast; or I eat cereal and toast 27 Interpretations Given a particular formula, can you tell if it is true or not? he truth of a compound formula depends on the truth values of the component propositions. A truth valuation is a function: I v : PROP {,} which assigns a truth value to each atomic proposition Given a truth valuation, we can define a interpretation I that gives a truth value for a (well-formed) compound formula using the truth valuation for the atomic propositions and the truth tables for the connectives involved. 28 University of Manchester,

15 Example Proposition: (p q) r ruth valuation: I v (p) =, I v (q) =, I v (r) = Applying the truth valuation gives us: I((p q) r) = (I v (p) I v (q)) I v (r)) = ( ) = = p q p q p q p q 29 Semantics of Propositional Logic Given an truth valuation I v :PROP! {,}, we can extend this to provide us with a interpretation I that assigns either or to any statement of the language. he symbol ² is used to represent the relationship between interpretations and formulae: I ² true I 2 false I ² p if, and only if I v (p) = I ² A if, and only if I 2 A I ² A Æ B if, and only if I ² A and I ² B I ² A Ç B if, and only if I ² A or I ² B I ² A ) B if, and only if If I ² A then I ² B I ² A, B if, and only if I ² A if and only if I ² B 30 University of Manchester,

16 autologies and Satisfiability A formula is valid or is a tautology iff it is true under every interpretation. If A is a tautology, this is written ² A A formula is said to be satisfiable (or consistent) iff it is true under at least one interpretation. A formula is said to be unsatisfiable (or inconsistent or contradictory) iff there is no interpretation under which it is true If a formula A is a tautology then A is unsatisfiable. 31 ruth ables Each line of a truth table corresponds to an interpretation. So we can use truth tables to determine whether or not formulae are valid. Example: (p ) q) Ç (q ) p) p q p ) q q ) p (p ) q) Ç (q ) p) autology 32 University of Manchester,

17 ruth ables Example: (p ) q) Æ p p q p ) q (p ) q) Æ p Not a tautology, but satisfiable 33 ranslations An alternative to providing a direct semantics (e.g. Interpretations as we ve seen here) is to provide a translation of the connectives or example, we can define p! q as p Ç q If we look at the truth tables for each of these formulae, then we can see that for any valuations of p and q, the result is the same. 34 University of Manchester,

18 Defining New connectives Using this approach of translation rather than a direct semantics, we can define new connectives. p q p q Recall the truth table for or p Ç q is true when either p or q is true. It s also true when both p and q are true or some situations, we might want a new connective that tells us when only one of p or q is true: also known as exclusive or and sometimes written p q 35 Defining New connectives We could define p q using a truth table: p q p q Alternatively, we can give a translation to an equivalent expression using the other connectives: p q (p Ç q) Æ (p Æ q) 36 University of Manchester,

19 unctional Completeness he above example illustrates that we don t actually need the exclusive or connective It can be defined in terms of Æ, Ç and So how many connectives do we really need? We say a set of connectives is functionally complete if there is no truth table that can not be expressed as a formula involving only these connectives. or example, the set {Æ, Ç, } is functionally complete In fact {Ç, } is functionally complete De Morgan s Laws 37 Logical Consequences We have provided definitions of the syntax and semantics of propositional logic. Given a set of formulae, we want to know which formulae are logical consequences of that set B is a consequence of A if it s the case that whenever A is true, then B must be true also. We write: A ² B or example, if we know that both p and p ) q hold, then we might want to be able to conclude that q also holds. 38 University of Manchester,

20 Logical Consequences We can do this by constructing truth tables. If we want to know whether B follows from A 1, A 2,. A n, then we could construct a truth table for A 1 Æ A 2 Æ Æ A n ) B and check to see is this is a tautology. E.g. is it the case that q follows from (p ) q) and p? Construct a truth table for ((p ) q) Æ p) ) q p q (p ) q) (p ) q) Æ p ((p ) q) Æ p) ) q 39 Knowledge Bases We can now use thise notion of logical consequence. A Knowledge Base K = {p 1,, p n } is a collection of propositions that describe facts about a situation of affairs that we are trying to model We can then derive consequences from this knowledge base where q is a consequence if p 1,,p n ² q or example, the rules encapsulating the different characteristics and qualities of different cloth weaves. 40 University of Manchester,

21 Logical Consequences As we saw before, we could test for logical consequence by constructing truth tables. If we want to know whether B follows from A 1, A 2,. A n, then we could construct a truth table for A 1 Æ A 2 Æ Æ A n ) B and check to see is this is a tautology. E.g. is it the case that q follows from (p ) q) and p? Construct a truth table for ((p ) q) Æ p) ) q) p q (p ) q) (p ) q) Æ p ((p ) q) Æ p) ) q) Problem: his is potentially expensive: we need 2 n rows for n propositions, so our truth tables may become large. 41 Proof Rules An alternative is to use some proof rules or proof theory. Proof rules provide us with a mechanism for determining logical consequences through some syntactic manipulation of the formulae. A rule stating that B follows (or is provable from) A 1,,A n is written as: A 1 A n B A well known proof rule is modus ponens: where A and B are any W. A ) B B A 42 University of Manchester,

22 More Proof Rules A common rule, known as Æ-elimination is: A Æ B or B We can read the first as If A and B hold, then A must also hold. A Æ B A he Ç-introduction rule tells us: A A Ç B or Again, we can read the first as: If A holds, then A Ç B must also hold. B A Ç B 43 Proof By combining proof rules together, we can deduce consequences from premises. Ex: from p Æ q and q ) r, can we prove r? 1. p Æ q [given] 2. q ) r [given] 3. q [1 Æ-elimination] 4. r [2,3 modus ponens] 44 University of Manchester,

23 Proof heory his reasoning about statements of the logic is being done without considering the interpretations We re not drawing up truth tables to work out if the consequences hold. Proof rules show us, given true statements, how to generate further true statements. Axioms describe universal truths of the logic or example, p Ç p is an axiom of propositional logic 45 Proofs If A 1, A n,b are W, then there is a proof of B from A 1,,A n iff there exists some sequence of formulae C 1,,C n such that C n = B and each formula C k for 1 k < n is either an axiom, one of the formulae A 1, A n or is the conclusion of a rule whose premises appeared earlier in the sequence. We write A 1,,A n ` B to show that B is provable from A 1,,A n (given some set of proof rules and axioms). Ex: from p ) q, ( r Ç q) ) (s Ç p), q can we prove s Ç q? 1. p ) q [given] 2. ( r Ç q) ) (s Ç p) [given] 3. q [given] 4. s Ç q [3, Ç-introduction] Alternative would be truth table for (p ) q Æ ( r Ç q) ) (s Ç p) Æ q ) ) (s Ç q) 46 University of Manchester,

24 Relating Proofs and Semantics So far we ve considered notions of validity and provability Validity is related to semantics. A propositional formula is valid if it is satisfied under all possible interpretations We draw up a truth table and check that every line evaluates to true. Provability is related to the proof theory. A propositional formula is provable if it is an axiom or it is provable from other provable formulae We construct a proof applying proof rules at each step. What s the connections between the two? Soundness and Completeness 47 Soundness We write A 1,,A n ` B to denote that B is provable from A 1,,A n using a set of proof rules A Soundness theorem states that: If A 1,,A n ` B then A 1 Æ Æ A n ² B (i.e. A 1 Æ Æ A n ) B is valid) Informally, soundness gives us an assurance that our proof theory is producing correct answers 48 University of Manchester,

25 Completeness A Completeness theorem states that: If A 1 Æ Æ A n ² B (i.e. A 1 Æ Æ A n ) B is valid) then A 1,,A n ` B Informally, completeness gives us an assurance that if a formula is valid, we can construct a proof of it using our proof theory. Note that completeness doesn t say anything at all about how we might go about constructing such a proof just that the proof exists. Note that both soundness and Completeness completeness are with respect to a particular set of axioms and proof rules. ² ` Soundness 49 Soundness and Completeness An example of an unsound rule is: A C Using this rule, given any p and q, we can deduce an arbitrary r. However p Æ q ) r is not a valid formula. hus including this rule in our proof rules would not give us soundness. B If we only have rules for modus ponens and Æ-elimination, we do not have completeness. With only those rules, we can t prove p ` p Ç q even though p ) (p Ç q) is valid 50 University of Manchester,

26 Summary We ve seen a (brief) overview of propositional logic, its syntax, semantics and proof theory. We haven t seen all the details of the proof rules for propositional logic though. hese can be found in any introductory logic text. We ve seen the notions of soundness and completeness, relating the interpretation semantics and the proof theory. Next, we ll look at predicate calculus, which gives us a much more expressive language than propositional logic. 51 University of Manchester,

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

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

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

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

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

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

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets

More information

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38 Propositional Logic Jason Filippou CMSC250 @ UMCP 05-31-2016 ason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 1 / 38 Outline 1 Syntax 2 Semantics Truth Tables Simplifying expressions 3 Inference

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

Artificial Intelligence Knowledge Representation I

Artificial Intelligence Knowledge Representation I Artificial Intelligence Knowledge Representation I Agents that reason logically knowledge-based approach implement agents that know about their world and reason about possible courses of action needs to

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

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

2. The Logic of Compound Statements Summary. Aaron Tan August 2017 2. The Logic of Compound Statements Summary Aaron Tan 21 25 August 2017 1 2. The Logic of Compound Statements 2.1 Logical Form and Logical Equivalence Statements; Compound Statements; Statement Form (Propositional

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

15414/614 Optional Lecture 1: Propositional Logic

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

More information

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

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

Propositional Logic Review

Propositional Logic Review Propositional Logic Review UC Berkeley, Philosophy 142, Spring 2016 John MacFarlane The task of describing a logical system comes in three parts: Grammar Describing what counts as a formula Semantics Defining

More information

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives Logic Logic is study of abstract reasoning, specifically, concerned with whether reasoning is correct. Logic focuses on relationship among statements as opposed to the content of any particular statement.

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the definitions and reasoning we use in our proofs? Where We're Going Propositional Logic (oday) Basic logical connectives. ruth tables. Logical

More information

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Propositional Logic Arguments (5A) Young W. Lim 11/8/16 Propositional Logic (5A) Young W. Lim Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

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

Logic. Propositional Logic: Syntax

Logic. Propositional Logic: Syntax 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

Formal Logic. Critical Thinking

Formal Logic. Critical Thinking ormal Logic Critical hinking Recap: ormal Logic If I win the lottery, then I am poor. I win the lottery. Hence, I am poor. his argument has the following abstract structure or form: If P then Q. P. Hence,

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

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

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

Ontology Engineering for the Semantic Web

Ontology Engineering for the Semantic Web What s the Problem? Ontology Engineering for the Semantic Web COMP60421 Robert Stevens and Sean Bechhofer University of Manchester sean.bechhofer@manchester.ac.uk 1 Typical web page markup consists of:

More information

Compound Propositions

Compound Propositions Discrete Structures Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not 2. And 3. Or 4. Exclusive or 5. Implication 6. Biconditional Truth

More information

Propositional Logic. Fall () Propositional Logic Fall / 30

Propositional Logic. Fall () Propositional Logic Fall / 30 Propositional Logic Fall 2013 () Propositional Logic Fall 2013 1 / 30 1 Introduction Learning Outcomes for this Presentation 2 Definitions Statements Logical connectives Interpretations, contexts,... Logically

More information

Logic for Computer Science - Week 4 Natural Deduction

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

More information

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning. 3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on

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

3 The Semantics of the Propositional Calculus

3 The Semantics of the Propositional Calculus 3 The Semantics of the Propositional Calculus 1. Interpretations Formulas of the propositional calculus express statement forms. In chapter two, we gave informal descriptions of the meanings of the logical

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

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

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson Natural Deduction Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. An example 1. Validity by truth table 2. Validity by proof 2. What s a proof 1. Proof checker 3. Rules of

More information

FORMAL PROOFS DONU ARAPURA

FORMAL PROOFS DONU ARAPURA FORMAL PROOFS DONU ARAPURA This is a supplement for M385 on formal proofs in propositional logic. Rather than following the presentation of Rubin, I want to use a slightly different set of rules which

More information

Logic, Human Logic, and Propositional Logic. Human Logic. Fragments of Information. Conclusions. Foundations of Semantics LING 130 James Pustejovsky

Logic, Human Logic, and Propositional Logic. Human Logic. Fragments of Information. Conclusions. Foundations of Semantics LING 130 James Pustejovsky Logic, Human Logic, and Propositional Logic Foundations of Semantics LING 3 James Pustejovsky Human Logic Thanks to Michael Genesereth of Stanford for use of some slides Fragments of Information Conclusions

More information

KB Agents and Propositional Logic

KB Agents and Propositional Logic Plan Knowledge-Based Agents Logics Propositional Logic KB Agents and Propositional Logic Announcements Assignment2 mailed out last week. Questions? Knowledge-Based Agents So far, what we ve done is look

More information

Section 1.1: Logical Form and Logical Equivalence

Section 1.1: Logical Form and Logical Equivalence Section 1.1: Logical Form and Logical Equivalence An argument is a sequence of statements aimed at demonstrating the truth of an assertion. The assertion at the end of an argument is called the conclusion,

More information

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows. Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is

More information

Knowledge Representation and Reasoning

Knowledge Representation and Reasoning Knowledge Representation and Reasoning Geraint A. Wiggins Professor of Computational Creativity Department of Computer Science Vrije Universiteit Brussel Objectives Knowledge Representation in Logic The

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

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

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example Announcements CS243: Discrete Structures Propositional Logic II Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Tuesday 09/11 Weilin s Tuesday office hours are

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

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

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

Propositional Logic Arguments (5A) Young W. Lim 10/11/16 Propositional Logic (5A) Young W. Lim Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

More information

Chapter 1: The Logic of Compound Statements. January 7, 2008

Chapter 1: The Logic of Compound Statements. January 7, 2008 Chapter 1: The Logic of Compound Statements January 7, 2008 Outline 1 1.1 Logical Form and Logical Equivalence 2 1.2 Conditional Statements 3 1.3 Valid and Invalid Arguments Central notion of deductive

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

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

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

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

Propositional Logic Arguments (5A) Young W. Lim 11/29/16

Propositional Logic Arguments (5A) Young W. Lim 11/29/16 Propositional Logic (5A) Young W. Lim Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

More information

Propositional Logic. Spring Propositional Logic Spring / 32

Propositional Logic. Spring Propositional Logic Spring / 32 Propositional Logic Spring 2016 Propositional Logic Spring 2016 1 / 32 Introduction Learning Outcomes for this Presentation Learning Outcomes... At the conclusion of this session, we will Define the elements

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

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

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

More information

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

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

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

Propositional Logic Arguments (5A) Young W. Lim 11/30/16 Propositional Logic (5A) Young W. Lim Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

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

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

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

Proving logical equivalencies (1.3)

Proving logical equivalencies (1.3) EECS 203 Spring 2016 Lecture 2 Page 1 of 6 Proving logical equivalencies (1.3) One thing we d like to do is prove that two logical statements are the same, or prove that they aren t. Vocabulary time In

More information

Discrete Mathematics and Applications COT3100

Discrete Mathematics and Applications COT3100 Discrete Mathematics and Applications CO3100 Dr. Ungor Sources: Slides are based on Dr. G. Bebis material. uesday, January 7, 2014 oundations of Logic: Overview Propositional logic: (Sections 1.1-1.3)

More information

Propositional Logic. CS 3234: Logic and Formal Systems. Martin Henz and Aquinas Hobor. August 26, Generated on Tuesday 31 August, 2010, 16:54

Propositional Logic. CS 3234: Logic and Formal Systems. Martin Henz and Aquinas Hobor. August 26, Generated on Tuesday 31 August, 2010, 16:54 Propositional Logic CS 3234: Logic and Formal Systems Martin Henz and Aquinas Hobor August 26, 2010 Generated on Tuesday 31 August, 2010, 16:54 1 Motivation In traditional logic, terms represent sets,

More information

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1 Propositional Logic: Syntax and Natural Deduction 1 The Plot That Will Unfold I want to provide some key historical and intellectual context to the model theoretic approach to natural language semantics,

More information

Propositional and Predicate Logic

Propositional and Predicate Logic Propositional and Predicate Logic CS 536-05: Science of Programming This is for Section 5 Only: See Prof. Ren for Sections 1 4 A. Why Reviewing/overviewing logic is necessary because we ll be using it

More information

THE LOGIC OF COMPOUND STATEMENTS

THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS All dogs have four legs. All tables have four legs. Therefore, all dogs are tables LOGIC Logic is a science of the necessary laws of thought, without which no employment

More information

Natural deduction for truth-functional logic

Natural deduction for truth-functional logic Natural deduction for truth-functional logic Phil 160 - Boston University Why natural deduction? After all, we just found this nice method of truth-tables, which can be used to determine the validity or

More information

Definition 2. Conjunction of p and q

Definition 2. Conjunction of p and q Proposition Propositional Logic CPSC 2070 Discrete Structures Rosen (6 th Ed.) 1.1, 1.2 A proposition is a statement that is either true or false, but not both. Clemson will defeat Georgia in football

More information

Foundation of proofs. Jim Hefferon.

Foundation of proofs. Jim Hefferon. Foundation of proofs Jim Hefferon http://joshua.smcvt.edu/proofs The need to prove In Mathematics we prove things To a person with a mathematical turn of mind, the base angles of an isoceles triangle are

More information

Propositional and Predicate Logic

Propositional and Predicate Logic 8/24: pp. 2, 3, 5, solved Propositional and Predicate Logic CS 536: Science of Programming, Spring 2018 A. Why Reviewing/overviewing logic is necessary because we ll be using it in the course. We ll be

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

MA103 STATEMENTS, PROOF, LOGIC

MA103 STATEMENTS, PROOF, LOGIC MA103 STATEMENTS, PROOF, LOGIC Abstract Mathematics is about making precise mathematical statements and establishing, by proof or disproof, whether these statements are true or false. We start by looking

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

Propositional Logic Arguments (5A) Young W. Lim 2/23/17

Propositional Logic Arguments (5A) Young W. Lim 2/23/17 Propositional Logic (5A) Young W. Lim Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

More information

INF3170 Logikk Spring Homework #8 For Friday, March 18

INF3170 Logikk Spring Homework #8 For Friday, March 18 INF3170 Logikk Spring 2011 Homework #8 For Friday, March 18 Problems 2 6 have to do with a more explicit proof of the restricted version of the completeness theorem: if = ϕ, then ϕ. Note that, other than

More information

PHI Propositional Logic Lecture 2. Truth Tables

PHI Propositional Logic Lecture 2. Truth Tables PHI 103 - Propositional Logic Lecture 2 ruth ables ruth ables Part 1 - ruth unctions for Logical Operators ruth unction - the truth-value of any compound proposition determined solely by the truth-value

More information

Intermediate Logic. Natural Deduction for TFL

Intermediate Logic. Natural Deduction for TFL Intermediate Logic Lecture Two Natural Deduction for TFL Rob Trueman rob.trueman@york.ac.uk University of York The Trouble with Truth Tables Natural Deduction for TFL The Trouble with Truth Tables The

More information

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional) Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.6) TOPICS Propositional Logic Logical Operators Truth Tables Implication Logical Equivalence Inference Rules What you should know about propositional

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Announcements Problem Session tonight from 7:00 7:50 in 380-380X. Optional, but highly recommended! Problem Set 3 Checkpoint due right now. 2 Handouts Problem Set 3 Checkpoint

More information

An Introduction to Modal Logic III

An Introduction to Modal Logic III An Introduction to Modal Logic III Soundness of Normal Modal Logics Marco Cerami Palacký University in Olomouc Department of Computer Science Olomouc, Czech Republic Olomouc, October 24 th 2013 Marco Cerami

More information

COMP 2600: Formal Methods for Software Engineeing

COMP 2600: Formal Methods for Software Engineeing COMP 2600: Formal Methods for Software Engineeing Dirk Pattinson Semester 2, 2013 What do we mean by FORMAL? Oxford Dictionary in accordance with convention or etiquette or denoting a style of writing

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

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1) CS100: DISCREE SRUCURES Lecture 5: Logic (Ch1) Lecture Overview 2 Statement Logical Connectives Conjunction Disjunction Propositions Conditional Bio-conditional Converse Inverse Contrapositive Laws of

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

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

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

Proof Rules for Correctness Triples

Proof Rules for Correctness Triples Proof Rules for Correctness Triples CS 536: Science of Programming, Fall 2018 A. Why? We can t generally prove that correctness triples are valid using truth tables. We need proof axioms for atomic statements

More information

Mathematical Logic Part Three

Mathematical Logic Part Three Mathematical Logic Part hree riday our Square! oday at 4:15PM, Outside Gates Announcements Problem Set 3 due right now. Problem Set 4 goes out today. Checkpoint due Monday, October 22. Remainder due riday,

More information

Logic and Proof. Aiichiro Nakano

Logic and Proof. Aiichiro Nakano Logic and Proof Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials Science

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the defnitions and reasoning we use in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical

More information

Gödel s Incompleteness Theorems

Gödel s Incompleteness Theorems Seminar Report Gödel s Incompleteness Theorems Ahmet Aspir Mark Nardi 28.02.2018 Supervisor: Dr. Georg Moser Abstract Gödel s incompleteness theorems are very fundamental for mathematics and computational

More information

Logic: Bottom-up & Top-down proof procedures

Logic: Bottom-up & Top-down proof procedures Logic: Bottom-up & Top-down proof procedures Alan Mackworth UBC CS 322 Logic 3 March 4, 2013 P & M Textbook 5.2 Lecture Overview Recap: Soundness, Completeness, Bottom-up proof procedure Bottom-up Proof

More information

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic Discrete Mathematical Structures Chapter 1 he oundation: Logic 1 Lecture Overview 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Quantifiers l l l l l Statement Logical Connectives Conjunction

More information

Reasoning. Inference. Knowledge Representation 4/6/2018. User

Reasoning. Inference. Knowledge Representation 4/6/2018. User Reasoning Robotics First-order logic Chapter 8-Russel Representation and Reasoning In order to determine appropriate actions to take, an intelligent system needs to represent information about the world

More information

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

Propositional Logic: Logical Agents (Part I)

Propositional Logic: Logical Agents (Part I) Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (this lecture, Part I) Chapter 7.5 (next lecture, Part II) Next lecture topic: First-order

More information