Section 1 - Logic

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

(Valid) Argument form A: ¬qp → q∴ ¬p (Invalid) Argument form B: Correct The form of this argument is A, which is valid.

4 is not a prime number.If 6 is a prime number, then 4 is a prime number.∴ 6 is not a prime number. Valid or Invalid?

Contradiction

A compound proposition is a _____ if the proposition is always false, regardless of the truth value of the individual propositions that occur in it

tautology

A compound proposition is a _____ if the proposition is always true, regardless of the truth value of the individual propositions that occur in it

see pic

A truth table for a compound statement will have a row for every possible combination of truth assignments for the statement's variables. If there are n variables, there are 2^n rows. In the truth table for the compound proposition (p ∨ r) ∧ ¬q, there are three variables and 2^3 = 8 rows.

free, bound

A variable x in the predicate P(x) is called a ____ variable because the variable is free to take on any value in the domain. The variable x in the statement ∀x P(x) is a _____ variable because the variable is bound to a quantifier.

p∧(p∨q) ↔ p p∨(p∧q) ↔ p

Absorption Law - if the statement has p inside and outside the () as well as the same symbol inside and outside we can reduce it to p p∧(p∨q) ↔ ? p∨(p∧q) ↔ ?

p ∴ p ∨ q

Addition

See tbl

All the different ways to express a conjuction in English ^

(¬p) ∨ q

Because the negation operation is always applied first, the proposition ¬p ∨ q is evaluated as ______ instead of ¬(p ∨ q)

if p = q then p ↔ q = 1

Biconditional Truth Table (if and only if) What is the mathematical way to find the right most column in this table?

see pic

Compound biconditional

p→q = 1 if the value of p is less than or equal to q Also think of it like this If its sunny I will wear sunscreen the only time we break this promise is if it is sunny but we are not wearing sunscreen

Conditional Truth Table What is the mathematical way to find the right most column in this table?

p q ∴ p ∧ q

Conjunction

p∧q = min(p,q) notice we take the minimum of each two pairs and that is what goes in the column

Conjunction Truth Table What is the mathematical way to find the right most column in this table?

x=2

Consider an example in which the domain is the set of positive integers and define the following predicates: P(x): x is prime O(x): x is odd The proposition ∃x (P(x) ∧ ¬O(x)) states that there exists a positive number that is prime and not odd. When is this true?

p ∨ q ¬p ∴ q p or q occurred but not p therefore it must be q

Disjunctive syllogism

p ∧ T ↔ T p ∨ F ↔ F

Domination Law -logic law that says the truth or false dominate over the p p ∧ T ↔ ? p ∨ F ↔ ?

¬¬p ↔ p

Double Negation - logic law that says double negative is positive ¬¬p ↔ ?

see pic

English expressions of the conditional operation.

see table

Example of a truth table

∀n (D(n) → D(n2)).

For every integer n, if n is odd then n2 is odd. The domain of variable n is the set of all integers. If D(n) is the predicate that says that n is odd, then the statement is equivalent to the logical expression:

A. (∀x P(x)) ∧ Q(x)

How do we read the statement ∀x P(x) ∧ Q(x) A. (∀x P(x)) ∧ Q(x) B. ∀x (P(x) ∧ Q(x))

p → q q → r ∴ p → r

Hypothetical syllogism

p ∧ T ↔ p since T is always true it can be reduced to say when p is true since were using and we need both to be true p ∨ F ↔ p since F is always false it can be reduced to say when p is true since were using or only one needs to be true

Identity Law -logic law that says if you give p outputs p T = tautology or always true F = contradiction or always false p ∧ T ↔ ? p ∨ F ↔ ?

biconditional operation

If p and q are propositions, the proposition "p if and only if q" is expressed with the ____ _____ and is denoted p ↔ q. The proposition p ↔ q is true when p and q have the same truth value and is false when p and q have different truth values. Alternative ways of expressing p ↔ q in English include "p is necessary and sufficient for q" or "if p then q, and conversely". The term iff is an abbreviation of the expression "if and only if", as in "p iff q". The truth table for p ↔ q is given below:

proof by exhaustion. If n ∈ {-1, 0, 1}, then n2 = |n|. It is straightforward to prove the above statement by verifying the equality for all three possible values of n. Here is the proof: Proof. Check the equality for each possible value of n: n = -1: (-1)2 = 1 = |-1|. n = 0: (0)2 = 0 = |0|. n = 1: (1)2 = 1 = |1|. ■

If the domain of a universal statement is small, it may be easiest to prove the statement by checking each element individually. A proof of this kind is called a ____ ___ _______

"Every person sent an email to someone."

If ∃x ∀y M(x, y) ↔ "There is a person who sent an email to everyone." then what does ∀x ∃y M(x, y) ↔ say?

direct

In a _______ proof of a conditional statement, the hypothesis p is assumed to be true and the conclusion c is proven as a direct result of the assumption.

¬q p → q ∴ ¬p

Modus tollens

see pic

Order of operations example

see pic

Other Easy Logic Laws

1. g → p notice this is not only if so getting a good exam mark is the ONLY way to pass the class. 2. p → g 3. p ↔ g

P = I will pass G = I get a good exam mark Translate the following: 1. I will pass if I get a good exam mark. 2. I will pass only if I get a good exam mark. 3. I will pass if and only if I get a good exam mark.

Proof. We consider two cases: x is even and x is odd. Case 1: x is even. If x is even, then x = 2k for some integer k. x2+5x−1=(2k)2+5(2k)−1=2(2k2+5k)−(2−1)=2(2k2+5k−1)+1. Since k is an integer, (2k2 + 5k - 1) is also an integer. Therefore, x2 + 5x - 1 is equal to 2 times an integer plus 1 and x2 + 5x - 1 is odd. Case 2: x is odd. If x is odd, then x = 2k + 1 for some integer k. x2+5x−1=(2k+1)2+5(2k+1)−1=(4k2+4k+1)+(10k+5)−1=4k2+14k+4+1=2(2k2+7k+2)+1 Since k is an integer, (2k2 + 7k +2) is also an integer. Therefore, x2 + 5x - 1 is equal to 2 times an integer plus 1 and x2 + 5x - 1 is odd. ■

Proof BY Cases example If x is an integer, then x2 + 5x - 1 is odd.

The answer is . . . it depends. For this type of statement, the easiest way to show this statement is true is to consider two different cases, the case when x is even and the case when x is odd. Then you will prove each case in whatever proof technique is best for that case. This process is aptly called "proof by cases."

Proof By Cases Consider this statement: if x + y is even, then x and y are either both even or both odd. How would you prove this statement is true? Would you use a direct proof, proof by contrapositive, or a proof by contradiction?

Assume the square root of 2 is irrational the square root of 2 can be written as a fraction as a/b where a,b are in the lowest terms put ^2 to both sides and we get 2 = a^2 / b^2 = 2b^2 = a^2 = a^2 even is a*a even which is a is even 2b^2 = (2k)^2 2b^2 = 4k^2 b^2 = 2k^2 b^2 even so b is even so if both a and b are even the a,b are not in their lowest terms which means they can reduced ex. 2/2 = 1/1 = 1 which is therefore not irrational

Proof By Contradiction Show that the square root of 2 is irrational

see pic

Proof By Contradiction Example

.A counterexample is an assignment of values to variables that shows that a universal statement is false Find a counterexample to show that each of the statements is false. (a) Every month of the year has 30 or 31 days. February is a counterexample because February always has 28 or 29 days. (b) If n is an integer and n2 is divisible by 4, then n is divisible by 4.

Proof By Counterexample

proves a conditional theorem of the form p → c by showing that the contrapositive ¬c → ¬p is true. In other words, ¬c is assumed to be true and ¬p is proven as a result of ¬c.

Proof by Contrapositive

To make this easier we say if not x is odd than 7x+9 is odd ¬c → ¬p x is even, then 7x+9 is odd 7x is even bc even*7 is even so an even number plus 9 is always odd

Proof by Contrapositive example Prove: If 7x+9 is even, then x is odd

Direct Proof Assume x is odd any odd number can be written in the form: x = 2n+1 x^2 = (2n+1)^2 = x^2 = 4n^2+4n+1 = x^2 = 2n(2n+2)+1 notice 2n(2n+2)+1 is the same as 2n+1 just with another even number being multiplied so basically the same thing

Prove: If x is odd, x^2 is odd

Direct Proof x = 2k+1 y= 2J+1 xy = (2k+1)(2j+1) = 4kj + 2k + 2j + 1 the plus one on the end means always odd

Prove: If x,y are odd then xy is odd

p ∨ q ¬p ∨ r ∴ q ∨ r

Resolution

a set of premises prove some conclusion in an argument, An argument is valid if the premises logically entail the conclusion.

Rules of Inference state...

True For example, the proposition ¬(p ∨ q) is not a contradiction because when p = q = F, then ¬(p ∨ q) is true.

Showing that a compound proposition is not a contradiction only requires showing a particular set of truth values for its individual propositions that cause the compound proposition to evaluate to ____

False For example, the proposition (p ∧ q) → r is not a tautology because when p = q = T and r = F, then (p ∧ q) → r is false.

Showing that a compound proposition is not a tautology only requires showing a particular set of truth values for its individual propositions that cause the compound proposition to evaluate to _____

see pic

Simple proof

p ∧ q ∴ p

Simplification

T Ex. Lucy is going to the park or the movie

T or F? The proposition p ⊕ q is true if exactly one of the propositions p and q is true but not both

and, conjunction

The proposition p ∧ q is read "p ____ q" and is called the ______ of p and q

or, disjunction

The proposition p ∨ q is read "p ___ q", and is called the ______ of p and q

see tbl

The proposition p ∨ q is true because January does have 31 days. The truth table for the ∨ operation is given

theorem, proof , axioms,

Theorems and axioms A ______ is a statement that can be proven to be true. A ______ consists of a series of steps, each of which follows logically from assumptions, or from previously proven statements, whose final step should result in the statement of the theorem being proven. The proof of a theorem may make use of _______, which are statements assumed to be true. A proof may also make use of previously proven theorems

If (R∧P) then (Q ∧ S) If I write an exam and I cheat Then I will get caught and I will fail

Translate the pic

see pic

Universal Quantifier - for all x x is P

Negate the following ∀x∃y[P(x,y)∧Q(y)]

see other side for question

a value indicating whether the proposition is actually true or false.

truth value

see pic

¬¬p∧((p∨F)∧¬¬q) break this down with the logic laws

(Valid) Argument form A: ¬qp → q∴ ¬p (Invalid) Argument form B: Correct The form of this argument is B, which is invalid.

π is not a rational number.If π is a rational number, then 2π is a rational number.∴ 2π is not a rational number. Valid or Invalid?

True The only positive integer x that is equal to x^2 is 1, so every positive integer x is either equal to 1 or x2 ≠ x.

∀x ((x = 1) ∨ (x^2 ≠ x)) T or F

If the domain is the set of students in a class and the predicate A(x) means that student x completed the assignment, then the proposition ∀x A(x) means: "Every student completed the assignment." Establishing that ∀x A(x) is true requires showing that each and every student in the class did in fact complete the assignment.

∀x P(x) ≡ P(a1)∧P(a2)∧...∧P(ak) If the predicate ∀x means that every student completed the assignment than what must be true

nested. The variable x is bound by ∀ and y is bound by ∃.

∀x ∃y, P(x, y) is a predicate that includes the ∀ and ∃ quantifiers. This is an example of a ____ quantifier. The logical expression is a proposition if all the variables are bound.

"There is a student who completed the assignment." Establishing that ∃x A(x) is true only requires finding one particular student who completed the assignment.

∃x P(x) ≡ P(a1) ∨ P(a2) ∨ ... ∨ P(ak) If the domain is the set of students in a class and the predicate A(x) means that student x completed the assignment, then ∃x A(x) is the statement:

compound proposition

A ______ ________ can be created by using more than one operation. For example, the proposition p ∨ ¬q evaluates to true if p is true or the negation of q is true

Predicate

A logical statement whose truth value is a function of one or more variables is called a _____. If P(x) is defined to be the statement "x is an odd number", then P(5) corresponds to the statement "5 is an odd number". P(5) is a proposition because it has a well defined truth value.

1. true because 5^2 = 25. 2.false because 2 + 3 ≠ 6

A predicate can depend on more than one variable. Define the predicates Q and R as: Q(x,y):x^2=y R(x,y,z):x+y=z The proposition Q(5, 25) is 1. ____ The proposition R(2, 3, 6) is 2. _______

see pic

An argument is a sequence of propositions, called hypotheses, followed by a final proposition, called the conclusion. An argument is valid if the conclusion is true whenever the hypotheses are all true, otherwise the argument is invalid. An argument will be denoted as

¬(p∧q)↔ ¬p∨¬q ¬(p∨q)↔ ¬p∧¬q

De Morgan's law - logic law that says if you have not on the outside of parenthesis you distribute the negation and flip the connector ¬(p∧q) ↔ ? ¬(p∨q) ↔ ?

The equivalence of the previous two statements is an example of De Morgan's law for quantified statements, which is formally stated as ¬∀x F(x) ≡ ∃x ¬F(x).

De Morgan's law for quantified statements If the domain for the variable x is the set of all birds and the predicate F(x) is "x can fly", then the statement ¬∀x F(x) is equivalent to: "Not every bird can fly." which is logically equivalent to the statement: "There exists a bird that cannot fly."

see table

Examples of propositions and their truth values.

see pic

Nested quantifiers as a two-person game

see other side

Quantifiers and Predicate Logic E(x) = x is even G(x,y) = x is greater than y - Cannot say so not a statement G(2,1) = 2 is greater than 1 - True G(3,6) = 3 is greater than 6 - False

see pic

Show (¬(p∧q)∧q) is logically equivalent to (¬p∧q)

¬∀x P(x) ≡ ∃x ¬P(x) ¬∃x P(x) ≡ ∀x ¬P(x)

Summary of De Morgan's laws for quantified statements.

conditional operation The proposition p → q is read "if p then q"

The ______ _________ is denoted with the symbol →.

domain

The _______ of a variable in a predicate is the set of all possible values for the variable. For example, a natural _____ for the variable x in the predicate "x is an odd number" would be the set of all integers.

exclusive. The exclusive or operation is usually denoted with the symbol ⊕

The _______ or of p and q evaluates to true when p is true and q is false or when q is true and p is false.

For example, the proposition p ∨ q ∧ r should be read as p ∨ (q ∧ r), instead of (p ∨ q) ∧ r. However, good practice is to use parentheses to specify the order in which the operations are to be performed, as in p ∨ (q ∧ r)

The order in which the operations are applied in a compound proposition such as p ∨ ¬q ∧ r may affect the truth value of the proposition. In the absence of parentheses, the rule is that negation is applied first, then conjunction, then disjunction:

Propositional variables

______ _______ such as p, q, and r can be used to denote arbitrary propositions, as in: p: January has 31 days.q: February has 33 days.

Premises 1. R 2. R→D 3.D→¬J Task-Prove that 1-3 entail ¬J and Justify each step using inference rules

see other side for question, note this is not the only way to prove it

No he did not lie, giving him the cheat sheet was not the only way to not fail the test. He may have still gotten a bad grade.

see pic

(Valid) Argument form A: ¬qp → q∴ ¬p (Invalid) Argument form B: The form of this argument is B, which is invalid.

6 is not a prime number.If 6 is a prime number, then 4 is a prime number.∴ 4 is not a prime number. Valid or Invalid?

quantifier

Another way to turn a predicate into a proposition is to use a _______. The logical statement ∀x P(x) is read "for all x, P(x)" or "for every x, P(x)"

¬∃x ∀y L(x, y ) ≡ ∀x ∃y ¬L(x, y ) which is translated into: ∀x ∃y ¬L(x, y ) ↔ Every student in the school has someone that they do not like.

Consider a scenario in which the domain is the set of all students in a school. The predicate L(x, y) indicates that x likes y. The statement ∃x ∀y L(x, y ) is read as: ∃x ∀y L(x, y ) ↔ There is a student who likes everyone in the school. The negation of the statement is: ¬∃x ∀y L(x, y ) ↔ There is no student who likes everyone in the school. Applying De Morgan's laws yields:

The universal player first selects the value of x. Regardless of which value the universal player selects for x, the existential player can select y to be -x, which will cause the sum x + y to be 0. Because the existential player can always succeed in causing the predicate to be true, the statement ∀x ∃y (x + y = 0) is true.

Consider as an example the following quantified statement in which the domain is the set of all integers: ∀x ∃y (x + y = 0)

De Morgan's law can be applied to logical statements with more than one quantifier. Each time the negation sign moves past a quantifier, the quantifier changes type from universal to existential or from existential to universal

De Morgan's laws for nested quantified statements.

"Everyone sent an email to everyone." Now consider the proposition: ∃x ∃y M(x, y). The proposition can be expressed in English as: ∃x ∃y M(x, y) ↔ "There is a person who sent an email to someone." The statement ∃x ∃y M(x, y) is true if there is a pair, x and y, in the domain that causes M(x, y) to evaluate to true. In particular, ∃x ∃y M(x, y) is true even in the situation that there is a single individual who sent an email to himself or herself. The statement ∃x ∃y M(x, y) is false if all pairs, x and y, cause M(x, y) to evaluate to false.

Define the predicate M to be: M(x, y): x sent an email to y and consider the proposition: ∀x ∀y M(x, y). The proposition can be expressed in English as: ∀x ∀y M(x, y) ↔ ___________________

p∨q = max(p,q) notice we take the maximum of each two pairs and that is what goes in the column

Disjunction Truth Table What is the mathematical way to find the right most column in this table?

p∧(p∨r) ↔ (p∧q) ∨ (p∧r) p∨(p∧r) ↔ (p∨q) ∧ (p∨r) Notice we distribute the ∧ and ∨ just like the arithmetic example

Distributive Law Arithmetic example: 3x(1+2) = 9 can also be (3x1) +(3x2) = 9 p∧(p∨r) ↔ ? p∨(p∧r) ↔ ?

if p ≠ q then p ⊕ q = 1 notice this is opposite of biconditional Ex. Lucy is going to the park or the movie

Exclusive Or Truth Table What is the mathematical way to find the right most column in this table?

see pic

Existential Quantifier - for some x, x is P

see pic

Express the statement with the rules of inference If it rains I will get wet. It's raining I will get wet

Inverse: If she did not finish her homework, then she did not go to the party. Contrapositive: If she did not go to the party, then she did not finish her homework. Converse: If she went to the party, then she finished her homework.

Give the inverse, converse and contrapositive for each of the following statement If she finished her homework, then she went to the party.

No, because its truth value depends on the value of variable x. If x = 5, the statement is true. If x = 4, the statement is false. The truth value of the statement can be expressed as a function P of the variable x, as in P(x)

Is this statement a proposition: X is an odd number.

see pic

Logically Equivalent Example

p p → q ∴ q

Modus ponens

see pic

Negative Quantifiers Not all dogs are brown means there exists a dog that isnt brown

see pic

Rules of Inference Addition, Simplification, and Conjunction

see pic

Rules of Inference hypothetical syllogism and disjunctive syllogism

see pic

Rules of Inference Modus Ponens and Modus Tollens

see pic

Rules of inference known to be valid arguments.

Express this with quantifiers and predicate logic: For every real number n, there is a real number m such that m^2 = n

See other side for question, R is real numbers

Express this with quantifiers and predicate logic: Given two rationals x and y, the square root of xy will also be ration

See other side for question, remember Q is rational numbers

The fact that ∃x P(x) is false means that there is no element n in the domain that makes P(n) true, which is in turn is equivalent to the fact that every element in the domain makes P(n) false.

Show that for every element n in the domain, P(n) is false.

negation For example if the proposition is "Paris is the capital of England," the negation of the proposition is "Paris is not the capital of England."

The ______operation acts on just one proposition and has the effect of reversing the truth value of the proposition. The negation of proposition p is denoted ¬p and is read as "not p

De Morgan's laws

____ _______ ________ are logical equivalences that show how to correctly distribute a negation operation inside a parenthesized expression.

logical operation

______ _______ combines propositions using a particular composition rule

Invalid

is this argument valid or invalid?

a statement that is either true or false, if it can be true or false in the future it is still a proposition ex. Interest rates will rise this year. Proposition Not a proposition Proposition. The statement may be true or false, although nobody knows which.

proposition

¬∀x P(x) find the logical equivalency

see other side for question

∃x (P(x) find the logical equivalency

see other side for question

Premise 1. (¬R ∨ ¬F)→(S∧L) 2. S → T 3.¬T Show that 1-3 entail R

see other side for question, note this is not the only way to prove it

When the negation operation is distributed inside the parentheses, the disjunction operation changes to a conjunction operation. Consider an English example with the following propositions for p and q. p: The patient has migraines q: The patient has high blood pressure The use of the English word "or" throughout the example is assumed to be disjunction (i.e., the inclusive or). De Morgan's law says that the following two English statements are logically equivalent: It is not true that the patient has migraines or high blood pressure.The patient does not have migraines and does not have high blood pressure. The logical equivalence ¬(p ∨ q) ≡ (¬p ∧ ¬q) can be verified using a truth table. Alternatively, reasoning about which truth assignments cause the expressions ¬(p ∨ q) and (¬p ∧ ¬q) to evaluate to true provides intuition about why the two expressions are logically equivalent.

The first De Morgan's law is: ¬(p ∨ q) ≡ (¬p ∧ ¬q)

universal

The symbol ∀ is a ______ quantifier

existential

The symbol ∃ is an ______ quantifier and the statement ∃x P(x) is called a existentially quantified statement The logical statement ∃x P(x) is read "There exists an x, such that P(x)". The statement ∃x P(x) asserts that P(x) is true for at least one possible value for x in its domain.

"therefore"

The symbol ∴ means

The converse of p → q is q → p. The contrapositive of p → q is ¬q → ¬p.The inverse of p → q is ¬p → ¬q.

Three conditional statements related to proposition p → q are so common that they have special names

p = James dies q = Mary gets money r = James fam happy (¬p) → (¬q∧¬r)

Translate into Logic: If James does not die then Mary will not get any money and Jame's family will be happy.

see pic A conditional proposition can be thought of like a contract between two parties, as in: If you mow Mr. Smith's lawn, then he will pay you. The only way for the contract between you and Mr. Smith to be broken, is for you to mow Mr. Smith's lawn and for him not to pay you. If you do not mow his lawn, then he can either pay you or not, and the contract is not broken. In the words of logic, the only way for a conditional statement to be false is if the hypothesis is true and the conclusion is false. If the hypothesis is false, then the conditional statement is true regardless of the truth value of the conclusion.

Truth table for the conditional operation.

logically equivalent

Two compound propositions are said to be _____ _____ if they have the same truth value regardless of the truth values of their individual propositions. If s and r are two compound propositions, the notation s ≡ r is used to indicate that r and s are logically equivalent. For example, p and ¬¬p have the same truth value regardless of whether p is true or false, so p ≡ ¬¬p

compound proposition

____ _____ is created by connecting individual propositions with logical operations


संबंधित स्टडी सेट्स

Real Estate Principles Study Guide -- Quiz 1 California's Diversity

View Set

Econ 202 - Unit 2 Quiz Questions

View Set

PrepU Ch. 38 Digestion & GI - Adult MedSurg

View Set

Prep U: Chapter 67 Emergency Nursing

View Set

Adult Health Chapter 17 Assessment of Respiratory Function

View Set

Precision Machining Technology - Section 5 - section 8

View Set

M06-Ch.19-Network Security and troubleshooting.

View Set

H.M case study multi store model

View Set

Chapter 53: Concepts of Care for Patients With Liver Problems

View Set