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: Guillaume Melquiond <guillaume.melquiond AT inria.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Why dependent type theory?
  • Date: Wed, 4 Mar 2020 08:52:28 +0100
  • Autocrypt: addr=guillaume.melquiond AT inria.fr; keydata= xsBNBEwRyHEBCADN8QQIJVuSRzQyhQ3pptiM6cbP/nUUeGcYGy9HGfypFSfSdkSBynjy4j6E VedUdwZ2aKk8r1uLHvbEkucMEFAd3y3A89VhKWGwSv1K3/cpPtsPWVaxC4E8t3XnVQ/3mHx5 XklTkOK7fe2AZmdohd/dDNymhaXPR/juIbbwrqhFMSfYum/qc5hNcSQ/VltOU/MnsGfR38Bo b2NSnBNc+zLMSdLN++FM2VTvspO2Dz1DL4+dVnAIe/d+cdeVb2bZhUhr/UUHMKN7hc12Kncm 6hTYuFwvoflLelyuD0sYiQWWb64uU7iFyHL73lDrBpHtC071FSYheSsnJ+AznL4gORnhABEB AAHNMkd1aWxsYXVtZSBNZWxxdWlvbmQgPGd1aWxsYXVtZS5tZWxxdWlvbmRAaW5yaWEuZnI+ wsB4BBMBAgAiBQJMF3edAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAgqYA0TjGE NS7NCACbgos+NzSswWCrr+carCw29a+e/M0OVa0+XdZ8NOdRjBgA3emCEqCSOxPaDf80FQrQ OSjBoew+cHQcfMk+C5scdLk5B1SgnmyzJhX70hETAa9DPe5XeSO7D8WkvBBwJVraLZjSVJQF D/8SFBD8Q0w1aoStf8kfISzif7G/VmcCH2sFR/LNfi05pl9Hon9NXNKXlZbByjztXrTFHmUg lX/CH/U0dOYiGtOXQRwPD/B2vqcWnHU7+6VJ2OGg/OYChGO2d8xYbCH45dCuwIpDwa7y0Tt7 nXQOft0+kykXSLu3RhDpKPQJqoX2BM6tcYZliRMG2v+CE7s6W6Zzn8oQc2OJzsBNBEwRyHEB CADcDyhRu6M+G3+8XvQ0y9ZUGUblIzQtHKbS9vPahKQPfOl68puROTuodNm0MEYrvdciY469 iB9iTObQevWLX7v0g1pISNI3GssB+BQILD81UJLyCIhuUV4vMEJ/DSGVxNpVr/6eHi8W/YUn v1Sxe4NaXgO2amgZjd8hznMY1/wqLFg8anjQiqQaYgEpLR5xQPB3a5HvdnqkTPedQrRY8NyO hx270zoeJUtOCEa6ZFlXFJCkM+fYV2AYKzx70oHkSaTYthxQrDVNwY6PNvSyVumifUWctgZp 904aMm3KAV2mJhXsEt2sdwisfjqtFPlSZak7zYSTx23dOGDxQNGKnn7ZABEBAAHCwF8EGAEC AAkFAkwRyHECGwwACgkQIKmANE4xhDUplQf/XM+XApsUkkvOwI8uC1nSl+W3Z6tzLGDtkkBY wag202rSY/tcPvrkLMPsEtfLQoWmtMaVM8vYMWB+CXaM1hkb9nnNVBy5y/9J3DLTzpiZ6Zhs 2p7BkJzky/dzGFHGfCDe/ZRQ9fcBaPbvj3/EquXcGC3viQbInOJ6AbPUaSDRqBHcH/MOynNL 4ad9ep7k1Lahpvpyu2AFq3SUTOFGVhpKB1wkZsqt6Yf/oh3+KjalprNy+Up5eh5tElhLnZFj GYZ1K1jgwWYyabZyOYVOMsGYvQTQRP27l6ymziK6V67ciScUmS4xaZdWrJjRMj5nkbdukpxh I7dMf0BWmtfjxNsiUA==

Le 03/03/2020 à 23:56, Dominique Larchey-Wendling a écrit :
> What comes first to my mind is my own experience 
> that it is generally not possible to define nested recursive
> functions such as eg MCarthy's F91
>
> F91 x = if x > 100 then x - 10 else F91 (F91 (x+11))
>
> w/o using dependent types because they allow you to express
> properties of the output that you can feed into the type-checker
> for termination.

That is kind of a circular argument: Dependent types require your
functions to be terminating, and termination requires dependent types to
be proved, thus dependent types are required.

In a HOL setting (or plain FOL for McCarthy's F91), types are never
empty, so functions always exist and return values, whether terminating
or not. (Obviously, if they do not terminate, you will not be able to
prove anything interesting about their return value.)

In fact, your next paragraph is a good characterization of non-dependent
type systems:

> Of course if you work in a framework where termination of all
> functions is not required by the type-checker, then you won't
> have such a constraint.

> On the other hand, proving properties after defining the function
> does not work with nested calls because you need those properties
> while constructing termination certificates.

Nested calls feel like a red herring to me. Indeed, you can always turn
a function with nested calls into a function without nested calls, e.g.,
using a trampoline. If your function uses dependent types, then your
trampoline does too, and we are back to the circular argument. For F91,
the trampoline has a trivial type (a list of single-valued elements,
i.e., a natural number).

Best regards,

Guillaume



Archive powered by MHonArc 2.6.18.

Top of Page