Logic

From Jonathan Gardner's Physics Notebook
Revision as of 17:40, 8 May 2012 by Jgardner (talk | contribs) (The Statement)
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.

You may have heard, "The consequent does not imply the antecedent". It arises when you examine <math>A \rightarrow B</math>, see that B is true, and then come to believe that A is true. This is simply not the case. It is a logical fallacy to assume so.

A good example of this is the simple statements "If it is raining, then I will carry an umbrella," and "I am carrying an umbrella." Does that mean it is raining? Of course not.

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). When you observe two things at the same time, then you can only observe that you saw two things at the same time, not that either implies either. A good example of this is seeing that it is raining, seeing that I carry an umbrella, and implying "If it rains, then you carry an umbrella." You can no more assert that based on your observations than "If you carry an umbrella, then it rains."

"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.

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.