Hacker News new | ask | show | jobs
by ek 4574 days ago
To be clear, constructive mathematics are new to me as well. The section in the introduction titled "Constructivity" may help you -- it is about trying to come to grips with the constructive nature of type theory. The short answer is that much of the mathematics that we might want to do does not require the law of the excluded middle or the axiom of choice at all when approached from a type-theoretic point of view. Higher inductive types eliminate the reliance classical logic will frequently have on either of these. To quote an example from this section, "In set-theoretic foundations, the statement 'every fully faithful and essentially surjective functor is an equivalence of categories' is equivalent to the axiom of choice. But with the univalence axiom, it is just true; see Chapter 9."

The emphasis that you are placing on the fact that type theory happens to be a constructive logic is perhaps causing you to miss the point. Homotopy type theory is not about advocating constructivism. The "big idea" is that HoTT is a foundation that computers can already reason about easily, based on the work that has already been invested into developing sufficiently powerful dependently typed languages (Coq, Agda). Because it is possible to formulate set theory, category theory, and even real numbers (all discussed in part 2 of the book) within the framework of homotopy type theory, it should be possible to extend these formulations to encompass more and more results from the rest of the mathematics. Because HoTT has already been shown to be implementable (in the form of a library for Coq), this means that any math that is done informally under homotopy type theory can be carried directly into a formal, machine-checkable series of theorems and proofs, in the form of a Coq development.

To expect this material to be readable and useful to every average Joe right away is asking far too much of any new idea in mathematics. This is cutting edge research, and there is still too much even the people closest to this material don't understand yet. As another comment on yours alluded to, at one time your equivalent in the 1700s would have written off calculus as indecipherable and judged it not likely to succeed as a result.

3 comments

The original article is about a potential mathematical revolution, where computer verified proof has gone mainstream. The stuff about using weaker axiom systems, or getting theorems without needing AC is interesting, but I'd argue it is not so relevant. More important are things like this:

"The thing that’s so remarkable about this new foundation is that the fundamental concepts are much closer to where ordinary mathematicians do their work. In the usual foundation, Zermelo-Frankel set theory, it takes an enormous amount of work just to build up the basic concepts and theorems that mathematicians rely on every day. The result is that if you want a computer to check your proofs, you have to teach it all that theory first. Essentially, you have to give it the same education you got — except that you have to do it in a far more exacting way. As a result, the only people so far who have used computer proof systems are computer scientists who specialize in it, and it takes them many years of effort to check a single new theorem. Georges Gonthier, for example, spent a decade checking the four-color theorem.

But this approach circumvents all that labor. Not only that, but the language the computer understands is far closer to natural mathematical language."

I should point out that the Four-Colour Theorem was formalised in Coq, not a ZF-based proof assistant. But that aside, these are pretty big claims. I'd like to hear what sort of basic theory is being talked about, and how the proofs are closer to natural language. On the stackexchange thread, ek comments:

"Anyone who has used Coq will tell you that the proofs that you produce often don't end up looking much like equivalent plain-English proofs at all."

But this doesn't strike me as fair. I'm a HOL Light user, and the de facto proof style is procedural. In that style, which I understand is preferred also in Coq, the user tells the machine how to compose an assortment of automated tools to break down and solve the problem, often performing computations to massage the goal into a suitable form. The scripts are usually completely unreadable, but that's by design. Those who want a more readable style of formalised proof are encouraged to use "declarative styles".

How do the claims made about HoTT's readability factor in here?

>But this doesn't strike me as fair. I'm a HOL Light user, and the de facto proof style is procedural. In that style, which I understand is preferred also in Coq, the user tells the machine how to compose an assortment of automated tools to break down and solve the problem, often performing computations to massage the goal into a suitable form. The scripts are usually completely unreadable, but that's by design. Those who want a more readable style of formalised proof are encouraged to use "declarative styles".

It's possible to create readable coq scripts. However, like with any kind of programming it takes effort. If you take a look at the proof of four colors theorem of fiet thompson they are quite readable and don't look like complete mess. They, however, use modified coq instead which is called ssreflect.

Your comments in this thread have really piqued my interest enough to read some of this HoTT. I'd heard of this a couple of years back and didn't have the energy for it at the time.

Some years ago I spent a serious amount of time reading topos theory, particularly local set theory, as given by the Mitchell-Benabou internal language of any topos, looking for a better approach to description logics.

I do believe topos theory provides a better foundations than set theory because the logic is inherently intuitionistic. I found it also provided a simpler explanation of independence results. However one of the things I believe is true of the proof theory is that there is no cut-elimination theorem, which is important to establish a sub-formula property.

Sorry to ramble here, let me ask specifically, are there connections between HoTT and topos theory? Or geometric logic? Your earlier comment on the synthetic nature made me think there might be.

Thank you

Edit: I more or less answered my own question by reading the introduction, the section on open problems, the possible connections are between HoTT and the higher toposes. Judging from the intro, this seems very readable.

To be clear, constructive mathematics is not new to me. I just don't see the point of it.

That mathematics can be done in a machine-checkable way was known long before HoTT. Nothing new there. For example, I've had no (particular) difficulty mechanising surreal numbers without using HoTT for this. Also real numbers can be done easily without HoTT. So again:

Why should I care about the univalence axiom?

If you cannot answer that, I am not sure you know what you are talking about. And also, maybe you are a little bit underestimating the links between HoTT and constructivism.

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.

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.