coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] [Metamath] Dependent Type Theory vs. Set Theory: Unencoded (direct) vs. encoded (indirect) form of expression
Chronological Thread
- From: Mario Carneiro <di.gama AT gmail.com>
- To: metamath <metamath AT googlegroups.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] [Metamath] Dependent Type Theory vs. Set Theory: Unencoded (direct) vs. encoded (indirect) form of expression
- Date: Mon, 24 Dec 2018 07:35:40 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=di.gama AT gmail.com; spf=Pass smtp.mailfrom=di.gama AT gmail.com; spf=None smtp.helo=postmaster AT mail-ot1-f46.google.com
- Ironport-phdr: 9a23:tiO0uRAdH7KNaZvfagK+UyQJP3N1i/DPJgcQr6AfoPdwSP37pMmwAkXT6L1XgUPTWs2DsrQY07qQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDmwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VjO/4ad2Ux/okDkIOCIl8G/ZjcxwibhUoBOnpxdix4LZb4WYOP94c6jAf90VWHBBU95eWCxPAIyyb4UBAekcM+hGs4bwvEEBoQekCAS2GO/j1j1Fi3nr1qM6yeQhFgTG0RQnEd0UqnTUrdL1P7oMXO+v1qnIyyvMb/JM2Tf69YPFdQ0uofCWUbJ/a8XRzFMgGhjKjlWVs4PlPjeV2v4RvGic6uptTOSigHMppQF2pzig3MYsio/Ri4IazVDE8ip5wIIrKtGiVEF7ZtukHINNtyGfKoR6WN0tTHx1uCoiy70Gv4S7fCkQx5g9yR7fceSLc5OP4hL+TuaePSl3hHxieLKliBa971KsyuviWcmoyFpFsy1FktjWunAKzRzT5dCLSvxz/0el3jaP2QXT6uBCIU8qj6rbNYQuzqQ2lpUNrUTOGDL9lkbujKKOaEko5uyl5/7kb7jmvJOQKZJ4hh3kPqkhm8GyB/kzPBIUUGiB4+u80aXu/U3nT7VOif07iqzZv4rbJcQfv6K5BBNV3ps65xaxADqr0c4UnXYALFJCdxKHi5bmN0vSL/D/CPezm1WskDF1yPDaJrDtHInBI3zZnLrifbtx8VBQxBcvwdxF6J9ZC6kNIPfpVU/wsNzYAAU5Mwuxw+v/Fdp915kSWW2VDa+cKqzfqlCI5uc1LOmNYI8ZoiryK/8g5/L2l382hUcdfbW13ZsQcH23AvNmI1yAbXXwhtcBDHwFsxElTO3qjV2CSSRca2yzX6I6/DE7CZipAZ3NRoC30/S82jymFMhTb2FCFlfeFHr0foCNR/dPdSSJP8V6mSYFX7WJRIgm2hWjuxX91qJ8aOHT/34ls4n+3o11+/HLjkN1sjNuCNmFyCeCSGZ7mm5OTDgzm6w4plRhzUqfgpV+mOFSQNxP++tSAEB9OoTb0vRhTd/1XQ3Fc5GCT1PhTc+hHCl2S98tytoHf0YuJ9L3ix3f1i+jH79dw7mGGJUx+77c93f2IMl5xnnc07Q5lB8tRc4ZZkO8gasq0gHJBomBuEyDkaurb6NUiCLMsmiKyGOms0RRUQo2WqLACyNMLnDKpMj0sxuRB4SlDq4qZ1cQkJ/QGu5xctTsyG5+arLmMdXabXi2nj7pVxmNz7KIKoHtfjdEhXmPOA0/iwkWuE2+G00mHC74+jDRCTVvERTkZEa+qbAj+kP+dVc9ykSxV2Mk17ex/URI1/mVSvdW2a5d/Sl99XN7G1Gy29+QAN2F9VJs
One thing which set-theory-based foundations afford (arguably you can do this in type theoretic foundations as well but it's not done conventionally) is a decreased reliance on the exact form of a definition. Definitional equality is a really important concept in dependent type theory, and it prevents the ability to say "here is an encoding, now let's forget about it henceforth" because you can always unfold the definitions. There is a lack of encapsulation. And what's more, certain theorems that are true under one definition are not well typed(!) under another, equal, definition, even if one proves all the analogous theorems for the new definition. This means a lack of modularity. Of course one can always say that it is bad practice to use definitional equality like this, but it's only a gentleman's agreement at best.
Set theory, by contrast, thrives on making encodings and forgetting about them. You might say that it's a loss to have to go to such lengths to get a basic concept inside the theory, and wouldn't it be better if the concept was built in? and I would say that this shows that the original foundations were good enough already, and we need not make an unnecessary assumption. Obligatory quote:
"The advantages of the method of postulation are great; they are the same as the advantages of theft over honest toil." -Bertrand Russell
"The advantages of the method of postulation are great; they are the same as the advantages of theft over honest toil." -Bertrand Russell
Once a concept is suitably encoded, and a short definition is made to refer to it, there is no loss in comfort or convenience to make use of it; indeed one of the most important properties of systems like metamath is that axioms and theorems are indistinguishable at point of use. The dependent type theory analogue of this would be to say that all theorems are opaque; this would be a problem for the objects of study, but we don't have propositions as types here - the proofs are not objects of (internal) study, they are strictly metatheoretic in nature.
If the foundation is chosen specifically to model the objects of study, no more no less, then this means that the foundation will shift as the objects of study change, once one attempts to formalize diverse subjects in the same theory. If the foundation never stops shifting then it's not much of a foundation, and if it does then eventually you fall back on encodings once more, and you will
not
have gained what you set out to gain. This latter situation is what you find in general purpose systems based on dependent type theory such as Coq; the foundations, though much more complicated than set theory, are still tiny compared to the breadth of what has been formalized, and in those formalizations you see encodings of all the things that the foundation didn't hand you specifically. Natural numbers are handed to you by fiat, but integers and real numbers have to be constructed. Compared to this, it is much more uniform to just say "construct everything" and make the foundation as parsimonious as possible.
Mario Carneiro
On Mon, Dec 24, 2018 at 6:32 AM Ken Kubota <mail AT kenkubota.de> wrote:
--Set theory *is* dependent set theory.This is – as an answer to José's question "that matrices should be dependently typed" – incorrect.He was asking this question since "Metamath does not use dependent type theory".Many things can be expressed via the circumlocation of encoding.But the concept of type theory is to express mathematical ideas naturally (*without* encoding).Andrews: "allowing mathematical ideas to be expressed precisely with a minimum of circumlocutions"The key concept of type theory is to represent such dependencies within the syntax (the grammar)as part of the formal language instead of using artificial constructions such as encoding on top of an existing invariable syntax.Andrews: "The discussion turns to finding as simple, natural, and expressive a formulation of type theory as possible."For the same reason, I had argued similarly in the context of Coq in February 2017:"A second aspect is the question of classical vs. constructive foundations. Allconstructive foundations, including Coq, use the encoding of proofs based onthe Curry-Howard isomorphism. But the concept of expressiveness yields the_natural_ _expression_ of mathematics, hence the desire is not an _encoded_, butan _unencoded_ (direct) form of _expression_. With Q0/R0, one can expressmathematical concepts very naturally."Kind regards,Ken Kubota____________________________________________________Am 23.12.2018 um 23:40 schrieb Mario Carneiro <di.gama AT gmail.com>:Set theory *is* dependent set theory. There is no problem encoding dependent types in set theory, and matrix multiplication depends on all the dimensions of the arguments as well as the arguments themselves. A dependent pi type in metamath is df-ixp (the indeced cartesian product), and dependent sigma doesn't have a name but is idiomatically represented in theorems like eliunxp as ∪ 𝑥 ∈ 𝐴 ({𝑥} × 𝐵) .On Sun, Dec 23, 2018 at 3:22 AM José Manuel Rodriguez Caballero <josephcmac AT gmail.com> wrote:Hello,There is an argument that matrices should be dependently typed, specially in the case of quantum programs: http://www.cs.umd.edu/~rrand/coqpl_2018.pdfMy question are:1) Do you agree with this argument?2) How does Metamath deals with this problem, because as far as I know, Metamath does not use dependent type theory?For further information, see section 4.7 in Robert Rand's PhD thesis: http://www.cs.umd.edu/~rrand/thesis.pdfKind Regards,José M.--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+unsubscribe AT googlegroups.com.
To post to this group, send email to metamath AT googlegroups.com.
Visit this group at https://groups.google.com/group/metamath.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+unsubscribe AT googlegroups.com.
To post to this group, send email to metamath AT googlegroups.com.
Visit this group at https://groups.google.com/group/metamath.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+unsubscribe AT googlegroups.com.
To post to this group, send email to metamath AT googlegroups.com.
Visit this group at https://groups.google.com/group/metamath.
For more options, visit https://groups.google.com/d/optout.
- [Coq-Club] Dependent Type Theory vs. Set Theory: Unencoded (direct) vs. encoded (indirect) form of expression, Ken Kubota, 12/24/2018
- Re: [Coq-Club] [Metamath] Dependent Type Theory vs. Set Theory: Unencoded (direct) vs. encoded (indirect) form of expression, Mario Carneiro, 12/24/2018
Archive powered by MHonArc 2.6.18.