coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition
Chronological Thread
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition
- Date: Mon, 22 Dec 2014 21:19:50 -0500
The answer to the question of parametricity is that type class resolution is done at type *inference* time, not type *checking* time. Thus, like notations and the tactics-in-terms of trunk, it has no impact on parametricity. (Another way of seeing this is that typeclasses live outside the kernel, like tactics and notations.)
-Jason
On Dec 22, 2014 12:30 PM, "Jonathan Leivent" <jonikelee AT gmail.com> wrote:
On 12/22/2014 12:12 PM, Amin Timany wrote:
...
In gallina, you can use the following command:
Definition x := Eval tac in y.
Where tac is a computation tactic, e.g., simpl, cbv, compute, etc. Unfortunately, this construction is only at the level of gallina and not terms. So,
Definition x := z (Eval tac in y).
will generate a parsing error!
But you can do this:
Ltac reduce term :=
let x := eval compute in term in exact x.
Variable P : nat -> Prop.
Definition foo := P (1+2+3).
Print foo. (* P (1 + 2 + 3) *)
Definition bar := P $(reduce (1+2+3))$.
Print bar. (* P 6 *)
-- Jonathan
- [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, michael.soegtrop, 12/16/2014
- RE: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Soegtrop, Michael, 12/17/2014
- Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Amin Timany, 12/17/2014
- RE: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Soegtrop, Michael, 12/17/2014
- Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Amin Timany, 12/22/2014
- Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Jonathan Leivent, 12/22/2014
- Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Jason Gross, 12/23/2014
- Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Jonathan Leivent, 12/22/2014
- Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Amin Timany, 12/22/2014
- RE: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Soegtrop, Michael, 12/17/2014
- Re: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Amin Timany, 12/17/2014
- RE: [Coq-Club] Type Class instance resolution stops working after adding type specification to definition, Soegtrop, Michael, 12/17/2014
Archive powered by MHonArc 2.6.18.