coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Randy Pollack <rpollack AT inf.ed.ac.uk>
- To: Jean-Francois Dufourd <dufourd AT dpt-info.u-strasbg.fr>
- Subject: Re: [Coq-Club] Type hierarchy
- Date: Sat, 10 Oct 2009 10:02:07 +0100
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
- Resent-date: Sat, 10 Oct 2009 10:18:59 +0100
- Resent-from: rpollack AT inf.ed.ac.uk
- Resent-message-id: <20091010101859.7jtds8lnsosco0w0 AT www.staffmail.ed.ac.uk>
- Resent-to: Coq Club <coq-club AT pauillac.inria.fr>
Quoting Jean-Francois Dufourd
<dufourd AT dpt-info.u-strasbg.fr>:
I'm trying to (impredicatively) define the type Nat in Coq
(without the option - impredicative-set, which works well).
Definition Nat:=forall X:Type,(X->X)->X-> X.
Type is not impredicative, so how could you expect the impredicative definition of Nat to work? Perhaps you are asking "why do some basic definitions work?" or "what is the limit?"
If you could define exponentiation then you could define a Godel numbering scheme and prove consistency of arithmetic, which is stronger than predicative type theory.
To see some thinking about this area look at Daniel Leivant's paper "Finitely stratified polymorphism" in Information and Computation, Volume 93, Issue 1 (July 1991).
Randy
--
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
--------------------------------------------------------
Bug reports: http://logical.saclay.inria.fr/coq-bugs
Archives: http://pauillac.inria.fr/pipermail/coq-club
http://pauillac.inria.fr/bin/wilma/coq-club
Info: http://pauillac.inria.fr/mailman/listinfo/coq-club
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
- Re: [Coq-Club] Typo on coq manual, (continued)
- Re: [Coq-Club] Typo on coq manual, Pierre Letouzey
- Re: [Coq-Club] another question (Prop as a subtype of Set), Matthieu Sozeau
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- Re: [Coq-Club] an inductive types question, André Hirschowitz
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- [Coq-Club] another inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] another inductive types question, AUGER Cédric
- Re: [Coq-Club] another inductive types question, Roman Beslik
- Re: [Coq-Club] another inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] Type hierarchy, Randy Pollack
Archive powered by MhonArc 2.6.16.