coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Cedric Auger <sedrikov AT gmail.com>
- To: t x <txrev319 AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Universe of Types / Internals
- Date: Mon, 18 Nov 2013 10:41:09 +0100
2013/11/18 t x <txrev319 AT gmail.com>
I think it is not correct.
"cons" is not universally quantified over 'k'.
A more correct vision would be:
cons: forall (A:Type-k) (lst:list A) (x:A), list A
Where k is some "internal Coq integer" which is computed by the system (so it is fixed, and you cannot provide the 'k' value to cons).
In fact, in practice, 'k' is not a Coq Integer, but some system on algebraic _expression_, and you have to check that all systems in the Coq module you define have a solution (so 'k' can be instantiated by an integer).
For your " we can't have (2) in Coq since "defining Natural numbers requires Type" ", this is wrong in a way, since natural numbers only require Set, not Type. Still, having the ability to express levels with natural numbers would be a burden, as you could not "insert" universes between two given universes. So the only trick I know if you want to do universe manipulations is to do "Definition Universe5 := Type. Definition Universe4 := Type:Universe5. …". And then you can "Inductive list (A: Universe4) : Universe5 := …" This trick fixes the universes once and for all. It can be a good trick to lighten Coq work on universe computations.
Thoughts:Although Coq displays the following:(1) cons: forall (A: Type) (lst: list A) (x: A), list Awe know this is a "lie" since Coq has a universe tower rather than a type of types.Thus, it seems internally, this must be stored as:(2) cons: forall (k: Coq-internal-Int) (A: universe k) (lst: list A) 9x: A), list ANow, we can't have (2) in Coq since "defining Natural numbers requires Type" so we can't have"k:Nat"and must instead have"k: Coq-internal-int"Question:Is the above analysis correct? If not, how else does Coq get around the fact that "[Universe k] is always displayed as Type" and "having a Type of Type -> paradox."
I think it is not correct.
"cons" is not universally quantified over 'k'.
A more correct vision would be:
cons: forall (A:Type-k) (lst:list A) (x:A), list A
Where k is some "internal Coq integer" which is computed by the system (so it is fixed, and you cannot provide the 'k' value to cons).
In fact, in practice, 'k' is not a Coq Integer, but some system on algebraic _expression_, and you have to check that all systems in the Coq module you define have a solution (so 'k' can be instantiated by an integer).
For your " we can't have (2) in Coq since "defining Natural numbers requires Type" ", this is wrong in a way, since natural numbers only require Set, not Type. Still, having the ability to express levels with natural numbers would be a burden, as you could not "insert" universes between two given universes. So the only trick I know if you want to do universe manipulations is to do "Definition Universe5 := Type. Definition Universe4 := Type:Universe5. …". And then you can "Inductive list (A: Universe4) : Universe5 := …" This trick fixes the universes once and for all. It can be a good trick to lighten Coq work on universe computations.
Thanks!
--
.../Sedrikov\...
- [Coq-Club] Universe of Types / Internals, t x, 11/18/2013
- Re: [Coq-Club] Universe of Types / Internals, Cedric Auger, 11/18/2013
- <Possible follow-up(s)>
- Re: [Coq-Club] Universe of Types / Internals, Cristóbal Camarero Coterillo, 11/24/2013
Archive powered by MHonArc 2.6.18.