Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Proper morphisms for family of functions

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Proper morphisms for family of functions


Chronological Thread 
  • From: Abhishek Anand <abhishek.anand.iitg AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Proper morphisms for family of functions
  • Date: Thu, 7 Jan 2016 20:04:05 -0500
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=abhishek.anand.iitg AT gmail.com; spf=Pass smtp.mailfrom=abhishek.anand.iitg AT gmail.com; spf=None smtp.helo=postmaster AT mail-yk0-f181.google.com
  • Ironport-phdr: 9a23:SPbkhhDtbCr3lv6OPuUAUyQJP3N1i/DPJgcQr6AfoPdwSP7+pcbcNUDSrc9gkEXOFd2CrakU1ayO6+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6MyZzvn8mJuLTtICxwzAKnZr1zKBjk5S7wjeIxxbVYF6Aq1xHSqWFJcekFjUlhJFaUggqurpzopM0roGxsvKcq8NcFWqHndexsRrtBST8iLmod5cvxtBCFQxHZtVUGVWBDuxBIAhPF4RKyd5H4tCey4uN32CiBPcD1C7kyUDKuqaZqVBDAhyIONjp/+2bS3J8jxJlHqQ6s8kQsi7XfZ5uYYaJz

As you noted, extensional equality on function types is only a partial equivalence relation in cases where the domain type has a non-syntactic equality -- reflexivity only holds for functions that are setoid morphisms.
Perhaps the Reflexive class was not designed to cover such partiality.

You can make a set type of functions that are setoid morphisms, but additional work (eta expansion of dependent pairs) would be needed before invoking reflexivity.

Instead, you can redefine `reflexivity` using Ltac, as Jason showed in a coq-club post on 12/23/15.


On Wed, Jan 6, 2016 at 1:08 AM, Vadim Zaliva <vzaliva AT cmu.edu> wrote:

On Jan 5, 2016, at 21:46 , Abhishek Anand <abhishek.anand.iitg AT gmail.com> wrote:

Sorry, I forgot that I had to make another fix to your code.

Thanks! That was it. Now about your other suggestion:

1) Take a look at  MathClasses.theory.setoids.ext_equiv_refl 
Moreover, you might want to reuse MathClasses.interfaces.abstract_algebra.Setoid_Morphism instead of defining your own `O`.

That was also super helpful! I still want to have my own class but I just defined it as:

  Class O (op: A -> A) :=
    o_setoidmor :> Setoid_Morphism op.

and if I use `apply ext_equiv_refl` instead of `reflexivity` everything works just great. Here is full example: http://ideone.com/rbD6rv reworked per your suggestions.

However I am still wondering if there is a way to declare such refined/specialized instance of ‘Reflexive’ for Setoid_Morphisms so 
reflexivity tactics would work as well?

Sincerely,
Vadim Zaliva

--
CMU ECE PhD candidate
Skype: vzaliva





Archive powered by MHonArc 2.6.18.

Top of Page