coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: mukesh tiwari <mukeshtiwari.iiitm AT gmail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Proving List with Concatenation operation is monoid.
- Date: Mon, 8 Sep 2014 12:01:16 +0530
Dear Coq-club.
Pardon me if it's a stupid question. I am trying to prove that list
with ++ is monoid. I am able to prove
1). Identity
l ++ [] = [] ++ l = l
2). Associativity
l1 ++ ( l2 ++ l3 ) = ( l1 ++ l2 ) ++ l3.
and trying to prove the existence of closure.
3. Existence of closure.
Theorem list_monoid : forall ( X : Type ) ( l1 l2 : list X ), exists (
l3 : list X ),
l1 ++ l2 = l3.
Proof.
intros X l1 l2. destruct l1 as [ | h' l1'].
Case "l1 = nil".
simpl. exists l2. reflexivity.
Case "l1 = cons h' l1'".
simpl. exists ( h' :: l1' ++ l2 ). reflexivity.
Qed.
Could some one please tell that my proof of closure is sound. It's
accepted by Coq but I never used exists tactic ( currently on 4th
chapter of software foundation ) so I am bit skeptical.
-Mukesh Tiwari
- [Coq-Club] Proving List with Concatenation operation is monoid., mukesh tiwari, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Casteran Pierre, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Beta Ziliani, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., mukesh tiwari, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Beta Ziliani, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Christopher Jenkins, 09/09/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Pierre Courtieu, 09/09/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Christopher Jenkins, 09/09/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Beta Ziliani, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., mukesh tiwari, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Beta Ziliani, 09/08/2014
- Re: [Coq-Club] Proving List with Concatenation operation is monoid., Casteran Pierre, 09/08/2014
Archive powered by MHonArc 2.6.18.