Skip to Content.
Sympa Menu

coq-club - [Coq-Club] mathematical function notation

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] mathematical function notation


Chronological Thread 
  • From: Michael Shulman <shulman AT sandiego.edu>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] mathematical function notation
  • Date: Tue, 3 Nov 2015 20:17:16 -0800
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=viritrilbia AT gmail.com; spf=Pass smtp.mailfrom=viritrilbia AT gmail.com; spf=None smtp.helo=postmaster AT mail-lf0-f47.google.com
  • Ironport-phdr: 9a23:8PPdShPYi4EUh3uxHmAl6mtUPXoX/o7sNwtQ0KIMzox0KPv5rarrMEGX3/hxlliBBdydsKIZzbCH+P69EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35nxjbH5pcCbSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6LoJvvRNWqTifqk+UacQTHF/azh0t4XXskzoShLHzX8BWC1CmR1RRgPB8RvSX5HrsyK8uPAriweAOsijaLE/WT2v6+9QSALsjS4Bf2oi8HzTj8V2pLlSph6gqhN4hYPYfdfGZ7JFYqrBcIZCFiJ6VcFLWnkEW9vkYg==

Is there any way to get Coq to display function applications using the
traditional mathematician's notation "f(x)", with parentheses around
the argument? I would be satisfied with a solution that only applied
to functions with a particular domain and codomain. Coq accepts this
notation, of course, since the parentheses just group the "x"
unnecessarily, but then it displays it as "f x" instead. I've tried
wrapping both the function and the arguments in dummy inductive types
so that I could define a Notation for the application, but in both
cases I had to declare a Coercion to get the input notation to work,
and apparently the Coercion then overrides the Notation for display as
well.

Context: I'm using Coq to teach an introductory logic class for
mathematicians. It would be nice if it used the same notation that
they'll see in their textbooks and everywhere else in mathematics.

Ironically, two-variable functions (or more) work fine, if I define
them uncurried (albeit with an extra space): the ordered pair (x,y)
always gets displayed with parentheses so that f applied to it looks
like "f (x,y)". But I can't figure out any trick for one-variable
functions.

Mike



Archive powered by MHonArc 2.6.18.

Top of Page