coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gregory Malecha <gmalecha AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] Universe Polymorphic Relations
- Date: Wed, 23 Dec 2015 09:50:50 -0800
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gmalecha AT gmail.com; spf=Pass smtp.mailfrom=gmalecha AT gmail.com; spf=None smtp.helo=postmaster AT mail-yk0-f169.google.com
- Ironport-phdr: 9a23:kPcH3RbeIptJ3nUqHfSFABv/LSx+4OfEezUN459isYplN5qZpcq+bnLW6fgltlLVR4KTs6sC0LqI9fi4EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35rxj7j60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgJ45jAsgCLZg+S7DNIWWIP1xFMHgLt7RfgX563vDGs5cRn3yzPEtf7QrcuSHyH5qNmQx/hwHMIMjc9/WrXg+R/iatapFSqoBkpkN2cW52cKPcrJvCVRtgdX2cUG58JDyE=
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.