coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jeremy Avigad <avigad AT cmu.edu>
- To: coq-club AT inria.fr
- Cc: Thorsten Altenkirch <Thorsten.Altenkirch AT nottingham.ac.uk>, agda-list <agda AT lists.chalmers.se>, "coq+miscellaneous AT discoursemail.com" <coq+miscellaneous AT discoursemail.com>, lean-user <lean-user AT googlegroups.com>
- Subject: Re: [Coq-Club] Why dependent type theory?
- Date: Wed, 4 Mar 2020 10:59:51 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=avigad AT cmu.edu; spf=Pass smtp.mailfrom=avigad AT andrew.cmu.edu; spf=None smtp.helo=postmaster AT mail-wr1-f50.google.com
- Ironport-phdr: 9a23:4VpKzx/prTbimv9uRHKM819IXTAuvvDOBiVQ1KB30u4cTK2v8tzYMVDF4r011RmVBNmdsqoUwLqO+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCeybL9oMRm6sQbcusYVjId+N6081gbHrnxUdutZwm9lOUidlAvm6Meq+55j/SVQu/Y/+MNFTK73Yac2Q6FGATo/K2w669HluhfFTQuU+3sTSX4WnQZSAwjE9x71QJH8uTbnu+Vn2SmaOcr2Ta0oWTmn8qxmRgPkhDsBOjUk62zclNB+g7xHrxKgvxx/wpDbYIeJNPplY6jRecoWSXddUspNUiBMBJ63YYkSAOobJetXoIf9qFkOoxWwBgeiGf3hxSNTi3DswaE3yf4sHR3a0AEiGd8FrXTarM/yNKcXSe27yLfHzS/dYPNT2Tb29ZTFcg4gofGDR71/bNfaxE41GAPbj1WQppbqMC6O2+sRtmib8vBsWvyyhG46sgx8pCWkyMkrionMnI0Vy1bE+D1nz4kvOd23VFV7bcSjEJtKuCGWL5d5QsY/Q21ypik116AGtYahcygQx5UnxgDfZ+aAc4iS7RLuUvuaLzRghH99Zr6zmxK//VKjx+D8TMW4zkhGojdfntTMqnwA0QHY5NKdRftn5Eih3C6C1wDN5eFAJkA5ja/bJIQgwr40j5YSv17DEjLvlEX4jKKaal8o+uev6+TgbbXmooGTO5VohQH5N6Qigs2/AeImPQgSR2WX5/iw2bn58UD6QLhGlOM6nrfEvJzAJckXura1AwpP3YYi7xa/AS2m0NMdnXQfNl1FZhOHj4fzNF7TO/33F/G/jEm2kDh1yfHKJKHuApDQLnTZjrjuYKt951ZGyAUv1dBf+45UCrYZLf3vXU/xrcXUAQM9Mwyp2OnqE85914MbWWKXGKCVKqLSsVmS5uIuOeaAfoEVuCyuY8QisvXplDoynUIXVaivx5oeLn6iTdp8JEDMQ3f2j9IQWU4UvwU3QKS+gUODXjdfT323QuQx6ixtW9HuNpvKWo342O/J5yy8BJADIzkeUgnRQ0etTJ2NXrI3UAzXIsJllWZZB72oSotkygv38QGnk/xoKe3b/iBevpXmhoAsu7/j0Coq/DkxNPyzlnmXRjAmlWYVATI6wfIn+B0v+hK4yaF9xsdgO5lW7vJNXB09MMeCneV8B8r/RUTKe8rPRVq7EIyr
Hi,
following up with Thorsten's command about the word "dependent type theory", I would like to add a few observations I had in this discussion:
- I think the word "type theory" itself is unclear in this context. At least several of the emails seem to use different but related ideas of what that means:
- It could mean "something where everything has a type" (i.e., not the usual ZF). Then HOL would be type theory. (Thorsten's email quoted below makes sense in that setting because HOL avoids the problem described there.)
- It could mean the above with dependent types (but not necessary the Curry-Howard thing from the next item)
- It could mean "a system where we use the same language for propositions and proofs via Curry-Howard isomorphism" (I believe this will then also need dependent types since otherwise the proof terms are not powerful enough)
- It could mean a system with strong normalization (so that everything terminates), at least some of the answers seem to see this as part of the meaning of "type theory".
Of course, there are many interaction between the different concepts, but if we talk about the costs or benefits of adopting type theory, it becomes quite important which aspect of it we are adopting. (E.g., if we have, say, a good reason why we need the second point, and a big cost for getting the four point, then it is important not to just say "type theory has the following good reason and the following cost".)
Maybe when discussing *why* type theory, we should prefix our answers by what we mean by type theory (e.g., one of the above). Otherwise it will be very confusing (at least to me).
Another question is also the context in which we want to use it:
- Programming (with all the associated things like verification, type checking, etc.)
- Math
These have different requirements, so making explicit which domain we are thinking of in our answer might make things clearer as well.
Just my personal thoughts, but I hope they may help to add some clarity to the discussion.
Best wishes,
Dominique.
On 3/4/20 11:42 AM, Thorsten Altenkirch wrote:
First of all I don’t like the word “dependent type theory”. Dependent types are one important feature of modern Type Theory but hardly the only one.
To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example
{0,1} \cup {0,1,2,3} = {0,1,2,3}
However, if we change the representation of the first set and use lets say {true,false} we get a different result:
{true , false} \cup {0,1,2,3} = {true,false,0,1,2,3}
This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved
{0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3}
{true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3}
Unlike \cup, + doesn’t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky’s univalence principle.
There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain “logic for free” and paedagogically helpful since it reduces logical reasoning to programming.
There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn’t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this.
Thorsten
From: "coq-club-request AT inria.fr" <coq-club-request AT inria.fr> on behalf of Jason Gross <jasongross9 AT gmail.com>
Reply to: "coq-club AT inria.fr" <coq-club AT inria.fr>
Date: Tuesday, 3 March 2020 at 19:44
To: coq-club <coq-club AT inria.fr>, agda-list <agda AT lists.chalmers.se>, "coq+miscellaneous AT discoursemail.com" <coq+miscellaneous AT discoursemail.com>, lean-user <lean-user AT googlegroups.com>
Subject: [Coq-Club] Why dependent type theory?
I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it"
So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved?
I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices.
Thanks,
Jason
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law.
- Re: [Coq-Club] Why dependent type theory?, (continued)
- Re: [Coq-Club] Why dependent type theory?, Dominique Larchey-Wendling, 03/03/2020
- Re: [Coq-Club] Why dependent type theory?, Guillaume Melquiond, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Dominique Larchey-Wendling, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Pierre Courtieu, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Jeremy Dawson, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Dominique Larchey-Wendling, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Makarius, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Guillaume Melquiond, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Thorsten Altenkirch, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Pierre-Marie Pédrot, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Thorsten Altenkirch, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Dominique Unruh, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Jeremy Avigad, 03/04/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Ettore Aldrovandi, 03/04/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Miguel Pagano, 03/05/2020
- Re: [Coq-Club] Why dependent type theory?, Pierre-Marie Pédrot, 03/04/2020
- Re: [Coq-Club] Why dependent type theory?, Talia Ringer, 03/05/2020
- Re: [Coq-Club] Why dependent type theory?, Josef Urban, 03/05/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, James McKinna, 03/06/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Martin Escardo, 03/06/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Martin Escardo, 03/06/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, James McKinna, 03/08/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Martin Escardo, 03/09/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Gabriel Scherer, 03/09/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Martin Escardo, 03/09/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, James McKinna, 03/08/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Martin Escardo, 03/06/2020
- Re: [Coq-Club] [Agda] Why dependent type theory?, Martin Escardo, 03/06/2020
- Re: [Coq-Club] Why dependent type theory?, Dominique Larchey-Wendling, 03/03/2020
Archive powered by MHonArc 2.6.18.