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: mukesh tiwari <mukeshtiwari.iiitm AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Lemma regarding fold_left
  • Date: Thu, 4 Aug 2016 19:10:19 +1000
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mukeshtiwari.iiitm AT gmail.com; spf=Pass smtp.mailfrom=mukeshtiwari.iiitm AT gmail.com; spf=None smtp.helo=postmaster AT mail-oi0-f68.google.com
  • Ironport-phdr: 9a23:CSg9cRbsxTIb1RiD9Bpd5XX/LSx+4OfEezUN459isYplN5qZpc+zbnLW6fgltlLVR4KTs6sC0LuO9fC6EjRcqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ3pzxh7r5o8GbSj4LrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mosVHSODxe7kyZb1eFjUvdW4vt+PxshyWSBaM62AcGnkXjRNSAkCR6Qz5U4zxrirlv/B8niibPNHzZb8xUDWmqaxsTUm72288Kzcl/TSP2YRLh6VBrUf5qg==

Dear Micheal, Gaetan,
Thank you very much. Now I can see my mistake.

Best regards,
Mukesh Tiwari


On Thu, Aug 4, 2016 at 7:04 PM, Gaetan Gilbert <gaetan.gilbert AT ens-lyon.fr> wrote:
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