coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Christian Doczkal <christian.doczkal AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Parametricity Axiom
- Date: Sun, 21 Feb 2021 13:08:57 +0100
- Organization: INRIA
Hi
> > Variable classic_dec : forall P : Prop, {P} + {~P}.
> > Fail Check forall (X : Type), classic_dec (bool = X).
> > (* The term "X" has type "Type" while it is expected to have type
> > Set *)
> I think this is because bool has sort Set and we thus can't compare
> bool and Type. I don't know enough about universes, but maybe there
> is something like a universe polymorphic version of bool, such that
> this equality is well-typed?
This is just an artifact of type inference for "eq", which always tries
to type the RHS with the type assigned to the LHS ("Set" in this case).
The variants below are accepted:
Variable classic_dec : forall P : Prop, {P} + {~P}.
Check fun (X : Type) => classic_dec (bool = X :> Type).
Check fun (X : Type) => classic_dec (X = bool).
(Note that you also need a (fun => _) as (classic_dec P) is not a
type.)
Best,
Christian
- [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/18/2021
- Re: [Coq-Club] Parametricity Axiom, Dominique Larchey-Wendling, 02/18/2021
- Re: [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/19/2021
- Re: [Coq-Club] Parametricity Axiom, Dominique Larchey-Wendling, 02/19/2021
- Re: [Coq-Club] Parametricity Axiom, Pierre-Marie Pédrot, 02/19/2021
- Re: [Coq-Club] Parametricity Axiom, Hugo Herbelin, 02/19/2021
- Re: [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/21/2021
- Re: [Coq-Club] Parametricity Axiom, Christian Doczkal, 02/21/2021
- Re: [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/21/2021
- Re: [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/19/2021
- Re: [Coq-Club] Parametricity Axiom, Daniel Schepler, 02/20/2021
- Re: [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/20/2021
- Re: [Coq-Club] Parametricity Axiom, Daniel Schepler, 02/20/2021
- Re: [Coq-Club] Parametricity Axiom, Thorsten Altenkirch, 02/23/2021
- Re: [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/20/2021
- Re: [Coq-Club] Parametricity Axiom, Daniel Schepler, 02/20/2021
- Re: [Coq-Club] Parametricity Axiom, Hugo Herbelin, 02/19/2021
- Re: [Coq-Club] Parametricity Axiom, Maximilian Wuttke, 02/19/2021
- Re: [Coq-Club] Parametricity Axiom, Dominique Larchey-Wendling, 02/18/2021
Archive powered by MHonArc 2.6.19+.