Logik für Informatiker Logic for computer scientists

Similar documents
Logik für Informatiker Proofs in propositional logic

Logik für Informatiker Formal proofs for propositional logic

PHIL12A Section answers, 28 Feb 2011

Logik für Informatiker Logic for computer scientists

Logik für Informatiker Logic for computer scientists. Multiple Quantifiers

Logik für Informatiker Logic for computer scientists

Intermediate Logic. Natural Deduction for TFL

Announcements For Methods of Proof for Boolean Logic Proof by Contradiction. Outline. The Big Picture Where is Today? William Starr

PUZZLE. You meet A, B, and C in the land of knights and knaves. A says Either B and I are both knights or we are both knaves.

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

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

Manual of Logical Style

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33

Completeness for FOL

PL: Truth Trees. Handout Truth Trees: The Setup

In this chapter, we specify a deductive apparatus for PL.

Chapter 4: Classical Propositional Semantics

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

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

PHIL012. SYMBOLIC LOGIC PROPOSITIONAL LOGIC DERIVATIONS

Philosophy 220. Truth-Functional Equivalence and Consistency

Learning Goals of CS245 Logic and Computation

Propositional Logic Review

6. Conditional derivations

6. Conditional derivations

Phil 110, Spring 2007 / April 23, 2007 Practice Questions for the Final Exam on May 7, 2007 (9:00am 12:00noon)

PHIL12A Section answers, 16 February 2011

Natural Deduction for Propositional Logic

Warm-Up Problem. Write a Resolution Proof for. Res 1/32

4 Derivations in the Propositional Calculus

Section 1.1: Logical Form and Logical Equivalence

Logic, Sets, and Proofs

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

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

1.1 Statements and Compound Statements

Final Exam Theory Quiz Answer Page

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

Natural deduction for truth-functional logic

We last time we began introducing equivalency laws.

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

CSC Discrete Math I, Spring Propositional Logic

02 Propositional Logic

Logic and Proofs 1. 1 Overview. 2 Sentential Connectives. John Nachbar Washington University December 26, 2014

2.3. Chapter 3 Solutions

Deductive Systems. Lecture - 3

Tautological equivalence. entence equivalence. Tautological vs logical equivalence

PHIL 422 Advanced Logic Inductive Proof

Part Two: The Basic Components of the SOFL Specification Language

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

FORMAL PROOFS DONU ARAPURA

A Little Deductive Logic

Propositional natural deduction

CITS2211 Discrete Structures Proofs

Logic As Algebra COMP1600 / COMP6260. Dirk Pattinson Australian National University. Semester 2, 2017

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Arguments and Proofs. 1. A set of sentences (the premises) 2. A sentence (the conclusion)

Chapter 1 Elementary Logic

Warm-Up Problem. Is the following true or false? 1/35

A Little Deductive Logic

Announcements For Formal Proofs & Boolean Logic I: Extending F with rules for and. Outline

Propositional Resolution Introduction

Manual of Logical Style (fresh version 2018)

A Guide to Proof-Writing

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

Announcements For The Logic of Atomic Sentences Counterexamples & Formal Proofs. Logical Consequence & Validity The Definitions.

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

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

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

Proving Things. Why prove things? Proof by Substitution, within Logic. Rules of Inference: applying Logic. Using Assumptions.

Artificial Intelligence Chapter 7: Logical Agents

Supplementary exercises in propositional logic

Introduction to Isabelle/HOL

Proofs. Joe Patten August 10, 2018

The statement calculus and logic

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

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

Math 10850, fall 2017, University of Notre Dame

Logic for Computer Science - Week 4 Natural Deduction

General Logic (with Special Application to Relevance Logic)

15414/614 Optional Lecture 1: Propositional Logic

Example ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. 2. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, x. P(x) x.

Section 1.2: Propositional Logic

THE LOGIC OF COMPOUND STATEMENTS

PHIL12A Section answers, 14 February 2011

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

Logic and Philosophical Logic. 1 Inferentialism. Inferentialism and Meaning Underdetermination

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

The Logic of Compound Statements cont.

Introducing Proof 1. hsn.uk.net. Contents

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

Supplementary Logic Notes CSE 321 Winter 2009

CHAPTER 11. Introduction to Intuitionistic Logic

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

AI Programming CS S-09 Knowledge Representation

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

Transcription:

Logik für Informatiker Logic for computer scientists Till Mossakowski WiSe 2013/14 Till Mossakowski Logic 1/ 24

Till Mossakowski Logic 2/ 24

Logical consequence 1 Q is a logical consequence of P 1,, P n, if all worlds that make P 1,, P n true also make Q true 2 Q is a tautological consequence of P 1,, P n, if all valuations of atomic formulas with truth values that make P 1,, P n true also make Q true 3 Q is a TW-logical consequence of P 1,, P n, if all worlds from Tarski s world that make P 1,, P n true also make Q true The difference lies in the set of worlds that is considered: 1 all worlds (whatever this exactly means ) 2 all valuations of atomic formulas with truth values (= rows in the truth table) 3 all block worlds from Tarski s world Till Mossakowski Logic 3/ 24

Proofs With proofs, we try to show (tauto)logical consequence Truth-table method can lead to very large tables, proofs are often shorter Proofs are also available for consequence in full first-order logic, not only for tautological consequence Till Mossakowski Logic 4/ 24

Limits of the truth-table method 1 truth-table method leads to exponentially growing tables 20 atomic sentences more than 1000000 rows 2 truth-table method cannot be extended to first-order logic model checking can overcome the first limitation (up to 1000000 atomic sentences) proofs can overcome both limitations Till Mossakowski Logic 5/ 24

Proofs A proof consists of a sequence of proof steps Each proof step is known to be valid and should be significant but easily understood, in informal proofs, follow some proof rule, in formal proofs Some valid patterns of inference that generally go unmentioned in informal (but not in formal) proofs: From P Q, infer P From P and Q, infer P Q From P, infer P Q Till Mossakowski Logic 6/ 24

Proof by cases (disjunction elimination) To prove S from P 1 P n, prove S from each of P 1,, P n Claim: there are irrational numbers b and c such that b c is rational Proof: 2 2 is either rational or irrational Case 1: If 2 2 is rational: take b = c = 2 Case 2: If 2 2 is irrational: take b = 2 2 and c = 2 Then b c = ( 2 2) 2 = 2 ( 2 2) = 2 2 = 2 Till Mossakowski Logic 7/ 24

Proof by contradiction To prove S, assume S and prove a contradiction ( may be infered from P and P) Assume Cube(c) Dodec(c) and Tet(b) Claim: (b = c) Proof: Let us assume b = c Case 1: If Cube(c), then by b = c, also Cube(b), which contradicts Tet(b) Case 2: Dodec(c) similarly contradicts Tet(b) In both case, we arrive at a contradiction Hence, our assumption b = c cannot be true, thus (b = c) Till Mossakowski Logic 8/ 24

Arguments with inconsistent premises A proof of a contradiction from premises P 1,, P n (without additional assumptions) shows that the premises are inconsistent An argument with inconsistent premises is always valid, but more importantly, always unsound Home(max) Home(claire) Home(max) Home(claire) Home(max) Happy(carl) Till Mossakowski Logic 9/ 24

Arguments without premises A proof without any premises shows that its conclusion is a logical truth Example: (P P) Till Mossakowski Logic 10/ 24

Formal Proofs and Boolean Logic Till Mossakowski Logic 11/ 24

Formal proofs in Fitch Well-defined set of formal proof rules Formal proofs in Fitch can be mechanically checked For each connective, there is an introduction rule, eg from P, infer P Q an elimination rule, eg from P Q, infer P Till Mossakowski Logic 12/ 24

Till Mossakowski P 1 Logic P n 13/ 24 Propositional rules ion Introduction Conjunction Elimination ( Elim) P 1 P i P n P i P n on Introduction Disjunction Elimination ( Elim)

Conjunction Introduction ( Intro) Conjunction Eli ( Elim) P 1 P n P 1 P n P 1 P P i Disjunction Introduction ( Intro) Disjunction Elim ( Elim) P i P 1 P Till Mossakowski Logic 14/ 24

P 1 P n P 1 P n P 1 P i P i Disjunction Introduction ( Intro) Disjunction Elim ( Elim) P i P 1 P i P n P 1 P n P 1 S Till Mossakowski Logic 15/ 24 P n

tion Introduction ) Disjunction Elimination ( Elim) P i P n P 1 P n P 1 S S P n S Till Mossakowski Logic 16/ 24

The proper use of subproofs The proper use of Subproofs are the characteristic feature of Fitch-style deductive systems It is important that you understand how to use them properly, since if you are not careful, you may prove things that don t follow from your premises For example, the following formal proof looks like it is constructed according to our rules, but it purports to prove that A B follows from (B A) (A C), which is clearly not right 1 (B A) (A C) 2 B A 3 B Elim: 2 4 A Elim: 2 5 A C 6 A Elim: 5 7 A Elim: 1, 2 4, 5 6 8 A B Intro: 7, 3 The problem with this proof is step 8 In this step we have used step 3, a step that occurs within an earlier subproof But it turns out that this sort of justification one that reaches back inside a subproof that has already ended is not legitimate To understand why it s not legitimate, we need to think about what function subproofs play in a piece of reasoning A subproof typically Till Mossakowski looks something Logic like this: 17/ 24

The proper use of subproofs (cont d) In justifying a step of a subproof, you may cite any earlier step contained in the main proof, or in any subproof whose assumption is still in force You may never cite individual steps inside a subproof that has already ended Fitch enforces this automatically by not permitting the citation of individual steps inside subproofs that have ended Till Mossakowski Logic 18/ 24

P P Introduction ( Intro) Elimina ( Elim) P P P Conditional Introduction ( Intro) Condition ( Elim) P P Q Till Mossakowski Logic 19/ 24

58 / Summary of Rules Negation Introduction ( Intro) Negation Elimi ( Elim) P P P P Introduction ( Intro) Elimination ( Elim) P Till Mossakowski Logic 20/ 24

n Introduction o) Negation Elimination ( Elim) P P P duction o) Elimination ( Elim) Till Mossakowski Logic 21/ 24

P P P P ntroduction Intro) Elimination ( Elim) P P P ditional Introduction Intro) P Conditional Elimination ( Elim) P Q Till Mossakowski Logic 22/ 24

Strategies and tactics in Fitch 1 Understand what the sentences are saying 2 Decide whether you think the conclusion follows from the premises 3 If you think it does not follow, or are not sure, try to find a counterexample 4 If you think it does follow, try to give an informal proof 5 If a formal proof is called for, use the informal proof to guide you in finding one 6 In giving consequence proofs, both formal and informal, don t forget the tactic of working backwards 7 In working backwards, though, always check that your intermediate goals are consequences of the available information Till Mossakowski Logic 23/ 24

Strategies in Fitch, cont d Always try to match the situation in your proof with the rules in the book (see book appendix for a complete list) Look at the main connective in a premise, apply the corresponding elimination rule (forwards) Or: look at the main connective in the conclusion, apply the corresponding introduction rule (backwards) Till Mossakowski Logic 24/ 24