Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Why dependent type theory?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Why dependent type theory?


Chronological Thread 
  • From: Jesper Cockx <Jesper AT sikanda.be>
  • To: Ralf Jung <jung AT mpi-sws.org>
  • Cc: coq-club Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Why dependent type theory?
  • Date: Wed, 4 Mar 2020 17:21:04 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=Jesper AT sikanda.be; spf=None smtp.mailfrom=Jesper AT sikanda.be; spf=None smtp.helo=postmaster AT ln02.mxout.alfaservers.com
  • Ironport-phdr: 9a23:7HDnYBS3f3x/QDSd1SzlMWwgBdpsv+yvbD5Q0YIujvd0So/mwa6yZhWN2/xhgRfzUJnB7Loc0qyK6vymADRQqsbf+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjeu8UMnIduNqU8xhTKr3ZJZu9b2X5mKVWPkhnz4cu94IRt+DlKtfI78M5AX6T6f6AmQrFdET8rLWM76tD1uBfaVQeA6WcSXWsQkhpTHgjK9wr6UYvrsiv7reVyxi+XNtDrQL8uWDSi66BrSAL0iCoCKjU0/n3bhtB2galGux+quQBxzJDIb4GULPp+f73SfdUGRWpaQ81dUzVNDp6gY4cTCuYMO/tToYvgqFsUtRaxCgesC+HvxDFGhXH4wLM03Pg6HA7cwAAtBcgDvGjIoNj3MqoZTOC7zLPPzTXGd/5Y3Sny6JPQch8/u/GHQKx9cc3NxkksGALOk1Kdp4j7MDOOzuQCrXKb4vF7VeKuiG4osQdxrSW1ycs2kYbGmJsYx1bZ/it3x4Y1IMe3SE99YdO8FZtQryCaO5JtQsIsWGFkoiE6yqcJuZO9YSMEy4wnygbcZvGHaYSE/xDuWPyMLTp7hH9pYryyihKq/US+1uHxUtO43VVKoyZfjNXAqG4B2wbc58SaTPZ2412v1iyV1w/J7+FJOUA0mrTfK54m2rMwkpwTvVjdEiPsnUX3g6iWdlg4+uSy8evnZrvmqYWHN4BqkAH+LLohmtakAegiLgcOWG2b9fy91L3l40L5XK1Hg/42n6XDrZzXJ94XqrO6DgJVyIou5RKyAy+j0NsCnHkHKFxFeAiAj4jsI1zAJO73Deyng1uyijdm3OvGPrziAprXKHjMja3ucaxm5EFC0AYz18xQ54pICrEdJ/L+QlP+tNvBDhMgLwO0x/vnB85m24MFWWOPB7eZP7nIvV+J4OIvOeiMa5UPtDbzMfh2r8Lp2EUwnVFVX7Sv0tNDam2+EdxjO0TcemX3xNAbHjFZkBA5SbnIhUaaXCQbTHG5XLJ0shM2E5qrF6/YR4OkhrCImi22SM4FLltaA0yBRC+7P76PXO0BPWfLepc4w240EIO5Qopk7imA8Qrzyr5pNO3Ro3dKrpPg3d557qvZmENqrGEmP4Gmy2iIClpMsCYISjsxhvAtpUolkBGGwa9ln7pREdJa/P5TTAogLtjXyOkoU4muCDKERc+ATROdevvjGSs4F4hj2N4NakBxEpOog0Kb0g==

Hi Ralf,

There are other dependently typed languages besides Coq that do provide a unified language for programs and proofs ;)

-- Jesper

On Wed, Mar 4, 2020 at 5:10 PM Ralf Jung <jung AT mpi-sws.org> wrote:
Hi Jesper,

I agree with most of your points, but...

> - From a practical point of view, in a dependently typed language I don't have to learn and use separate languages for writing programs and for writing proofs about them. In fact, by giving the write types to my programs I often do not need to give any proofs at all (i.e. correct-by-construction programming).

Practically speaking, in Coq, programs are written in Gallina and proofs are
written in Ltac.  These two languages could hardly be more different.

; Ralf

On 03.03.20 22:37, Jesper Cockx wrote:
> Hi Jason,
>
> There's many reasons for me to choose a dependently typed language:
>
> - From a philosophical point of view, dependently typed languages are the only
> kind of language that have been given a meaning explanation (in the sense of
> Martin-Löf). This is important because it means I can grasp the meaning of each
> rule/axiom on a fundamental level, something that I never managed for set theory.
> - From a practical point of view, in a dependently typed language I don't have
> to learn and use separate languages for writing programs and for writing proofs
> about them. In fact, by giving the write types to my programs I often do not
> need to give any proofs at all (i.e. correct-by-construction programming).
> - Dependent type theory is constructive so I do not have to assume classical
> principles when I do not need them.
> - Since expressions at the type level can compute in dependent type theory,
> there are many equalities that I do not need to reason about explicitly but just
> hold by definition/computation (although not as many as I would want).
>
> As for other interactive theorem provers not based on dependent type theory,
> such as Isabelle or HOL4, I am mainly jealous of their excellent integration
> with automated theorem proving tools (e.g. sledgehammer) and their huge
> mathematical libraries. In a dependently typed languages, it is much harder to
> get everyone to agree on a definition because there are so many different ways
> to encode a concept. This has the effect that libraries are a lot more
> fragmented and everything is done in a more ad-hoc manner.
>
> Another weak point of current implementations of dependent type theory is
> abstraction: you /can/ make a definition abstract but that means it becomes an
> inert lump that stubbornly refuses to compute, so you lose most of the benefits
> of working with a dependently typed language. But I see these as reasons to
> continue to improve dependently typed languages rather than to abandon them.
>
> -- Jesper
>
> On Tue, Mar 3, 2020 at 10:00 PM Viktor Kunčak <vkuncak AT gmail.com
> <mailto:vkuncak AT gmail.com>> wrote:
>
>     I would be also curious to hear answers to this questions!
>     ("Lots of people do it" seems like a very compelling answer.)
>
>     Which bottlenecks are you referring to? Are they intrinsically tied to
>     dependent types, or they are related to the treatment of propositions and
>     equality in systems such as Coq?
>
>     There are type systems overlayed on top of initially untyped languages (e.g.
>     the language of Alloy Analyzer) and there are gradual types and designs like
>     TypeScript for to initially untyped programming languages. ACL2 theorem
>     prover for pure LISP, SPASS theorem prover for first-order logic, and "TLA+
>     model checking made symbolic" model checker for TLA+ all include techniques
>     to recover types from an initially untyped language.
>
>     Best regards,
>
>       Viktor
>
>     On Tue, Mar 3, 2020 at 8:44 PM Jason Gross <jasongross9 AT gmail.com
>     <mailto:jasongross9 AT gmail.com>> wrote:
>
>         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
>

--
Website: https://people.mpi-sws.org/~jung/



Archive powered by MHonArc 2.6.18.

Top of Page