Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Qed opacity and Coq standard library

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Qed opacity and Coq standard library


Chronological Thread 
  • From: Xavier Leroy <xavier.leroy AT college-de-france.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Qed opacity and Coq standard library
  • Date: Wed, 21 Apr 2021 19:12:29 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=xavier.leroy AT college-de-france.fr; spf=Pass smtp.mailfrom=xavier.leroy AT college-de-france.fr; spf=None smtp.helo=postmaster AT smtpout02-ext2.partage.renater.fr
  • Ironport-hdrordr: A9a23:BKUF56OA1n3B8MBcT6P155DYdL4zR+YMi2QD/UoZc20yTuWzkceykPMHkSLugDEKV3063fyGMq+MQXTTnKQFmLU5F7GkQQXgpS+UPJhvhLGD/xTMEzDzn9QtsptIXLN5DLTLfD1HpOb8pDK1CtMxhOSAmZrY4dv263t2VwllZ+VB4m5Ce36mO2l3QAUDOpYjDpqb4aN81lmdUE8aZMi6GXUJNtKrz7arqLvcbRELHBIh4gWV5AnYk4LSKBSEwgwYFwpG3LZKywb4ujbk7aauuezT8G6/60bv6f1t6aHc4+oGKsjJrsQOMD3jhkKTeYx9V9S50QwdkaWA7lAlldWJjjUBG4BI633XdnyouheF4WPd+QdrxXnlx1qVxUHmvNW8fjQnEMBM7Lg0TjLpr24pvNRxy8twrh+knqsSNh/LkCTj69WgbX5XqnY=

On Tue, Apr 20, 2021 at 3:54 PM Jerome Hugues <jhugues AT andrew.cmu.edu> wrote:

Hi,

 

At some point in my project, I use Defined rather than Qed to have transparent proofs and use the Compute mechanisms to evaluate some statements. This works nicely for my own theorems, but I am stuck when this involves theorems provided by the Coq standard library, NoDup_dec in my case, but ultimately this might extend to more situations.


My rule of thumb is that every definition that is in Prop should be Qed and every definition that is in Type should be Defined.  Most of the time, there's enough of a phase distinction for this heuristic to work well.  See http://gallium.inria.fr/blog/coq-eval/ for more examples, including one that used to violate the phase distinction but was fixed since.

In this respect, NoDup_dec in the Coq standard library is a bug, and so is incl_decl in the same file, while In_dec correctly uses Defined.  Why don't you file a bug report at https://github.com/coq/coq/issues ?

Regards,

- Xavier Leroy
 

 

One quick and dirty work-around is to copy/paste the code, change Qed into Defined and voila! But this is not satisfactory.

 

I could find some blog posts like this one https://plv.csail.mit.edu/blog/computing-with-opaque-proofs.html by Clément Pit-Claudel on this topic, but again it seems this imposes some rework.

 

I understand Qed and Defined are different for a reason, I am just curious whether there is a systematic way to change Qed into Defined on a case by case basis, or if we are forced to this type of modifications.

 

Is there some suggested readings on this topic?

 

Thanks




Archive powered by MHonArc 2.6.19+.

Top of Page