Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Hide I : True in match

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Hide I : True in match


Chronological Thread 
  • From: Jason Gross <jasongross9 AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Hide I : True in match
  • Date: Tue, 31 Mar 2020 11:28:16 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-ed1-f51.google.com
  • Ironport-phdr: 9a23:nlcu0RAqu0iskLyI6CssUyQJP3N1i/DPJgcQr6AfoPdwSP39oMbcNUDSrc9gkEXOFd2Crakb26yL6+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6i760TlHERLmcAFxO+69ToXVloG80/2405zVeQRBwjSnN+BcNhKz+CfYrc4QyaR4Lb0qgk/Lq2BPfetMwnhzdHqcmh/94oG7+5s1oHcYgO4o68MVCfayRK8/V7ENVG17YVBw39XisFz4dSXK5nYYVT9LwB9BAgyA4R2jG5ms6231se1y3CTcNsrzH+htCGaSqpxzQRqtsx8pcjsw8WXZkMt11fsJrxeophg5yInRMtjMaKhOO5jFdNZfflJvG95LXnUYUIy5ZooLSeEGOLQAog==

To answer your actual question, even if perhaps not your intended one, you can pass `-noinit` to Coq and then do `Require Coq.Init.Prelude`, and then everything will need to be qualified.  There isn't a good way to import just some things and not others, though there's a pull request to add this feature at https://github.com/coq/coq/pull/11820

On Mon, Mar 30, 2020 at 8:04 PM Maximilian Wuttke <s8mawutt AT stud.uni-saarland.de> wrote:
Both tricks are very nice.

Thanks
Maximilian

On 30/03/2020 11:25, Christian Doczkal wrote:
> Another possible trick is:
>
> Definition I := I.
>
> Fixpoint test (I : nat) : nat :=
>   match I with
>   | 0 => 0
>   | S I => test I
>   end.
>
> This way, "I" can freely be used as a pattern variable while still being
> convertible to "Logic.I"
>
> Best,
> Christian
>
> On 3/27/20 11:39 AM, Laurent Thery wrote:
>>
>> One possible trick is :
>>
>> Fixpoint test (I : nat) : nat :=
>>   match I with
>>   | 0 => 0
>>   | S (_ as I) => test I
>>   end.
>>
>>
>> On 3/27/20 11:14 AM, Maximilian Wuttke wrote:
>>> Fixpoint test (I : nat) : nat :=
>>>   match I with
>>>   | 0 => 0
>>>   | S I => test I
>>>   end.




Archive powered by MHonArc 2.6.18.

Top of Page