Skip to Content.
Sympa Menu

coq-club - [Coq-Club] For arguments of a Class' projections to be explicit

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] For arguments of a Class' projections to be explicit


Chronological Thread 
  • From: "Xavier Montillet" <xavierm02.net AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] For arguments of a Class' projections to be explicit
  • Date: Thu, 19 Jun 2014 13:12:21 +0200

Hi,

Since I have/want to use relations over quotient sets, I defined

Class relationA := mkRelationA {
R : relation A;
R_compat :> Proper (eqA ==> eqA ==> iff) R
}.

I currently use "RA.(@R)" to get the "relation A" from the "relationA" but I'd
prefer to force the arguments of the projections to be explicit because weird
things happen.

For example, given two variables:

Variable RA1 : relationA.
Varaible RA2 : relationA.

You can try to prove that their R-projections are equal:

Lemma wut : RA1.(@) = RA2.(@).

And the goal will be "R = R".

Obviously, "reflexivity" doesn't work and one can use "unfold R" to change the
goal to "(let (R0, _) := RA1 in R0) = (let (R0, _) := RA2 in R0)". But I'd
rather not have two different things with the same name in the first place...

So my questions are:

- Is it possible to force the arguments of the projections to be explicit?
- If it is, how?
- If it isn't, would it be possible to use a Record instead but still have
R_compat be "magically registered" so that I can use "rewrite" instead of
"apply R_compat"?

Thank you in advance for your answers.

Respectfully,

Xavier Montillet



Archive powered by MHonArc 2.6.18.

Top of Page