Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Fixpoint "decreasing on 1st argument" notification

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Fixpoint "decreasing on 1st argument" notification


Chronological Thread 
  • From: Beta Ziliani <beta AT mpi-sws.org>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Fixpoint "decreasing on 1st argument" notification
  • Date: Thu, 8 Jun 2017 09:56:01 -0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=beta AT mpi-sws.org; spf=Pass smtp.mailfrom=beta AT mpi-sws.org; spf=None smtp.helo=postmaster AT jupiter.mpi-klsb.mpg.de
  • Ironport-phdr: 9a23:M/ul7BSgcgIYC9OVKZ0Ze7PqGdpsv+yvbD5Q0YIujvd0So/mwa69YBON2/xhgRfzUJnB7Loc0qyN4v+mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbF/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4rx1QxH0ligIKz858HnWisNuiqJbvAmhrAF7z4LNfY2ZKOZycqbbcNgHR2ROQ9xRWjRDDYOyb4UBAekPM/tGoYbhvFYBtweyCBO2Ce/z1jNFhHn71rA63eQ7FgHG2RQtEs8Qv3TIttr+KaQdUeGxzKnJ1zrDafJW0ir65YfTbB8hveuDUKl1ccrJyEkjDhjFj1uLqYD/ODOVzOsNvnGd4uF9Vuyvk3Yqpxx/rzWr3Msgl43EipgWx13F7yl13YY4KcWmREJnZdOoCphduiGAO4doX88vTXtktSYmxrAApJW1ZjIFyI49yB7ac/GHc5aH4hbkVOuJIzd4mWpleLOjhxms60is0Oj8VtG10FpTrSpFlsLMuWsX2xzW8siHReFx8Vq/1jqX1gDT7P9LIVwsmKbGJZMsxqQ8mocXvEjZHSL7mV/6gLKWe0k8/+in8eXnYrHopp+GMI90jxnzPb8wlcyjG+s1KQ0OX3Ca+eilz73i81b5TK9Njv0snanVqIraKtgDpq6lHw9V1Z4u5Aq4Dze/ydgXgX0HLE9edx+clIjoO1TOIOjiAvulglSsli1rx/HcMbH7DJXNNCuLrLC0VrFko2VY1QB7mdtY/tdfDqwLCPP1QE748tLCWEwXKQuxlszqFNw15IIaWGuJA+fNOq7OuHeN/uNqOPaXIogPt2CueLAe+/fygCphyhcmdq6z0M5SMSjgEw==



On Thu, Jun 8, 2017 at 9:52 AM, <raffaello.giulietti AT supsi.ch> wrote:
I agree on both your observation about evaluation strategies as well as
your (and my) surprise that Coq tries to be smart.

I think Coq should reject the definition.


Greetings
Raffaello


The problem is that it should then reject many good definitions (take division, for instance).
 

On 08/06/17 14:41, Gaetan Gilbert wrote:
> Some evaluation strategies terminate. eg
>
>
> Fixpoint z (n: nat): nat := 0 * z n.
>
> Lemma foo n : z n = 0.
> unfold z. cbn.
> (* (fix z (n0 : nat) : nat := 0) n = 0 *)
>
>
> I don't know why Coq tries to be smart with this though.
>
> Gaëtan Gilbert
>
> On 08/06/2017 14:38, raffaello.giulietti AT supsi.ch wrote:
>> Hello,
>>
>> consider the following z function
>>
>> Fixpoint z (n: nat): nat := 0 * z n.
>>
>> which Coq accepts with the usual notification "decreasing on 1st
>> argument".
>>
>> Well, I don't see that this recursive definition is "decreasing on 1st
>> argument". Indeed, an invocation results in an infinite recursion, as
>> witnessed by the Out of memory message:
>>
>> Compute z 0.
>> Out of memory.
>>
>> I'd expect Coq to reject the definition (even if the smallest
>> mathematical fixpoint is the unary function 0).
>>
>> What is really happening? Any clarification would help.
>>
>> Greetings
>> Raffaello
>





Archive powered by MHonArc 2.6.18.

Top of Page