coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "John Wiegley" <johnw AT newartisans.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] Question about evar unification (I think)
- Date: Thu, 30 Mar 2017 12:52:06 -0700
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jwiegley AT gmail.com; spf=Pass smtp.mailfrom=jwiegley AT gmail.com; spf=None smtp.helo=postmaster AT mail-io0-f178.google.com
- Ironport-phdr: 9a23:MglUrxeAXGwMsQR4vYKjN8HolGMj4u6mDksu8pMizoh2WeGdxcS9Yh7h7PlgxGXEQZ/co6odzbGH7+a4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9GiTe5br5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v9LlgRgP2hygbNj456GDXhdJ2jKJHuxKquhhzz5fJbI2JKPZye6XQds4YS2VcRMZcTyxPDJ2hYYUBCOoPPuhXoIbhqFUBtha+GRCsCfnzxjNUnHL736s32PkhHwHc2wwgGsoDvHrQotXyNKcSV/2+w6nJzTrdYPNW3Sny6YjGfhs8pvyMX7VwccrXyUghDA7FiEufqIL/MDOPyuQNsnOb4PBmVeK0kWIotwZxoj22y8oql4LHiIUVylXe+iV4xoY4PcG3SEl9YdG+FJtcrSeaOJVqQs86RWFnpig7xaccuZ6nfSgK044oxxjEa/Cdb4eI5RfjWP6eITd5mHJleK+/iA2o/Ue8ze38U8+520tJoCpditTAqGwB2hjJ5sWESvZx5Fmt1SiB2gzJ9+1JI0M5mbLZJpMg2LI8iJQevEvZEiL3nEj6lrKae0og9+Wu9u/peK/ppoWGOI9xkgz+Mrohmsi4AekgNwgBRWmb+eCl2L3i+k31XKxGjvMrnqTbs53WP8sbpqm+Aw9a1oYs9QyzACuh0NQdhXUHLVRFdwybj4XxJV3CPPT1Ae28jlmsijtn2e7KM7P7DpnQLHXOk6/tfbNn5E5dzAozw8pf55VRCrwZIvLyVE7xu8LXDh89LQO1w/3qCNp41owEWGKPBrWVP7/VsV+N/u4vOfWDZJcJuDbhLPgo/+LhjXggmVMEYaap2YYXZ2ujE/R9I0SZZGLsjc0bHWcLuAo+Vu3qh0eYXT5dfXbhF547sxo8EcqNCZrJDtSmh6XE1yOmFLVXYHpHAxaCCyG7WZ+DXqJGSiWSJIdekzELUbWwAcd11xaushDSzbd4J/DI+zYRs4ml399wsb6A3Sou/CB5WpzOm1qGSHt5yyZRH2c7
- Organization: New Artisans LLC
Hello,
I'm working on some sample code that uses ltac to generalize a subset of
Gallina terms to any cartesian closed category, allowing me to then use
instance resolution to map to a different category for interpretation. This
is based on work by Conal Elliot in his paper here:
http://conal.net/papers/compiling-to-categories/
Everything seems to work well, until I get to a goal where the left-hand side
is the [arrow] category version of the term (i.e., Coq types and functions),
and the right-hand side is an extensional that wants to parameterize over
[arrow]:
mulC ∘ (id △ id) = ?Goal@{T:=arrow; c:=Coq_Closed; n:=Coq_NumCat}
I would think that this should just unify as is, since [mulC ∘ (id △ id)], in
general form, where T is chosen to be arrow, turns into the exact [mulC ∘ (id
△ id)] on the LHS.
However, I get this error:
Unable to unify "?Goal@{T:=arrow; c:=Coq_Closed; n:=Coq_NumCat}" with
"mulC ∘ (id △ id)"
(unable to find a well-typed instantiation for "?Goal": cannot ensure
that
"arrow Z Z" is a subtype of "T Z Z").
How do I tell Coq that in an environment where [T:=arrow], that [arrow] is
clearly always a subtype of [T]?
The code is here:
https://github.com/jwiegley/categories/blob/master/Categories.v#L183
It works if I manually instantiate the evar using the general form of [mulC ∘
(id △ id)], but I haven't found a way to automate this choice.
Thanks,
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
- [Coq-Club] Question about evar unification (I think), John Wiegley, 03/30/2017
- <Possible follow-up(s)>
- [Coq-Club] Question about evar unification (I think), John Wiegley, 03/31/2017
- Re: [Coq-Club] Question about evar unification (I think), Jason Gross, 03/31/2017
Archive powered by MHonArc 2.6.18.