coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Coq User <coquser AT googlemail.com>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] Check Record Field Membership in a List
- Date: Wed, 29 Jul 2009 17:56:06 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=loY07l/pEfNMjxYroZY9G6ZEAtak4F0mfgwCQhB5CwATsG25yvOoJV1+DqL1c1+eS2 B2c2h1NqQ2B0mPu8RCGA3n9EYgVcJGnKaN6ANCQRLRw73p3170WLiul5hWU5BszfjZjA k4HzZ0LKwzx/KnF4lsVuD6dBlGhlaoLCnQvU4=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
In the (very simplified) example below I want to check that all product's names appear in the list of product names in a Store. However, I always get this error:
Error: In environment
p : Product
s : Store
The term "products s" has type "list Product"
while it is expected to have type "Product".
Any Ideas??
Example Code:
Require Import String.
Require Import List.
Record Product:Set := {productName:string}.
Record Store:Set := {products:list Product}.
Theorem T: forall p:Product,forall s:Store, In (productName p) (productName (products s)).
(*A product's name must be in the list of Product Names that a Store has.
How is this written? I don't want to check that the Product is in the list of
Products, only that the name is in the Store's list of product names.*)
- [Coq-Club] Check Record Field Membership in a List, CoqUser CoqUser
- <Possible follow-ups>
- [Coq-Club] Check Record Field Membership in a List,
CoqUser CoqUser
- Re: [Coq-Club] Check Record Field Membership in a List,
Adam Koprowski
- [Coq-Club] Canonical Structures Not at top level, Cedric Auger
- Re: [Coq-Club] Check Record Field Membership in a List,
Adam Koprowski
- [Coq-Club] Check Record Field Membership in a List, Coq User
- Message not available
Archive powered by MhonArc 2.6.16.