1 CA 208 Logic PQ PQPQPQPQPQPQPQPQ 111111 100100 010110 000011.

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Propositional Equivalences
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
08 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
1 CA 208 Logic Ex1 In your own words, define the following 1. Logic: 2. Valid reasoning/inference (2 equivalent definitions): 3. Propositions/statements:
Discussion #12 1/22 Discussion #12 Deduction, Proofs and Proof Techniques.
1 CA 208 Logic Ex3 Define logical entailment  in terms of material implication  Define logical consequence |= (here the semantic consequence relation.
1 CA 208 Logic Logic Prof. Josef van Genabith Textbooks:  The Essence of Logic, John Kelly, Prentice Hall, 1997  Prolog Programming, Third Edition, Ivan.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 CA 208 Logic Ex4 Commutativity (P  Q)  Associativity P  (Q  R)  (P  Q)  R Distributivity P  (Q  R)  Idempotency.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
Introduction to Logic Sections 1.1 and 1.2 of Rosen Spring 2010
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Introduction to Logic Sections 1.1 and 1.2 of Rosen Fall 2010 CSCE 235 Introduction to Discrete Structures URL: cse.unl.edu/~cse235 Questions:
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Introduction to Logic Logical Form: general rules
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,
Logic Truth Tables, Propositions, Implications. Statements Logic is the tool for reasoning about the truth or falsity of statements. –Propositional logic.
Propositional Logic Review
3.6 Analyzing Arguments with Truth Tables
Review I Rosen , 3.1 Know your definitions!
Propositional Equivalences
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Reading: Chapter 4 (44-59) from the text book
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
1 CA 208 Logic PQ PQPQPQPQPQPQPQPQ
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
The Logic of Boolean Connectives Chapter 4 Language, Proof and Logic.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Law of logic Lecture 4.
Module Code MA0003NI: Computing mathematics Lecture for Week Autumn.
Chapter 1 Logic and proofs
2. The Logic of Compound Statements Summary
The Foundations: Logic and Proofs
Advanced Algorithms Analysis and Design
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
Discussion #10 Logical Equivalences
Discrete Mathematics Lecture # 2.
Mathematics for Computing
Propositional Calculus: Boolean Algebra and Simplification
Administrivia Course Web:
Propositional Equivalences
Information Technology Department
Propositional Equivalence (§1.2)
CSE 311 Foundations of Computing I
Propositional Equivalences
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
The Method of Deduction
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Lecture 2: Propositional Equivalences
CSE 321 Discrete Structures
TRUTH TABLES.
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Concepts of Computation
Presentation transcript:

1 CA 208 Logic PQ PQPQPQPQPQPQPQPQ

2 Today some special types of logical formulas: Tautologies: are always true Contraditions: always false (never true) Contingencies: true is some situations, false in others

3 CA 208 Logic PQ PQPQ P  Q is a contingency, true in some situations, false in others

4 CA 208 Logic P PPP  P P  P is a tautology, i.e. always true in all situations:

5 CA 208 Logic P P  P P  P is a tautology, i.e. always true in all situations:

6 CA 208 Logic PQ QPQPP  (Q  P) P  (Q  P) is a , true in

7 CA 208 Logic PQ QPQPP  (Q  P) P  (Q  P) is a , true in

8 CA 208 Logic PQ QPQPP  (Q  P) P  (Q  P) is a , true in

9 CA 208 Logic P P  P P  P is a contradiction, false in all situations

10 CA 208 Logic PQ QPQPP  (Q  P)  (P  (Q  P)) Take any tautology, negate it, and you get a contradiction e.g. P  (Q  P) is a tautology, and  (P  (Q  P)) is a contradiction

11 CA 208 Logic PQ QPQPP  (Q  P)  (P  (Q  P)) Take any tautology, negate it, and you get a contradiction e.g. P  (Q  P) is a tautology, and  (P  (Q  P)) is a contradiction

12 CA 208 Logic Logical connectives: , , , ,  Take formulas as arguments and form new, more complex formulas

13 CA 208 Logic Two new symbols (not logical connectives)  and  Relate (!) two formulas  logical equivalence: Defn: A  B iff A  B is a tautology In words: A and B are logically equivalent if and only if they are true in the same situations and false in the same situations, i.e. they have the same meaning, and you can replace one by the other (and vice versa)

14 CA 208 Logic PQ PQPQQPQP(P  Q)  (Q  P) (P  Q) is logically equivalent to (Q  P), in symbols (P  Q)  (Q  P), i.e. the have the same meaning = true in exactly the same situations, false in the same situations! How do you show this? Truth table: show that (P  Q)  (Q  P) is a tautology, hence (P  Q)  (Q  P),

15 CA 208 Logic PQ PQPQQPQP(P  Q)  (Q  P) (P  Q)  (Q  P), Truth table: show that (P  Q)  (Q  P) is a tautology, hence (P  Q)  (Q  P),

16 CA 208 Logic We have that: (P  Q)  (Q  P) (P  Q)  (Q  P)  and  are commutative connectives, i.e. you can swap their arguments

17 CA 208 Logic PQP → QQ → P (P → Q)  (Q → P) Question: (P → Q)  (Q → P) ???? Truth table: show whether (P → Q)  (Q → P) is a tautology, if so, then (P → Q)  (Q → P), if not...

18 CA 208 Logic PQP → QQ → P (P → Q)  (Q → P) Question: (P → Q)  (Q → P) ???? Truth table: show whether (P → Q)  (Q → P) is a tautology, if so, then (P → Q)  (Q → P), if not...

19 CA 208 Logic PQR QRQRP  (Q  R)PQPQ(P  Q)  R(P  (Q  R))  ((P  Q)  R) P  (Q  R)  (P  Q)  R Truth table: show that (P  (Q  R))  ((P  Q)  R) is a tautology...

20 CA 208 Logic We have established that: (P  Q)  (Q  P) (P  Q)  (Q  P) P  (Q  R)  (P  Q)  R P  (Q  R)  (P  Q)  R There are lots more logical equivalence It turns out that Propositional Logic is a Boolean Algebra (see next two slides...)

21 CA 208 Logic Commutativity (P  Q)  (Q  P) Associativity P  (Q  R)  (P  Q)  R Distributivity P  (Q  R)  (P  Q)  (P  R) Idempotency (P  P)  P Absorption (P  T)  P Commutativity (P  Q)  (Q  P) Associativity: P  (Q  R)  (P  Q)  R Distributivity P  (Q  R)  (P  Q)  (P  R) Idempotency (P  P)  P Absorption (P   )  P

22 CA 208 Logic De Morgan  (P  Q)  (  P   Q) Double Negation   P  P The Falsum/Absurd:  (P   P)   De Morgan  (P  Q)  (  P   Q) The Verum/True: T (P   P)  T

23 CA 208 Logic Now sth. amazing happens... We can use the logical equivalences  to do calculations (simplifications) with propositional logical formulas What is calculation? Large part of it is simplification... Example from arithmetics and high school algebra: = 4, n (n + 1) – n = (n^2 + n) – n = n^2 Can do the same with logical formulas Use logical equivalence A  B to replace A for B or vice versa  (P   P)  (  P    P)  (  P  P)  (P   P)  T

24 CA 208 Logic More examples of using logical equivalences  to do calculations (simplifications) with propositional logical formulas...

25 CA 208 Logic Two new symbols (not logical connectives)  and   logical equivalence: A  B iff A  B is a tautology  logical entailment, logically entails, logically follows (a bit like logical consequence |=, |-): A  B iff A  B is a tautology In words: B logically follows from A (A logically entails B) if and only if whenever A is true, then B is true; in all situations where A is true, B is true as well (rings a bell: |=...)  allows us to model |= (|-) as follows: {P1,..., Pn} |= C iff (P1 ...  Pn)  C iff (P1 ...  Pn)  C is a tautology

26 CA 208 Logic PQ PQPQ(P  Q)  P (P  Q) logically entails P, in symbols (P  Q)  P, iff (P  Q)  P is a tautology... Check this by truth table method... Hence also {P, Q} |= P......! Semantic consequence relation...

27 CA 208 Logic PQ PQPQ(P  (P  Q))(P  (P  Q))  Q This is amazing.... We have in effect operationalised the semantic consequence relation |= in terms of  and ultimately in terms of checking whether the corresponding formula with  is a tautology using the truth table method. We In fact “mechanised” part of what it is for a being to be intelligent: the ability to reason from premises to conclusions!!!! AI.... e.g. {P, P  Q} |= Q iff (P  (P  Q))  Q iff (P  (P  Q))  Q is a tautology:

28 CA 208 Logic Show that {P  Q, Q  R} |= P  R iff ((P  Q)  (Q  R))  (P  R) iff ((P  Q)  (Q  R))  (P  R) is a tautology: PQR P  QQ  R(P  Q)  (Q  R)((P  Q)  (Q  R))  (P  R)

29 CA 208 Logic PQ PQPQPQPQPQPQPQPQ