Informal introduction to formal logic

 In mathematics, we must prove (almost) everything and the proofs must be done logically and rigorously. Therefore, we need some understanding of basic logic. Here, I will informally explain some rudimentary formal logic.



Definitions

(Proposition): A proposition is a statement that is either true or false. "True" and "false" are called the truth values, and are often denoted and .

Here is an example. "Dr. Akira teaches at UBD." is a statement that is either true or false (we understand the existence of Dr. Akira and UBD), hence a proposition.

The following statement is also a proposition, although we don't know if it's true or false (yet):

Any even number greater than or equal to 4 is equal to a sum of two primes.

See also: Goldbach's conjecture 

Next, we define several operations on propositions. Note that propositions combined with these operations are again propositions. 

(Conjunction, logical "and"): Let P and Q be propositions. Their conjunction PQ is defined by the following truth table: PQPQ

We "interpret" the conjunction as logical "and," that is, if P and Q are both true, then PQ is true. 

(Disjunction, logical "or"): Let P and Q be propositions. Their conjunction PQ is defined by the following truth table: PQPQ

We "interpret" the conjunction as logical "or," that is, if P or Q is true, then PQ is true. 

(Negation, logical "not"): Let P be a proposition. Its negation is defined by the following truth table: P¬P

We interpret the negation as logical "not," that is, if P is true (false), then ¬P is false (true).

(Implication, "if...then..."): Let P and Q be propositions. The implication PQ is defined by the following truth table: PQPQ

We interpret the implication PQ as "if P then Q" or "P implies "Q." Note in particular that an implication is true if the left-hand side of is false (by the way, the left- and right-hand sides of are called a premise and a conclusion, respectively).

Examples

We can connect propositions with the above operations to make new propositions.

Let us show that ¬(PQ) and (¬P)(¬Q) are equivalent. We say that two propositions are equivalent if their truth tables are identical. First, let's write down the truth table for ¬(PQ): PQPQ¬(PQ) It is often helpful to write down the smaller components of a complicated logical expression, such as PQ, which is a "smaller" component of ¬(PQ). Next, (¬P)(¬Q): PQ¬P¬Q(¬P)(¬Q) By comparing the two tables, we can see that ¬(PQ) and (¬P)(¬Q) are indeed equivalent.

If two propositions P and Q are equivalent, we write
PQ
to denote their equivalence.

Theorem (De Morgan's laws)

Let P and Q be any propositions.
We have ¬(PQ)(¬P)(¬Q),¬(PQ)(¬P)(¬Q).
Proof. Exercise. (See above.) ■

Sometimes, we want propositions to depend on some inputs.

(Predicate) A proposition that depends on variables is called a predicate.

Example: Let P(x) be the predicate that "x is an even integer." Then, P(2)=, P(3.1415)=, P(``elephant'')=, etc.

Example: Let P(x,y) be the predicate that "x<y" (i.e., x is less than y). Then P(1,2)=,P(5,1)=, etc.

Quantifiers

Next, consider the following "proposition":
For all xZ, there exists yZ such that x<y.

(This statement means that, for any integer x, there is (always) another integer y that is greater than x. This is clearly true!)

Here we have quantifiers such as "for all" or "there exists" that restrict the behavour of the variables x and y in the predicate "x<y." We introduce the symbols for these quantifiers. The above proposition can be expressed as 

xZ yZ(x<y).

The symbol "" is called the universal quantifier and is read as "for all..." or "for any..." or "for every...." 

The symbol "" is called the existential quantifier and is read as "there exist(s)..." or "for some..."

The order of appearance of quantifiers matters. That is, the above proposition is different from

yZ xZ(x<y).

The latter reads as "There exists an integer y such that, for every integer x, x<y holds." But this means that there exists the greatest integer y (that is greater than any integers); this is clearly false.

Negation involving quantifiers

Note the following equivalence:
¬(x<y)xy.

This means that "Not that x is less than y" is equivalent to "x is greater than or equal to y." This equivalence is based on the mathematical meaning of < and .

Next, note the following equivalence:

¬(xA(P(x)))xA(¬P(x)).

This means that, if "P(x) holds for all xA" does not hold, then there exists an xA such that P(x) does not hold, and vice versa.

We also have the following equivalence:

¬(xA(P(x)))xA(¬P(x)).

In plain English, if "P(x) holds for some xA" does not hold, it means that "for any xA, P(x) does not hold."

Example: ¬(yZ xZ (x<y))yZ¬(xZ (x<y))yZ xZ (¬(x<y))yZ xZ (xy).

Note that the original proposition "yZ xZ (x<y)" is false, but its negation "yZ xZ (xy)" is indeed true.

Propositions about members of the empty set.

Any propositions (predicates) about members of the empty set are true. For example,

x (x is a fish)

is true. So is

x (x is not a fish).

This is because the proposition that x is always false.


Comments

Popular posts from this blog

Birth process

Branching processes: Mean and variance