Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] How much can I expect from higher-order unification?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] How much can I expect from higher-order unification?


Chronological Thread 
  • From: Pierre Courtieu <pierre.courtieu AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] How much can I expect from higher-order unification?
  • Date: Fri, 18 May 2018 07:43:49 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=pierre.courtieu AT gmail.com; spf=Pass smtp.mailfrom=pierre.courtieu AT gmail.com; spf=None smtp.helo=postmaster AT mail-ot0-f182.google.com
  • Ironport-phdr: 9a23:7Vrkoh8pnFakN/9uRHKM819IXTAuvvDOBiVQ1KB42+8cTK2v8tzYMVDF4r011RmVBd6ds6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+55Pebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRxDmiCgFNzA3/mLZhNFugq1Hux+uvQBzzpTObY2JKPZzfKXQds4aS2pbWcZRUjRMDJm9b4QRFeoBJ/hXpJTjqlsJsBu+HxWsBOLxxT9Vm3T72rU60+U/HgHcxgwvAcgCv2jTrNXoLqcSTeG1w7fVzTjYYPNW3C3y6InMchw7vf6MWrdwfNPXxEIyGQ3FiVCQppbkPzOTzukNsW+b4PB8WuKvim4nrhh9rSO1xsgyi4nJmoQVxU7e9Slj3Yk6O9u1Q1N4b968CJZdtS6XO5FrTs88Q2xkoiU3xqMctZKmfyUG1pIqzAPFZfOdaYiH+BfjWf6RIThmgHJlf6qyhxOo/kihzu3wT8600EpWoiZcnNnAq3MA2wLJ5siITft9+Uih2TKR2AzJ9u5EJkU0mbLaK54n3LEwioIevEbMEyPshUn6kq+bel8n9+S28ejrf7brqoGEO49xkA7+M6AumsKlAeQ/NwgDR3Cb+eWi27355032Xq9GgeExkqnEqpDaOcUbqbCkAwJO3YYj7gywDzai0NgCgXYHK1dFdAqdj4f1I1HOPOz4DfCnjluwlzdr3unKMaHlApXQNXfOi6zhfLZ4605E0gU/19Ff55ROCrEAOv3/QEHxtMaLRiM+Zgez2qPsDMh3/oIYQ2OGRKGDY43Itlrd3uMiOfOBLKQSpSzhKvU4r6r2jHIjg1Jbdq60x4cWZW2QEfFvIkHfan3p1IRSWVwWtxYzGbS5wGaJViReMi7rDvAMowojAYfjNr/tA4WkgbiPxiC+R8QEaWVPC1TKGnDtJdzdB6U8LRmKK8okqQQqEKC7QtZ4hx6rvQ7+jbFgK7iMo3BKhdfYzNFwotbru1Qy+DhzVZrP1miMSyRzgjtNSWZmhuZwpktyzlrF2q990aRV

No there is not afaik. But if the predicate you want is your goal+beta expansion then you can use “pattern r n b” to do the beta expansion.
P

Le ven. 18 mai 2018 à 02:18, Joachim Breitner <mail AT joachim-breitner.de> a écrit :
Hi,

Pierre writes in another thread:

> 2) I would expect (P x (foo x)) for the conclusion of foo_ind_aux instead
> of (P (foo x)). Did you just simplify your example or do you manage to use
> it like that?

and of course he is right. But now I am running into problems with
higher-order unification when I try to apply the custom induction rule:

   Unable to unify "?P (take n b) n b" with
   "length (take n b) = Init.Nat.min n (length b)".

I can work around by instantiating P explicitly, with

   apply take_ind where (P := fun r n b => … ).

but I wonder if I can do better. Is there a trick that would make Coq
figure out P on its own? Maybe some particular order of arguments of P,
or a different tactic?

(I know that higher order unification is in general undecidable, and
that this instance admits multiple solutions… but still, hope dies
last.)

Cheers,
Joachim


--
Joachim Breitner
  mail AT joachim-breitner.de
  http://www.joachim-breitner.de/



Archive powered by MHonArc 2.6.18.

Top of Page