== is a decent equivalence

Similar documents
Logic and Proof course Solutions to exercises from chapter 6

Tables. Part I. Truth-Tables P Q P Q P Q P P Q P Q

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

BOOLEAN ALGEBRA AND CIRCUITS

Program Verification & Testing; Review of Propositional Logic

A proof-producing CSP solver: A proof supplement

Introduction to Sets and Logic (MATH 1190)

Software Engineering Lecture Notes

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Bootcamp. Christoph Thiele. Summer An example of a primitive universe

Functional Dependencies and Finding a Minimal Cover

Combinatorial Optimization

Fondamenti della Programmazione: Metodi Evoluti. Lezione 5: Invariants and Logic

Answer Key #1 Phil 414 JL Shaheen Fall 2010

AXIOMS FOR THE INTEGERS

Introduction to dependent types in Coq

Mathematically Rigorous Software Design Review of mathematical prerequisites

1.4 Normal Forms. We define conjunctions of formulas as follows: and analogously disjunctions: Literals and Clauses

Homework 1 CS 1050 A Due:

Propositional Logic. Andreas Klappenecker

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

Logic Haskell Exercises

CSE 20 DISCRETE MATH. Fall

LECTURE 2 An Introduction to Boolean Algebra

CSC2108: Automated Verification Assignment 1 - Solutions

Lecture 5. Logic I. Statement Logic

Discrete Mathematics Lecture 4. Harper Langston New York University

Lecture 6: Faces, Facets

Warm-Up Problem. 1. What is the definition of a Hoare triple satisfying partial correctness? 2. Recall the rule for assignment: x (assignment)

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

Propositional Logic. Part I

Section 2.2: Introduction to the Logic of Quantified Statements

H1 Spring B. Programmers need to learn the SOAP schema so as to offer and use Web services.

CSE 20 DISCRETE MATH. Winter

This is an author-deposited version published in : Eprints ID : 13108

Propositional Calculus

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

The Substitution Model

Symbolic Methods. The finite-state case. Martin Fränzle. Carl von Ossietzky Universität FK II, Dpt. Informatik Abt.

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely

Mixed Integer Linear Programming

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences.

CSC 501 Semantics of Programming Languages

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

The Resolution Algorithm

Propositional Logic:

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

FUZZY BOOLEAN ALGEBRAS AND LUKASIEWICZ LOGIC. Angel Garrido

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Geometry Note-Sheet Overview

Exact Algorithms Lecture 7: FPT Hardness and the ETH

Some Hardness Proofs

Programming Languages Fall 2014

Milawa an extensible proof checker

Propositional Theories are Strongly Equivalent to Logic Programs

Finding Strongly Connected Components

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

Evaluation Trees for Proposition Algebra

Disjunctive and Conjunctive Normal Forms in Fuzzy Logic

Sets. {1, 2, 3, Calvin}.

CSE 311: Foundations of Computing. Lecture 8: Predicate Logic Proofs

CS-E3220 Declarative Programming

Lecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

Computer Science Technical Report

Semantic Tableau Prover for Modal Logic

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

THE LOGIC OF QUANTIFIED STATEMENTS

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

An Annotated Language

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

On the reflection and the coreflection of categories over a base in discrete fibrations

Sets. Sets. Subset, universe. Specifying sets, membership. Examples: Specifying a set using a predicate. Examples

An Improved Separation of Regular Resolution from Pool Resolution and Clause Learning

Logical Verification Course Notes. Femke van Raamsdonk Vrije Universiteit Amsterdam

Propositional Calculus. Math Foundations of Computer Science

Introduction to Homotopy Type Theory

3EA3 Lecture 16: Linear Search

Propositional logic (Ch. 7)

Propositional Calculus. Math Foundations of Computer Science

Lecture 10 Graph algorithms: testing graph properties

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson

Softwaretechnik. Lecture 03: Types and Type Soundness. Peter Thiemann. University of Freiburg, Germany SS 2008

6c Lecture 3 & 4: April 8 & 10, 2014

Foundations of Computation

Lecture Notes: Hoare Logic

6.170 Lecture 6 Procedure specifications MIT EECS

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman.

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

The Substitution Model. Nate Foster Spring 2018

Logic and Computation Lecture 20 CSU 290 Spring 2009 (Pucella) Thursday, Mar 12, 2009

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

Principles of AI Planning. Principles of AI Planning. 7.1 How to obtain a heuristic. 7.2 Relaxed planning tasks. 7.1 How to obtain a heuristic

(iv) The square root of an integer is a rational number. (viii) There is an infinite number of natural numbers.

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

1. M,M sequential composition: try tactic M; if it succeeds try tactic M. sequential composition (, )

Transcription:

Table of standard equiences 30/57 372 TABLES FOR PART I Propositional Logic Lecture 2 (Chapter 7) September 9, 2016 Equiences for connectives Commutativity: Associativity: P Q == Q P, (P Q) R == P (Q R), P Q == Q P, (P Q) R == P (Q R), P Q == Q P (P Q) R == P (Q R) Idempotence: Double Negation: P P == P, P == P P P == P Inversion: True/False-elimination: True == False, P True == P, False == True P False == False, P True == True, P False == P Negation: Contradiction: P == P False P P == False Excluded Middle: P P == True Distributivity: De Morgan: P (Q R) == (P Q) (P R), (P Q) == P Q, P (Q R) == (P Q) (P R) (P Q) == P Q Implication: Contraposition: P Q == P Q P Q == Q P Bi-implication: Self-equience: P Q == (P Q) (Q P ) P P == True For the collection of all standard equiences, see page 372 of the book! You will have to know them by heart (including their names!). Start memorising them today! Calculation 31/57 == is a decent equience 32/57 Recall the following calculation: P Q P Q == { Double Negation } P Q Can we conclude P Q == P Q? 1. What about applying two standard equiences in a row? Does it preserve equience? Lemma 6.1.1 1. (Reflexivity:) P == P 2. (Symmetry:) If P == Q, then Q == P 3. (Transitivity:) If P == Q and Q == R, then P == R 2. First step: not a literal application of Implication. Can we do substitutions? 3. Second step: literal application of Double Negation. Is it safe to apply standard equiences in a larger context?

Substitution 35/57 Substitution 36/57 Substitution is the replacement of all occurrences of a letter by a formula. Substitution is the replacement of all occurrences of a letter by a formula. Examples: Examples: 1. If we substitute Q P for P in the id equience 2. If we substitute R for Q in the id equience P Q == P Q, (Q P ) Q == (Q P ) Q, then we get the id equience then we get the id equience (Q P ) Q == (Q P ) Q. ( R P ) R == ( R P ) R. Substitution 37/57 Substitution Rule 38/57 Substitution is the replacement of all occurrences of a letter by a formula. SUBSTITUTION PRESERVES EQUIVALENCE Examples: 3. If we (simultaneously) substitute Q P for P and R for Q in the id equience P Q == P Q, then we get the id equience Important remarks: 1. Substitution operates on entire equiences 2. If you substitute for some letter P in an equience, then you have to replace all occurrences of P in that equience! (Q P ) R == (Q P ) R.

Leibniz s rule 40/57 Leibniz s rule 41/57 Leibniz s rule is about the replacement of a subformula by an equient subformula. Leibniz s rule is about the replacement of a subformula by an equient subformula. Example: From the id equience Schematically: P Q == P Q we can make new id equiences by replacing P Q in some complex formula by P Q, for instance: P P == Q == Q ( P (P Q)) R == ( P ( P Q)) R Proving tautologies method 1 42/57 Proving tautologies method 1 (example) 43/57 Prove with a calculation that (P P ) is a tautology. We have the following calculation: To prove with a calculation that P is a tautology: (P P ) Give calculation that shows P == True. P P == { Double Negation } P P == { Excluded Middle } True So (P P ) is a tautology.

Proving tautologies method 2 44/57 Proving tautologies method 2 (example) 45/57 Prove with a calculation that (Q R) ( R Q) is a tautology. Lemma 6.1.3 If P == Q, then P Q is a tautology, and vice versa. To prove with a calculation that P is a tautology: Give a calculation that shows P == Q. First, we establish, with a calculation, that (Q R) == ( R Q): (Q R) ( Q R) Q R == { Double negation } R Q Explanation: Substituting Q for P and R for Q in P Q == P Q (Implication) we get, by the substitution rule: Q R == Q R. (The application of this equience in the calculation involves an application of Leibniz.) Proving tautologies method 2 (example) 45/57 Proving tautologies method 2 (example) 45/57 Prove with a calculation that (Q R) ( R Q) is a tautology. Prove with a calculation that (Q R) ( R Q) is a tautology. First, we establish, with a calculation, that (Q R) == ( R Q): (Q R) ( Q R) Q R == { Double negation } R Q Explanation: Substituting Q for P and R for Q in (P Q) == P Q (De Morgan) we get, by the substitution rule: ( Q R) == Q R. First, we establish, with a calculation, that (Q R) == ( R Q): (Q R) ( Q R) Q R == { Double negation } R Q Explanation: Substituting Q for P in P == P (Double negation) we get, by the substitution rule: Q == Q. (The application of this equience in the calculation involves an application of Leibniz, and is followed by an application of Commutativity.)

Proving tautologies method 2 (example) 45/57 Logical Consequence 46/57 Prove with a calculation that (Q R) ( R Q) is a tautology. First, we establish, with a calculation, that (Q R) == ( R Q): Recall: P == Q means { (a) whenever P is 1, then also Q is 1 (b) whenever Q is 1, then also P is 1 (Q R) ( Q R) Q R == { Double negation } R Q From (Q R) == R Q it follows (by Lemma 6.1.3) that (Q R) ( R Q) is a tautology. Define: P == Q means P Q 1 1 0 1/0 { (a) whenever P is 1, then also Q is 1 Pronounce P == Q as P is stronger than Q. P == Q: 1s are carried over from P to Q. Logical Consequence (example 1) 47/57 Logical Consequence (example 2) 48/57 { } ==? P ==? P Q { } ==? P Q ==? P Q P Q P P Q 0 0 1 1 0 1 1 1 1 0 0 0 1 1 0 1 extra true P Q P Q P Q 0 0 1 0 0 1 1 1 1 0 0 1 1 1 1 1 So P is stronger than P Q (i.e., P == P Q). So P Q and P Q are incomparable.

Standard weakenings 49/57 Basic properties of == 50/57 Also: - -weakening: P Q == P P == P Q P Q == Q and Q == P Q. P Q P Q P P Q 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 1 1 1 Lemma 7.3.1 (1a) P == P. (2) If P == Q, then Q == P, and vice versa. (3) If P == Q and Q == R, then P == R. Extremes: False == P P == True False is strongest of all True is weakest of all Basic properties of == 51/57 Basic properties of == 52/57 Lemma 7.3.2 P == Q if, and only if, P == Q and P == Q. So, if you need to prove P == Q or P == Q by a calculation, then it is enough to prove P == Q. But P == Q (or P == Q) alone is not enough to conclude P == Q! Lemma 7.3.4 P == Q if, and only if, P Q is a tautology.

Substitution Rule for == 53/57 Leibniz for ==? 54/57 The Substitution Rule also works for == and == : Recall Leibniz s Rule for making new equiences: SUBSTITUTION PRESERVES WEAKENING/STRENGHTENING Example We have the following id weakening: P Q == P R and hence, according to the Substitution Rule, if we substitute (Q R) for P and (P Q) for Q, we get another id weakening: (Q R) (P Q) == (Q R) R. P P == Q == Q Can we replace == by == in this rule? Examples Note that, by - -weakening, P Q == P Q. Now consider: 1. (P Q) = (P Q); 2. R (P Q) == R (P Q); and 3. (P Q) R = (P Q) R. Conclusion: replacing == by == does not yield a id rule! Monotonicity 55/57 Example 56/57 We do have the following weaker variant of Leibniz s Rule: Prove with a calculation that (P Q) ( Q (P R)) is a tautology. Monotonicity: (1) If P == Q, then P R == Q R (2) If P == Q, then P R == Q R Example: Since P == P Q by - -weakening, we have: P R == { - -weakening + Monotonicity } (P Q) R. First, we establish that (P Q) == Q (P R): (P Q) ( P Q) P Q == { Double Negation } P Q == { - -weakening + Monotonicity } Q (P R) So, by Lemma 7.3.4, the formula (P Q) ( Q (P R)) is a tautology.

Formal System for Calculation 57/57 We now have a precisely defined formal system for calculating with abstract propositions: standard equiences and standard weakenings; inference rules (viz. reflexivity, symmetry, transitivity, substitution, Leibniz for equality, Monotonicity for weakening) It gives a method to prove in a structured manner that two abstract propositions are equient, or one is stronger/weaker than the other; an abstract proposition is a tautology.