Proof of negation and proof by contradiction (2010)
math.andrej.com
math.andrej.com
To prove ¬ϕ, assume ϕ and derive absurdity.
and
To prove ϕ, assume ¬ϕ and derive absurdity.
It just seems exactly the same, given that ¬¬ϕ = ϕ.
"Yes indeed, but the cancellation of double negation is precisely the reasoning principle we are trying to get."
You have to go to a very very deep level of maths if this is what you want to get.
It's not a deep level at all.
Consider the intermediate value theorem. The normal proof is by contradiction. However, it doesn't tell you anything about where the intermediate value is reached. One can constructively proof the theorem by bisection. This proof has the added benefit of showing you how to compute where the intermediate value is reached. Or rather, it shows that you can compute the intermediate value.
Meanwhile, the proof by contradiction doesn't tell us if we can ever compute where the intermediate value is reached. Having made the switch to CS from maths, it has struck me how useless some theorems proven by contradiction are.
You can view the issue as viewing math as truth finding in a world of platonic ideals, or math as a the study of computation.
In cases where the set of all possible examples is finite, I can see this trick working. Maybe a similar approach still works when all possible examples are enumerable or even recursively enumerable.
None of these hold for the intermediate value theorem on the real number line though.
You could case the joint, figure out the guards and the employees, their schedules, their uniforms, the jewels on display, the layout of the place, and so on. You can make a plan, an appropriate scenario, disguises, make a copy of keys, some costume jewelry, some fake uniforms. Really know the place inside and out, Oceans-11 the whole thing. And if you do it right, you can make it out with the jewels before anyone even knows they were stolen.
Or you can get some masks and some baseball bats, steal a semi truck, and drive it through the front window of the jewelry store. If the jewel cases aren't open from the impact, or if someone gets in your way, well, refer back to the baseball bats.
Both accomplish what you set out to do, but the first is clearly more elegant and often takes more work and study, requiring/granting a greater understanding of the system. And future thieves would learn a lot more studying Danny Ocean than they would Johnny Smash-and-Grab.
One way this difference shows itself is in proofs of existence: rather than just demonstrating that something exists (by virtue of it not-not-existing), you have to create an example of it. This is similar to a program, where you cannot demonstrate that 2+2 has some value and then print "4"; instead you have to calculate 4 before you can print it.
Another weird place it shows up[4] is in Prolog, which uses classical first order logic by the closed-world assumption[5]: anything you cannot prove is false.
[1] https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...
[2] https://en.wikipedia.org/wiki/Intuitionistic_logic
[3] https://en.wikipedia.org/wiki/Natural_deduction
[4] At least I thought so, one morning in the shower.
On the other hand, there have been many mathematical papers written there this distinction was key. It all depends upon your topic, really, and how many times you have to invoke the hobgoblins of mathematical foundations.
int a = 5;
a = !!a;
printf("%i", a); // -> 1
my handwavy approach, negation is either information preserving, or not. If operations destroy data, you have to be extra careful. I think classical logic runs into some subtlety switching from reals to integers and back to reals - how are you rounding or truncating those values?Information erasure is a handy thing to keep track of.
All facts are either true or false.
Gödel of course blew this idea up quite elegantly, but the thrust of the idea is encoded directly into classical logic: (P \/ not P) is saying exactly that.
Intuitionistic logic is a development of constructive logic which takes seriously the idea that many statements are at least presently unknown and possibly unknowble. Taking this very seriously we find that we cannot even use three-valued logic like "True | False | Uncertain", but instead require a logical valuation with infinitely many states.
In practice, it's super convenient to use classical logic. You can use proof by contradiction, e.g. On the other hand, you have to deal with some idealogical uneasiness when you think really hard about graphs, real numbers, or the Axiom of Choice. In practice, we cannot imagine the world bereft of some of the theorems which require these uneasy choices. Simultaneously, AoC, for instance, allows bizarre obviously alien results like Banach-Tarski.
Constructive logics and especially intuitionistic logics are an attempt to get past this and use a language which has the same force without the aliens and misfits. Unfortunately, the result is something that is more complex to wield.
The point behind it is to only use 'constructive' proofs. Or rather, to avoid proofs that show a counter-example is impossible.
1. A proposition is the name of a set/type whose elements are proofs of the proposition.
2. A proposition is provable if its set/type is nonempty/inhabited.
3. Implication can be modeled as a function space X → Y. There is some restriction on the kinds of functions allowed, but "continuous" seems to be kind of the idea, in particular only compositions of known continuous functions.
4. The set for "contradiction" is ⊥, which ought to be empty.
5. For negation, we take ¬ϕ to mean ϕ → ⊥, that is, with the truth of ϕ we may construct a contradiction.
6. It is not hard to prove that ϕ → ¬¬ϕ, which is ϕ → ((ϕ → ⊥) → ⊥). In fact, rewriting this as ϕ → (ϕ → ⊥) → ⊥, we can just use "flip ($)" in Haskell, so to speak.
7. But, ¬¬ϕ → ϕ can't be proved directly. The double negation (ϕ → ⊥) → ⊥ as a function space is empty if ϕ is false and has exactly one element if ϕ is provable, so ¬¬ϕ → ϕ would mean that if ϕ is not false then one could obtain one of the proofs of ϕ. You can prove ¬¬(¬¬ϕ → ϕ) directly, though. ("It is not false that ϕ follows from ϕ being not false.")
7.5. I personally find that it is easier to think of ⊥ as an indeterminate set you don't know the elements of rather than just assuming it is empty, for the purpose of understanding the function space interpretation of implication.
8. If you care about classical logic, you can prove that double negation is a monad. It actually turns out that ¬¬¬¬ϕ → ¬¬ϕ, so you only ever need to have a single level of double negation. Double negation from the point of view of function spaces takes empty/nonempty sets to empty/singleton sets.
Here's an answer to why stress the difference: sometimes you want to know if the best you can say about a proposition is that it isn't false. That way, you know whether its proof suggests an algorithm for calculating whatever the theorem was about. But if you don't care about the difference, then you can stay inside the double negation monad to get classical logic.
I'm not sure how this information is supposed to help you, but I hope it improves your life somehow.
https://en.wikipedia.org/wiki/Brouwer%E2%80%93Heyting%E2%80%...
http://math.andrej.com/2016/10/10/five-stages-of-accepting-c...
Why would you care about this?
Simplifying a bit, in a constructive proof, every existential statement ∃x.ϕ comes with a witness c such that ϕ is true when x is replaced by c. Likewise, in a logical disjunction ϕ \/ Ψ comes with information whether ϕ is true or Ψ.
If your proof is not constructive, you may not be able to get this information from the proof. In other words, a constructive proof is nicer than a non-constructive proof.
OTOH, non-constructive proofs tend to be easier to find, indeed some theorems have only non-constructive proofs. Moreover, non-constructive can sometimes be shorter than constructive proofs of the same statement.
For instance, the continuum hypothesis: unproven and still controversial. We can state it in whatever ambient logic, say ZFC, you like, but then it's independent. It therefore flies directly in the face of LEM. We have to work metamathematically to even survive such a blow (as Gödel already began the trend of, ruining Hilbert's Formalist hopes).
As it turns out, we're generally quite fine exploring the consequences of logical systems even when they're flawed. It's still interesting, pays the bills, and is generally helpful. Some things might be shown "false" by some stickler's particulars of what truth means while others need modification to satisfy everyone, but we're still doing the right things "usually".
But it's still a really good question Hilbert posed: what is the ultimate underlying language that we're using to discuss and drive the mechanism of mathematics? For that, you really have to look critically at things like LEM.