coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Robbert Krebbers <mailinglists AT robbertkrebbers.nl>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Feature Request: Sealed definitions
- Date: Thu, 25 Feb 2016 00:29:56 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mailinglists AT robbertkrebbers.nl; spf=None smtp.mailfrom=mailinglists AT robbertkrebbers.nl; spf=None smtp.helo=postmaster AT smtp1.science.ru.nl
- Ironport-phdr: 9a23:3n9sAxJlKon+B0ti29mcpTZWNBhigK39O0sv0rFitYgUL/3xwZ3uMQTl6Ol3ixeRBMOAu60C1rud6/+ocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC0ILqhqvqpNX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqLjOq88ULZwDTI8Mmlz6te4mwPESF614XEWX38K2jlSDgLP4QvhFsP0uyr+t+xy3CiBIdbeV7c+Uzm486RxRRXihT0ccTg9pjKEwvdshb5W9Ury7yd0xJTZNdmY
Hi Arnaud,
For Ralf's purpose the generated term should be Opaque. As far as I see, one can only control the opacity of the equality lemma. So, given:
Derive f SuchThat (f = λ x : nat, 10) As foo.
One can control whether foo is Opaque by ending the proof with Qed/Defined, but not whether f is Opaque.
Robbert
On 02/24/2016 09:15 PM, Arnaud Spiwack wrote:
See also :
https://coq.inria.fr/distrib/current/refman/Reference-Manual033.html#hevea_command305
(syntax subject to changes by the time of next release)
On 24 February 2016 at 14:57, Jacques-Henri Jourdan
<jacques-henri.jourdan AT inria.fr
<mailto:jacques-henri.jourdan AT inria.fr>>
wrote:
Le 24/02/2016 14:51, Ralf Jung a écrit :
> Hi,
>
>> Oh, but you also want the equality lemma.
> Right :)
>
>> Then you can do something like:
>>
>> Definition x : nat := 1.
>>
>> Definition x_aux : { x':_ & x' = x }.
>> exact (existT _ _ eq_refl). Qed.
>> Definition x_sealed := projT1 x_aux.
>> Definition x_sealed_eq : x_sealed = x := projT2 x_aux.
>>
>> Which is, I admit, not ideal from a syntactic point of view. However,
>> note that the type and definition of x appear only once.
> Thanks, this indeed looks nicer than using modules!
>
> Unfortunately, if the type of x is more complicated, this loses all the
> information about implicit arguments: If some arguments of "x" were made
> implicit by putting them in "{...}", these are all explicit for
> x_sealed. So the type has to be repeated, or at least the implicitness
> information has to be declared again with Arguments.
Well, you don't really need x, so you don't need to give this
information twice. But yes, you have to repeat the information about
implicitness of arguments.
> Kind regards,
> Ralf
- [Coq-Club] Feature Request: Sealed definitions, Ralf Jung, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jeehoon Kang, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Robbert Krebbers, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jacques-Henri Jourdan, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jacques-Henri Jourdan, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Ralf Jung, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jacques-Henri Jourdan, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Arnaud Spiwack, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Robbert Krebbers, 02/25/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Arnaud Spiwack, 02/25/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Robbert Krebbers, 02/25/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jacques-Henri Jourdan, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Ralf Jung, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jacques-Henri Jourdan, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jacques-Henri Jourdan, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jacques-Henri Jourdan, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Robbert Krebbers, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Ralf Jung, 02/24/2016
- Re: [Coq-Club] Feature Request: Sealed definitions, Jeehoon Kang, 02/24/2016
Archive powered by MHonArc 2.6.18.