What is logic, the topic of this course? There are at least two answers to that question.

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

Mathematical Logic. Introduction to Reasoning and Automated Reasoning. Hilbert-style Propositional Reasoning. Chiara Ghidini. FBK-IRST, Trento, Italy

Learning Goals of CS245 Logic and Computation

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

cse541 LOGIC FOR COMPUTER SCIENCE

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

Introduction to Logic and Axiomatic Set Theory

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

Gödel s Incompleteness Theorem. Overview. Computability and Logic

Lecture 3: Semantics of Propositional Logic

Logic. Propositional Logic: Syntax

Lecture 24: Gödel s s Proof. Microsoft Foundation Classes. Story So Far. Quiz? PS6 Classes. sim-object. physical-object. place. mobile-object.

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

Propositional Logic: Syntax

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:

Gödel s Incompleteness Theorem. Overview. Computability and Logic

Discrete Mathematics

The Limit of Humanly Knowable Mathematical Truth

Chapter 2: Introduction to Propositional Logic

COMP 2600: Formal Methods for Software Engineeing

Propositional Logic: Methods of Proof (Part II)

Propositional Logic Not Enough

Lecture 4: Proposition, Connectives and Truth Tables

Logic. Propositional Logic: Syntax. Wffs

1 Propositional Logic

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

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

Announcements CompSci 102 Discrete Math for Computer Science

The roots of computability theory. September 5, 2016

Logic in Computer Science. Frank Wolter

Discrete Structures for Computer Science

Syllogistic Logic and its Extensions

Introduction to Logic

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59

Ahmad KARIMI A NON-SELF-REFERENTIAL PARADOX IN EPISTEMIC GAME THEORY

Logic: The Big Picture

The Logic of Compound Statements cont.

Logic for Computer Science - Week 2 The Syntax of Propositional Logic

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

CHAPTER 3: THE INTEGERS Z

CITS2211 Discrete Structures. Propositional Logic

CSCI3390-Lecture 6: An Undecidable Problem

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

Lecture 10: Gentzen Systems to Refinement Logic CS 4860 Spring 2009 Thursday, February 19, 2009

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

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

INTRODUCTION TO LOGIC

Lecture Notes for MATH Mathematical Logic 1

Church s undecidability result

Truth-Functional Logic

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Chapter 1. Logic and Proof

Class 23: Gödel s Theorem

Axiomatic set theory. Chapter Why axiomatic set theory?

Logical Agents. September 14, 2004

Introduction to Metalogic

Structural Induction


CS 2800: Logic and Computation Fall 2010 (Lecture 13)

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

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

Introduction to Metalogic 1

Relational Reasoning in Natural Language

Sets, Functions and Relations

8. Reductio ad absurdum

The semantics of propositional logic

02 Propositional Logic

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

Introduction to Logic in Computer Science: Autumn 2006

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

CS156: The Calculus of Computation

Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein

CONSTRUCTION OF THE REAL NUMBERS.

Lecture 13: Soundness, Completeness and Compactness

Class 15: Hilbert and Gödel

MAI0203 Lecture 7: Inference and Predicate Calculus

Introduction to Metalogic

Discrete Mathematics(II)

Comp487/587 - Boolean Formulas

First Order Logic (1A) Young W. Lim 11/5/13

Computer Science and Logic A Match Made in Heaven

Natural Deduction for Propositional Logic

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Lectures in Discrete Mathematics Math 1165 Professors Stanislav Molchanov and Harold Reiter

Filtrations and Basic Proof Theory Notes for Lecture 5

From Greek philosophers to circuits: An introduction to boolean logic. COS 116, Spring 2011 Sanjeev Arora

Propositional Logics and their Algebraic Equivalents

18.S097 Introduction to Proofs IAP 2015 Lecture Notes 1 (1/5/2015)

Chapter 11: Automated Proof Systems

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification

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

Languages, regular languages, finite automata

Applied Logics - A Review and Some New Results

MODULE- 07 : FLUIDICS AND FLUID LOGIC

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

Lecture 10: Predicate Logic and Its Language

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Introduction to Sets and Logic (MATH 1190)

2. Prime and Maximal Ideals

Transcription:

Applied Logic Lecture 1 CS 486 Spring 2005 Tuesday, January 25, 2005 What is Logic? What is logic, the topic of this course? There are at least two answers to that question. General logic: critical examination of how we acquire scientific knowledge, and of that knowledge itself, principles, general laws, and theories. Formal logic: study of sound reasoning, based on form more than content. In this course, we focus on this section definition of logic. Formal logic goes back to the philosopher Aristotle (384 322 BC), who studied logic in the form of syllogisms, such as the following standard example: All men are mortal, Socrates is a man; Therefore, Socrates is mortal. If we the two premises (all men are moral, and Socrates is a man) are true, then we are forced, if we are rational, to acknowledge that the conclusion (Socrates is mortal) is also true. This view of logic remained essentially unchanged well past the Renaissance. In the 19th century, De Morgan (1806 1876) and Boole (1815 1864) started to think of logic as an algebra of mental operations. This led to the mathematization of logic, the study of logic using mathematical techniques. This modern variant of formal logic is often called symbolic logic, logistic, or mathematical logic. Applications Beyond its use as a study of reasoning, logic has uses in many fields. (1) In Mathematics, logic is often used for the study of the foundations of the field. 1

With Russell and Whitehead at the beginning of the 20th century, there was this hope to reduce all of mathematics to logic (Principia Mathematica). While this project arguably failed, they managed to capture a lot of mathematics using essentially logical ideas. This led to the study of Set Theory as a foundation of mathematics, a still active area of research. The search for an algorithmic decision procedure for determining the true statements in the logic of Principia Mathematica gave birth to Computer Science: it forced mathematicians to examine what exactly one means by an algorithm and a mechanical computation (recursive functions and Turing machines are two frameworks that came out of those investigations). A field of logic called Model Theory has applications to mainstream mathematical questions, as recent results on abstract algebra questions using model-theoretic techniques have shown. (2) In Computer Science, we generally deal with computational issues associated with logic. Automated verification of systems and software. Logic can be used as a programming language (logic programming, Prolog). Many uses in AI: reasoning systems, robots. Logic is intimately connected with computation. A deep result, the Curry-Howard isomorphism, says, very roughly, that to every formula corresponds a type, and that a proof of a formula corresponds to a program that computes a value of the type corresponding to the formula. (3) In Philosophy, where logic was first studied, it remains central to much of modern analytic philosophy. Study of other forms of sound reasoning, such as inductive reasoning. Connection between logic and language; understanding the meaning of an English sentence is informed by logic. Epimenides the Cretan said: All Cretans are liars. How is one supposed to understand this sentence, whose meaning is naively paradoxical? In this course, we study logic from a Computer Science perspective, that is, with an eye towards computational issues (procedures for deciding truth of formulas, proof methods, etc). Propositional Logic Propositional logic is, in some sense, the simplest logic. It captures reasoning with the basic logical connectives not, and, or, and implies. Compare the following English sentences: 2

(1) A foo is a bar. (2) If a foo is both a bar and a baz, then a foo is a bar. Is the first sentence stating a truth? It s hard to tell, because, intuitively, it depends on what foos and bars are. In contract, the second sentence seems to be stating a truth, despite us not knowing what foos, bars, and even bazes are. Why is this? This is what propositional logic is meant to help answer. To study logic, rather than using English, we use an abstraction, in the form of a formal language. The language of propositional logic is built from the following symbols: (read not ; sometimes written ) (read and ; sometimes written &) (read or ) (read implies ; sometimes written ) We also assume a denumerable set PVar = {p 1, p 2, p 3,... } of propositional variables. (I will generally use p, q, r, s,... to range over propositional variables.) Additionally, the symbols ( and ) are used as delimiters. The formulas of propositional logic (roughly, the sentences of the language) are given by the following inductive definition: A propositional formula p is a formula. If ϕ is a formula, then ϕ is a formula. If ϕ and ψ are formulas, then (ϕ ψ), (ϕ ψ), and (ϕ ψ) are formulas. I use ϕ, ψ,... to range over formulas. I will often drop the outer parentheses around a formula, since there is no ambiguity in that case. Example 1 If we read the propositional variable p as a foo is a bar and the propositional variable q as a foo is a baz, then the formula (p q) p represents the English sentence (2) above. 3

The following unique decomposition lemma, taken from Smullyan, is needed with the above definition of formulas to ensure that we can always tell, for a given formula, how it is built up from smaller formulas. Lemma 2 For every formula ϕ, one and only one of the following propositions hold: (a) ϕ is a propositional variable. (b) There is a unique formula ψ such that ϕ is ψ. (c) There are unique formulas ψ 1 and ψ 2 and a unique binary connective b such that ϕ is (ψ 1 b ψ 2 ). Proof. Left as an exercise. There is an alternative approach to defining formulas that does away with the need for a unique decomposition lemma, which is more in the CS spirit. First, we define the concept of a labeled disjoint union. Define l:a + r:b as the set of all pairs of l, a (for a A) and r, b (for b B). Intuitively. we tag every element of A with an l, and every element of B with a r. Thus, giving an arbitrary element of l:a + r:b, we can always tell whether if it is an element of A (if it is tagged by l) or an element of B (if it is tagged by r). This construct obviously generalizes to more than two summands. With this in mind, we can define the set of formulas Form as: Form =var:pvar + not:form + and:form Form+ or:form Form + imp:form Form. Thus, a typical element of Form is var, p, or and, ϕ, ψ, where ϕ and ψ are themselves in Form. Example 3 Returning to the foo-bar-baz example sentence (2) above, if we once again interpret p as a foo is a bar and q as a foo is a baz, then we can rewrite the sentence as the formula imp, and, var, p, var, q, var, p. If you are familiar with the concept, not that this really just defines an Abstract Syntax Tree of formulas. 4

Formula decomposition can now be done via a case expression, as case ϕ of var, p... p... not, ψ... ψ... and, ψ 1, ψ 2... ψ 1, ψ 2... or, ψ 1, ψ 2... ψ 1, ψ 2... imp, ψ 1, ψ 2... ψ 1, ψ 2... end. We will see examples of this construct next class, when we define valuations for formulas. Unless specified otherwise, we will take formulas as being defined using the second definition above, but we will write them using the original notation in terms,,,. This is not a problem, as long as we remember that (ϕ ψ) is just an alternative notation for imp, ϕ, ψ, for a suitably translated ϕ and ψ. 5