coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jean-Francois Dufourd <dufourd AT dpt-info.u-strasbg.fr>
- To: Coq Club <coq-club AT pauillac.inria.fr>
- Subject: [Coq-Club] Type hierarchy
- Date: Thu, 08 Oct 2009 10:24:32 +0200
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi,
I'm trying to (impredicatively) define the type Nat in Coq
(without the option - impredicative-set, which works well).
I write:
Definition Nat:=forall X:Type,(X->X)->X-> X.
Definition succ(n:Nat):Nat:=
fun(X:Type)(f:X->X)(z:X) => (f (n X f z)).
Definition add(n m:Nat):Nat:=
fun(X:Type)(f:X->X)(z:X) => m X f (n X f z).
Definition mult(n m:Nat):Nat:=
fun(X:Type)(f:X->X)(z:X) => m X (n X f) z.
All that is OK. But, when I write an other version of mult:
Definition mult1(n m:Nat):Nat:=
n Nat (add m) zero.
Coq answers "Universe inconsistency".
I interprete this mistake as the violation of the typing rules, because
Nat is probably of higher Type level as the X of its definition.
Is this true ? Does a means exist for circumventing this problem ?
Thank you !
Jean-Franc,ois Dufourd
- [Coq-Club] binary distribution for Leopard (and Snow Leopard), Thorsten Altenkirch
- Re: [Coq-Club] binary distribution for Leopard (and Snow Leopard),
Matthieu Sozeau
- [Coq-Club] what are "levels" in Coq,
Vladimir Voevodsky
- Re: [Coq-Club] what are "levels" in Coq, Adam Chlipala
- Re: [Coq-Club] what are "levels" in Coq,
harke
- Re: [Coq-Club] what are "levels" in Coq,
Vladimir Voevodsky
- Re: [Coq-Club] what are "levels" in Coq, Adam Chlipala
- Re: [Coq-Club] what are "levels" in Coq,
Thorsten Altenkirch
- Re: [Coq-Club] what are "levels" in Coq,
Yves Bertot
- Re: [Coq-Club] what are "levels" in Coq, Lionel Elie Mamane
- [Coq-Club] Type hierarchy, Jean-Francois Dufourd
- Re: [Coq-Club] Type hierarchy, André Hirschowitz
- Re: [Coq-Club] Type hierarchy, Hugo Herbelin
- Re: [Coq-Club] Type hierarchy, Adam Chlipala
- Re: [Coq-Club] Type hierarchy, Hugo Herbelin
- Re: [Coq-Club] Type hierarchy, Jean-Francois Dufourd
- Re: [Coq-Club] what are "levels" in Coq,
Yves Bertot
- [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, Adam Chlipala
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, Thorsten Altenkirch
- Re: [Coq-Club] what are "levels" in Coq,
Vladimir Voevodsky
- [Coq-Club] what are "levels" in Coq,
Vladimir Voevodsky
- Re: [Coq-Club] binary distribution for Leopard (and Snow Leopard),
Matthieu Sozeau
Archive powered by MhonArc 2.6.16.