Skip to Content.
Sympa Menu

coq-club - RE: [Coq-Club] Records and Inductive definitions

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

RE: [Coq-Club] Records and Inductive definitions


Chronological Thread 
  • From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: RE: [Coq-Club] Records and Inductive definitions
  • Date: Thu, 1 Oct 2015 14:30:15 +0000
  • Accept-language: de-DE, en-US
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=michael.soegtrop AT intel.com; spf=Pass smtp.mailfrom=michael.soegtrop AT intel.com; spf=None smtp.helo=postmaster AT mga01.intel.com
  • Ironport-phdr: 9a23:0EbAyhzcx9NvMmnXCy+O+j09IxM/srCxBDY+r6Qd0e0XIJqq85mqBkHD//Il1AaPBtWHrawewLqO+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStKU0Z78h7j60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mooRLVry/dKAlR5RZCi4nOiY7/oej4RLEVE6E4mYWemQQiBtBRQbfukLURJD052HBsedyxDOdJYm+aLE/WT2v6+0jHBrpgycOOjp/62bahdBqi7pzoRS9qhg5yInRNtLGfMFid7/QKItJDVFKWdxcAnRM

Dear Petar,

in this case it might be easier to use a set type or duplication free list
type. In my experience it is much more pain to carry along the witnesses in
dependent types than to use types which have the desired properties by
construction.

Unfortunately the set types in the standard library are implemented with
modules and are not first class polymorphic, but if lists are performance
wise ok as set representation for you, it is easy to define. If not, I would
be interested to work together on porting relevant standard libraries (tree
based sets) to type class based first class polymorphic implementations.

Best regards,

Michael


-----Original Message-----
From:
coq-club-request AT inria.fr

[mailto:coq-club-request AT inria.fr]
On Behalf Of Petar Maksimovic
Sent: Thursday, October 01, 2015 4:14 PM
To:
coq-club AT inria.fr
Subject: Re: [Coq-Club] Records and Inductive definitions

Thanks Pierre-Marie and Epiphanie,

Vectors would work if my example hadn't been somewhat under-illustrative.
What I would really like is

Record list_noDup (T : Type) := {lT :> list T; cond: noDup lT}.

Inductive T : Type :=
| T_main : list_noDup T -> T.

but for that I think I'll need some sort of workaround.

Cheers,
Petar
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928



Archive powered by MHonArc 2.6.18.

Top of Page