coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Ralf Jung <jung AT mpi-sws.org>
- To: coq-club AT inria.fr, Maxime Dénès <mail AT maximedenes.fr>
- Subject: Re: [Coq-Club] Easy question re: implicit parameters
- Date: Fri, 15 Sep 2017 16:01:40 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jung AT mpi-sws.org; spf=Pass smtp.mailfrom=jung AT mpi-sws.org; spf=None smtp.helo=postmaster AT jupiter.mpi-klsb.mpg.de
- Ironport-phdr: 9a23:FKdFRRUzl9L5cCzedQtlzTeH6lTV8LGtZVwlr6E/grcLSJyIuqrYZRyCt8tkgFKBZ4jH8fUM07OQ6P+wHzFYqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aSV3DMl9+If2wEYrPhey20fqz8tvdeUEAoTOtYLZ/ZDk3q4XK/p0TiIpmAqM42hrMr3dFfelNg21ycwG9hRH5s/25+JAr0TlWtLp19dNGXo3/Z6V9VqNDSjM8PDZmt4XQqRDfQF7XtTMnWWIMn08QDg==
Hello,
> An idea could be to also provide the [A : Type] syntax in binders for
> non-maximal implicits, similar to what Arguments accepts.
That would indeed be a useful feature to have. (A year ago or so, I had
asked on this list as I wondered whether such a feature is already
available.)
Is there a place where you track such feature requests (e.g., is this
worth opening an issue for in Bugzilla)?
Kind regards,
Ralf
>
> Maxime.
>
> On 09/15/2017 02:54 PM, Soegtrop, Michael wrote:
>> Dear Pierre,
>>
>>
>>
>> I thought about using the curly brace notation for implicit arguments in
>> the standard library:
>>
>>
>>
>> Inductive sig2 {A:Type} (P:A -> Prop) : Type :=
>>
>> exist2 : forall x:A, P x -> sig2 P.
>>
>>
>>
>> I think this is the most readable option for beginners and advanced
>> users. But it leads to a slightly different definition (see below),
>> first regarding the “maximally inserted” property – not sure why this is
>> different for “explicitly implicit” arguments and “Implicitly implicit”
>> arguments. There don’t seem to be any “Set/Unset Maximal Implicit
>> Insertion” directives in the code.
>>
>>
>>
>> More interestingly the second argument of sig2 has a different scope
>> (type_scope for sig vs function_scope for sig2). No idea why this is so.
>>
>>
>>
>> Such context dependent differences make it sometimes difficult to
>> understand definitions in the standard library.
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Michael
>>
>>
>>
>> Inductive sig (A : Type) (P : A -> Prop) : Type :=
>>
>> exist : forall x : A, P x -> {x : A | P x}.
>>
>>
>>
>> For sig: Argument A is implicit
>>
>> For exist: Argument A is implicit
>>
>> For sig: Argument scopes are [type_scope type_scope]
>>
>> For exist: Argument scopes are [type_scope function_scope _ _]
>>
>>
>>
>> Inductive sig2 (A : Type) (P : A -> Prop) : Type :=
>>
>> exist2 : forall x : A, P x -> sig2 P
>>
>>
>>
>> For sig2: Argument A is implicit and maximally inserted
>>
>> For exist2: Argument A is implicit and maximally inserted
>>
>> For sig2: Argument scopes are [type_scope function_scope]
>>
>> For exist2: Argument scopes are [type_scope function_scope _ _]
>>
>>
>>
>> Intel Deutschland GmbH
>> Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
>> Tel: +49 89 99 8853-0, www.intel.de
>> Managing Directors: Christin Eisenschmid, Christian Lamprechter
>> Chairperson of the Supervisory Board: Nicole Lau
>> Registered Office: Munich
>> Commercial Register: Amtsgericht Muenchen HRB 186928
>>
- [Coq-Club] Easy question re: implicit parameters, Kevin Sullivan, 09/14/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Guillaume Melquiond, 09/14/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Kevin Sullivan, 09/14/2017
- RE: [Coq-Club] Easy question re: implicit parameters, Soegtrop, Michael, 09/14/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Pierre Courtieu, 09/15/2017
- RE: [Coq-Club] Easy question re: implicit parameters, Soegtrop, Michael, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Maxime Dénès, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Ralf Jung, 09/15/2017
- RE: [Coq-Club] Easy question re: implicit parameters, Soegtrop, Michael, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Guillaume Melquiond, 09/15/2017
- RE: [Coq-Club] Easy question re: implicit parameters, Soegtrop, Michael, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Guillaume Melquiond, 09/15/2017
- RE: [Coq-Club] Easy question re: implicit parameters, Soegtrop, Michael, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Guillaume Melquiond, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Guillaume Melquiond, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Jason Gross, 09/16/2017
- RE: [Coq-Club] Easy question re: implicit parameters, Soegtrop, Michael, 09/18/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Guillaume Melquiond, 09/18/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Maxime Dénès, 09/15/2017
- RE: [Coq-Club] Easy question re: implicit parameters, Soegtrop, Michael, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Pierre Courtieu, 09/15/2017
- Re: [Coq-Club] Easy question re: implicit parameters, Guillaume Melquiond, 09/14/2017
Archive powered by MHonArc 2.6.18.