Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Question about evar unification (I think)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Question about evar unification (I think)


Chronological Thread 
  • From: Jason Gross <jasongross9 AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Question about evar unification (I think)
  • Date: Fri, 31 Mar 2017 00:48:29 +0000
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f179.google.com
  • Ironport-phdr: 9a23:ayW8ZxRw5X3LB8cTQMdtrwf3h9psv+yvbD5Q0YIujvd0So/mwa6yYBeN2/xhgRfzUJnB7Loc0qyN4vymATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbx/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4rx1QxH0ligIKz858HnWisNuiqJbvAmhrAF7z4LNfY2ZKOZycqbbcNgHR2ROQ9xRWjRODYOybYQBD+QPM+VFoYfju1QDtgGxCRW2Ce711jNEmn370Ksn2OohCwHG2wkgEsoKvnvOt9X1M6ESWv20wqnSyjXDdOhW0ir65YjKaB8huvaMXbR/ccrLzkkvDBjFg1GLpIzqOjOazOUNs2yB4+V8UuKvjncqpgdsqTahwccsj5PGhoMTyl3c6Sp5x4A1Kse8SEJhZ96rDodQuzmcN4RoTMItWXtouDo7yr0do5G7ejMKxI47yB7YbvyLa4eI4hP/VOaRPDd3n2hpd664hxa390Wr1+7yVtGs3VpUsiZIlsPAu3MN2hDJ9MSLVOdx8l281TuN0w3e7PxPL1oumqrBMZEhx6Y9lpoNvkTHGS/7gED2g7WXdkUg4+So8ufnbqn/qp+SKoN5iAXzPr4hmsy4BuQ4PQwOUHaB9eug073j+FX1QLRMjvIojqnUqI7WKdgfq6KjAAJY0pwv5wihAzu6ytgUgHsKIVZddBKClYfpOlXOIP7iDfe4hlShiDVryOrdPr3mBJXNIWLDkLD6fbZm70NR0wUzzdVF6JJVDrENOu78Wkj0tNDAFB82LxS0w/r7CNV6zo4RRWWPAraAPKzOtV+I+/kgLvKXZI4VvTb9M+Iq6+TvjX8/g18dfLOm0YEZaHCiTbxaJBCyZmOkqdMcGy9etQ0nCefulVeqUDhJZn/0UbhqtR8hD4fzL47YQYblr6aGxzzzSp9ffWdABUqLCmy5X4qBUvYILimVJ5kywXQ/SbG9Rtp5hlmVvwjgxu8id7KM9w==

This sounds like a bug in Coq that you should report.


On Thu, Mar 30, 2017, 7:47 PM John Wiegley <johnw AT newartisans.com> wrote:
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



Archive powered by MHonArc 2.6.18.

Top of Page