coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Abhishek Anand <abhishek.anand.iitg AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] difference between typeclass substructures vs. superclasses
- Date: Mon, 27 Jun 2016 15:38:48 -0400
- 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-qk0-f178.google.com
- Ironport-phdr: 9a23:YUc0ZRWQffCFjs1OvuqUF/YbcLPV8LGtZVwlr6E/grcLSJyIuqrYZhGDt8tkgFKBZ4jH8fUM07OQ6PG4HzVZqs/b7jgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLHqvcSKKFwS2nKUWvBbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvdKMhCLdcET5uZ2sy/YjgsQTJZQqJ/HoVFGsMxElmGQ/AuTjwXpbqsib5/sN70S+WdZn/R7A1QjSv7OFiThbuhGEGNiI22G7Sg810yqlcpUTy9FRE34fIbdTNZ7JFdaTHcIZCSA==
Section 3 of the following article discusses some practical differences:
Spitters, Bas, and Eelis Van Der Weegen. “Type Classes for Mathematics in Type Theory.” MSCS 21, no. Special Issue 04 (2011): 795–825. doi:10.1017/S0960129511000119.
If I understand the article correctly, it recommends the former (bundled) approach for proof-irrelevant items such as your `Irrelevant`.
-- Abhishek
http://www.cs.cornell.edu/~aa755/On Mon, Jun 27, 2016 at 3:19 PM, Jonathan Leivent <jonikelee AT gmail.com> wrote:
What are the differences between typeclass substructures and superclasses?
For instance, suppose I have:
Class Irrelevant T := { all_the_same : forall a b : T, a = b }.
Class Singular T := { irr :> Irrelevant T; unique : T }.
Class Singular2 T `{irr : Irrelevant T} := { unique2 : T }.
What is the difference between Singular and Singular2? Is there a semantic difference? Are there situations in which one is preferable to the other?
-- Jonathan
- [Coq-Club] difference between typeclass substructures vs. superclasses, Jonathan Leivent, 06/27/2016
- Re: [Coq-Club] difference between typeclass substructures vs. superclasses, Abhishek Anand, 06/27/2016
- Re: [Coq-Club] difference between typeclass substructures vs. superclasses, Jonathan Leivent, 06/28/2016
- Re: [Coq-Club] difference between typeclass substructures vs. superclasses, Abhishek Anand, 06/27/2016
Archive powered by MHonArc 2.6.18.