coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gaëtan Gilbert <gaetan.gilbert AT skyskimmer.net>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Problem with Definition Matching
- Date: Thu, 8 Nov 2018 21:07:23 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gaetan.gilbert AT skyskimmer.net; spf=Pass smtp.mailfrom=gaetan.gilbert AT skyskimmer.net; spf=None smtp.helo=postmaster AT relay6-d.mail.gandi.net
- Ironport-phdr: 9a23:WEGxLxYe60qprTMrDZjrKVz/LSx+4OfEezUN459isYplN5qZoMS4bnLW6fgltlLVR4KTs6sC17KJ9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa/bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjAk7m/XhMx+gqFVrh2vqBNwwZLbbo6OOfpifa7QZ88WSXZPU8tTUSFKH4Oyb5EID+oEJetWrpPyoEcSrRSkAwmjHOLhyj5MhnDtw6I6yfghGhzB0QwvBd0BrmjUo8/zNKsIXuC1za3Iwi7dYPNMxTfw85PIchMhoPGXXrJwcM/RyUwxGAPflFmQr5LqPy+M2+kLrmOV7PJgWPqxh2I6qQx9uDqiyts2hoXUhY8YxErI+Th9zYs2PdG1SVB3bcS5HJdMqS2WLZZ6T8whTm1ypSo3y7ILtJimdyYQ0psn3QTQa/mffoiI/B3jUOGRLC9ihH17fLKwnRaz/Em5xuLhTMW01UxFritBktXWuXACzRrT5dWGSvdn+EeuxyqP2xjS6uFCP080ibLWJ4A8zrMyjJYes1jPEjXrlEj1gqKabFgo9+yr5uj/Z7XpvJ6cN4t6igHkNaQun9SyAesiPQcQQ2iU4+K82Kfs/U34RLVFleM5krPFsJ3BPsQbpa64AxRW0oYi7ha/Cimp0M4CkXkBMl1FZAqLj5L1NFHWPPD4EfC/jkywnzds3vDKJ6HuApHQLnfYi7rhZrZ860tEyAUp19xf5pRUCqsAIP3pQEPxusbYXVcFNFm/xP+iA9Fg3KsfX3iOC+mXKvD8q1iNs80moPWFYrg6uTL3JuI5r6rhhHIlkFlbcqit15YNdFijHeV9IEScZHf2xNEMDTFZ7UIFUOX2hQjaAnZobHGoUvdkv2BpOMedFY7GA7uVrvmE1Sa/EIdRYzkYWEuPAGzrdoCBVu1Kbi+OcJY4zm40EIO5Qopk7imA8RfgwuM5fPHX6zYbtJfm2cIz4eDPx0lrqG5ESv+F2mTIdFla22MFQzhsgfJlrEh02wnG3e59iv1cU9Na4f9IFAE3KcyEwg==
{ x : foo & bar } and { x : foo | bar } are different types (sigT and sig respectively)
exist produces sig, you need existT for sigT
(sig accepts only Prop for the second component, the difference is useful for extraction)
Gaëtan Gilbert
On 08/11/2018 20:50, Morgan Sinclaire wrote:
I'm having an issue with a certain construction. The details/background shouldn't be important, but I have types "formula", "ord", and "nf : ord -> Prop" defined (the latter two taken from a paper). I'm trying to build a new type "ptree" and assign members of type "e_0" to it in a certain way. Here's the relevant (grossly abridged) part of my code:
Definition e_0 : Set := {a : ord & nf a}.
Theorem Zero_nf : nf Zero.
Proof. apply zero_nf. Qed.
Inductive ptree : Type :=
| node_p : formula -> e_0 -> ptree.
Fixpoint finite_valid_p (t : ptree) : Prop :=
match t with
| node_p f alpha => alpha = exist nf Zero Zero_nf
end.
When I run that, the Fixpoint fails with the error:
"The term "exist nf Zero Zero_nf" has type "{x : ord | nf x}"
while it is expected to have type "e_0"."
Which I don't understand, since that's /exactly/ how I defined e_0. On the other hand, when I changed the definition of "ptree" to:
Inductive ptree : Type :=
| node_p : formula -> {x : ord | nf x} -> ptree.
Then everything works. What am I doing wrong here?
Thanks,
Morgan
- [Coq-Club] Problem with Definition Matching, Morgan Sinclaire, 11/08/2018
- Re: [Coq-Club] Problem with Definition Matching, Gaëtan Gilbert, 11/08/2018
Archive powered by MHonArc 2.6.18.