coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "gallais @ ensl.org" <guillaume.allais AT ens-lyon.org>
- To: Coq Dev <coqletsgo AT yahoo.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Folding 'not'
- Date: Mon, 11 Jul 2011 11:46:35 +0200
Hi,
Sometimes fold works only if you provide the full term.
======================
Goal ~ (1 < 2) -> True.
unfold not. fold (not (1 < 2)).
======================
Alternatively, you could write a tactic to do that automatically.
This example is maybe not the best one because you do not
control where you fold the nots:
======================
Ltac fold_not := match goal with
| |- context [?x -> False] => fold (not x)
| H: context [?x -> False] |- _ => fold (not x) in H
end.
======================
Cheers,
--
gallais
On 11 July 2011 11:28, Coq Dev
<coqletsgo AT yahoo.com>
wrote:
> Is it possible to fold a "not" after it has been unfolded? For instance:
>
> Goal ~ (1 < 2) -> True.
> unfold not. fold not.
>
> The " -> False" remains after the "fold not" operation.
>
> Alternatively, is there an easy way to do an Ltac or Tactic Notation to
> obtain this behavior, for instance "fold_not in H" to fold corresponding
> definitions in a hypothesis?
>
> Actually, the main reason I'd like to do it, is because of the intuition
> tactic, which unfolds 'not's into implications. If there would be a way to
> disable this behavior, it might be equally useful (decompose [and ex], for
> instance, does not help splitting the goal).
>
- [Coq-Club] Folding 'not', Coq Dev
- Re: [Coq-Club] Folding 'not', gallais @ ensl.org
- Re: [Coq-Club] Folding 'not', Stéphane Lescuyer
- [Coq-Club] Re : Folding 'not',
Coq Dev
- [Coq-Club] Re : Folding 'not', Coq Dev
- <Possible follow-ups>
- Re: [Coq-Club] Folding 'not',
Paolo Herms
- Re: [Coq-Club] Folding 'not', Stéphane Lescuyer
Archive powered by MhonArc 2.6.16.