Mathematical Proof/Logic

As discussed in the introduction, logical statements are different from common English. We will discuss concepts like "or," "and," "if," "only if." (Here I would like to point out that in most mathematical papers it is acceptable to use the term "we" when referring to oneself. This is considered polite by not commanding the audience to do something nor excluding them from the discussion.)

Truth and statement
We encounter frequently in mathematics.

For the sentences that are not statements, there is a special type of sentences among them, namely.

To express all possible combinations of of some statements, we usually list them in a table, called a.

Conjunction, disjunction and negation
In this section, we will discuss some ways (conjunction and disjunction) to combine two statements into one statement, which is analogous to ../Introduction to Set Theory, in which two sets are combined into one set. Also, we will discuss a way (negation) to change a statement to another one.

Negations
To negate a statement, we usually add the word "not" into a statement, or delete it from a statement. For example, the negation of the statement "The number 4 is even." is "The number 4 is even.", and the negation of the statement "The number 1 is not prime." is "The number 1 is not prime."

Conditionals
Apart from the above ways to form a new statement, we also have another very common way, namely the "if-then combination". The statement formed using the "if-then combination" is called a.

To understand more intuitively why the conditional is always true when the hypothesis is false, consider the following example.

Converse and biconditionals
After discussing of $$P$$ and $$Q$$, we will discuss  of $$P$$ and $$Q$$. As suggested by its name, there are conditionals involved. The conditional involved, in addition to $$P\to Q$$, is $$Q\to P$$, which is called the  of the conditional $$P\to Q$$.

In mathematics, given that the conditional $$P\to Q$$ is true, we are often interested in knowing whether its $$Q\to P$$ is true as well.

Implication and logical equivalence
When the conditional $$P\to Q$$ is, we can say "$$P$$ $$Q$$", denoted by $$P\Rightarrow Q$$. On the other hand, when $$P$$ does imply $$Q$$, i.e. $$P\to Q$$ is, we denote this by $$P\nRightarrow Q$$.

We have some other equivalently ways to say "$$P$$ implies $$Q$$", namely
 * $$P$$ is a for $$Q$$ (or $$P$$ is sufficient for $$Q$$ in short)
 * We call $$P$$ to be for $$Q$$ since when $$P$$ implies $$Q$$, then "$$P$$ is true" is  to deduce "$$Q$$ is true".


 * $$Q$$ is a for $$P$$ (or $$Q$$ is necessary for $$P$$ in short)
 * We call $$Q$$ to be for $$P$$ since when $$P$$ implies $$Q$$, the hypothesis cannot be possibly true when the consequent $$Q$$ is false (or else the conditional $$P\to Q$$ will be false). This explains the  of "$$Q$$ is true".

When $$P\Rightarrow Q$$, we are often interested knowing whether the of $$P\to Q$$ is true or not, i.e. whether we have $$Q\Rightarrow P$$ or not.

In the case where $$P\Rightarrow Q$$ but $$Q\nRightarrow P$$, we have multiple equivalent ways to express this:
 * $$P$$ is for $$Q$$.
 * From the previous interpretation, when we say $$P$$ is necessary for $$Q$$, we mean $$Q\Rightarrow P$$. Hence, when $$P$$ is sufficient but not necessary for $$Q$$, we mean $${\color{blue}P\Rightarrow Q}$$ and $${\color{red}Q\nRightarrow P}$$.


 * $$P$$ is a than $$Q$$ (or $$P$$ is  than $$Q$$ in short).

In the case where $$P\Rightarrow Q$$ and $$Q\Rightarrow P$$ as well, the biconditional $$P\leftrightarrow Q$$ is also true, and we denote this by $$P\Leftrightarrow Q$$. There are also multiple equivalent ways to express this:
 * $$P$$ is $$Q$$.
 * We say they are equivalent since they always have the same truth values (because $$P\leftrightarrow Q$$ is true), which is related to.


 * "$$P$$ $$Q$$" (is true).
 * Recall that we also use "$$P$$ if and only if $$Q$$" to express the $$P\leftrightarrow Q$$. Thus, technically, we should write "$$P$$ if and only if $$Q$$" is true in the case where $$P\Leftrightarrow Q$$. However, we rarely write this in practice, and usually omit the phrase "is true" since it makes the expression more complicated. So, when we write "$$P$$ if and only if $$Q$$" in this context, we mean that the biconditional is true without saying it explicitly.
 * Usually, when we just write "$$P$$ if and only if $$Q$$", we have the meaning of the logical equivalence $$P\Leftrightarrow Q$$, rather than the statement $$P\leftrightarrow Q$$. If we really want to have the latter meaning, we should specify that "$$P$$ if and only if $$Q$$" refers to a.


 * $$P$$ is for $$Q$$.
 * Following the previous interpretation, $$P$$ is necessary and sufficient for $$Q$$ means $${\color{blue}Q\Rightarrow P}$$ and $${\color{red}P\Rightarrow Q}$$.

Tautologies and contradictions
Before defining what tautologies and contradictions are, we need to introduce some terms first. In the previous sections, we have discussed the meaning of the symbols $$\sim,\lor,\land,\to$$ and $$\leftrightarrow$$. These symbols are sometimes called , and we can use to make some complicated statements. Such statements, which are composed of at least one given (or component) statements (usually denoted by $$P,Q,R$$ etc.) and at least one logical connective, are called.

Quantifiers
Recall that an is a sentence whose truth values depends on the input of certain variable. In this section, we will discuss a way to change an open statement into a statement, by "restricting the input" using quantifiers, and such statement made is called an quantified statement. For example, consider the statement "The square of each real number is nonnegative.". It can be rephrased as "For each real number $$x$$, $$x^2\ge 0$$." We can let $$P(x)$$ be the "$$x^2\ge 0$$". Then, it can be further rephrased as "For each real number $$x$$, $$P(x)$$." In this case, we can observe how an open statement ($$P(x)$$) is converted to a statement (For each real number $$x$$, $$P(x)$$), and the phrase "for each" is a type of the. Other phrases that are also universal quantifiers include "for every", "for all" and "whenever". The universal quantifier is usually denoted by $$\forall$$ (an inverted "A"). After introducing this notation, the statement we mention can be further rephrased as "$$\forall x\in\mathbb R,x^2\ge 0$$" (we also use some set notations here).

In general, we can use the universal quantifier to change an open statement $$P(x)$$ to a statement, which is "$$\forall x\in S,P(x)$$" in which $$S$$ is a (universal) set (or domain) which restricts the input $$x$$.

Apart from the universal quantifier, another way to convert an open statement into a statement is using an. Each of the phrases "there exists", "there is", "there is at least one", "for some", "for at least one" is referred to as an , and is denoted by $$\exists$$ (an inverted "E"). For example, we can rewrite the statement "The square of some real number is negative." as "$$\exists x\in\mathbb R, x^2 < 0.$$" (which is false).

In general, we can use the existential quantifier to change an open statement $$P(x)$$ to a statement, which is "$$\exists x\in S,P(x)$$" in which $$S$$ is a (universal) set (or domain) which restricts the input $$x$$.

Another quantifier that is related to quantifier is the. Each of the phrases "there exists a unique", "there is exactly one", "for a unique", "for exactly one" is referred to as, which is denoted by $$\exists !$$. For example, we can rewrite the statement "There exists a unique real number $$x$$ such that $$2x=0$$." as "$$\exists !x\in\mathbb R, 2x=0$$." We can express the unique existential quantifier in terms of existential and universal quantifiers, by "$$\exists !x\in S, P(x)$$" as $$\left(\exists x\in S,P(x)\right)\land \left(\forall x_1,x_2\in S,P(x_1)\land P(x_2)\to x_1=x_2\right)$$ where the left bracket is the existence part, and the right bracket is the uniqueness part. In words, the expression means
 * There exists $$x\in S$$ such that $$P(x)$$, AND for every $$x_1,x_2\in S$$, if $$P(x_1)$$ and $$P(x_2)$$, then $$x_1=x_2$$ (i.e., $$x_1$$ and $$x_2$$ are actually referring to the same thing, so there is $$x$$ such that $$P(x)$$).

In general, we need to separate the existence and uniqueness part as above to prove statements involving unique existential quantifier.

Negation of quantified statements
From this example, we can see that the negation of the statement "$$\exists x\in S,P(x)$$" is logically equivalent to "$$\forall x\in S,\sim P(x)$$". Now, it is natural for us to want to know also the negation of the statement "$$\forall x\in S,P(x)$$. Consider this: when it is not the case that $$P(x)$$ is true for each $$x\in S$$, it means that $$P(x)$$ is false for $$x\in S$$. In other words, $$\exists x\in S,\sim P(x)$$. Hence, we know that the negation of the statement "$$\forall x\in S,P(x)$$" is logically equivalent to $$\exists x\in S,\sim P(x)$$.

Quantified statements with more than one quantifier
A quantified statement may contain more than one quantifier. When only one type of quantifier is used in such quantified statement, the situation is simpler. For example, consider the statement "For each real number $$x$$ and for each real number $$y$$, $$xy$$ is a real number." It can be written as "$$\forall x\in\mathbb R,\forall y\in\mathbb R,xy\in\mathbb R$$". When we interchange "$$\forall x\in\mathbb R$$" and "$$\forall y\in\mathbb R$$", the meaning of the statement is not affected (the statement still means "The product of two arbitrary real numbers is a real number.") Because of this, we can simply write the statement as "$$\forall x,y\in\mathbb R,xy\in\mathbb R$$" without any ambiguity.

For an example that involve two existential quantifiers, consider the statement "There exists an real number $$x$$ and an real number $$y$$ such that $$xy$$ is a real number." It can be written as "$$\exists x\in\mathbb R,\exists y\in\mathbb R,xy\in\mathbb R$$." Similarly, interchanging "$$\exists x\in\mathbb R$$" and "$$\exists y\in\mathbb R$$" does not affect the meaning of the statement (the statement still means "For at least one pair of real numbers $$x$$ and $$y$$, $$xy$$ is a real number.") Because of this, we can simply write the statement as "$$\exists x,y\in\mathbb R,xy\in\mathbb R$$" without any ambiguity.

However, when both types of quantifier are used in such quantified statement, things get more complicated. For example, consider the statement "For each integer $$x$$, there exists an integer $$y$$ such that $$y<x$$." This can also be written as "$$\forall x\in\mathbb Z,\exists y\in\mathbb Z, y<x$$". It means that for each integer, we can find a (strictly) smaller one, and we can see that this is a true statement. For instance, if you choose $$x=13$$, I can choose $$y=-99,0$$ or $$12$$. Indeed, for the integer $$x$$ chosen by you, I can always choose my $$y$$ as $$x-1$$ so that $$y<x$$.

Let's see what happen if we interchange "$$\forall x\in\mathbb Z$$" and "$$\exists y\in\mathbb Z$$". The statement becomes $$\exists y\in\mathbb Z,\forall x\in\mathbb Z,y<x$$, meaning that there exists an integer $$y$$ such that it is (strictly) smaller than integer $$x$$! This is false, since, for example, there is no integer that is (strictly) smaller than itself (which is an integer). In this example, we can see that interchanging the positions of universal quantifier and existential quantifier can change the meaning of the statement. Hence, it is very important to understand clearly the meaning of a quantified statement with both universal and existential quantifiers. To ease the understanding, here is a tips for reading such statement:
 * For the variable associated to the quantifier $$\exists$$, it depend on the variable(s) introduced earlier in the statement, but  be independent from the variable(s) introduced later in the statement.

What does it mean? For example, consider the above example. , we have $$\forall x\in\mathbb Z,\exists y\in\mathbb Z,y<x.$$. Then, since the variable $$x$$ appears than the variable $$y$$ which associated to $$\exists$$, $$y$$  on $$x$$ (This is similar to the case in English. In a sentence, a thing may depend on other things mentioned earlier.). For instance, when you choose $$x=13$$, and I choose $$y=12$$. Then, $$y<x$$. However, if you change your choice to $$x=9$$, then my $$y=12$$ does not work, and I need to change my $$y$$ to, say, 8 so that $$y<x$$. Then, we can see that $$y$$ depends on $$x$$ in this case. , we have $$\exists y\in\mathbb Z,\forall x\in Z, y<x$$. In this case, the variable $$x$$ appears than the variable $$y$$. Hence, the variable $$y$$ must be independent from from $$x$$. That is, when such $$y$$ is determined, it needs to satisfy $$y<x$$ for each $$x$$ chosen, and the $$y$$ cannot change depend on what $$x$$ is. Indeed, $$y$$ cannot depend on $$x$$, since $$y$$ is supposed to be determined when $$x$$ is not even introduced!

Exercises
In the following questions, $$P,Q,R,S$$ are statements.

A. Construct the truth tables for each the following statements, and also give its converse and contrapositive: B. Negate the following statements:
 * 1) $$\sim P \to Q $$
 * 2) $$P \to (\sim Q) $$
 * 3) $$(P\lor Q)\to R$$
 * 4) $$(P\land Q)\to (R\lor S)$$
 * 5) $$(R\to S)\to (P\to Q)$$
 * 1) $$ P \land Q$$
 * 2) $$ (P \lor Q)\land (R \land S)$$
 * 3) $$ (P \land \sim Q)\lor (\sim R\lor S)$$