coq-club AT inria.fr
Subject: The Coq mailing list
List archive
[Coq-Club] How to define a module type for NAxioms.NAxiomsSig + Orders.UsualOrderedTypeFull + ... effectively?
Chronological Thread
- From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: [Coq-Club] How to define a module type for NAxioms.NAxiomsSig + Orders.UsualOrderedTypeFull + ... effectively?
- Date: Thu, 30 Jun 2016 16:44:49 +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 mga14.intel.com
- Ironport-phdr: 9a23:hZmdFBH4oiE1vUVmw7AbYJ1GYnF86YWxBRYc798ds5kLTJ75ocmwAkXT6L1XgUPTWs2DsrQf2rKQ6v+rCDZIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWD14LuiKvjodX6WEZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0vcVHSODxe7kyZb1eFjUvdW4vroW/vh7aCACL+3E0U2MMkxMODRKTvz/gWZKk+BD9u+Vhwi6CeYXTTLs0UDmmpe8/TR7jiC4KM3gi92zYltZ3lIpapg6so1p0xIuCM9LdD+Z3Yq6IJYBSfmFGRMsEDyE=
Dear Coq Users,
the file Coq.NArith.BinNat contains this definition:
Module N <: NAxiomsSig <: UsualOrderedTypeFull <: UsualDecidableTypeFull <: TotalOrder.
I wonder if there is an effective way to define a Module Type with the same interface as the 4 module types given above combined? Just chaining them with <+ like this:
Module Type NatInt := NAxioms.NAxiomsSig <+ Orders.UsualOrderedTypeFull <+ Equalities.UsualDecidableTypeFull <+ Orders.TotalOrder.
fails, because all of them contain a type t. The only way I see is to include e.g. UsualOrderedTypeFull is to include all its components as shown in this image:
the colored boxes are module type functors, the white ones module types including a type t. Blue are functions, red are specifications, the darker ones contain definitions/lemmas, the light ones contain parameters/axioms.
Is there a smart way of doing this without essentially copying the definition of UsualOrderedTypeFull, UsualDecidableTypeFull and TotalOrder?
Should I create Module Type functors matching all the white boxes above?
Best regards,
Michael Intel Deutschland GmbH Intel Deutschland GmbH |
- [Coq-Club] How to define a module type for NAxioms.NAxiomsSig + Orders.UsualOrderedTypeFull + ... effectively?, Soegtrop, Michael, 06/30/2016
Archive powered by MHonArc 2.6.18.