Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Prove associativity of composition of relations

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Prove associativity of composition of relations


Chronological Thread 
  • From: scott constable <sdconsta AT syr.edu>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Prove associativity of composition of relations
  • Date: Wed, 11 May 2016 13:34:59 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=sdconsta AT syr.edu; spf=None smtp.mailfrom=sdconsta AT syr.edu; spf=None smtp.helo=postmaster AT smtp1.syr.edu
  • Ironport-phdr: 9a23:vFrKdRBYWwz/ocDeg1eDUyQJP3N1i/DPJgcQr6AfoPdwSP74oMbcNUDSrc9gkEXOFd2CrakU2qyP7eu5ATJIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/nhqbrpdaKO1sArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIYTGZn9Kq8/VPlTCCksG2Ez/szi8xfZHiWV4X5JSW4RjgYACA/D9w3zVJP8+n/huuF63jKGNOXtXKpyVDi/ufQ4ACT0gTsKYmZquFrcjdZ92fpW

For reference, here is a more complete example of the problem I am facing:

Set Implicit Arguments.

Section Rels.

  Variables T U V : Type.
  Variable R1 : T -> U -> Prop.
  Variable R2 : U -> V -> Prop.

  Inductive Compose : T -> V -> Prop :=
  | comp_intro : forall x y z, R1 x y -> R2 y z -> Compose x z.

End Rels.

Notation "R2 @ R1" := (Compose R1 R2) (at level 55, right associativity).

Section RelLemmas.

  Variables T U V W : Type.
  Variable R1 : T -> U -> Prop.
  Variable R2 : U -> V -> Prop.
  Variable R3 : V -> W -> Prop.

  Lemma compose_assoc : R3 @ R2 @ R1 = (R3 @ R2) @ R1.
  Proof. ???
  Admitted.

End RelLemmas.

~Scott

On Wed, May 11, 2016 at 1:07 PM, scott constable <sdconsta AT syr.edu> wrote:
>
> Correction: "I think it should be possible to prove associativity of my definition of composition"...
>
> On Wed, May 11, 2016 at 1:06 PM, scott constable <sdconsta AT syr.edu> wrote:
>>
>> Thanks for the quick response Frédéric, but I already have a large project which relies heavily on my definition of composition, and the CoLoR library uses a different definition of composition. Hence I would have to rework a lot of my project to fit the CoLoR definition. I think it should be possible to prove associativity of my definition of relation in Coq, and I would like to know how to do so.
>>
>> ~Scott
>>
>> On Wed, May 11, 2016 at 1:00 PM, Frédéric Blanqui <frederic.blanqui AT inria.fr> wrote:
>>>
>>> Hello. You will find useful developments on relations in CoLoR.Util.RelUtil.v (coq-color on opam). See http://color.inria.fr/doc/CoLoR.Util.Relation.RelUtil.html for the definitions and theorems without the proofs. Best regards, Frédéric.
>>>
>>>
>>> Le 11/05/2016 18:51, scott constable a écrit :
>>>>
>>>> Hi All,
>>>>
>>>> I have the following definition of composition:
>>>>
>>>> Inductive Compose : T → V → Prop :=
>>>> | comp_intro : ∀ x y z, R1 x y → R2 y z → Compose x z.
>>>>
>>>> Notation "P ∘ R" := (Compose R P) (at level 55, right associativity).
>>>>
>>>> And I am hopelessly lost as to how to prove this theorem:
>>>>
>>>> Lemma compose_assoc : ∀ (R : U → V → Prop) (Q : V → T → Prop)
>>>>                           (P : T → W → Prop), P ∘ Q ∘ R = (P ∘ Q) ∘ R.
>>>>
>>>> Any help would be extremely appreciated!
>>>>
>>>> Thanks in advance,
>>>>
>>>> ~Scott Constable
>>>
>>>
>>
>



Archive powered by MHonArc 2.6.18.

Top of Page