Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Question about the formal definition of the guard condition

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Question about the formal definition of the guard condition


Chronological Thread 
  • From: Gabriel Scherer <gabriel.scherer AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Question about the formal definition of the guard condition
  • Date: Mon, 12 Dec 2016 16:56:46 -0500
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabriel.scherer AT gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer AT gmail.com; spf=None smtp.helo=postmaster AT mail-io0-f182.google.com
  • Ironport-phdr: 9a23:18wK8xLvyzGTGp7EKdmcpTZWNBhigK39O0sv0rFitYgRI/7xwZ3uMQTl6Ol3ixeRBMOAuqkC1bCd7v+ocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbQhFgDSwbalzIRmoognctssbipZ+J6gszRfEvmFGcPlMy2NyIlKTkRf85sOu85Nm7i9dpfEv+dNeXKvjZ6g3QqBWAzogM2Au+c3krgLDQheV5nsdSWoZjBxFCBXY4R7gX5fxtiz6tvdh2CSfIMb7Q6w4VSik4qx2UxLjljsJOCAl/2HWksxwjbxUoBS9pxxk3oXYZJiZOOdicq/BeN8XQ3dKUMRMWCxbGo6zbYUPAeoPM+hbsofzuUcBoACiBQWwHu7j1iNEimP00KA8zu8vERvG3AslH98WsXrbts76NL0TUe+ryKnD0CjNYO9W2Tjj8ojHbAohquyLULJ/a8Xe0lMvFwLbgVWUs4DlJC+a1uQTvGiB8eVgT/mii2Eiqw5rozivwt0ghZXOhoIQ013J8zhyzoUtJdCgVkJ3fdqpHIFTuiyaLYd6XN0uTm9ytConybAKp5i2dzUQxps93R7QcfmHfpCI4h39UOaRJi91hHd/d7K+gxa+6EmgyurgWsWt3lZGsylInsfWunAC0BzT7ceHSv9j8Uu7xTmP0AXT5vlFIUAyi6XbN4YszqAsmpcXq0jOHS/7lF/ogKOIeEgo4PWk5uf5brn+o5+TLY50igXwMqQ0ncy/BPw1MgcUUGeA4+S81aPs/UnjTLVRkvI2krfWsIrEKsQBvaO5DApV3Zwi6xa7FTupzNMYnXwfIFJfZB2Hl5TpO03JIP3gEfi/hE2snC53yPDCI73uGY7ALmPDkbfkZbZy8VRQyAs1zdBF5pJbEKsNIPzpWhy5iNuNJRggeyew3uyvXN56z8YVXX+FKq6fKqLb91GSsLEBOe6JMaAcsiz8Jvxt3PXugGU0gxdJcqCjx5oabDajFfRrOUiDSXXpi9YFV2wNu1xtH6TRlFSeXGsLND6JVKUm62R+Udr+AA==

My understanding of what happens is that it breaks *strong*
normalization, in the sense that there exist reduction strategies that
loop, but it preserves *weak* normalization, namely the fact that
there exists a reduction path to a value -- and thus consistency.
Indeed, in the checking rule

Gamma, F : T |- M : T
M -beta*-> M'
M' \in Guard^F_k
-------------------------
Gamma |- (Fix F_k : T := M) : T

there *exists* a reduction path M -> M', and my understanding is that
reusing this specific reduction path each time you unfold the fixpoint
is a normalizing strategy.

Indeed in this specific example we have:

Coq < Fixpoint F (n : nat) := let x := F n in 0.
F is defined
F is recursively defined (decreasing on 1st argument)

Coq < Eval cbv in (F 1).
Stack overflow.

Coq < Eval cbn in (F 1).
= 0
: nat

On Mon, Dec 12, 2016 at 4:48 PM, William J. Bowman
<wjb AT williamjbowman.com>
wrote:
> On Mon, Dec 12, 2016 at 04:44:05PM -0500, roux cody wrote:
>> I think the idea is that while this can lead to non-termination during the
>> checking of the guard condition, if this succeeds then the resulting
>> program is well-guarded,
> Is the example program non-terminating at run-time or when checking the
> guard condition? To me, it
> seems it would terminate when checking the guard condition, but fail to
> terminate at run-time.
> For reference, the example I'm referring to is:
> Fixpoint F n := let x = (F n) in 0.
>
> Since let x = (F n) in 0 reduces to 0, and 0 is well-guarded, so is the
> Fixpoint (according to the
> algorithm described in the slides). But F will not terminate at run-time.
>
> I agree that it is less concerning since I cannot see how it would allow
> deriving contradiction.
>
> --
> William J. Bowman



Archive powered by MHonArc 2.6.18.

Top of Page