Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] implicit arguments

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] implicit arguments


Chronological Thread 
  • From: Jim Fehrle <jim.fehrle AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] implicit arguments
  • Date: Wed, 9 Dec 2020 20:32:31 -0800
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jim.fehrle AT gmail.com; spf=Pass smtp.mailfrom=jim.fehrle AT gmail.com; spf=None smtp.helo=postmaster AT mail-il1-f178.google.com
  • Ironport-phdr: 9a23:AeoOBxzusSacmHPXCy+O+j09IxM/srCxBDY+r6Qd2+gRIJqq85mqBkHD//Il1AaPAdyErasb2qGM4ujJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglVhjexe65+IReyoAneqMUbhZZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLulSwJNSM28HvPh8N/gqJUohKvqRJ8zYDJfo+aKOFzcbnBcd4AX2dNQtpdWi5HD4ihb4UPFe0BPeNAoof5plsOqAa1CwmyC+Pv0D9IgmH51rA93uQjEAHG2RYsH9wQv3TUttX1MLkdXPu6zKnN1zrDbvdW1S3h54jPdxAsuPeBVq9/fsTN00cgDR/FjkmOpoz/OTOYzuYAvnab4udhWu+hhW0qpxx1rzWsxskhlpXFi58Jx13L8Sh3z5g4KNy6RUB1fdOpH5hduiKUOYZ2TM4vTXxktDg8x7Ybt5C7ey0Kx44mxx7Zc/GHco6I4gjiVOmLOzt4imhldbSijBix6Uit0vPwWtWw3VpQrSdIksPAum0M2hHS8MSLV/lw80Sn1D2SzQ7c8PtELloxlafDK54u3Lowlp0LvETGBCD2mUH2gLaXdkUg5+Sk8urnbqjkq5KfLYN0hQb+MqMhmsy7H+s0KBQBX2+e+eik1b3j+1P2QKlSg/EojqXUtIrWKMcbq6KjHgNY04cu5wyiAzqk09kUhXwHI0hEeBKDgYjpIVbOIPXgAPe9glSslS1nx/7YMb3hGJXNKmbMnazufbZ48UFcyQ4zwcpD6JJTD7ENOOjzVVPptNzEEh85NBS5zPrgCNVkz48RRWaPArKCP67Jql+J5ucvI/GWa4MPuTb9LeIl5//0gnMjl18dZ/rh4ZxCY3ehW/9iPk+xYHz2g95HH31ZkBA5SbnIiVjKfzNTfXK/F/Y+5zR9Bo+mF4PObo+oib2Fmiy8G8sFNSh9FlmQHCKwJM2/UPAWZXfKe54zonk/TbGkDrQZ+1SrvQ7+xaBgK7ONqCIdvJPnktNy4r+KzE1gxXlPF82Yllq1YSRshGpRHm052al+pQp2zVLRifEl0cwdLsRa4rZyail/NZPYyLYkWdX7WwaEf9PQDVj/HYXgDjY2QdY8hdQJZhQlFg==

Check this section of the manual: https://coq.inria.fr/distrib/current/refman/language/extensions/arguments-command.html, that may have what you seek.  Still lots of things in the manual need improvement.

However, I'm not an expert on implicit arguments.

It's a bit hard to index :=, it's used in 77 places in the grammar.  A few non-alphabetic items appear in the general index, but what's there is probably woefully inadequate.  Here is one basic use:

Jim

On Wed, Dec 9, 2020 at 7:46 PM Jeremy Dawson <Jeremy.Dawson AT anu.edu.au> wrote:

Hi,

I have tried to find out when implicit arguments are inserted.  Is this
in the documentation anywhere?

With a function

lja_dd_ord < About no_rpt_same.
no_rpt_same :
forall U : Type,
relationT U ->
forall (rules : list U -> U -> Type) (prems : U -> Type) (c0 : U),
derrec rules prems c0 -> Type

Arguments U, rules, prems, c0 are implicit

I find

lja_dd_ord < Check no_rpt_same seq_ord.
no_rpt_same seq_ord
      : forall (rules : list (srseq (PropF ?V)) -> srseq (PropF ?V) -> Type)
          (prems0 : srseq (PropF ?V) -> Type) (c0 : srseq (PropF ?V)),
        derrec rules prems0 c0 -> Type

which is as I expected (as a matter of fact, I can't find this
documented either, but I've discovered from experience that implicit
arguments (non-maximal) are inserted up to the last explicit argument)

but

lja_dd_ord < Check no_rpt_same seq_ord (prems:=prems).
no_rpt_same seq_ord (prems:=prems)
      : forall c0 : srseq (PropF V), derrec ?rules prems c0 -> Type

ie it seems to have inserted the implicit argument rules also.

What are the rules about this?

And if there are any tips for finding things like this in the
documentation, I'd appreciate it.  For example, the symbol := isn't in
the general index, which I would have expected.

Thanks

Jeremy



Archive powered by MHonArc 2.6.19+.

Top of Page