coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Universe Polymorphic Relations
- Date: Wed, 23 Dec 2015 13:52:24 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-ob0-f182.google.com
- Ironport-phdr: 9a23:ePdnOBwFtmcUoWzXCy+O+j09IxM/srCxBDY+r6Qd0e4XIJqq85mqBkHD//Il1AaPBtWFraocw8Pt8IneGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwudrqzQtaapv/0/t7x0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY/jtKJkpi9Xorcq89NKGfHxeL19RrhFBhwnNXo07Yvlr0+QYxGI4y4+W34RlFJnGQ/e91muXJ7qtS31rO1mw3iyMsj/TLRyUjOnufQ4ACT0gTsKYmZquFrcjdZ92fpW
I think you are looking for Coq.Classes.CRelationClasses.
On Wed, Dec 23, 2015 at 12:50 PM, Gregory Malecha <gmalecha AT gmail.com> wrote:
Hello --I'm wondering if there are definitions analagous to [Reflexive] and [Transitive] that are both universe polymorphic and work with the built-in tactics such as [reflexivity] and setoid rewriting. In particular, I note that when I use the basic definitions I get a universe constraint that I would like to avoid. For example,Require Import Coq.Classes.RelationClasses.Set Printing Universes.Polymorphic Class ILogic (T : Type) : Type :={ lentails : T -> T -> Prop; Refl_lentails : Reflexive lentails }.Print ILogic.(*Polymorphic Record ILogic (T : Type@{Top.1}) : Type@{max(Set+1, Top.1)}:= Build_ILogic{ lentails : T -> T -> Prop; Refl_lentails : Reflexive lentails }(* Top.1 |= Top.1 <= Coq.Classes.RelationClasses.1*)*)The extra constraint [Top.1 <= Coq.Classes.RelationClasses.1] makes this definition less useful in my particular context. If I inline the definition of [Reflexive] then everything works out.Polymorphic Class ILogic' (T : Type) : Type :={ lentails' : T -> T -> Prop; Refl_lentails' :> forall a : T, lentails' a a }.Print ILogic'.(*Polymorphic Record ILogic' (T : Type@{Top.12}) : Type@{max(Set+1, Top.12)}:= Build_ILogic'{ lentails' : T -> T -> Prop; Refl_lentails' : forall a : T, lentails' a a }(* Top.12 |= *)*)However, with this definition, [reflexivity] does not work. I'm wondering if there already exists polymorphic instances of the basic classes, e.g. [Reflexive], [Transitive], [Proper], [Respectful], etc, or if there is some way to tell Coq to look for instances of a polymorphic version of these classes that I would define.Thanks so much.--gregory malecha
- [Coq-Club] Universe Polymorphic Relations, Gregory Malecha, 12/23/2015
- Re: [Coq-Club] Universe Polymorphic Relations, Jason Gross, 12/23/2015
- Re: [Coq-Club] Universe Polymorphic Relations, Gregory Malecha, 12/23/2015
- Re: [Coq-Club] Universe Polymorphic Relations, Gregory Malecha, 12/23/2015
- Re: [Coq-Club] Universe Polymorphic Relations, Jason Gross, 12/23/2015
- Re: [Coq-Club] Universe Polymorphic Relations, Gregory Malecha, 12/23/2015
- Re: [Coq-Club] Universe Polymorphic Relations, Gregory Malecha, 12/23/2015
- Re: [Coq-Club] Universe Polymorphic Relations, Jason Gross, 12/23/2015
Archive powered by MHonArc 2.6.18.