Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Feature Request: Sealed definitions

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Feature Request: Sealed definitions


Chronological Thread 
  • From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Feature Request: Sealed definitions
  • Date: Wed, 24 Feb 2016 21:15:20 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=arnaud.spiwack AT gmail.com; spf=Pass smtp.mailfrom=arnaud.spiwack AT gmail.com; spf=None smtp.helo=postmaster AT mail-lb0-f172.google.com
  • Ironport-phdr: 9a23:CzTQ5xT/uk/VI/x5PEvI0gQ5Y9psv+yvbD5Q0YIujvd0So/mwa64bBaN2/xhgRfzUJnB7Loc0qyN4/+mBDxLuM3Z+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8KVPlUD3WHlKZpJbzyI7izp/vEMhoVjLqtjgjDomVBvP9ps+GVzOFiIlAz97MrjtLRq8iBXpu5zv5UYCfayV+0CQLdZFDUrNXwurI2u7EGbDFjH2nxJeWIP2jFMHgKNuBr9R9L6tjbwnut7wiiTe8PsG+MaQzOnuo5xThb1hG88Lz8m+WrUwph5l7pavxuqpDR7wp6SeIaRJeZzdaPbfMoHSCxPRJACBGR6HoqgYt5XXKI6NuFCoty4/gNWoA==

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> 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






Archive powered by MHonArc 2.6.18.

Top of Page