Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] overloading natural number notations for user types

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] overloading natural number notations for user types


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] overloading natural number notations for user types
  • Date: Tue, 23 Feb 2016 18:57:16 -0500
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qg0-f54.google.com
  • Ironport-phdr: 9a23:PkkdIB8254h6OP9uRHKM819IXTAuvvDOBiVQ1KB91+scTK2v8tzYMVDF4r011RmSDdqdtqwP0reI+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStGU0pr8jr3ss7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLVry/dKAlR5RZCi4nOiY7/p7Frx7GGCmI4HIAUmwQ2j5FAhbI6g2yCpX2tCr5u+5w1QGVOMT3SfY/XjH0vPQjcwPhlCpSb21xy2rQkMEl1K8=



On 02/22/2016 02:44 PM, Jonathan Leivent wrote:
In this particular case, I did manage to use coercions. I did have to change a few tactics to accommodate the appearance of the coercion function, but it worked. It does feel a bit fragile, though. In particular, the user type that I want numerals to work for is also declared to be a ring, and I need ring-simplify to work properly even in other cases I haven't tried yet. Maybe I can rig the Add Ring declaration with the necessary preprocess/postprocess tactics to unfold/fold the coercion function?

But, I would like to avoid this by having everything handled in the parse/print layers.

Another issue: with the coercions in place, some proofs are much slower. I don't know what is causing the slowdown. Of course, one suspect would be that the coercion function - being in the actual terms as opposed to merely being something called and desugared by the parser - is somehow messing with my tactics.

-- Jonathan




Archive powered by MHonArc 2.6.18.

Top of Page