Mathematical Logic Part One

Similar documents
Mathematical Logic Part One

Mathematical Logic Part One

Mathematical Logic Part One

Mathematical Logic Part One

Mathematical Logic Part One

Mathematical Logic Part Two

Mathematical Logic Part One

Mathematical Logic Part Three

Mathematical Logic Part Three

Mathematical Logic Part One

Discrete Mathematics and Applications COT3100

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

A statement is a sentence that is definitely either true or false but not both.

13.3 Truth Tables for the Conditional and the Biconditional

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

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

THE LOGIC OF COMPOUND STATEMENTS

CSC Discrete Math I, Spring Propositional Logic

Section 1.1: Logical Form and Logical Equivalence

A Little Deductive Logic

The Inductive Proof Template

A Little Deductive Logic

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Propositional logic ( ): Review from Mat 1348

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

Chapter 1 Elementary Logic

EECS 1028 M: Discrete Mathematics for Engineers

DeMorgan s Laws and the Biconditional. Philosophy and Logic Sections 2.3, 2.4 ( Some difficult combinations )

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

Formal Logic. Critical Thinking

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Truth-Functional Logic

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

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

Logic and Truth Tables

Propositional Logic Not Enough

Predicates, Quantifiers and Nested Quantifiers

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Definition 2. Conjunction of p and q

Mathematical Logic Part Three

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Introduction to Sets and Logic (MATH 1190)

Mat 243 Exam 1 Review

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

PHIL12A Section answers, 16 February 2011

Foundation of proofs. Jim Hefferon.

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:

DISCRETE STRUCTURES WEEK5 LECTURE1

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Propositional Logic. Fall () Propositional Logic Fall / 30

Functions. Lecture 4: Truth functions, evaluating compound statements. Arithmetic Functions. x y x+y

CSE 240 Logic and Discrete Mathematics

Predicate Logic. Predicates. Math 173 February 9, 2010

PHIL 422 Advanced Logic Inductive Proof

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

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

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Section 1.1 Propositions

Mathematical Logic Part Three

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

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

Mathematical Logic Part Three

Announcements. Problem Set 1 out. Checkpoint due Monday, September 30. Remaining problems due Friday, October 4.

Propositional Logic. Spring Propositional Logic Spring / 32

GEOMETRY. Chapter 2: LOGIC. Name: Teacher: Pd:

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

Proofs. Joe Patten August 10, 2018

Stanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014

HANDOUT AND SET THEORY. Ariyadi Wijaya

First Order Logic: Syntax and Semantics

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

5. And. 5.1 The conjunction

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Learning Goals of CS245 Logic and Computation

Chapter 1: Formal Logic

THE LOGIC OF QUANTIFIED STATEMENTS

Logic and Proofs. (A brief summary)

5. And. 5.1 The conjunction

Truth Tables for Arguments

Predicate Calculus - Syntax

Section 1.2: Propositional Logic

Math 10850, fall 2017, University of Notre Dame

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

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

WARM-UP. Conditional Statements

Propositional Language - Semantics

ICS141: Discrete Mathematics for Computer Science I

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

Discrete Mathematics and Its Applications

Compound Propositions

FUNDAMENTALS OF MATHEMATICS HANDOUT 1.3 DR. MCLOUGHLIN

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

Chapter 1, Section 1.1 Propositional Logic

Discrete Mathematics and Its Applications

Lecture 2: Syntax. January 24, 2018

Proving logical equivalencies (1.3)

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

Transcription:

Mathematical Logic Part One

An Important Question How do we formalize the logic we've been using in our proofs?

Where We're Going Propositional Logic (oday) Basic logical connectives. ruth tables. Logical equivalences. irst-order Logic (oday/riday) Reasoning about properties of multiple objects.

Propositional Logic

A proposition is a statement that is, by itself, either true or false.

Some Sample Propositions Puppies are cuter than kittens. Kittens are cuter than puppies. Usain Bolt can outrun everyone in this room. CS103 is useful for cocktail parties. his is the last entry on this list.

More Propositions I came in like a wrecking ball. I am a champion. You're going to hear me roar. We all just entertainers.

hings hat Aren't Propositions Commands Commands cannot cannot be be true true or or false. false.

hings hat Aren't Propositions Questions Questions cannot cannot be be true true or or false. false.

hings hat Aren't Propositions he he first first half half is is a a valid valid proposition. proposition. I am the walrus, goo goo g'joob Jibberish Jibberish cannot cannot be be true true or or false. false.

Propositional Logic Propositional logic is a mathematical system for reasoning about propositions and how they relate to one another. Every statement in propositional logic consists of propositional variables combined via logical connectives. Each variable represents some proposition, such as You liked it or You should have put a ring on it. Connectives encode how propositions are related, such as If you liked it, then you should have put a ring on it.

Propositional Variables Each proposition will be represented by a propositional variable. Propositional variables are usually represented as lower-case letters, such as p, q, r, s, etc. Each variable can take one one of two values: true or false.

Logical Connectives Logical NO: p Read not p p is true if and only if p is false. Also called logical negation. Logical AND: p q Read p and q. p q is true if both p and q are true. Also called logical conjunction. Logical OR: p q Read p or q. p q is true if at least one of p or q are true (inclusive OR) Also called logical disjunction.

ruth ables p q p q

ruth ables p q p q If If p is is false false and and q is is false, false, then then both both p and and q q is is false. false.

ruth ables p q p q

ruth ables p q p q

ruth ables p q p q

ruth ables p q p q Both Both p and and q q is is true true only only when when both both p and and q are are true. true.

ruth ables

ruth ables p q p q

ruth ables p q p q his his or or is is an an inclusive inclusive or. or.

ruth ables p p

ruth able for Implication p q p q

ruth able for Implication p q p q

ruth able for Implication p q p q In In both both of of these these cases, cases, p is is false, false, so so the the statement statement if if p, p, then then q q is is vacuously vacuously true. true.

ruth able for Implication p q p q In In both both of of these these cases, cases, p is is false, false, so so the the statement statement if if p, p, then then q q is is vacuously vacuously true. true.

ruth able for Implication p q p q

ruth able for Implication p q p q p q should should mean mean when when p is is true, true, q is is true true as as well. well. But But here here p is is true true and and q is is false! false!

ruth able for Implication p q p q p q should should mean mean when when p is is true, true, q is is true true as as well. well. But But here here p is is true true and and q is is false! false!

ruth able for Implication p q p q

ruth able for Implication p q p q p q means means that that if if we we ever ever find find that that p is is true, true, we'll we'll find find that that q is is true true as as well. well.

ruth able for Implication p q p q p q means means that that if if we we ever ever find find that that p is is true, true, we'll we'll find find that that q is is true true as as well. well.

ruth able for Implication p q p q

ruth able for Implication p q p q he he only only way way for for p q to to be be false false is is for for p to to be be true true and and q to to be be false. false.

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q One One of of p or or q is is true true without without the the other. other.

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q One One of of p or or q is is true true without without the the other. other.

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q Both Both p and and q are are false false here, here, so so the the statement statement p p if if and and only only if if q q is is true. true.

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q Both Both p and and q are are false false here, here, so so the the statement statement p p if if and and only only if if q q is is true. true.

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q

he Biconditional he biconditional connective p q is read p if and only if q. Intuitively, either both p and q are true, or neither of them are. p q p q One One interpretation interpretation of of is is to to think think of of it it as as equality: equality: the the two two propositions propositions must must have have equal equal truth truth values. values.

rue and alse here are two more connectives to speak of: true and false. he symbol is a value that is always true. he symbol is value that is always false. hese are often called connectives, though they don't connect anything. (Or rather, they connect zero things.)

Operator Precedence How do we parse this statement? x y z x y z Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? x y z x y z Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) y z x y z Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) y z x y z Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) y z x (y z) Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) y z x (y z) Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) (y z) (x (y z)) Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) (y z) (x (y z)) Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) ((y z) (x (y z))) Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Operator Precedence How do we parse this statement? ( x) ((y z) (x (y z))) Operator precedence for propositional logic: All operators are right-associative. We can use parentheses to disambiguate.

Recap So ar A propositional variable is a variable that is either true or false. he logical connectives are Negation: p Conjunction: p q Disjunction: p q Implication: p q Biconditional: p q rue: alse:

ranslating into Propositional Logic

Some Sample Propositions a: here is a velociraptor outside my apartment. b: Velociraptors can open windows. c: I am in my apartment right now. d: My apartment has windows. e: I am going to be eaten by a velociraptor I won't be eaten by a velociraptor if there isn't a velociraptor outside my apartment. a e

p if q translates to q p It does not translate to p q

Some Sample Propositions a: here is a velociraptor outside my apartment. b: Velociraptors can open windows. c: I am in my apartment right now. d: My apartment has windows. e: I am going to be eaten by a velociraptor If there is a velociraptor outside my apartment, but velociraptors can't open windows, I am not going to be eaten by a velociraptor. a b e

p, but q translates to p q

he akeaway Point When translating into or out of propositional logic, be very careful not to get tripped up by nuances of the English language. In fact, this is one of the reasons we have a symbolic notation in the first place! Many prepositional phrases lead to counterintuitive translations; make sure to double-check yourself!

More Elaborate ruth ables p q p (p q)

More Elaborate ruth ables We can't evaluate this until we have a value for p q. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables So let's start by evaluating this. p q p (p q)

More Elaborate ruth ables p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables Now we can go evaluate this. p q p (p q)

More Elaborate ruth ables p q p (p q)

More Elaborate ruth ables his gives the final truth value for the expression. p q p (p q)

Logical Equivalence

Negations p q is false if and only if (p q) is true. Intuitively, this is only possible if either p is false or q is false (or both!) In propositional logic, we can write this as p q. How would we prove that (p q) and p q are equivalent? Idea: Build truth tables for both expressions and confirm that they always agree.

Negating AND p q (p q)

Negating AND p q (p q)

Negating AND p q (p q)

Negating AND p q (p q)

Negating AND p q (p q) p q p q

Negating AND p q (p q) p q p q

Negating AND p q (p q) p q p q

Negating AND p q (p q) p q p q

Negating AND p q (p q) p q p q

Negating AND p q (p q) p q p q hese two statements are always the same! hese two statements are always the same!

Logical Equivalence If two propositional logic statements φ and ψ always have the same truth values as one another, they are called logically equivalent. We denote this by φ ψ. is not a connective. It is a statement used to describe propositional formulas. φ ψ is a propositional statement that can take on different truth values based on how φ and ψ evaluate. hink of it as a function of φ and ψ. φ ψ is an assertion that the formulas always take on the same values. It is either true or it isn't.

De Morgan's Laws Using truth tables, we concluded that (p q) p q We can also use truth tables to show that (p q) p q hese two equivalences are called De Morgan's Laws.

Another Important Equivalence When is p q false? Answer: p must be true and q must be false. In propositional logic: p q Is the following true? (p q) p q

Negating Implications

Negating Implications p q (p q)

Negating Implications p q (p q)

Negating Implications p q (p q)

Negating Implications p q (p q)

Negating Implications p q (p q) p q p q

Negating Implications p q (p q) p q p q

Negating Implications p q (p q) p q p q

Negating Implications p q (p q) p q p q

Negating Implications p q (p q) p q p q

Negating Implications p q (p q) p q p q (p q) p q

An Important Observation We have just proven that (p q) p q If we negate both sides, we get that p q (p q) By De Morgan's laws: p q (p q) p q p q p q p q hus p q p q

An Important Observation We have just proven that (p q) p q If we negate both sides, we get that p q (p q) By De Morgan's laws: p q (p q) p q p q p q p q hus p q p q If If p is is false, false, the the whole whole thing thing is is true true and and we we gain gain no no information. information. If If p is is true, true, then then q has has to to be be true true for for the the whole whole expression expression to to be be true. true.

Why his Matters Understanding these equivalences helps justify how proofs work and what to prove. Unsure what to prove? ry translating it into logic first and see what happens.

Announcements!

Problem Set hree Checkpoint Problem Set hree checkpoints graded and solutions are released. Please review the feedback and solution set. Parts (ii) and (iv) are trickier than they might seem. On-time Problem Set wo's should be graded and returned by tomorrow at noon in the homework return bin. Please keep everything sorted! Please don't leave papers sitting out!

A Note on Induction In an inductive proof, P(n) must be a statement that is either true or false for a particular choice of n. Examples: P(n) = aₙ = 2n. P(n) = any tournament with n players has a winner. Non-examples: P(n) = a game of Nim with n stones in each pile P(n) = for any n N, aₙ = 2n.

Your Questions

What are some practical applications of cardinality? Why is it useful?

irst-order Logic

What is irst-order Logic? irst-order logic is a logical system for reasoning about properties of objects. Augments the logical connectives from propositional logic with predicates that describe properties of objects, and functions that map objects to one another, quantifiers that allow us to reason about multiple objects simultaneously.

he Universe of Propositional Logic

he Universe of Propositional Logic p q r s

he Universe of Propositional Logic p q r s RUE ALSE

he Universe of Propositional Logic p q r s p r q s RUE ALSE

he Universe of Propositional Logic p q r s s r q p RUE ALSE

Propositional Logic In propositional logic, each variable represents a proposition, which is either true or false. We can directly apply connectives to propositions: p q p q he truth of a statement can be determined by plugging in the truth values for the input propositions and computing the result. We can see all possible truth values for a statement by checking all possible truth assignments to its variables.

he Universe of irst-order Logic he Sun Venus he Morning Star he Moon he Evening Star

irst-order Logic In first-order logic, each variable refers to some object in a set called the domain of discourse. Some objects may have multiple names. Some objects may have no name at all. Venus he Morning Star he Evening Star

irst-order Logic In first-order logic, each variable refers to some object in a set called the domain of discourse. Some objects may have multiple names. Some objects may have no name at all. Venus he Morning Star he Evening Star

Propositional vs. irst-order Logic Because propositional variables are either true or false, we can directly apply connectives to them. p q p q r Because first-order variables refer to arbitrary objects, it does not make sense to apply connectives to them. Venus Sun 137 42 his is not C!

Reasoning about Objects o reason about objects, first-order logic uses predicates. Examples: ExtremelyCute(Quokka) DeadlockEachOther(House, Senate) Predicates can take any number of arguments, but each predicate has a fixed number of arguments (called its arity) Applying a predicate to arguments produces a proposition, which is either true or false.

irst-order Sentences Sentences in first-order logic can be constructed from predicates applied to objects: LikesoEat(V, M) Near(V, M) WillEat(V, M) Cute(t) Dikdik(t) Kitty(t) Puppy(t) x < 8 x < 137 he he notation notation x x < 8 is is just just a a shorthand shorthand for for something something like like Lesshan(x, Lesshan(x, 8). 8). Binary Binary predicates predicates in in math math are are often often written written like like this, this, but but symbols symbols like like < are are not not a a part part of of first-order first-order logic. logic.

Equality irst-order logic is equipped with a special predicate = that says whether two objects are equal to one another. Equality is a part of first-order logic, just as and are. Examples: MorningStar = EveningStar Glinda = GoodWitchOfheNorth Equality can only be applied to objects; to see if propositions are equal, use.

or notational simplicity, define as x y (x = y)

Next ime irst-order Logic II unctions and quantifiers. How do we translate statements into first-order logic? Why does any of this matter?