Hacker News new | ask | show | jobs
by salutis 995 days ago
I do not think mixing up 'f(x)' and 'f' is harmless, given mathematics is all about clarity. In any quality text, 'f(x)' denotes the value of 'f' at 'x', and 'f' denotes the function 'f' itself. Also, speaking of notation, I wonder why you used ':=' instead of '=' to define 'f'. There is no computation going on, right?
3 comments

Mixing up 'f' and 'f(x)' is mostly harmless in practice. The underlying principles are still clear enough. (And I say that as someone who would _really_ like to make that argument that people who mess this up are somehow unclear in their thinking. No, they are mostly fine.

Getting 'f' vs 'f(x)' right mostly is really important for programmers who deal with higher order functions in general all the time. Most mathematicians don't fall into that category.

You could say calculus deals with higher order functions, like the derivative. And that's a valid way to look at it. But most people get by just fine using special purpose notation for the derivative and not thinking about it as a function just like 'f'.)

I used := to emphasis that I am defining 'f' here, not just writing down any old equation. (Eg like like in the example "Find all functions f such that f(x + 1) = x * f (x).")

Though if you wanted to be pedantic about notation, I could have written that as with the x on the other side of the :=, like f := \x -> x + 3 (for Haskell inspired notation) or f := (x |-> x + 3) where |-> means the little arrow I draw by hand to denote a mapping when I'm writing math on a chalk board or piece of paper.

I'm not sure why := would denote a computation? At most you might want to use it to denote an assignment in a mutable context?

> Getting 'f' vs 'f(x)' right mostly is important for programmers who deal with higher order functions in general all the time. Most mathematicians don't fall into that category

Mathematicians deal with higher order functions all the time, e.g. in functional analysis.

The amount of "cheating" (as in, notation/language abuse) in functional analysis is much worse than that. People routinely call points in L^2[0,1] "functions"... OTOH, I don't think it leads to serious problems.

OTOH, the lack of rigor is definitely one of the problems of contemporary math. Many years ago, when I was a student, I studied one paper, coauthored by 2 people - call them X and Y. X was a very established mathematician, Y was a relative newcomer. There was one (set-theoretical) argument I couldn't understand, so I asked Y (he was my advisor's friend) about it. He told me "yeah, X asked me this, too, and I told him to use Zorn's lemma, and after a moment of thinking, he said, «yeah, that would work»". I'm not set theorist myself, but it smelled suspicious to me, so I asked another friend, who knew much more about set theory than me. He smiled and said "of course it's wrong, it's a very common mistake".

Had X and Y written out the argument more rigorously, we'd have one less published result with no correct proof...

And I have quite a few other anecdotes like this, unfortunately.

One professor at my former faculty once told how he approaches refereeing papers. "For the first 30 minutes, I try to prove the main result myself. If I don't succeed, I spend the next 30 minutes trying to find a counterexample. This way I write most reviews in half an hour."

A few years ago I coauthored a book about non-linear analysis. Quite a few quite interesting topics. One of the coauthors insisted on writing out proofs in detail and rigorously, and now we joke that our book is the first one where some (quite established and known in this field) theorems are proved correctly for the first time. (And that includes proofs with gaps/mistakes in both research papers and monographs, btw.)

Integration and differentiation are examples of higher order functions. And so are many things you can do to groups.

I specifically meant getting this is important for programmers who deal with higher order functions.

It is not so important for mathematicians who deal with higher order functions.

Mostly because the intended audience for their writings is smarter than a computer, and there's typically more context.

> Getting 'f' vs 'f(x)' right mostly is really important for programmers who deal with higher order functions in general all the time. Most mathematicians don't fall into that category.

Operators and functionals?

It's usually clear from context what you mean, even if you work with operators and functionals.
> Also, speaking of notation, I wonder why you used ':=' instead of '=' to define 'f'. There is no computation going on, right?

In math, := is typically used to denote a definition. Using equality (=) only makes sense if both sides of the equality sign already have a definition.

Well, to be fair, = is also very often used for definitions. And the reader has to figure out from context which meaning of = applies.
> In math, := is typically used to denote a definition.

i mentioned this up-thread but is that why := is assignment in Pascal? Wasn't Pascal the main academic language there for a while?

Yeah, I think that has the same origin. Though I'm not sure if programming languages or maths came first. Apparently, for programming languages it appeared first in ALGOL in 1958[1].

Edit: On math.SE[2] someone claims that it's notation borrowed form programming. Someone else claims that it was introduced by Bourbaki, which might predate programming, as Bourbaki started publishing in the 1930s. However, I couldn't find any evidence of this from skimming a few Bourbaki PDFs.

[1] https://en.wikipedia.org/wiki/Assignment_(computer_science)

[2] https://math.stackexchange.com/a/25215/312406

I agree but i'm by no means even remotely an expert. Mixing up f and f(x) seems pretty bad to me.

f = y+3 makes sense f(x) = y+3 does not make sense (at least to me), f(y) = y+3 makes sense however.

f(x) is a function of x correct? It's articulated as "f of x".

> I wonder why you used ':=' instead of '=' to define 'f'. There is no computation going on, right?

:= is assignment in Pascal iirc, maybe that's where it's coming from.

Something like 'f(x) = y + 3' can make perfect sense, depending on context.

For example, that could describe a constant function that doesn't depend on x, and y is a free variable that gets its value from context.

Or y could implicitly be a function of x. That happens a lot in calculus or physics.