Re: [Haskell-cafe] mathematical notation and functional programming

2005-01-28 Thread Fritz Ruehr
Well, I don't know about modern works which might appeal to knowledge 
of FP languages, but there is a well-known, 2-volume work by Cajori:

Cajori, F., A History of Mathematical Notations, The Open Court 
Publishing Company, Chicago, 1929 (Available from Dover).

I know it through Ken Iverson (may he rest in peace), the creator of 
APL. (Dr. Iverson's own notations were not to everyone's taste, but I 
think they were a bigger influence on Backus and the recent wave of FP 
than is generally acknowledged.)

APL *did* have implicit maps and zipWiths in the sense that scalar 
functions would be automatically extended to vectors (and similarly for 
higher dimensions). I think my PhD advisor, Satish Thatte, did some 
work on extending this sort of notational abuse to Hindley-Milner 
systems, but I don't have the citations at hand.

OK then, googling on Cajori yields this quote from a math history site:
  He almost single-handedly created the history of mathematics as an 
academic subject in the United States
   and, particularly with his book on the history of mathematical 
notation, he is still one of the most quoted
   historians of mathematics today.

More googling on mathematical notation reveals that there *are* 
people concerned about these issues, Steven Wolfram being an 
easily-recognized example (he refers to Cajori's work).

  --  Fritz
On Jan 27, 2005, at 12:14 PM, Henning Thielemann wrote:
I wonder if
mathematical notation is subject of a mathematical branch and whether
there are papers about this topic, e.g. how one can improve common
mathematical notation with the knowledge of functional languages.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] mathematical notation and functional programming

2005-01-28 Thread Michael Matsko
Also, Walter Noll of Carnegie Mellon Univ. wrote a book,
Finite-Dimensional Spacesin 1987 which basically presented
undergraduate math in a notationally and conceptually unified manner. 
Some of the notation and terminology was strange, but consistent.

Mike Matsko

- Original Message -
From: Fritz Ruehr [EMAIL PROTECTED]
Date: Friday, January 28, 2005 3:10 pm
Subject: Re: [Haskell-cafe] mathematical notation and functional programming

 Well, I don't know about modern works which might appeal to 
 knowledge 
 of FP languages, but there is a well-known, 2-volume work by Cajori:
 
 Cajori, F., A History of Mathematical Notations, The Open 
 Court 
 Publishing Company, Chicago, 1929 (Available from Dover).
 
 I know it through Ken Iverson (may he rest in peace), the creator 
 of 
 APL. (Dr. Iverson's own notations were not to everyone's taste, but 
 I 
 think they were a bigger influence on Backus and the recent wave of 
 FP 
 than is generally acknowledged.)
 
 APL *did* have implicit maps and zipWiths in the sense that 
 scalar 
 functions would be automatically extended to vectors (and similarly 
 for 
 higher dimensions). I think my PhD advisor, Satish Thatte, did some 
 work on extending this sort of notational abuse to Hindley-Milner 
 systems, but I don't have the citations at hand.
 
 OK then, googling on Cajori yields this quote from a math history 
 site:
   He almost single-handedly created the history of mathematics as 
 an 
 academic subject in the United States
and, particularly with his book on the history of mathematical 
 notation, he is still one of the most quoted
historians of mathematics today.
 
 More googling on mathematical notation reveals that there *are* 
 people concerned about these issues, Steven Wolfram being an 
 easily-recognized example (he refers to Cajori's work).
 
   --  Fritz
 
 On Jan 27, 2005, at 12:14 PM, Henning Thielemann wrote:
 
  I wonder if
  mathematical notation is subject of a mathematical branch and 
 whether there are papers about this topic, e.g. how one can 
 improve common
  mathematical notation with the knowledge of functional languages.
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] mathematical notation and functional programming

2005-01-28 Thread Jorge Adriano Aires

 Things I'm unhappy about are for instance

 f(x) \in L(\R)
where f \in L(\R) is meant

 F(x) = \int f(x) \dif x
where x shouldn't be visible outside the integral

 O(n)
which should be O(\n - n) (a remark by Simon Thompson in
The Craft of Functional Programming)
 f(.)
which means \x - f x or just f

All of these are the same notation abuse,
sometimes f x is meant to be interpreted as \x-f x

In some cases it would be really tedious to add the extra lambdas, so the 
expression used in its definition is used to denote the function itself. 

 a  b  c
which is a short-cut of a  b \land b  c

Both, ambiguity and complex notation, can lead to (human) parsing problems, 
which is what we are trying to minimise here.

J.A.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] mathematical notation and functional programming

2005-01-28 Thread Hamilton Richards
At 9:14 PM +0100 2005/1/27, Henning Thielemann wrote:
Over the past years I became more and more aware that common mathematical
notation is full of inaccuracies, abuses and stupidity. I wonder if
mathematical notation is subject of a mathematical branch and whether
there are papers about this topic, e.g. how one can improve common
mathematical notation with the knowledge of functional languages.
Your distaste for common mathematical notation was shared by Edsger 
W. Dijkstra. For a sampling of his writings on the subject, visit 
http://www.cs.utexas.edu/users/EWD/welcome.html and search the 
transcriptions for notation. Or use the Advanced Search facility 
to pick up other forms such as notations and notational.

Things I'm unhappy about are for instance
f(x) \in L(\R)
   where f \in L(\R) is meant
F(x) = \int f(x) \dif x
   where x shouldn't be visible outside the integral
O(n)
   which should be O(\n - n) (a remark by Simon Thompson in
   The Craft of Functional Programming)
I use lambda notation extensively in the part of my discrete math 
course that deals with complexity. Works fine.

Moreover --anticipating a reply further down the list-- my students 
learn that O(f) for some function f denotes a set of functions, so 
that f = O(g), where f and g are functions of the same type, is 
simply a type error. I seem to recall that Donald Knuth made this 
point a few decades ago, but old habits die hard.

a  b  c
   which is a short-cut of a  b \land b  c
This problem has worse consequences when the operator is (=). By 
common convention,

a = b = c is shorthand for a = b /\ b = c
which is a great mistake because it obscures the extremely valuable 
(for equational reasoning) fact that when a, b, and c are Boolean, 
(=) is associative.
   In their textbook, _A Logical Approach to Discrete Math_, Gries 
and Schneider explain that (=) is conjunctional, and that an operator 
can't be both conjunctional and associative. Following Dijkstra, they 
introduce another operator, the equivalence (=) (that should display 
as a three-bar equality operator). It's defined only for Boolean 
operands, and it's not conjunctional but associative.

f(.)
   which means \x - f x or just f
All of these examples expose a common misunderstanding of functions, so I
assume that the pioneers of functional programming also must have worried
about common mathematical notation.
As did Dijkstra, who devoted the last part of his career to the 
streamlining of mathematical argument.

Regards,
--Ham
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe