Hacker News new | ask | show | jobs
by fmap 4574 days ago
Since you are using the word "constructivism" so often, there is probably some sort of misunderstanding. Constructivism usually refers to the philosophical school of thought which rejects the axiom of excluded middle for fairly dogmatic reasons. Most people who learn about this are appalled, since excluded middle appears to be consistent and useful. In particular, intuitionistic set theory is weird and unintuitive - most people don't bother with it.

This has little to do with the reason for constructive logic in HoTT or any type theory. Models of type theory collapse if you add excluded middle and you cannot interpret the resulting structure in any particularly useful way. Without excluded middle you have more freedom in designing new axioms.

This is the reason why HoTT is constructive: You have a choice between classical logic and univalence. The latter turns out to be more useful.

1 comments

So are you saying that adding the law of excluded middle would make HoTT inconsistent? That does not sound very useful.
You get a choice between univalence and excluded middle. The whole argument is that univalence is more useful in practice.

Briefly, in Martin-Löf type theory equalities are very strong, but you do not have many tools for proving new equalities. Univalence is one answer to this problem. So the choice is roughly between "having more equalities" (univalence) or "making everything decidable" (excluded middle).

Additionally, in HoTT you can embed classical set theory at "h-level 1". Basically, you get a slightly weaker form of excluded middle + choice, which is nevertheless sufficient for building a model of classical ZFC. The reverse is not possible, as far as I know.

In short: I don't get a choice between univalence and excluded middle, I HAVE to choose between univalence and excluded middle. Which is an easy choice for me: I choose excluded middle.
Sorry if I wasn't clear about this, but you can embed classical mathematics in a type theory with univalence. If you look into the HoTT book, there is a chapter on set theory in type theory. The general form of excluded middle is inconsistent, because it would collapse the structures on which univalence is built.

This means that classical mathematics still works as expected, so long as you have the assumption that you are working with things that are "set-like". Additionally you can make any type "set-like", since this amounts to manually collapsing its equality type.

However... the truth is that most of the time excluded middle is unnecessary (in a type theory). Having nice equality types is so much more useful that, honestly, you are not making an informed decision.

Answer to auggierose's comment above: Yes you can prove that sqrt(2) is irrational.

This is actually a great example, because it doesn't need excluded middle. Equality of rational numbers is decidable, which means that classical reasoning is provable. And yes, even if it wasn't, it would still work.

Edit: Ok, this was apparently confusing, so let me repeat it here. Yes, the same proof works. This form of excluded middle is entirely unproblematic.

There might be some confusion. The typical proof of the irrationality of root 2 is phrased as a proof-by-contradiction, and I've come across folk who mistakenly think that this technique is exclusive to classical mathematics.

In fact, the standard proof-by-contradiction that sqrt(2) is irrational is also intuitionistically valid. The important point for this case is that we're proving a negative property (irrationality), so this sort of proof by contradiction is fine.

The standard example of a classical proof I use is the one showing that there exist irrationals x and y such that x^y is rational. The dead easy proof asks whether x^y is rational for x=y=sqrt(2). If it is, we're done. Otherwise, we just take x=sqrt(2)^sqrt(2) and y=sqrt(2).

But note that we don't actually know for sure which x and y work, so this is definitely classical. An intuitionistic proof here would have to tell us directly what x and what y work.

Sigh. It is really hard to get straight answers out of constructivists / type theorists.

So let's say I am writing a theorem proving system based on HoTT (with univalence). Can I then do the classic proof of the irrationality of the square root 2 in that system? Then this would be classical mathematics as I expect it.

Answer to the answer to my comment :-) :

This is exactly the answer I expected. It was a little bit of a trap, I have to admit that.

I didn't ask for any proof of the irrationality of square root 2. I asked specifically for the classic proof. Which I cannot do. So it is not classic mathematics as usual.

An honest answer to this whole thread would have been: "No, you cannot do classical mathematics as you were used too. You have to give stuff up, but I think that you will gain other stuff in exchange, and in my opinion this other stuff is more valuable than the stuff you gave up."