coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] module "best practices"?
- Date: Tue, 21 Aug 2018 13:58:25 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=adamc AT csail.mit.edu; spf=Pass smtp.mailfrom=adamc AT csail.mit.edu; spf=None smtp.helo=postmaster AT outgoing-stata.csail.mit.edu
- Ironport-phdr: 9a23:7Xd53ByrUMePohzXCy+O+j09IxM/srCxBDY+r6Qd1OgfIJqq85mqBkHD//Il1AaPAd2Eraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HRbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRH1likHOT43/mLZhMN+g61Uog6uqRNkzo7IY4yYLuZycr/TcN4YQ2dKQ8ZfVzZGAoO5d4YCE/cOMvxdr4LguVYOrR++BQi0BOz1zj9HnGL90Kog3Os8Cw7G2RAvEskSv3TPttr1NaMSXfqwzKnJ0TXPde1Z1irg6IXRdB0qvPKCXapofMbM10UiFBnJg1uMpYD/IT+ZzPoBv3WH4+Z4SO6jlW0qpxt/rzSz3MshjpfFipgLxlza6Cl0xps+K8eiR05he9GkFYNdtyGEOItyRcMvW2ZouDsmyr0Jvp67fS4KyJs+yx7Ed/yIaZSI7Qj5WOmNOjd3nnNleLalixa38Eig1vfwWdep31ZXtiZFk9/MuW4R1xHL98SLVPhw8l2v1DqTzQzf9PtILV4pmabHM5Ihx6Q/lpsXsUTNBC/2n0D2gbeMeUo54Oeo7vjob676qZ+HLYB0iwX+Pr4rmsy+HeQ0KBYBUHWG+eikzr3s4VX5QKlWjv0xiqTWrJfaJd0CqqGlBw9Vz50s5g2kDzam1dQYhWMIIEhEeBKBlYjpOkvBLOr2Dfel0ByQl2JgwOmDNbn8CL3MKGLCmfHvZ+VT8UlZnSM/xNUXzJJQC6kIJPu7Dkb9vdnTJhQiOg2whePmFJNw2p5ICjHHObOQLK6H6QzA3ekoOeTZPNZE6ga4EOAs4rvVtVF8nFYceaez2p5ONSKzBf1nJwOcYGaqj9scQz5T4lgOCdfygVjHagZ9Im6oVvthtDogAYOiS4LCWsagjKHThH7mTK0TXXhPDxW3KVmtd4iAXKxUOiWPPsBmkzoLEKO9QpMokxq1vQ7+jb9mMqzZ9jBK7Z8=
On 08/17/2018 04:36 PM, Kevin Hamlen wrote:
What do Coq programmers consider the "right way" to organize large projects containing functors? In particular, how do authors of large projects define collections of modules that all build upon some shared functor without getting duplicate name-conflicts?
It really seems like a distraction to work so hard to put an inductive definition directly inside a functor body. I would do it like this:
Module Type FOO_TYPE.
Parameter foo: Type.
End FOO_TYPE.
Inductive bar T := Bar (f : T).
Module FooDefs (Foo: FOO_TYPE).
Definition bar := bar Foo.foo.
(* ... hundreds more definitions ... *)
End FooDefs.
Module FooTheory1 (Foo: FOO_TYPE).
Module Import F := FooDefs Foo.
Ltac silly1 := match goal with |- Bar _ _ = Bar _ _ => reflexivity end.
(* ... more theorems, proofs, and ltacs ... *)
End FooTheory1.
Module Foo:FOO_TYPE.
Definition foo:=nat.
End Foo.
Module Import FD := FooDefs Foo.
Module Import FT1 := FooTheory1 Foo.
Theorem silly: forall (x:bar), x=x.
Proof.
destruct x.
silly1.
Qed.
- [Coq-Club] module "best practices"?, Kevin Hamlen, 08/17/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/18/2018
- Re: [Coq-Club] module "best practices"?, Samuel Gruetter, 08/18/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/19/2018
- Re: [Coq-Club] module "best practices"?, Kevin Hamlen, 08/20/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/20/2018
- Re: [Coq-Club] module "best practices"?, Benjamin C. Pierce, 08/20/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/23/2018
- Re: [Coq-Club] module "best practices"?, Benjamin C. Pierce, 08/20/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/20/2018
- Re: [Coq-Club] module "best practices"?, Kevin Hamlen, 08/20/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/19/2018
- Re: [Coq-Club] module "best practices"?, Adam Chlipala, 08/21/2018
- Re: [Coq-Club] module "best practices"?, Kevin Hamlen, 08/21/2018
- Re: [Coq-Club] module "best practices"?, Samuel Gruetter, 08/22/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/23/2018
- Re: [Coq-Club] module "best practices"?, David Holland, 08/23/2018
- Re: [Coq-Club] module "best practices"?, Anders Lundstedt, 08/24/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/24/2018
- Re: [Coq-Club] module "best practices"?, Anders Lundstedt, 08/24/2018
- Re: [Coq-Club] module "best practices"?, David Holland, 08/23/2018
- RE: [Coq-Club] module "best practices"?, Soegtrop, Michael, 08/23/2018
- Re: [Coq-Club] module "best practices"?, Samuel Gruetter, 08/22/2018
- Re: [Coq-Club] module "best practices"?, Kevin Hamlen, 08/21/2018
Archive powered by MHonArc 2.6.18.