In short, there are two different logical principles, and ordinary mathematicians call both of them proof by contradiction. However, constructivist (aka intuitionist) mathematicians make a distinction between them: they "believe in" proof of negation, but not in proof by contradiction.
A lot of work has been done about formalizing mathematics in constructive logic. One big component of this is figuring out which uses of proof by contradiction are avoidable, and which one are essential (in the latter case the theorem statement has to be weakened for the constructive version). But this is all about proof by contradiction in the narrow sense. The usual proof about the irrationality of √2 is valid constructively.
The really fascinating thing is that the distinction between ¬¬x and x actually parallels the distinction between proof by contradiction and normal proofs. That is, if you have any classical proof of x, you have a constructive proof of ¬¬x.
The way I like to think of it is that, in constructive logic, both x and ¬¬x represent evidence for x—it's just that ¬¬x is weaker. You can still derive all the results you want, you simply have to be more explicit about whether you have constructive evidence or not.
What is the justification for not believing that from a double negation of A follows A is a valid inference?
I took formal systems in university some years ago and remember something about different axiom systems and how one school of thought rejected one particular rule of inference but was this the one?
I am trying to think of a world where this rule is not valid and not succeeding.
The simplest intuition is to exchange "truth" as the airy concept of "is valid/reflects the world" with "I possess tangible evidence to the case".
So, "2 + 2" is true because I can generate tangible evidence of it, but "the Collatz conjecture" is not true because I cannot. It's also not false. To be "false" I'd have to have tangible evidence of "the Collatz conjecture is false", a counterexample. This "I lack evidence" as neither truth nor falsehood is the characteristic of intuitionistic/constructive logic that makes it so interesting.
To be clear, there is now an element of time involved. Or, as others have stated, constructive logic reflects the "communicative nature" of proof. What I should have said a second ago is "The Collatz conjecture is not true (for me) (right now) (because I personally don't happen to have evidence for its validity yet)". If you had a (valid) proof it'd be true for you and once you communicated that proof to me it'd be true for me.
So in the case of rejecting "not not P => P", it's merely a statement of the fact that "not (not P)" failing to actually generate any evidence for "P", it merely shows that there isn't "not evidence". If you live in a world where things must be true or false (e.g., excluded middle holds) then this is sufficient, but if you demand I show you why "P" holds, then "not (not P)" is unsatisfactory.
It may be slightly easier to work through it for the formula ¬¬¬P ⇒ ¬P. (This also a constructive tautology, and the above formula is an instance of it, taking P = ¬ϕ). So let's prove that.
Expanding the definition of ¬, we must prove (((P⇒False)⇒False)⇒False)⇒P⇒False. I.e. we are given two assumptions
f : ((P⇒False)⇒False)⇒False
x : P
and should prove False. So we can use the assumption f, provided we can find an argument of type ((P⇒False)⇒False) to call it with. And in fact that's easy: (λg. g x). The full proof term is λf.λx. f (λg. g x)
Indeed, this is a perfectly good function (so it's constructive). If we type that function into (say) a Haskell repl, the typechecker will infer an even more general type for it, but we can check that the type we wanted is an instance:
ghci> :type (\f x -> f (\g -> g x))
(\f x -> f (\g -> g x)) :: (((t2->t1)->t1)->t) -> t2 -> t
gchi> type Not a = (a -> False)
ghci> :type (\f x -> f (\g -> g x)) :: (Not (Not (Not p)))->Not p
(\f x -> f (\g -> g x)) :: (Not (Not (Not p))) -> Not p
It just follows from the axioms. They accept that a proof of ¬ p can be a proof that takes p and arrives to a contradiction. And that a contradiction is a formula and its negation. From that we can prove ¬¬¬¬p => ¬¬p.
We can assume ¬p and we have to prove a contradiction.
So we have to prove: ¬¬¬¬p, ¬p => _|_
Now, we know* that alpha => ¬¬alpha.
So from ¬p, we can get ¬¬¬p.
And from ¬(¬¬¬p) and (¬¬¬p) we arrive to _|_.
*To prove alpha => ¬¬alpha, we can assume ¬alpha and arrive at a contradiction, so we would have to rpove alpha, ¬alpha => _|_ and we are done.
This has been generalized to translate classical theorems into constructive theorems.[1] Just like this case, though, the resulting theorems are full of double negations.
I'm not sure "try not to use [proof by contradiction] unless you really need it" is the optimal conclusion. In "Meta Math"[1], Gregory Chaitin explores the question: "What makes a mathematical concept desirable?"
Simplicity was the solution. The best theorems seem obvious in retrospect, because they are reduced into relationships between existing concepts.
I would recommend trying all angles of attack when searching for a proof. If it starts to take too long or you hit a dead end, try a different angle. Even if you discover a proof, try your other opening moves, look for a more elegant solution.
I believe Wolfram Alpha converges on this solution by performing some sort of weighted, breadth-first search on the permutations of an equation.
I highly recommend "Meta Math"[1] if you are interested in theories about entropy and algorithms that generate proofs.
> I'm not sure "try not to use [proof by contradiction] unless you really need it" is the optimal conclusion.
Oh, that's only a guideline for presenting your proves. Not for coming up with them in the first place. Mathematicians do exactly what you are suggesting already.
The first prove one finds is usually quite ugly, and then comes the simplification. Writers call it editing, programmers refactoring.
All difficult conjectures should be proved by reductio ad
absurdum arguments. For if the proof is long and complicated
enough you are bound to make a mistake somewhere and hence a
contradiction will inevitably appear, and so the truth of the
original conjecture is established QED.
I don't like the conclusion that students should avoid proving by contradiction unless they really need it.
I almost always start with contradiction as my initial method of choice when taking exams because you don't always have time to completely rewrite your proofs. Contradiction helps with this since it naturally encompasses proving by contrapositive also. Because if you're trying to prove that p->q, you can assume p and ~q and getting to ~p is a contradiction since p^~p (and this is the same structure as a proof by contrapositive if you got to this line without assuming p). And of course if you find any other absurdities along the way sooner, you're done quicker.
This is nice because a proof by contrapositive is more or less equivalent to a direct proof. So simply by always starting with proof by contradiction, you cover the cases where the theorem:
- is simple enough for you to find out exactly why it's true (direct proof hidden in the contrapositive).
- is complex and wide reaching enough for you to hit an absurdity quickly
>In which case, perhaps the advice that I give to students — proof by contradiction is a very useful tool, but try not to use it unless you really need it — is, though not completely precise, about the best one can do.
Pretty unrelated, but proof by contradiction has been really useful for me in real life. It gives you a way to look at logical facts, and remove many axioms, because it relies on empirical evidence and a set of assumptions that you are trying to invalidate.
In that way, it avoids issues with deducing things from a set of pre-prescribed beliefs. In fact, it fights against them.
My intuition – proof by contradiction means we have to use one step that inverts the set of values for which the statement is true – so whether we need a contradiction step depends on the cardinality of this truth set. Perhaps it depends on the relationship between the ‘truth set’ of our premises and our conclusions (e.g. the square root of 2 is one number, but all of the rationals is infinite)
Supporting this intuition, getting rid of proof by contradiction leaves us unable to construct uncountable sets. Maybe some proofs need several contradiction steps (i.e., when their truth set cardinality is aleph-2,3, etc.)
When both X and Not X lead to contradictions, we have a paradox.
But what if Not X leads to a contradiction and we can't seem to find a contradiction when we assume X, but we aren't sure there isn't one? Have we proven X by contradiction, or is it really a paradox and there is some nonsensical operation somewhere?
In that case, you have proven X by contradiction. If you're rigorous enough, you can rule out the 3rd option. As wondering if you're in a situation where your axioms are inconsistent, well that's actually the world mathematics lives in. Godel's Incompleteness Theorems show that, besides some weak axiom systems, the only systems of axioms that can prove they are consistent are the ones that are inconsistent. So we can only tell when systems are inconsistent, never when they are consistent. You just kinda hope it's not all inconsistent.
All rational numbers have the property that their square is not 2. (Should be a simple proof by induction on the denominator.) The square root of two does not have that property, and is therefore not rational.
Is the contradiction hiding in my implied definition, my implied induction proof, somewhere else?
I've got something much simpler than what I was thinking not involving induction, so I'll give that instead.
Assume n,m,x integer, and n^2/m^2=x. I claim x!=2. Proof: Write out both n and m's prime factorizations. Their squares' prime factorizations each contain an even number of all primes (zero is even). Therefore, for every prime, x's prime factorization contains an even number of it as well. Therefore x is not 2.
But that's not the proof I used. My proof was positive.
They may be equivalent, but not if we count proof by contradiction as special.
In response to edit: No, it doesn't. Having proven that x contains an even number of 2s as factors, it follows that x is not two. 2 does not have an even number of 2s as factors, x does, therefore they are different. No contradiction required.
I can't see the difference between your proof and the given one, except that you didn't write yours out with the same degree of formality. If you wrote your proof using only applied axioms and theorems, it would be essentially identical.
The key point here is that you are partitioning the possibilities in a binary fashion: either x has even number of prime factors or it does not. You've shown that it must not have an even number of prime factors. You haven't shown that it isn't 2. You implied that if it were true, that would contradict what you have shown.
How you go from "X has an even number of prime factors" to "X can't be 2" is important.
Take two cases. One where x has no factors of two, and one here it has at least 2. In the first case, x is not divisible by 2, while 2 is divisible by 2, therefore x is not 2. In the second case, x is divisible by 4, while 2 is not, therefore x is not 2.
You're right that they are "essentially" the same proof, but excluding contradictions is weird, a bit like excluding the letter e. Rephrasing a proof to not use it may be possible in some cases.
This is where you are implicitly employing proof by contradiction. Why do you take two cases and not three? Or four? What assumption allows you to restrict your conclusions like that?
Probably the Law of the Excluded Middle: (P or ~P). (This is equivalent to ~~p = p.)
Once you assume or derive either of those, you have validated proof by contradiction.
I proved that x has an even number of factors of 2. Why can't I then split that into scenarios when that even number is 0, and cases where it isn't? I don't see any restrictions here.
Let's imagine I had shown that something was either one or two. You seem to be claiming I could not take positive proofs assuming each of them and turn it into a full proof.
>Let's imagine I had shown that something was either one or two. You seem to be claiming I could not take positive proofs assuming each of them and turn it into a full proof.
When you break it down to the logical axioms, you can't use cases like that. Try it yourself. You get something like this:
Let A: (k > 0)
B: (k = 0)
k is a whole number, therefore A v B.
A -> X !=2
B -> X !=2
Okay, from here, you need to deduce X != 2. Traditionally we do this by applying proof by cases, but as I showed in my other comment, this requires the law of the excluded middle.
I don't see any other propositional logic axioms we can apply to achieve the same result.
If you are rigorous in your expansion of "it follows that x is not two", you will find your contradiction.
Here is a more rigorous form of what you've said there:
Let X be an integer with a prime factorization in the form 2^(2k) * p_1 * p_2 ... * p_n where k is a positive integer and p_i for any i is a prime not equal to 2.
Proposition: X is not 2
Proof:
Assume X is 2.
The prime factorization of X is:
X = 2
By the definition of X, we have:
2 = 2^(2k) * p_1 * p_2 ... * p_n
Since we defined k to be a positive integer, we have
min(2^(2k)) = 2^(2(min(k)) = 2^(2*1) = 4
So we have:
2^(2k) >= 4
So we have:
2^(2k) > 2
Since p_i for all i are all positive integers, we have:
2 < 2^(2k) * p_1 * p_2 ... * p_n
So we have:
2 != 2^(2k) * p_1 * p_2 ... * p_n
Thus:
2 != X
And we have arrived at a contradiction.
Consider k. Either it is 0, or greater. Consider 0. In that case, X is not divisible by 2, hence cannot be 2.
Now consider k positive. (My original proof didn't show k wa positive, so I needed to deal seperately.)
Use your proof to show that 2^(2k) > 2, and then 2!=X. As far as I can tell you never actually used the assumption that 2=x, so that can be deleted from the proof and it remains valid.
I think "Proof by cases" uses proof by contradiction. You're proving that given A -> C and !A -> C, then C, which requires the axiom A v !A, i.e. proof by contradiction. In your proof, you've proven k=0 -> X != 2, and k > 0 -> X !=2, but it doesn't follow that X != 2 without contradiction.
I especially liked the discussion under Example 1 about reformulating "negative" sentences into "positive" sentences.
The briefest amount of work in mathematical deduction or symbolic logic will cause you to raise an eyebrow whenever anyone insists "you can't prove a negative."
Every negative statement has a positive formulation buried within it. Or, no negative statement exists that lacks a positive formulation, and vice versa.
And then you have linear logic (which is to constructive logic what constructive logic is to classical logic), with its two kinds of conjunctions and two kinds of disjunctions, one of which is difficult to understand but does have excluded middle again.
Empirical sciences are based upon this, you can only prove theories to be false and you do that by demonstrating a contradiction regarding its predictions and the observations.
In short, there are two different logical principles, and ordinary mathematicians call both of them proof by contradiction. However, constructivist (aka intuitionist) mathematicians make a distinction between them: they "believe in" proof of negation, but not in proof by contradiction.
A lot of work has been done about formalizing mathematics in constructive logic. One big component of this is figuring out which uses of proof by contradiction are avoidable, and which one are essential (in the latter case the theorem statement has to be weakened for the constructive version). But this is all about proof by contradiction in the narrow sense. The usual proof about the irrationality of √2 is valid constructively.