Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Matching parameters of dependent types with common stem

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Matching parameters of dependent types with common stem


Chronological Thread 
  • From: "Terrell, Jeffrey" <jeffrey.terrell AT kcl.ac.uk>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Matching parameters of dependent types with common stem
  • Date: Wed, 3 Oct 2012 15:51:11 +0000
  • Accept-language: en-GB, en-US

Hi,

How could Spec be made to return the proposition

forall x : X, D x /\ L x?

Clearly, the way I've defined it is nonsense. However, I don't know how to
exploit the fact that parameters d and l are both dependent on parameter X.

Inductive Data : Set -> Type :=
Build_Data : forall X : Set, (X -> Prop) -> Data X.

Inductive Link : Set -> Type :=
Build_Link : forall X : Set, (X -> Prop) -> Link X.

Definition Spec (X : Set) (d : Data X) (l : Link X) : Prop :=
match d with Build_Data X D =>
match l with Build_Link X L =>
forall x : X, D x /\ L x
end
end.

Many thanks.

Regards,
Jeff.
---
Jeffrey Terrell
Department of Informatics
King's College, London





Archive powered by MHonArc 2.6.18.

Top of Page