Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Easy question re: implicit parameters

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Easy question re: implicit parameters


Chronological Thread 
  • From: Kevin Sullivan <sullivan.kevinj AT gmail.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: [Coq-Club] Easy question re: implicit parameters
  • Date: Thu, 14 Sep 2017 12:12:14 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=sullivan.kevinj AT gmail.com; spf=Pass smtp.mailfrom=sullivan.kevinj AT gmail.com; spf=None smtp.helo=postmaster AT mail-wr0-f171.google.com
  • Ironport-phdr: 9a23:NoJwQBWPVNLUqn9doiGFFU11s8DV8LGtZVwlr6E/grcLSJyIuqrYZRyCt8tkgFKBZ4jH8fUM07OQ6P+wHzFYqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aSV3DMl8/LePsX4XWks6f1uao+pSVbR8CzG62Zqo3JxGrpy3QsNMXiM1sMPBi5AHOpy5rdvpXwytTOFaXngj14I/k54Nn9yVOsvRn9MNeUKP4V6s9RL1cSj8hNjZmt4XQqRDfQF7XtTMnWWIMn08QDg==

What aspect of the definition of [sig] in the standard library results in its first parameter being implicit.

Here's how it's defined:

Inductive sig (A:Type) (P:A -> Prop) : Type :=
    exist : forall x:A, P x -> sig A P.

[A] is not implicit here.

Later on the definition includes this:

Arguments sig (A P)%type.

Now when using the standard library, I have to leave out the value of [A].

However, if I write my own re-implementation as follows, I still have to provide an explicit value for [A].

Module foo.

Inductive sig (A:Type) (P:A -> Prop) : Type :=
    exist : forall x:A, P x -> sig A P.

Arguments sig (A P)%type.

Definition any_bp := sig  dnabasepair (fun p: dnabasepair => True).

(* I have to explicitly provide the first [dnabasepair] parameter *)

End foo.

I know this is an elementary question on implicit parameters. I read the manual but didn't find the detail I need to understand what's going on here. Thanks.



Archive powered by MHonArc 2.6.18.

Top of Page