Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] How do I simplify a particular redex exactly once?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] How do I simplify a particular redex exactly once?


Chronological Thread 
  • From: Agnishom Chattopadhyay <agnishom AT cmi.ac.in>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] How do I simplify a particular redex exactly once?
  • Date: Thu, 28 May 2020 08:41:19 -0500
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=agnishom AT cmi.ac.in; spf=Pass smtp.mailfrom=agnishom AT cmi.ac.in; spf=None smtp.helo=postmaster AT mail.cmi.ac.in
  • Ironport-phdr: 9a23:YSzWLxejeLClrw3nFRg/4sOSlGMj4u6mDksu8pMizoh2WeGdxcS4Yx7h7PlgxGXEQZ/co6odzbaP7ua5AzJLu8fJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRW7oR/MusUIgIZuJbg9xx/UqXZUZupawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnFVguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hCoBKjU09nzchM5tg6JBuB+uqBJ/zIzUbo+bN/RwY73Tcs8BSGVbQspcTTZMDp+gY4YNCecKIOZWr5P6p1sLtRazGQasBOXuyj9Thn/22qg62Pk/HAHGxgMgA84OsHPMrNrvKagSUeC0w7PIzD7eaP5Zwzj96I7JchA6ofGMWrdwfNHNxkkqFgPJlE+fppD/MzOU0OQAqm6W5PdvWuyzkWAosR1xoiSxycc2jInEnoIbx03Y+Sllz4s4IcC0RU50bNO4FJZcqSGXOYRrTs0sTWxlvCY3x6MGtJC7fCUEyIoqygDBZvCacoWF4xzuWeWXLDxlh3xlYKqyiwuv/UWg0OHwSMa53VVQoiZbj9XArG0B2h/P5sSfVPdx4kOs1SyM2g3T8O1IPEE5mKvBJ5MuwLM9kIcYv17ZES/sgkr2ibebdkU69eis7OTqerDmqYWdN49wkA3xLqEums2lDesiLgcCRWmb+eKk2L3i+032XqlKg+UrnqXEsJ3WP9oXq6G6DgNPzIov9gyzAyql3dgEhXUHKUhKeBODj4jnIVHOJ/X4AO+ljFSjljdrxuvGPr3mApXINXXMjLLhfbdn50FG1AU/19Ff55RMBrEbPP3zQlPxtMDfDhIhLwO0xP/nBMxh2YMaRGKAGbSUMLjSsF+N/uIgOfOAZI4TuDbnKvgq/eTijXEjmQxVQa781pwOLXu8A/5OIkODYHOqjM1SP30Nu18XQ+rrk12FVHZ4Z3+uQ6Uk7z07GYu3RdPKSYasm7yG2Q+wG5wQb2sAC1baQiSgTJmNR/pZMHHaGcRmiDFRDeHwGb9k7gmnsUrB85QiK+PV/iMCspe6jYp+4uyVnBp09DomVp3AgVHIdHl9myYzfxFz3K17phUjmFKK0Kw+iPlZU9VYofJPAF9jaczsitdiAtW3YTrvO8+TQQ//EN6jAHc4RZQwxY1Wbg==

I realized that hnf was not working because what I had was something like "(eval (FAnd (FOr f g) h) x) = ...." but it does seem to work when I pull out the term and use hnf on it. Is there a way I can use hnf on one branch of the equality?

The issue with most strategies I can think of is that they are becoming rather long-winded, and I am having to copy-paste large chunks of the terms obscuring my proof text, especially for something which is a rather simple algebraic manipulation

On Wed, May 27, 2020 at 7:08 PM jonikelee AT gmail.com <jonikelee AT gmail.com> wrote:
On Wed, 27 May 2020 17:45:55 -0400
"jonikelee AT gmail.com" <jonikelee AT gmail.com> wrote:

> Sorry, did a non-list send by accident.  Resending...
>
> On Wed, 27 May 2020 16:25:29 -0500
> Agnishom Chattopadhyay <agnishom AT cmi.ac.in> wrote:
>
> > No, it did not.
> >
> > Is there a tactic which says "do one step of reduction"?   
>
> I have developed beta1 and zeta1 tactics that do one step of those
> reductions, but none that would help here. 
>
> Are you sure hnf doesn't work?  I tried it, and it seemed to work for
> me:

It might not be working for you if the term is "e = (eval (FAnd
(FOr f g) h) x)" - meaning that the head is equals, not eval.  You can
use the set tactic to pull out the rhs of that equation, and use a match
tactic to drive the set:

For instance, if your goal is "e = (eval (FAnd (FOr f g) h) x)", one can
do something like:
match goal with |- e = ?R => let t:=fresh in set (t:=R) in *; hnf in t;
subst t end.

If the equation is intead the type of some hyp H, use "match type of H
with e = ?R ..." instead.



Archive powered by MHonArc 2.6.19+.

Top of Page