coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gregory Malecha <gmalecha AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] Universes in Modules
- Date: Sat, 30 Jan 2016 12:58:50 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gmalecha AT gmail.com; spf=Pass smtp.mailfrom=gmalecha AT gmail.com; spf=None smtp.helo=postmaster AT mail-yk0-f173.google.com
- Ironport-phdr: 9a23:AztssBHtG0d6qCDHYmnuBJ1GYnF86YWxBRYc798ds5kLTJ75oM6wAkXT6L1XgUPTWs2DsrQf27WQ6/CrADBZqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7/0o82YOlkRzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzazXwFGk4SjxAAVwPC9VTxWor7mir8rOt0nieAa57YV7cxDBu44qhsUg6grS4DOjU5+SmDhcl5iK9QoBuJqBl2woqSa4aQYqktNpjBdM8XEDISFv1aUDZMV8blN9MC
Hello --
--
I'm wondering if there is a clean way to to make a module type that carries a universe. What I would ideally want to do is something like:
Module Type Uni.
Universe U.
End Uni.
Module Option (U : Uni).
Inductive option (T : Type@{U.U}) : Type :=
| None
| Some (_ : T).
End.
But the universe U is not accessible. My attempt, which I do not think actually works is something like this:
Module Type Uni.
Universe U.
Parameter type : Type@{U}.
End Uni.
Module Option (U : Uni).
Definition U := ltac:(match type of U.type with | ?T => exact T end).
Inductive option (t : U) : Type :=
| None
| Some (_ : T).
End Option.
As far as I can tell though, the universe [U] seems to be fixed, and does not vary between different instances of the module type.
Does anyone know of a way to achieve this?
Thanks.
gregory malecha
- [Coq-Club] Universes in Modules, Gregory Malecha, 01/30/2016
- Re: [Coq-Club] Universes in Modules, Jason Gross, 01/30/2016
- Re: [Coq-Club] Universes in Modules, Gregory Malecha, 01/31/2016
- Re: [Coq-Club] Universes in Modules, Jason Gross, 01/30/2016
Archive powered by MHonArc 2.6.18.