coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: GANGCHEN5 AT aol.com
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] pattern matching with product type
- Date: Thu, 7 Aug 2003 13:17:16 EDT
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hello, Is there an easy way to do pattern matching with product type ? Assume: Variable A,B,C : Set. Definition ABC := A * B * C. Variable a : A; b : B; c : C. Definition i := (a,(b,c)). I would like to write something like: Check let (x,(y,z)) = i in (x,(y,z)). Unfortunately this is an error: Syntax error: [Prim.name] expected after ',' (in [ne_name_comma_list]) There is a way around: Check let (x,r1) = i in let (y,z) = r1 in (x,(y,z)). but not so elegant. Gang Chen |
- [Coq-Club] pattern matching with product type, GANGCHEN5
Archive powered by MhonArc 2.6.16.