Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Doubt about In

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Doubt about In


Chronological Thread 
  • From: Arthur Azevedo de Amorim <arthur.aa AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Doubt about In
  • Date: Mon, 22 Feb 2016 17:36:53 +0000
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=arthur.aa AT gmail.com; spf=Pass smtp.mailfrom=arthur.aa AT gmail.com; spf=None smtp.helo=postmaster AT mail-oi0-f49.google.com
  • Ironport-phdr: 9a23:e7XGHxf0hwYj612CDtbE45EslGMj4u6mDksu8pMizoh2WeGdxc6+bR7h7PlgxGXEQZ/co6odzbGG7Oa9BSdZuc7JmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbvipNuOP04R3GL1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GLdfFXEtN30/zMztrxjKCwWVtVUGVWBDuwBUAxXfpDjoU4n8viyyuuc18SydJ8zzBeQ9Qyii8r0tQRbAhyIONjp/+2bS3J8jxJlHqQ6s8kQsi7XfZ5uYYaJz

As a matter of fact, we can even show that any type E that satisfies your original formulation has decidable equality:

Theorem strong_in_inv_implies_eq_dec :
  forall E,
    (forall (l: list E) e f,
       In f (e :: l) -> e = f \/ (e <> f /\ In f l)) ->
    forall x y : E, x = y \/ x <> y.
Proof.
  intros E H x y.
  destruct (H [y] x y (or_intror (or_introl (eq_refl y)))) as [H' | [H' _]]; eauto.
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.




Archive powered by MHonArc 2.6.18.

Top of Page