coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Saulo Araujo <saulo2 AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Doubt about In
- Date: Mon, 22 Feb 2016 14:44:55 -0300
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=saulo2 AT gmail.com; spf=Pass smtp.mailfrom=saulo2 AT gmail.com; spf=None smtp.helo=postmaster AT mail-qg0-f43.google.com
- Ironport-phdr: 9a23:oea+hR/x4IPL9P9uRHKM819IXTAuvvDOBiVQ1KB90O4cTK2v8tzYMVDF4r011RmSDdqdtq4P0rKN+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStGU0pj8jrjps7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLVry/dKAlR5RZCi4nOiY7/p7Frx7GGDCG+38bGkwMmwdKBECR9xjnWpCrmiT/v+t5niKdOJulHvgPRT2+4vIzG1fTgyAdOmth/Q==
Thanks a lot Artur!
Unfortunately I need to use this theorem with a dependent type in which the tactic decide equality is not being able to do its job. I was able to manually prove that the equality of this type is decidable. However, since this proof ended being a little big, I was wondering if by giving a stronger definition of In, I could refraim from having to prove decidability.
Saulo
On Mon, Feb 22, 2016 at 2:32 PM, Arthur Azevedo de Amorim <arthur.aa AT gmail.com> wrote:
Hi Saulo,In order to prove this theorem, you need to assume that E has decidable equality:Require Import Coq.Lists.List.Import ListNotations.Theorem strong_in_inv:forall E (l: list E) e f,(forall x y : E, x = y \/ x <> y) ->In f (e :: l) -> e = f \/ (e <> f /\ In f l).Proof.intros R l e f eq_dec.simpl.destruct (eq_dec e f) as [H | H].- intros _. left. trivial.- intros [? | H']; try congruence.now right; split; trivial.Qed.Em seg, 22 de fev de 2016 às 12:27, Saulo Araujo <saulo2 AT gmail.com> escreveu:Hi,I am in the middle of a proof in which I need the following theorem:Theorem strong_in_inv:forall E (l: list E) e f,In f (e :: l) -> e = f \/ (e <> f /\ In f l).Unfortunately, I was not able to complete the proof below:Proof.intros.simpl in H.destruct H.{left.apply H.}{right.split.{(* I am stuck here! *)}{apply H.}}Qed.
- [Coq-Club] Doubt about In, Saulo Araujo, 02/22/2016
- Re: [Coq-Club] Doubt about In, Arthur Azevedo de Amorim, 02/22/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/22/2016
- Re: [Coq-Club] Doubt about In, Arthur Azevedo de Amorim, 02/22/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/22/2016
- Re: [Coq-Club] Doubt about In, Emilio Jesús Gallego Arias, 02/22/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/22/2016
- Re: [Coq-Club] Doubt about In, Emilio Jesús Gallego Arias, 02/22/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/23/2016
- Re: [Coq-Club] Doubt about In, Dominique Larchey-Wendling, 02/24/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/24/2016
- Re: [Coq-Club] Doubt about In (and refine), Jean-Francois Monin, 02/25/2016
- Re: [Coq-Club] Doubt about In (and refine), Saulo Araujo, 02/25/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/22/2016
- Re: [Coq-Club] Doubt about In, Emilio Jesús Gallego Arias, 02/22/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/22/2016
- Re: [Coq-Club] Doubt about In, Arthur Azevedo de Amorim, 02/22/2016
- Re: [Coq-Club] Doubt about In, Saulo Araujo, 02/22/2016
- Re: [Coq-Club] Doubt about In, Arthur Azevedo de Amorim, 02/22/2016
Archive powered by MHonArc 2.6.18.