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: Matthieu Sozeau <mattam AT mattam.org>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] The typing of total recursive functions in Coq (via the untyped Lambda calculus)
  • Date: Wed, 08 Mar 2017 16:59:53 +0000
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mattam AT mattam.org; spf=Pass smtp.mailfrom=matthieu.sozeau AT gmail.com; spf=None smtp.helo=postmaster AT mail-ua0-f170.google.com
  • Ironport-phdr: 9a23:yKQSIx+Z/SDSiv9uRHKM819IXTAuvvDOBiVQ1KB40uIcTK2v8tzYMVDF4r011RmSDNidt64P2rGempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9ZDeZwVFiCCybL59Ixm7qQvcvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/6apgVR3mhzodNzMh/27XhM5/gqJVrhyiuhJx3ZLbbZqPO/ZiZK7QZ88WSXZDU8tXSidPApm8b4wKD+cZOuhXtZX9p0cOrRu/GwasGf7kxCJPhn73w6I1yfkhGhzB0QwlBd0OrGjUo8/wNKoJVOC61rXIzSnZYPNTwzv975LIch84rPyKQLl+ctLRxFExGw/Zilics4/oMjOP2ugTrmSW7fBsWf+thmI7rQx6vyKhyd02iobTg4IY0lDE+jt9wIYyPdC4TVR0Yd+gEJdJqiGVLZd6TtosQ211uis21qcKuZG8fCgNx5QnwwDQZ+abfIiP5xLvTOeRITFmi3J5YL+zmQq+/Ey6xuD/VsS4ykhGojdHn9XWq3wA1QDf5tCCSvRn/0eh3TiP1xrU6uFBOU00kLDUK4I9wr4wl5ocr1nDEjXtmEXxja6ZaF8r+vWz5uToZ7XpvJ6cN4tuhg7iNaQun9SzAf4kPQgWQ2ib5eO82aX/8k3+WbVGl+E5kq3EsJ/BPskbva64AwpN0ok58Rq/DjGm0M4ZnXYdNl5FdgiH3MDVPATFJ+m9BvOiiXytli1qzrbIJO7PGJLIe13KjKvhfLtgo3Vb2gc60JgL4ptIFrgECPf6RlP4sZrfFBBvYF/8+PruFNgojtBWYmmIGKLMaK4=

I think indeed singleton elimination is mainly useful for eliminating
propositional equalities (Logic.eq) into Type.

On Tue, Feb 7, 2017 at 3:59 PM Dominique Larchey-Wendling <dominique.larchey-wendling AT loria.fr> wrote:
Now I do understand the reason for this Acc_intro_generator ...

I have another question regarding "singleton elimination".
As explained earlier, it is not needed for well-founded recursion.
It is not need either for False_rect elimination (I agree
it is more "void" than "singleton" elimination):

Fixpoint False_rect_prog (H : False) : forall X, X :=
   False_rect_prog (match H with end).

So my question is: does "singleton elimination" add some
expressivity to the CIC/Coq or is it just introduced in the
calculus as a convenience/shortcut ?

D.


Le 06/02/2017 à 14:10, Matthieu Sozeau a écrit :
> The partial way out of this issue is to put some fuel (a large number of
> Acc_intro constructors) in front of your opaque proof, as is done by
> Wf.Acc_intro_generator
>
> On Mon, Feb 6, 2017 at 12:01 PM Dominique Larchey-Wendling
> <dominique.larchey-wendling AT loria.fr
> <mailto:dominique.larchey-wendling AT loria.fr>> wrote:
>
>     Le 06/02/2017 à 08:55, Gaetan Gilbert a écrit :
>     >>But if you use the second method (acc_rect_alt), it seems to me that
>     > there would be no need to advance in the computation of the
>     > accessibility proof while reducing a term defined by induction on that
>     > predicate, even within Coq internal evaluation strategies. I am not
>     > sufficiently aware of Coq's internal evaluation mechanism to be
>     certain
>     > of that but I do not think that added axioms would block the
>     evaluation
>     > because the proof of accessibility is never needed to reduce the term.
>     > It might however saturate the memory if it is never reduced ...
>     >
>     > Fixpoints only unfold if the principal argument is a constructor. For
>     > acc_rec_alt the principal argument is the (Hx : acc x) so it needs
>     to be
>     > reduced.
>     > This is because otherwise you would get an infinite reduction
>     >
>     > acc_rec_alt x Hx ↦ f x (fun y Hy => acc_rec_alt ...)
>     > ↦ f x (fun y Hy => f y (fun z Hz => acc_rec_alt ...))
>     > ↦ ...
>
>     Ok this is a bit unfortunate ... it means anything defined with
>     the Fix operator or by induction over a predicate will almost
>     certainly have its evaluation blocked because most proof terms
>     are Opaque in Coq ... this is not specific to this particular
>     fixpoint computation.
>
>     D.
>



  • Re: [Coq-Club] The typing of total recursive functions in Coq (via the untyped Lambda calculus), Matthieu Sozeau, 03/08/2017

Archive powered by MHonArc 2.6.18.

Top of Page