Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Problem with Definition Matching

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Problem with Definition Matching


Chronological Thread 
  • From: Morgan Sinclaire <morgansinclaire AT boisestate.edu>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Problem with Definition Matching
  • Date: Thu, 8 Nov 2018 12:50:47 -0700
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=morgansinclaire AT boisestate.edu; spf=Pass smtp.mailfrom=morgansinclaire AT boisestate.edu; spf=None smtp.helo=postmaster AT mail-wr1-f52.google.com
  • Ironport-phdr: 9a23:rJfY0R8cJh87tv9uRHKM819IXTAuvvDOBiVQ1KB41uscTK2v8tzYMVDF4r011RmVBdqds6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+55/ebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRxDohikJNDA37X/ZhdBrga1BvB6svQZyz5LIbIyXMvd1Y6PTfckdRWpERstfUCtBApmzb4QVCeoKIPtWr4j7p1QSqRuxHwisBPnxxTRVgXL22Ko60/4uEQ7c2gwgBNMOsHLIo9XxLqgSUPq1w7fTwDrYaPNW2Cz955bTchA9u/6MQax/fdDPxkYyCgPIl1OdopHmMTONzukBrXSX4u56We+si2MrsR99riayyss2ioTFmIQYwU3e+ypj2oY6P9i4RVZ7YdG6FJtQsDmXN45sTcMjR2FkoSg7yqcbtZKicigHyIorywTQa/yAdIiI7RbjW/iLLThkg3Jlfaqzhxe08Ue+1u3xTte43EpOoyZfkdTBtmoB2wLN5sSaUPdw/lmt1S6K1w/J6+FEJU40lbDcK54k2rMwk50TsV7MHiDsnkX2l66WdkM49eis8evnY6/mqYGHOoBvjQH+M78uldKkAeQkKAcOQ3aU9f6i27L+4E31WK9KgeEukqnFrJDaItwWqbK+Aw9My4os9xK/Dyq939kDhnkGLFdFeAqdgITzOlHOJur4DfaljFi2njdr3aOOArq0CZLUa3PHjb3JfLBn6kcaxhBg48pY4sdxDasOKfS7YU73v9jRDwU0e1ixxPzoAdNm14UVXWuOGKKxOqTTqlKT+uszLq+BaJJD62W1EOQs+/O71SxxolQaZ6T8hcJGOkD9JexvJgCiWVSph94AFWkQuQ9nEr7gj1yZXCVPbmq/Ga8w+2NiUd70PcL4XomoxYe58mKjBJQPODJMDVGXHGz0fpmJHfoAdXDKe5Izonk/TbGkDrQZ+1SuuQv9kec1K+PV/mgHr8um2oUvoeLUkh42+Hp/CMHPi2w=

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



Archive powered by MHonArc 2.6.18.

Top of Page