coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Eddy Westbrook <westbrook AT galois.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Unification Bug?
- Date: Fri, 2 Dec 2016 11:50:46 -0800
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=westbrook AT galois.com; spf=Pass smtp.mailfrom=westbrook AT galois.com; spf=None smtp.helo=postmaster AT mail-pf0-f175.google.com
- Ironport-phdr: 9a23:mBM/FB0sjiE3d/NBsmDT+DRfVm0co7zxezQtwd8ZsesRKfad9pjvdHbS+e9qxAeQG96KsLQY0KGI6eigATVGusnR9ihaMdRlbFwst4Y/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVImbre9JomHhMOukuu25pf7YgNShTP7b6khAg+xqFD8usUHybRvMbo70BzOoTMcZOlN2WlyIlWQtxn14sCx59ho9CEG6KFpzNJJTaivJ/dwdrdfFjlza20=
Dear Coq club list,
I feel like the following should work, but it doesn’t, and something like it
keeps coming up in some typeclass programming I am trying to do:
Definition foo A B : (A -> B) = (A -> B) := eq_refl.
Goal { T:Type | T=T }.
refine (exist _ (forall (x:?[T1]), ?[T2]) _).
apply foo.
Somehow, it seems like Coq does not want to apply foo because it works on
non-dependent function types, even though all it has to do is to unify ?T2,
which depends on x, with the B argument of foo, which does not.
I tried to boil the problem down further, and ended up with this, which also
exposes some cases where the unify tactic is not commutative:
Goal { T:_ & T }.
refine (existT _ (forall (x:?[T1]) (y:?[T2]), ?T1) _).
evar (Tnew:Type).
(* OK: unify (fun (x:?T1) => ?T2) (fun (x:?T1) => ?Tnew). *)
(* FAILS: unify (fun (x:?T1) => ?Tnew) (fun (x:?T1) => ?T2). *)
(* OK: unify (forall (x:?T1), ?T2) (forall (x:?T1), ?Tnew). *)
(* FAILS: unify (forall (x:?T1), ?Tnew) (forall (x:?T1), ?T2). *)
(* FAILS: unify (forall (x:?T1) (y:?T2), ?T1) (forall (x:?T1), ?Tnew). *)
(* FAILS: unify (forall (x:?T1), ?Tnew) (forall (x:?T1) (y:?T2), ?T1). *)
Does anyone know of a workaround for this problem, where I can tell Coq to
instantiate all the evars in the body of a forall with fresh evars that are
not dependent?
Thanks,
-Eddy
- [Coq-Club] Unification Bug?, Eddy Westbrook, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Jonathan Leivent, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Eddy Westbrook, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Jonathan Leivent, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Eddy Westbrook, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Jonathan Leivent, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Eddy Westbrook, 12/03/2016
- Re: [Coq-Club] Unification Bug?, Jason Gross, 12/03/2016
- Re: [Coq-Club] Unification Bug?, Matthieu Sozeau, 12/03/2016
- Re: [Coq-Club] Unification Bug?, Eddy Westbrook, 12/03/2016
- Re: [Coq-Club] Unification Bug?, Matthieu Sozeau, 12/06/2016
- Re: [Coq-Club] Unification Bug?, Eddy Westbrook, 12/03/2016
- Re: [Coq-Club] Unification Bug?, Jonathan Leivent, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Eddy Westbrook, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Jonathan Leivent, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Eddy Westbrook, 12/02/2016
- Re: [Coq-Club] Unification Bug?, Jonathan Leivent, 12/02/2016
Archive powered by MHonArc 2.6.18.