User:Addemf/sandbox/Technical Reasoning/Examples of Logical Problems

One of the most organizing goals of this course is to discuss good reasoning, in many different technical domains.

These domains include mathematics, science, computer science, statistics, and philosophy.

We start by looking at a collection of puzzles which motivate the study of logic and reasoning.

Point 9 Repeating


Many students are told that "0.9 repeating", which we may write as 0.999..., is the same as 1.

Some find it hard to make sense of this intuitively, and a small number of people even are certain that it must be false.

Is this true, and if so, how can we know?

i
Students often also learn about the number, $$i=\sqrt{-1}$$.

Paradoxically, they also hear that it is impossible to take the square-root of a negative number, and that i is "imaginary".

So why do we study i? In what sense does it exist? Are we always free to make up any numbers that we want?

Proofs
You may have learned that, in any triangle, the interior angles sum to 180°.

But why is that?

Here is a proof. Each statement in the proof is numbered, like (1.). This is so that statement numbers can be referenced later, if we ever need to talk about specific parts of the proof.

(Note that the following uses some facts from geometry. If any of the geometry facts are unfamiliar to you, then don't worry.  This proof is merely meant to demonstrate how geometry proofs "look", and will be used to motivate how we describe and structure proofs later on.  But it is not important that the reader understands every little thing about this particular example.)

Theorem: The sum of the internal angles of any triangle is 180°.

(1.) Let $$\Delta ABC$$ be any triangle. 



(2.) Consider the line through vertices A and B, call this m.

Reason: Through any two points is a line.

(3.) There is a line through vertex C which is parallel to m. Call this line $$\ell$$.

Reason: For any point P and line n which does not contain the point, there is a line through P, and which is parallel to n.



(4.) $$\ell$$ now forms new angles at vertex C. Call the angle on the same side as A, the angle $$\angle \alpha$$. Call the angle on the same side as B, the angle $$\angle \beta$$.

(5.) $$\angle A$$ and $$\angle \alpha$$ are alternate interior angles, for the lines $$\ell$$ and m.

Reason: For lines $$\ell$$ and m, the line $$\overleftrightarrow{AC}$$ is a transversal between them. $$\angle A$$ is on one side of the transversal and $$\angle \alpha$$ is on the other.

(6.) Therefore the measure of these angles is the same, $$m\angle A = m\angle \alpha$$.

Reason: Alternate interior angles of parallel lines are always congruent.

(7.) $$\angle B$$ and $$\angle \beta$$ are alternate interiors for $$\ell$$ and m, therefore $$m\angle B=m\angle \beta$$.

Reason: Similar to statements (5.) and (6.).

(8.) Therefore
 * $$m\angle A+m\angle B+m\angle C = m\angle \alpha+m\angle \beta+m\angle C$$

Reason: Substitution of equal quantities, $$m\angle A = m\angle \alpha$$, and $$m\angle B= m\angle \beta$$. Established in lines (6.) and (7.).

(9.) But $$m\angle \alpha+m\angle\beta+m\angle C = 180^\circ$$.

Reason: The total angle measure on one side of a line is 180°.

(10.) Therefore $$m\angle A+m\angle B+m\angle C = 180^\circ$$.

Reason: Equations from (8.) and (9.).

Now you may be thinking "That's so cool!" And you would be absolutely right.

But notice that some of these statements have reasons, like "through any two points there is a line" or "for a point and line there is a parallel line through the point". Of course, for a proof to be rigorous we might wonder why those are true.

But this gets into a problem. At some point we have to stop giving reasons for reasons, and reasons for reasons for reasons. Because if we don't, then we would require an "infinite regress" of reasons!

We must accept some sentences without reasons, in order to avoid this infinite regress. Such sentences are called "axioms".

However, that now provokes the question "Which sentences do we accept as axioms?" And "How do we choose which sentences to accept as axioms?"

Arguments
Even very simple arguments, when you take them apart and try to understand how the principles of logic work, are often very complex.

Therefore, at least to begin with, we will start with some "toy" over-simplified arguments.

Morality
The argument below is only presented as an over-simplified example, in order to give us a good starting place. Conclusion: Abortion is always wrong.

Argument:

(1.) It is always wrong to kill an innocent person.

(2.) A fetus is always an innocent person.

(3.) Therefore it is always wrong to kill a fetus.

I won't try to say whether the argument is right or wrong.

But there are two importantly different kinds of "right" and "wrong" when it comes to arguments. We will distinguish these below.



The Premises May Be Wrong
The argument may make some factual mistakes. For example (1.) may be false, because there may be cases in which it is not wrong to kill an innocent person.

Consider "the trolley problem", in which a train is rolling down a track, with a fork in the track. Further down one of the two branching tracks, four people are tied up and will be killed if the train continues on its path. On the other track, just one person is tied up.

The tracks have a switch which can direct the train onto the second track, which would save the four people but kill the one person.

Is this a situation in which it is not wrong to kill one innocent person?

We will not try to adjudicate this question in this course, but the point is to see that premise (1.) in the abortion argument is at least debatable. Therefore, on this point, the argument may have made a mistake because it is not always wrong to kill an innocent person.

Premise (2.) likewise can be argued against, and therefore again the argument may have a factual mistake here. The philosophical questions here are, I think, so apparent that I won't spend time detailing them.

Validity Versus Soundness, Math Versus Science
However, notice that the problems with points (1.) and (2.) might be regarded as "factual" mistakes. The argument assumes these as premises, but they may in fact be false.

But the argument makes no "logical" mistakes! By a "logical mistake", we mean a mistake in how you handle and work with the given information or facts.

If we accept the premises of the argument, then the conclusion does in fact follow from the premises. This means that the argument is "valid".

You might say, "How can it be a valid argument if its premises are wrong?" Keep in mind that the meaning of the word "valid" that a lot of people use in daily life is not very well-defined. Very often, people assume that "valid" means something like "right" or "good" or "you should accept it".

But this is not the technical definition of the term, because such definitions are not sufficiently precise. Therefore logicians distinguish "valid" arguments from "sound" arguments.

A valid argument is one which makes no logical mistakes, but it may still make factual mistakes. This means that the premises may be false, but if you accept the premises then the conclusion must follow.

A sound argument is one which is valid, but also makes no factual mistakes. That is to say, a sound argument is one which makes no mistakes at all.

Logic is exclusively concerned with the study of argument validity. That might seem somewhat underwhelming, since what we really care about is sound arguments. However, you can view this as a kind of division of labor.

Science is concerned with what is true. The job of science is, in a way, to get the facts right.

Logic and mathematics are concerned with validity, which is the job of using given facts to reach new conclusions.

Science
There is a kind of division of labor between math and science, as described above. However, this division is not very clean.

It is not as if scientists are doing nothing but making a bunch of observations, getting all the bare and basic "facts", without any thinking or reasoning.

Scientists need math and logic in order to arrive at their conclusions.

As a case-study, consider the following scientific argument.

Conclusion: The earth is stationary and the sun orbits the earth.

(1.) We see the sun rise in the east and set in the west.

(2.) Therefore the earth must be at the center of the orbit of the sun.

(3.) Besides, if the earth were moving, we should feel that motion in the same way that you can feel it when you are spinning on an axis.

(4.) Because we do not feel ourselves moving, we cannot be on a moving earth.

Then consider this counter-argument.

Conclusion: The sun is stationary and the earth rotates on an axis.

(1.) If the earth revolved on an axis then it would appear as if the sun were rising and setting.

(2.) Therefore the apparent motion of the sun is no evidence for the motion of the sun, because it would appear the same if the sun were rotating or if the earth were revolving.

(3.) Also, we do not feel the motion of the earth because of how large the earth is. A large radius of motion would cause a very small acceleration, and if the radius is large enough then the acceleration would be so small that we couldn't even notice it.

(4.) Also, gravity causes its own acceleration, which is large enough for us to clearly notice it. This effect may overwhelm the small effect of a rotating earth so much, that it is impossible to detect the acceleration from a rotating earth.

These kinds of arguments are noticeably different from the mathematical and philosophical examples.

Physics arguments are much messier. The general rules, by which physicists make inferences, are much less clear.

That is perhaps very striking! We often think of physics as very precise and clear.

Physics is more precise than other fields of study. However, mathematical reasoning alone is not enough to analyze physics arguments.

Instead, for science, we need a logic of empiricism, which we discuss toward the end of the course. Probability and statistics will feature heavily in this analysis.

Program Verification
A much less philosophical and more "industrial" application of the ideas of logic, are in the study of computer programs.

In particular, it is important to know that a given computer program "does what we say it does". This has become quite hard in practice. Computer programs have grown to thousands of lines of code or more, sometimes written by teams of people, and sometimes even written by loose communities of open-source contributors!

There has to be a significant amount of testing and confirmation that a program is "correct", to make sure that all of the pieces (i) work, and (ii) interact with each other in the intended ways.

There are a few different ways that one can test. One of the most basic ways to print certain software objects to a console, or log file, to see what the program is doing at any given state of the run of the program.

However, for large and complex programs, there are a lot of reasons why this fails.

At this introductory stage I won't go into too much detail about that. But an important fix for this problem, is the ability to give "proofs of correctness" for algorithms.

That is to say, in exactly the same way that mathematicians give geometric proofs like the one that we saw earlier, it is possible to give a proof that a computer algorithm performs a given task.