Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] The typing of total recursive functions in Coq (via the untyped Lambda calculus)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] The typing of total recursive functions in Coq (via the untyped Lambda calculus)


Chronological Thread 
  • From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] The typing of total recursive functions in Coq (via the untyped Lambda calculus)
  • Date: Sat, 4 Feb 2017 11:51:24 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=arnaud.spiwack AT gmail.com; spf=Pass smtp.mailfrom=arnaud.spiwack AT gmail.com; spf=None smtp.helo=postmaster AT mail-vk0-f41.google.com
  • Ironport-phdr: 9a23:3d+jgRGZY/bQq0HSmZwvnp1GYnF86YWxBRYc798ds5kLTJ7zpcuwAkXT6L1XgUPTWs2DsrQf2raQ7PurADNIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbx/IA+0oAjfucUanIlvIbstxxXUpXdFZ/5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohVbBXAygoPG4z5M3wqBnMVhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu47ttRRT1kyoMKSI3/3/LhcxxlKJboQyupxpjw47PfYqZMONycr7Bcd8GQGZMWNtaWS5cDYOmd4YADeQBM+ZWoYf+ulUAswexCBK2C+/z0DJFnGP60bE43uknDArI3BYgH9ULsHnMsNj1LqESXvqozKbV0D7NcutW2Tbz6YfSbh8houyHULVqfsrK0UkvFg3EgU+MpozmJD6V0uUNsmeB4+p4UuKvj24mqx1vrTezxscsjIjJhpsIyl/a7yl5zpw1KMS+RUVmb9CkF55QuDubN4twWs4iR2ZouDw7yrIco5K7cjIKxZI6zBDcc/yKa5aE7g7nWeqLIjp1hGhpdKyiixu860StxfDwW8+p21hQtCVFiMPDtnUV2hzT9MeHTvx981+k2TmV1gDT7vhIIV43labHMpIhzLE9mocJvUTMGS/2n0r2jKuIeUk+5ueo7OHnbq3npp+aKYB0lhnzProylsG7G+g1MQgDU3KF9eih2rDv50L0TKhSgv0ziKbZsZTaJcoBpq6+Bg9Yypws6wy5Dzi8zdQXgGMLLEldeBKGgYnmIU3BIPPjAPewhlSjijZrx/TcMrL9BZXNK2DPkK39crZl905c1A0zwMhD6JJTE7ENOe78WkvstNPDFRI5KAy1w+P/CNpnzI8eWGSPArWYMKzIq1OI6PgvcKGwY9o+vy+1APw47ba6hngg3FQZYKOB3J0NaXn+EO4wcGuDZn+5q80HGHoG9jEmTfPjg17KBTdIf3etVqk/zjU6GMS+CoPSWo2mgLqAxTq2WJNMMDMVQmuQGGvlIt3XE8wHbzifd4o4ymQJ

Quite a lot of cool, if I might say so.

I've only have a quick glimpse at the proof. Let me try to summarise my understanding of it: you prove to each total recursive function (in the sense that its graph is a total functional relation) then there corresponds a normalisable lambda-term (in the sense of the accessibility predicate) and then you define a function by recursion over this accessibility predicate.

Is that correct?

This makes use of the singleton-elimination of accessibility. A subtle point in Coq (in particular since it's hard to reconcile with judgemental proof irrelevance, and this is an extension of Coq which has been mooted a number of times). For instance, you mention that if totality of the recursive function is proved with axioms, then a Coq function still emerges. This would be right, but I'd expect the function to block on some natural numbers as it would need to match on the axioms.

On 2 February 2017 at 16:18, Dominique Larchey-Wendling <dominique.larchey-wendling AT loria.fr> wrote:
Dear Coq users,

I am happy to announce the availability of a dependently typed
implementation of the untyped Lambda Calculus in Coq.

http://www.loria.fr/~larchey/Lambda_Calculus

One of the by-products of that development is a formal proof
that:

Every total recursive function f : N -> N can be represented by
Coq term tf : nat -> nat (which can be computed from the algorithm
that describes f.) (*)

Of course the problem is to circumvent the unbounded minimization
scheme. I know that there have been many published (and unpublished)
implementations of the untyped Lambda Calculus.

This one enjoys the following properties:

1/ A dependently typed representation of terms which avoids the problem
   induced by alpha conversion: two alpha-equivalent terms are equal.
   The type of terms is parametrized by the number of usable free
   variables.

2/ Most of the proofs of JL Krivine's book "Lambda-Calculus: Types and
   Models" are implemented in an intuitionistic way (no axiom is used).
   Intersection types system D and Domega are implemented with the
   characterization of strongly normalizable terms.

   System F is not implemented yet though (but this is not really
   the goal of this project).

3/ A dependently typed representation of recursive algorithm and
   a formal proof of the encoding of recursive algorithm by untyped
   lambda terms.

The main objective of this project is to build a Coq library
that could be used to implement *undecidability results*
(for various logics) in an intuitionistic way.

The development is ongoing on my private repository but anyone
interested in such a project can be given access to that
development branch. Do not hesitate to contact me.

Dominique Larchey-Wendling
TYPES, LORIA, CNRS

(*) the word "total" which could be ambiguous (as it refers to
meta-theory), should here be understood as "provably total" in Coq





Archive powered by MHonArc 2.6.18.

Top of Page