coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Nuno Gaspar <nmpgaspar AT gmail.com>
- To: gallais <guillaume.allais AT ens-lyon.org>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] bool stuff
- Date: Wed, 7 Nov 2012 17:24:35 +0100
eheh, thank you both for your solutions posted so quickly.
Stay cool!
--
Bart: Look at me, I'm a grad student, I'm 30 years old and I made $600 dollars last year.
Marge: Bart! Don't make fun of grad students, they just made a terrible life choice.
2012/11/7 gallais <guillaume.allais AT ens-lyon.org>
Hi, If you don't care about names and don't mind a quick and dirty solution,you can use something like this:======================Require Import Bool.Lemma and_bool_inv : forall a b, a && b = true -> a = true /\ b = true.Proof.intros [] [] ; auto.Qed.Ltac split_my_ands := match goal with| H : ?a && ?b = true |- _ =>let myH := fresh "H" inassert (myH := and_bool_inv _ _ H) ; destruct myH ; clear Hend.Goal forall a b c, a && b && c && (a && b) = true -> a = true /\ b = true.intros ; repeat split_my_ands.======================Cheers,
--
gallais
On 7 November 2012 16:12, Nuno Gaspar <nmpgaspar AT gmail.com> wrote:Hello.Let's say that you have an hypothesis of this shapeH: A /\ B /\ ... /\ Cyou could dodestruct H as (Ha, (..., Hc)...).Now, lets consider this hypothesis insteadH: A && B && ... && C = trueSo, is there a tactic (or a general approach ...) that could allow me to easily obtain something likeHa: A = true...Hc: C = true?Cheers!--
Bart: Look at me, I'm a grad student, I'm 30 years old and I made $600 dollars last year.
Marge: Bart! Don't make fun of grad students, they just made a terrible life choice.
Bart: Look at me, I'm a grad student, I'm 30 years old and I made $600 dollars last year.
Marge: Bart! Don't make fun of grad students, they just made a terrible life choice.
- [Coq-Club] bool stuff, Nuno Gaspar, 11/07/2012
- Re: [Coq-Club] bool stuff, Chantal Keller, 11/07/2012
- Re: [Coq-Club] bool stuff, gallais, 11/07/2012
- Re: [Coq-Club] bool stuff, Nuno Gaspar, 11/07/2012
Archive powered by MHonArc 2.6.18.