Logic

From Jonathan Gardner's Physics Notebook
Jump to: navigation, search

Intro

Logic is not really that difficult of a topic. People make it out to be this hard thing, but it's really not.

The problem with logic is not logic. It is people who claim to use it when they don't.

The Statement

In logic, we evaluate statements. Statements are ideas that describe something.

Statements may either be true or false or meaningless. Sometimes we cannot tell whether a statement is true or false or meaningless, but that only says something about our ignorance.

Meaningless statements cannot be true or false. For instance, "This statement is false" is perfectly meaningless.

It's quite common that people ask meaningless questions or offer meaningless statements in Physics. "How much does the speed of light weigh?" is an example.

Propositional Logic

Propositional Logic is simple reasoning.

You start with a set of statements, all of which are assumed to be true. From this, you try to derive new statements, or prove that the statements are inconsistent, meaning, it is not possible to have them all be true.

Logical Expressions

In first-order predicate logic, we consider the simplest kinds of statements and their relation to each other.

Statements are represented with letters, much like in algebra. For instance, "A" could be the statement, "It is cold outside" and "B" could represent the statement, "I should wear a coat."

These statements may relate to each other. For instance, "If it is cold outside, I should wear a coat." This can be reduced to symbols such as:

<math>A \rightarrow B</math>

We'll examine all the symbols below and their meaning.

True, False

The simplest statements are simply:

True (<math>\top</math>), a statement that is always true, no matter the conditions.

False(<math>\bot</math>), a statement that is always false.

not A

The logical statement "not A" means that if A is true, then the statement is false; if A is false, then the statement is true.

<math>\lnot A := \text{false if }A\text{ is true; true if }A\text{ is false.}</math>

A and B

The logical statement "A and B" means that both A and B are true. If either is false, then the entire statement is false.

<math>A \land B := \text{ both }A\text{ and }B\text{ are true.}</math>

A or B

The logical statement "A or B" means that either A or B are true, or perhaps both. If both are false, then the entire statement is false.

<math>A \lor B := \text{ either }A\text{ or }B\text{ are true.}</math>

If A then B

The logical statement "If A then B" means that if A is true, then B must be true. However, if A is false, then B may or may not be true.

<math>A \rightarrow B := (A \land B) \lor \not A</math>

The conditional part is the part on the left side. It is called the Antecedent.

The right side is called the Consequent.

Below, we consider the implications of the "if" statement.

If and only if A, then B.

This often appears as "iff", for instance, "iff A then B". It is still read "if and only if", of course, since no one would be able to tell the difference between "if" and "iff" in spoken language.

The notation is:

<math>A \leftrightarrow B := (A \rightarrow B) \land (B \rightarrow A)</math>

There are many cases where the statement "if A then B" and "if B then A" are both true. This means that if you see either A or B as true, then you know that the other is also true.

The problem with implying the antecedent is that the simple "if A then B" statement is no more than it claims to be, even though many types of statements also imply the reverse. As a mathematician and logician, you have to be extremely careful to prove both "if A then B" and "if B then A" before you can start implying the antecedent without committing a logical fallacy.

Predicate and Functional Symbols

In logical statements, capital letters tend to refer to entire statements (predicate symbols), while lower-case letters refer to functional symbols.

Predicate Symbols are statements unto themselves. Sometimes they require some parameters, such as F(x), not unlike in Algebra.

Functional Symbols refer to some operation, usually a combination of logical operators, or attribute references. They take at least one parameter.

For all x...

The upside-down "A" is read as "for all", and is quite handy. The notation is:

<math>\forall x (B(x))</math>

Note that you need some parameter, and you need some predicate symbol.

It says, simply, that for all values of x in the assumed universe, the statement B(x) is true.

There is some x...

The backwards E is read "there exists some...".

<math>\exists x (B(x))</math>

This says that there is at least one value x such that B(x) is true.

There is no x ...

The backwards E with a line says, "There exists no ... ".

<math>\nexists x (B(x))</math>

This says that for all values of x there is no such value that will make B(x) true.

The "If" Statement

In logic, probably the most difficult and surprising implications are had by a simple "if" statement, <math>A \rightarrow B</math>.

Denying the Consequent

It may surprise you that you can prove that the antecedent is not true simply by showing the consequent is not true. In other words,

<math>A \rightarrow B \land \not B \therefore \not A</math>

The reasoning is quite simple. Suppose A were true. That would mean B would be true. Suppose A were false. That would mean B could be true or false. Since B is false, the former case is not possible, and so A must be false.

Example:

If today is a holiday, I won't go to work. I am going to work. Therefore, today must not be a holiday.

Implying the Antecedent

On the other hand, if the consequent is true, it says nothing about the antecedent. The antecedent could be true or false.

We are often tempted to imply that the antecedent is true because the consequent is true. This is a logical fallacy we must not fall victim to called "implying the antecedent."

Example:

If it is raining, then I will carry an umbrella. I am carrying an umbrella. Therefore, it is raining.

Correlation and Causation

You may have heard of "correlation does not imply causation." Another common logical fallacy is supposing "If A then B" (causation) because you observe both A and B to be true at the same time (correlation).

A good example of this is pretty much any study in medicine or social dynamics. Does eating fatty foods cause arterial hardening? Or do people eat fatty foods because they have hardened arteries? Or is there some cause that causes both? Or do they just happen to occur more frequently together due to randomness in your sample?

"Post hoc ergo propter hoc" is latin for "after, so because of". It is a logical fallacy to assume that since something happens after something else, the latter implies the former. I could claim to an Atheist that my proof in God is because I prayed for healing, therefore I was healed by God because of my prayer. This is not a very good proof, of course, since we all know that many people do not pray for healing and yet are healing, and many people pray for healing but are not. It is a demonstration of "post hoc ergo propter hoc."

And yet, in many instances in our lives, we must assume "post hoc ergo propter hoc." Turn the key in the ignition, hear the engine roar to life. Press a button on the radio, and hear the sound change or the station change. Eat spicy food, have an upset stomach. Smash your hand with a hammer, feel intense pain. If we didn't assume post hoc ergo propter hoc in these cases, we would live ignorantly, wondering how to start our cars, change the radio, or why we feel sick and have sore hands.

The problem of causation is a really difficult one for physicists. Many physicists refuse to even talk about it. We know from special relativity that causation cannot be implied even if we see some event occur before another. Certain classes of events, to another spectator in a different reference frame, would appear to happen in reverse order.

Note that there is a way to establish, very accurately, causation or correlation between two kinds of events in reality. This is not a trivial exercise, and as far as I know, only chemists and engineers approach the same level of rigor as physicists. (Mathematicians don't deal with reality in any way, so they don't have this problem.) All other "lesser" disciplines have no such accuracy.