Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] "Cannot satisfy constraint" error using subset types

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] "Cannot satisfy constraint" error using subset types


Chronological Thread 
  • From: Klaus Ostermann <klaus.ostermann AT uni-tuebingen.de>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] "Cannot satisfy constraint" error using subset types
  • Date: Sat, 29 Apr 2017 13:50:54 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=klaus.ostermann AT uni-tuebingen.de; spf=None smtp.mailfrom=klaus.ostermann AT uni-tuebingen.de; spf=None smtp.helo=postmaster AT mx04.uni-tuebingen.de
  • Ironport-phdr: 9a23:FyvGDRTr/Uv+Ln5sLXWaXmkC09psv+yvbD5Q0YIujvd0So/mwa69YxyN2/xhgRfzUJnB7Loc0qyN4vymATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbx/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/nzJhMx+jKxVoxyvqBJwzIHWfI6bO+Fzfr/fcN4AWWZNQshcWi5HD4ihb4UPFe0BPeNAoof4o1sBtwa+BRKxD+320T9ImmH53bc/0+s7FwHG2hErEtUNsHTQttr1KbwSXfqyzKnT0TXMcelW2TLn54jOdBAsuuyMXbRxccbI1UkvCh3KgU6RqYzjMDOayOINv3KG4OV+TO+ijXMspQJpojW328shhIbEipgLxlze9Sh12pg5KcC3RUJjb9OpEoFcuz+GO4drWM8vQXtktSI6x7AApJW1ZjIFyI49yB7ac/GHc5aH4hbkVOuJJDd5i25pdb2lixav90igy/TwVtWp0FlUtSVFk9/Mtn8T2BzV8MSIV+Vy8l+g2TaJyQ/T9vlJLV06mKfUMZIt3KQ8m5oJvUjdAyP7l136jKqMeUUl/uio5f7nYrLjppKENI90jhvxMrk1msClBuQ4KRQOUHaB+eS5zrLj+0v5Ta5Xjv0wk6nVqYzaJdkFqaGiAg9V1Ikj5Ai5Dzu8zdsXg2ELLEhZdxKfk4jpJ1bOLejkAve4mlSgiStkx/TbPrL6GZjNNXjCkLL5fbln8UJcyQwzzcpe551OEL0BLujzCQfNs4nTCQZ8OAipyc7mDs9838UQQzGhGKicZYDWuEKTrsU0P+SWYYYTvn6pKPws+uWoimQllEUYdK+v9YYRaTWkA/lsIkOWbHyqjtpXQjRChRY3UOG/0A7KajVUfXvnB68=

Hi Jan,

thanks for your answer! I'm not sure how to apply your suggestion, though.
This error does not happen in a proof but in the definition of an
inductive datatype.
I tried to formulate your assertion (adapted to my situation) as a lemma
and add it to the rewrite hint database,
but that doesn't change the error.

Any ideas? Maybe I need some kind of cast?

Klaus



Am 29/04/17 um 11:59 schrieb Jan Bessai:
> Hi,
>
>> The term "fds" has type "id -> id -> {n : nat & eqn n}"
>> while it is expected to have type "id -> id -> {n : nat & eqn n}"
>> (cannot
>> satisfy constraint
>> "eqn (length tys1)" == "(fun n : nat => eqn n) (projT1 (fds f c))").
>>
>> The types that it wants to be identical are identical, and they are also
>> identical if all implicit arguments, universe levels etc. are printed.
>
> I came across issues like that when porting a proof from Coq 8.5 to
> 8.6. My guess is reduction during unification got less intelligent but
> more predictable. I usually get around these cases doing something like
>
> assert (x_eq: x = f y). {
> unfold f; destruct y; simpl; reflexivity.
> }
> rewrite x_eq.
>
> potentially using "rewrite in" or simpler proofs for x_eq.
>
> This is a bit explicit and brittle, but I tend to prefer it over
> overly intelligent magic.
> Hope this helps.
>
> Bests,
> Jan
>
>
>
>




Archive powered by MHonArc 2.6.18.

Top of Page