Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] parameter

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] parameter


chronological Thread 
  • From: "Patricia Peratto" <psperatto AT adinet.com.uy>
  • To: "Adam Chlipala" <adamc AT csail.mit.edu>
  • Cc: "coqclub" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] parameter
  • Date: Sat, 21 Apr 2012 16:12:29 -0300

In case of a formation rule, can I replace in an inductive declaration of a type a forall
by parameters and arrow?


----- Original Message ----- From: "Adam Chlipala" <adamc AT csail.mit.edu>
To: "Patricia Peratto" 
<psperatto AT adinet.com.uy>
Cc: "coqclub" 
<coq-club AT inria.fr>
Sent: Saturday, April 21, 2012 3:45 PM
Subject: Re: [Coq-Club] parameter


Patricia Peratto wrote:
Yes, my question is other.
What I mean is if always that I have an explicit forall
in a definition I can replace it by parameters and  arrow. By example
I can write:

cons (a:A)(l:List A):List A

or

cons : A->List A->List A

instead of
cons : forall(A:A)(l:List A),List A.

My question is if I can always do it.

Ah, I see. None of your code above uses "parameters," following official Coq terminology; that only applies to this sort of argument binding at the level of an inductive definition, not a constructor.

However, the first kind of constructor type shorthand notation you demonstrate above _is_ general enough to work for all constructor types. Of course, one of the constructor arguments (or the result) might itself have a [forall] type, in which case you need to get the [forall] in there somehow; none of the shorthands you've shown will help avoid that.




Archive powered by MhonArc 2.6.16.

Top of Page