Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] boolean simplification

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] boolean simplification


chronological Thread 
  • From: Thomas Braibant <thomas.braibant AT gmail.com>
  • To: filou AT labri.fr
  • Cc: coq-club AT inria.fr, pierre.casteran AT labri.fr
  • Subject: Re: [Coq-Club] boolean simplification
  • Date: Thu, 7 Oct 2010 13:41:28 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=N73dzGeunHJxXEsLWsFLXpmU+dDn9uDjIpfm/O8s+jptmzv/cPRKFRXTUQnINSlBr4 fxrl8tmJ4GudRQ5OCrGta6xlAuoT1Fgz/Oak9TWbGFEo63GYm/b5St+pnqzPsm0fDIGw 8XWxT+7UqBaWpV0LIrZ4FRGQUkA3AVjKgMHJw=

I often use :

Hint Rewrite
  orb_false_r                    (** b || false -> b *)
  orb_false_l                    (** false || b -> b *)
  orb_true_r                     (** b || true  -> true *)
  orb_true_l                     (** true || b  -> true  *)
  andb_false_r                   (** b && false -> false *)
  andb_false_l                   (** false && b -> false *)
  andb_true_r                    (** b && true  -> b *)
  andb_true_l                    (** true && b  -> b  *)
  negb_orb                       (** negb (b || c) -> negb b && negb c *)
  negb_andb                      (** negb (b && c) -> negb b || negb c *)
  negb_involutive                (** negb( (negb b) -> b *)
  : bool_simpl.

Hint Rewrite <- andb_lazy_alt : bool_simpl. (** a &&& b -> a && b *)
Hint Rewrite <- orb_lazy_alt : bool_simpl.  (** a ||| b -> a || b *)

Ltac bool_simpl := autorewrite with bool_simpl in *.

which you can adapt to autorewriting in an hypothesis.


then, in your case, you can use "discriminate" to conclude.

With best regards,
thomas



On Thu, Oct 7, 2010 at 11:54 AM,  
<filou AT labri.fr>
 wrote:
> Hi all,
>
> I was wondering if there exists a tactic to simplify boolean
> expressions in hypotheses, such as in a goal of the form
>
> H: a && false && b = true
> -------------------------
> False
>
> I've tried "contradict H;ring" but it seems that ring doesn't deal with
> inequalities.
>
> Thanks,
> Vincent
>
>
>



Archive powered by MhonArc 2.6.16.

Top of Page