Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Equality for inductive type containing list

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Equality for inductive type containing list


Chronological Thread 
  • From: Abhishek Anand <abhishek.anand.iitg AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Equality for inductive type containing list
  • Date: Thu, 6 Oct 2016 11:24:24 -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-yb0-f182.google.com
  • Ironport-phdr: 9a23:beS4YRCAFJxC77Rbq91HUyQJP3N1i/DPJgcQr6AfoPdwSP3ypMbcNUDSrc9gkEXOFd2CrakV0ayN6euwAyRAuc/H6y9SNsQUFlcssoY/oU8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0IufrymUt2as8Pi3OervpbXfg8A0DG6ePZ5KAi8hQTXrMgfx4V4fPUf0BzM91JCe+VNxW5rbXuVlhDwrpO59p5i6CRduLQo8cdGXeP7frg3ZbNdBTUidWsy4Zu45lH4UQKT6y5EAS0tmR1SDl2d4Q==

Yes.
Many Coq developments contain mutual-inductive definitions that contain custom specializations of generic containers like list.
The example in the first email in this thread would be rewritten in such developments as:
Inductive ty: Set :=
  | tvar : id -> ty
  | tpoly : id -> lty -> ty
with lty : Set :=
  | tnil : lty
  | tcons : ty -> lty -> lty.

I suspect that this pattern is encouraged by the good induction-principle generation (Scheme command) for mutual inductives and the lack thereof for nested inductives.
This creates unnecessary duplication of combinators on lists and their proofs. Personally, I find this duplication very unfortunate.
I hope that generating good induction principles for nested inductives will put an end to the above practice.




On Thu, Oct 6, 2016 at 11:08 AM, Pierre Courtieu <pierre.courtieu AT gmail.com> wrote:
The default inductive principles for mutual are dumb and I don't
understand why we keep on generating it.

But the ones defined by Scheme...with... . are reasonable. Mimicking
on nested inductives what Scheme does for mutual would be a very good
approximation. Won't it?

P.



2016-10-06 16:48 GMT+02:00 Pierre-Marie Pédrot <pierre-marie.pedrot AT inria.fr>:
> On 06/10/2016 16:44, Maxime Dénès wrote:
>> Aren't we already doing exactly that for mutual inductive types?
>
> No, the principle defined by default on mutual inductive types is
> stupid, as it does not recurse on the other types than self. Note that
> there is again a problem of canonicity here. What would be the type of
> such a principle here? Shall we return pairs? Or shall we define several
> principles?
>
> PMP
>




Archive powered by MHonArc 2.6.18.

Top of Page