



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A summary of basic logic operations, their definitions, and how to formalize proof statements. It covers the negation of statements, AND, OR, IMPLIES, and IFF operations, as well as quantifiers and their negations. The document also explains how to prove compound statements with quantifiers.
What you will learn
Typology: Lecture notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!
In order to do do proofs, you do not need to know formal logic. After all, our brain uses logic all the time and we really know all we need to know. However, if you feel something is missing in your understanding of how we structure a proof because you have not studied formal logic before, here is a short summary of basic logic operations, their definitions and how we can formalize proof statements. As an example, we will do a proof of a function not having a limit at some point. Proving the limit does not exist is really proving that the opposite (negation) of the statement in the definition is true. What is the negation or opposite of a complicated statement like the one in the definition of limit? First, we start with basic logic.
A statement is something that is either true or false.
Examples:
a ia an irrational number.
Which of the above statements are true?
We will use the letters P , Q and R for arbitrary statements. There are five basic logic operations. The logic operations NOT, AND, OR, IMPLIES and IFF are capitalized below to distinguish them from the English explanations. There are also symbols for these operations which are mentioned in a separate section at the end.
a. Negation - NOT
The negation of a statement P NOT P
is true when P is false and it is false when P is true.
Example: The negation of x < 6, (NOT x < 6), is (x ≥ 6). In other words, x < 6 is true when x ≥ 6 is false and vice verse.
b. AND
The statement P AND Q
is true when both the statements are true. For example,
7 is prime AND 7 is odd
is a true statement. If one or both of the statements are false, the statement is false. Examples:
All three are false statements. In a proof, to prove a statement with AND you actually prove two pieces. For example, in order to prove 2 ≤ x ≤ 5, which is short notation for 2 ≤ x AND x ≤ 5 ,
you have to prove the two pieces. You can do that separately or together depending on the rest of the proof.
c. OR
The statement P OR Q
is true when at least one of them is true. For example, for any real number x, x > 0 OR x ≤ 0. Examples:
All except the last one are true statements. In ordinary language, the word or sometimes has the hidden meaning that both of the things cannot be true at the same time. We understand or as one or the other. However, in logic, OR does not have that exclusive meaning. P OR Q is true when both are true.
d. IMPLIES
This is what we see in almost every statement of a proposition or theorem:
P IMPLIES Q
or equivalently, IF P, THEN Q.
This statement is true in all cases except when P is true and Q is false. The statement ”IF P , THEN Q” makes a claim about what would happen if P were true. So it holds if P is false. It is also true if P and Q are both true. The only time it fails is when P holds but Q does not. One way to think about ”IF P , THEN Q” is to think of it as a promise. If you hold your end of the bargain, P , then I’ll hold my end of the bargain, Q. You only complain if you do P but I do not do Q. Examples:
If f is differentiable, then f is continuous.
This is true. You cannot find a function which is differentiable (P holds) but not continuous (Q fails). The statement If f is continuous, then f is differentiable, is false. You would point to a counterexample, for example, f (x) = |x| at x = 0.
In the wording of theorems, propositions, definitions etc., besides the phrases ”P implies Q” and ”If P , then Q” the statement P IMPLIES Q can also be expressed as ”Q if P ” or ”P only if Q”. The last one points that P cannot be true when Q is false.
Besides the basic logic operations, there are also two quantifiers. Is a certain statement true for every x or are there some x’s for which it works. We have both of these in the definition of the limit. The first one
for all x P (x)
is true if the statement P (x), which depends on x, holds for all x’s, just like it says. It is called the universal quantifier. Example: ”For all x real, x^2 ≥ 0,” is a true statement whereas ”For all x rational,
x is rational,” is a false statement. To prove a for all statement, we start with ”Let x be given and arbitrary” and try to prove the rest, the P (x) part. This is exactly what we do in the limit proof: We let > 0 (be arbitrary) and follow the rest of the proof to show that it works for any > 0. The second quantifier is the existential quantifier
there exists an x such that P (x).
It is true when there is at least one x with the property P (x). There may or may not be more x’s with that property. Example: ”There exists a real x such that x^2 = 5” is a true statement whereas ”There exists a rational x such that x^2 = 5” is a false statement. To prove a there exists statement, you have to specifically show at least one that makes the statement true. If there are more than one, you do not have to list them all. So to prove the first statement in the
example we would say yes,
2 = 5 or x =
5 works. This is another piece we have in our limit definition. We prove that there exists a δ with a certain property by explicitly writing it down in termes of the which comes before it in the proof. What makes a for all statement false? For example, the statement,
for all x real x^2 > 0
is false because it fails for at least (in this case exactly) one number, namely 0. To show that the statement is false, you would point out that there exists an x for which it fails. i.e.
there exists a real x, such that x^2 ≤ 0.
So, the negation of for all x P (x)
is there exists an x such that NOT P (x).
Similarly, the negation of there exists an x such that P (x)
is for all x NOT P (x). Example: The negation of the false statement
there exists a rational x such that x^2 = 5
is for all x rational x^2 6 = 5
When we do a proof of a compound statement with quantifiers, we basically take the statement and make it the outline of our proof. Example: In order to prove lim x→ 2 (3x + 1) = 7 we take its statement
for every > 0 there exists a δ > 0 such that [|x − 2 | < δ implies |(3x + 1) − 7 | < ]
and write the outline of our proof in the same order as: Let > 0 be arbitrary (this is a for all quantifier so it should work for any ) Define δ = ... (to show existance we have to exibit a certain δ) Assume |x − 2 | < δ (to prove an implication you start with the first part and try to reach the second ) . . . Then, |(3x + 1) − 7 | < (finishing the proof of the implication)
Now, let’s put most of these together to prove that the Dirichlet function
g(x) =
1 if x is rational 0 if x is irrational
is discontinuous everywhere. First, let’s prove that
lim x→ 3
g(x) 6 = g(3)
or
lim x→ 3 g(x) 6 = 1
since g(3) = 1. So, the negation of the statement
lim x→ 3 g(x) = 1
holds. We will now negate the statement in the limit definition. Remember the limit statement:
for every > 0 there exists a δ > 0 such that [|x − 3 | < δ implies |g(x) − 1 | < ]
Now, we negate this statement step by step. The negation
not [for every > 0 there exists a δ > 0 such that [|x − 3 | < δ implies |g(x) − 1 | < ]]
is
there exists an > 0 such that not [ there exists a δ > 0 such that [|x − 3 | < δ implies |g(x) − 1 | < ]]
negating the for all part. Next comes the negation of the there exist part:
there exists an > 0 such that for all δ > 0 not [|x − 3 | < δ implies |g(x) − 1 | < ]
Note that, the properties > 0 and δ > 0 remain unchanged. Now, we have to negate the implication. Remember that the negation of ”P implies Q” is ”P and (not Q)”. So we get
there exists an > 0 such that for all δ > 0 [|x − 3 | < δ and not [|g(x) − 1 | < ]]
Finally, the negation of a < b is a ≥ b so we finally have
there exists an > 0 such that for all δ > 0 [|x − 3 | < δ and [|g(x) − 1 | ≥ ]]
So, to prove that the limit is not equal to 1, we have to find the that makes this possibe for all δ and exibit at least one x with that property. Here is the complete proof of lim x→ 3 g(x) 6 = 1. As you read it, think about
how we can come up with the and x which work. Let = 1/2. Let δ > 0 be arbitrary.