Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Lemma regarding fold_left

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Lemma regarding fold_left


Chronological Thread 
  • From: Gaetan Gilbert <gaetan.gilbert AT ens-lyon.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Lemma regarding fold_left
  • Date: Thu, 4 Aug 2016 11:04:42 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gaetan.gilbert AT ens-lyon.fr; spf=Pass smtp.mailfrom=gaetan.gilbert AT ens-lyon.fr; spf=None smtp.helo=postmaster AT labbe.ens-lyon.fr
  • Ironport-phdr: 9a23:X8Ggth/oGrT5w/9uRHKM819IXTAuvvDOBiVQ1KB90OIcTK2v8tzYMVDF4r011RmSDN2du6gP07aempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47AblHf6ke/8SQVUk2mc1EkfqKlQMWK04ye7KObw9XreQJGhT6wM/tZDS6dikHvjPQQmpZoMa0ryxHE8TNicuVSwn50dxrIx06vrpT4wJk2+CNJ/vkl6sRoUKPgfq1+Q6YLIi4hNjUa7cD3vB+LYgqL7HYGTi1CnRNFHwHDqh77Wp38qDfSu+xmnS2LOsuwQ6piCmfq1LtiVBK90HRPDDU+6myC0sE=

With

f := fun _ _ => false

l := []

you get forall A, A -> false = true

which isn't true.

Gaëtan Gilbert

On 04/08/2016 10:51, mukesh tiwari wrote:
Hello everyone, I am trying to state a property related to fold_left.

Lemma fold_left_true : forall (A : Type) (f : bool -> A -> bool) (l : list A),
fold_left f l true = true -> forall b : A, f true b = true.

fold_left f (h1 :: (h2 :: t)) true = true -> fold_left f (h2 :: t) (f true h1) = true ->
fold_left f t (f (f true h1) h2)

Induction on l is not any helpful because I am stuck with true = true in context, and destruct (f true b) is also not any helpful because of false = true in goal. Any idea how to solve this lemma ?

Best regards,
Mukesh Tiwari




Archive powered by MHonArc 2.6.18.

Top of Page