coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "jonikelee AT gmail.com" <jonikelee AT gmail.com>
- To: Gregory Malecha <gregory AT bedrocksystems.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] lesson learned about reflection: atoms and transparency
- Date: Wed, 8 Jul 2020 22:41:02 -0400
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk1-f169.google.com
- Ironport-phdr: 9a23:1/VXORHZwzaRD3XXGcnyXp1GYnF86YWxBRYc798ds5kLTJ76p8y4bnLW6fgltlLVR4KTs6sC17OI9fmwEjFRqdbZ6TZeKcEKD0dEwewt3CUYSPafDkP6KPO4JwcbJ+9lEGFfwnegLEJOE9z/bVCB6le77DoVBwmtfVEtfre9FYHdldm42P6v8JPPfQpImCC9YbRvJxmqsAndrMYbjZZjJ6or1xfEoXREduRSyGh1IV6fgwvw6t2/8ZJ+8ylcoe4t+9JFXa7nY6k2ULtUASg8PWso/sPrrx7DTQWO5nsYTGoblwdDDhbG4h/nQJr/qzP2ueVh1iaUO832Vq00Vi+576h3Uh/oiTwIOCA//WrKl8F/lqNboBampxxi347ZZZyeOfRicq/Be94RWHFMVdhNWSNfHoy8bpMPD+sfMuZes4n9vEYFoR+nCQWxGO/j1jpEi3nr1qM4zushCxnL0gIgEdwQrXrar9f6NKkVX++60KbGwi7Ob+9U1Drn9ITFaAwtre+KULltccTR004vFwbdg1meq4zlODWV1uUOs2eF6+pvS/yghnUoqwF0uDevx8MshpPViYISz1DI+zhyzYE3Jd2/Tk57YN2kH4VUty6EKYR7WcwiQ2RytyY7zr0Ko4K0fC8PyJk+wRPUdvOIfZSS7B35SOaRPSl3hGhjeL+nmxq//lWsxvDiW8S001tHrSVIn8fCuH0C2RLe5MaKRuVz80qhxDuCygDd5+9ZLU0qm6TWNZ0szLA0m5QTsUrOHSn7k1j1gq+Obkgo5PSk5uD9brjlppKQLZF4hh/gPqg0h8CyAOA1PhAQU2Wa5eiwybju8VD9TbpWi/A7najUvIzGKckeqKO0AgFV34Mi5hu8ATqr0tEVkmUFIVJLdhKKiobpNE/SL//iCPqwmU6jnCl2yP3AI7bvGI/CLmLZn7fkZbt961BTyA40zd1H4pJbELABIPbqVk/ot9zUEwY1MwKpz+vmDNhxzIweWWWIAq+WNKPdr0WE6f4oI+mJfIMVuTD9JOY55/P2k3M1hVsQcbOq0JYXcny0AOpqL1uDbXbxg9oMFX8Gvg8kQ+zrjF2CXyRTZ3G3X68k5DE7D4SmDYbARo+zhLyOwjm0E4ZZZmBDEF+MEHPoe5+YVPcLbSKeOtVhnSAcVbi9V48h0gmjuxP9y7p+N+bb5ikYtY/429Vu/O3SlRQy9SRuAMiH0mGNSXt0nmISSDMs0qB/ux819lDW/rJ1jPtCBJR27vdEWQczfcrT1eF1DMrjcgjMcs2OQ1W9U866DDQqCNk2xoldTVx6HoDojBfF3imnB7IYv7OODZ0wtKnb2jK5c8R6zXfF2a0sgnEpR8JOMSutgasppFubPJLAj0jMz/XiTq8bxiOYsT7blTPS7nEdaxZ5VOD+ZV5aflHf9I2r6UbLTrvoArMiYFMYmJyyb5BSY9istm1oAfLqOdDQeWW0wj7iChOBx7fKZ43vKTxEgXftTXMcmgVWxk6ocAgzAiD7/TDbBT1qUEvsOgbiqLcv7ny8SUAwwkeBaEgzj7c=
On Wed, 8 Jul 2020 21:56:10 -0400
Gregory Malecha <gregory AT bedrocksystems.com> wrote:
> ...
> > The decision procedure is still missing a transitive closure
> > component, though. And that appears difficult to incorporate...
> >
> If this is difficult due to termination, then the standard solution
> here is to use fuel.
That's part of it.
> ...
> > I think I misunderstood, then. I thought the point to QUOTE was to
> > continue to use the proof-carying style instead of the
> > fully-reflective (Guillaume's) style, but still achieve both the
> > performance benefit and the modularity (reflective computations
> > cannot attempt to eliminate atoms from the original goal) that are
> > provided by the fully-reflective style.
> >
> Sorry, no. The proof carrying style will always be slower because
> there are extra reductions and memory used to explicitly build the
> proof term.
Is that a shortcoming of Coq or something more ominous? In my intuition
about erasability, it seems it should be possible for the execution to
use code with all erasable terms erased.
>
> >
> > >
> > > In your context, you could write
> > >
> > > Theorem reflection_works' : forall (f : Sorted_formula),
> > > if solve_sorted f then sfDenote f else True.
> >
> > Yes. The attached file does that (although I changed the function
> > name from "solve_sorted" to "do_reflection" to avoid confusion with
> > the same named tactic).
> >
> If [do_reflection] takes a long time to compute, you will want to
> change to the style where you introduce an explicit equality proof
> and use [vm_compute] to reduce it. This can be a *significant*
> savings for large reflective procedures. The section of my
> dissertation that I pointed you to should have a detailed description
> of why.
>
If this is just due to the advantage of vm_compute over the execution
engine normally used for checking convertibility, then would it be
possible instead to use:
let R := eval vm_compute in (do_reflection ...) in exact R
in the solve_sorted tactic in place of exact (do_reflection ...)
with no need for an explicit equality proof?
Jonathan
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/01/2020
- <Possible follow-up(s)>
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/01/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, Gregory Malecha, 07/08/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, Gregory Malecha, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, Guillaume Melquiond, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/10/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/11/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, Guillaume Melquiond, 07/11/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, Guillaume Melquiond, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, Gregory Malecha, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, jonikelee AT gmail.com, 07/09/2020
- Re: [Coq-Club] lesson learned about reflection: atoms and transparency, Gregory Malecha, 07/08/2020
Archive powered by MHonArc 2.6.19+.