Logic

From Jonathan Gardner's Physics Notebook
Revision as of 17:41, 8 May 2012 by Jgardner (talk | contribs) (If A then B)
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.