Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Question an 8.6 changes on typeclasses eauto (multi-goal)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Question an 8.6 changes on typeclasses eauto (multi-goal)


Chronological Thread 
  • From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: [Coq-Club] Question an 8.6 changes on typeclasses eauto (multi-goal)
  • Date: Wed, 9 Nov 2016 14:40:34 +0000
  • Accept-language: de-DE, en-US
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=michael.soegtrop AT intel.com; spf=Pass smtp.mailfrom=michael.soegtrop AT intel.com; spf=None smtp.helo=postmaster AT mga06.intel.com
  • Ironport-phdr: 9a23:W2HJcRaaHOip+ecdpeTw7L3/LSx+4OfEezUN459isYplN5qZr8m/bnLW6fgltlLVR4KTs6sC0LuN9fi4Ejdeqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjSwbLd8IRmssQndqsYajIVjJ60s1hbHv3xEdvhMy2h1P1yThRH85smx/J5n7Stdvu8q+tBDX6vnYak2VKRUAzs6PW874s3rrgTDQhCU5nQASGUWkwFHDBbD4RrnQ5r+qCr6tu562CmHIc37SK0/VDq+46t3ThLjlSEKPCM7/m7KkMx9lKJVrgy8qRxjzYDaY4CVO+Zxca7GZ9wWWW5MU9xNWyBdHI+xaZYEAeobPeZfqonwv1UCowa5BQayC+Pv1iVIhnju3aEizu8vFgDG0xAgH90UrnvUqNv5P7oVXOCwzanH0TXDYOlI1jf58oTIaRchru+DXbJsa8rRzlEvGhjEjlWWtYzqITeV2v4RvGic6uptTOSigHMppQF2pzig3MYsio/Ri4IUzFDE6Tt2wIIvKdKlVkF2Z8OvHphItyyCKod7TMwvT3t1tCs0xbAKo4O3cSYLxZg9yRPTduSLf5WJ7x/tTuqcLzl1iGh7dL+xgxu+61Wsx+7hWsWszVpHry5InsPSun0N2BHf8NaLRuFj8ku/2DuC0R3Y5PteLkAuj6XbLoYswr4umZoXtkTOBir2mErsg6OKd0go4Omo6+L7Yrr4op+QLZN7igb7Mqg2m8y/B/o3MhQWUmSG9+mx26fv8VD3TbhFlPE6j6fUvZHAKckVu6K1GwpV3Zwi6xa7ATemytMYnXwfIVJAeRKIk4jpNEvQL/D8F/u/mFOsnylkx/DaJL3hBY3NI2PCkLfnYbZy9UpcxBAvwtBY4pJYEqsBL+7rWk/tqNzYCQc0PBCzw+b+EdlyyoceWX+UDaKCK6PTsVqI5vo1LOWWZY8Vviz9K/k/6PL0g385gwxVQa78l5AQcTWzGulsC0Sfe3vlxNkbWy9etQ0nCefulVeqUDhJZn/0UbhqtR8hD4fzR7zES4+xmruZmG+eH5ZWb21CQBjYFHbjd4yJX7EXby+dPtVmihQFU6SsT8kq0hT451yy8KZuMueBon5QjpnkztUgv+A=

Dear Coq Team,

 

I read in the changelog in git for 8.6:

 

- Many new options and new engine based on the proof monad. The

  [typeclasses eauto] tactic is now a multi-goal, multi-success tactic.

 

I wonder if it is now possible to use typeclasses eauto without solving the goal. The use case is to use a hint database for forwarding tactics. I want to be able to write something like:

 

Hint Extern 0 => typeclasses eauto with nocore HdbAutoForward : HdbMain.

 

The effect shall be that all successful tactics in HdbAutoForward, which are generally tactics which inspect hypothesis and see if something can be derived from them, shall be executed. But since these are just forwarding tactics, which add additional derived hypothesis but don’t solve the goal, this currently doesn’t work because eauto eventually fails and everything it did is undone.

 

Of cause I can add each individual forwarding tactic to HdbMain, but the disadvantage is that on backtracking the forwarding tactics are tried in every possible order. The idea of forwarding is that it just adds additional hypothesis and that this should never reduce the solvability of the goal, so that there is no point in trying forwarding tactics in different orders and all forwarding should be done (and undone) in one step in the main eauto. This dramatically reduces branching in the eauto proof search.

 

Currently this is a rather tricky business. I create a dummy goal (current goal \/ True), run eauto on this dummy goal, collect the new hypothesis in a list of Props, assign this list to an evar, solve the \/ True and then expand the list in the evar to hypothesis for the real goal. This works, but it is slow, hard to debug and transporting hypothesis through the evar needs to be done carefully to avoid context dependency issues. I thought about extending eauto with an option for this use case, but maybe someone was faster ;-)

 

Best regards,

 

Michael

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928




Archive powered by MHonArc 2.6.18.

Top of Page