Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Re : Folding 'not'

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Re : Folding 'not'


chronological Thread 
  • From: Coq Dev <coqletsgo AT yahoo.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Re : Folding 'not'
  • Date: Fri, 22 Jul 2011 10:52:28 +0100 (BST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=FTN1qd08043ALGZK1Uku8rnBe3k0g7JpprejDQrPylRD/wbqFlE5bRVNAlXBH/BvF3v3v6Un5zBdL3csube2uz9J3IJSdVBAW8E8cPzxPPVl2hI7D6nlwnuTRL/dZhcD+3Iw5oHHcRdwQzFAcz9V0Rid/W0C3RK4Qb3pwHs5umI=;

Thank you for the replies, they do work in most cases but there are still some situations where the suggested tactics do not seem to work:

Goal forall n, (forall (n : nat), ~ (n > 2)) -> (n < 3).
  intros.
  unfold not in *.
  fold_not.

I thought the "context" in the Ltacs would be able to capture such situations though. All I can manage to do are some ugly hacks, like adding specific Ltac rules:

 | H: forall x : ?t, ?p -> False |- _ => fold (forall x : t, not (p)) in H

But besides renaming the variable, it is not elegant and extensible.

There is also the fact that one of the proposed Ltacs does match in the following case, but the 'fold' does not actually do anything.

Goal forall n, (exists n' : nat, ~ (n' > 2)) -> (n < 3).
  intros.
  unfold not in *.


Is it possibly my Coq version (8.3pl1) that is buggy? Or did I misunderstand the 'context' keyword in Ltac?



Archive powered by MhonArc 2.6.16.

Top of Page