coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
- To: Frederic Blanqui <frederic.blanqui AT inria.fr>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Does Coq actively convert things to Prop?
- Date: Wed, 18 Apr 2012 11:21:24 +0200
Frederic's answer is pretty spot on. The detailed answer goes like this:
- Types that support singleton elimination go in Prop, so Q maps to Prop, as it does not lose anything (like, no need of squashing).
- Prop is stable by forall, so forall x y, Q x y is in Prop
- cow Q only has type Type
- Unfolding cow Q adds possible types, because that's what reductions tends to do.
As far as homotopy type theory goes, as long as you don't mention Prop explicitely (which coerces inductive into doing some kind of squashing, hence going beyond the power of MLTT+univalence), you can ignore Prop safely.
Arnaud
On 18 April 2012 10:32, Frederic Blanqui <frederic.blanqui AT inria.fr> wrote:
Hello.
Le 18/04/2012 16:07, Andrej Bauer a écrit :The "problem" seems to be here already since, for Coq, Q has type A->A->Prop instead of A->A->Type as written explicitly.
Consider the following example:
Parameter A : Type.
Definition cow (P : forall (x : A), A -> Type) := forall x y : A, P x y.
Inductive Q (x : A) : A -> Type := horn : Q x x.
And, if you have two constructors, then you get Set which is at the bottom of the Type hierarchy:
Inductive Q'(x:A):A->Type:=h1:Q' x x|h2:Q' x x.
Coq < Check Q'.
Q'
: A -> A -> Set
Therefore, I guess that this is related to the fact that there is only one constructor. I believe that there is a special treatment in this case. It allows for instance elimination on well-foundedness proofs.
Frederic.
Definition q := cow Q.
Definition r := forall x y : A, Q x y.
r is just q expanded out by hand, but q is in Type and r is in Prop.
This seems awfully wrong. Can someone convince me that it is not a
bug? It destroys homotopy type theory in Coq, where we want to keep
things in Type.
With kind regards,
Andrej
- [Coq-Club] Does Coq actively convert things to Prop?, Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Frederic Blanqui
- Re: [Coq-Club] Does Coq actively convert things to Prop?, Arnaud Spiwack
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?, Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Arnaud Spiwack
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Bernard Hurley
- Re: [Coq-Club] Does Coq actively convert things to Prop?, Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?, AUGER Cédric
- Re: [Coq-Club] Does Coq actively convert things to Prop?, Frederic Blanqui
- Re: [Coq-Club] Does Coq actively convert things to Prop?, Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?, Pierre Courtieu
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Bernard Hurley
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Andrej Bauer
- Re: [Coq-Club] Does Coq actively convert things to Prop?, Arnaud Spiwack
- Re: [Coq-Club] Does Coq actively convert things to Prop?,
Frederic Blanqui
Archive powered by MhonArc 2.6.16.