3

A function is defined by either

A function $f: A\to B$ is defined by $\color{green}{x\mapsto f(x)}$

or

$ \begin{align}f:\quad&A\to B\\&\color{green}{x\mapsto f(x)}\end{align}$

Is there a name for the green part? It (or even just $f(x)$) is often just called a function by itself, but I was wondering if there was another word for it, to avoid any confusion.

Frank Vel
  • 5,339
  • Not really, it is just another notation for function. So, it reads "x maps to f(x)" or there is a function from the elements of A, the x's, to the elements of B, the f(x)'s. – Vegeta the Prince of Saiyans Jul 16 '16 at 11:08
  • Frank It's exactly the same. Some authors perhaps prefer the former notation some others the latter. Althought, I believe that the latter is more common. $\mathbf{EDIT}$: I don't have any idea about how does a computer scientist use the above, mathetamatically-wise is exactly the same. –  Jul 16 '16 at 11:09
  • @LordVader007 I was referring to the green colored part, not the entire definition. – Frank Vel Jul 16 '16 at 11:30
  • I would write: "let $f:A\to B$ be given by $f(x)=\ldots$ for all $x\in A$". The way you have written it you are not actually defining the function. – smcc Jul 16 '16 at 11:33
  • @smcc That would be yet another way to define a function, I don't see how my way(s?) are any different. The question is about the expression $\color{green}{x\mapsto f(x)}$, so it's not too significant anyways. – Frank Vel Jul 16 '16 at 11:44
  • 3

1 Answers1

3

I think its basically called lambda abstraction; instead of $x \mapsto f(x),$ computer scientists often write $\lambda x.f(x)$ and speak of "anonymous functions." Its interesting that in your example, we actually are, in fact, naming a function; but, I think the main point of this notation is we you don't have to give it a name. For instance, I can write: observe that the function \begin{align}\quad& \mathbb{Z}\to \mathbb{Z}\\&x\mapsto 2x\end{align} is injective, but fails to be surjective.

goblin GONE
  • 67,744
  • What's the difference between an anonymous function and a lambda abstraction then? edit: nvm; "anonymous functions are often referred to as lambdas or lambda abstractions". – Frank Vel Jul 16 '16 at 11:37
  • What is the purpose of the last example about injectivity and surjectivity? – Frank Vel Jul 16 '16 at 11:39
  • @FrankVel, I can talk about the properties of the function (e.g. injectivity) without giving it a name like "$f$" – goblin GONE Jul 16 '16 at 11:47
  • So an anonymous function is $\begin{align}&A\to B\&x\mapsto x'\end{align}$ or just $x\mapsto x'$? How does one distinguish between the two? – Frank Vel Jul 16 '16 at 12:14
  • @FrankVel, unfortunately, mathematics doesn't quite make 100% sense yet, so different people will give you different answers. I'm secretly working on a foundation of matj in which they're both valud objects; in my approach, the former is a function, while the latter is just its underlying "morphism of syntax." My ideas arent yet consistent enough that i can say much more than that. – goblin GONE Jul 16 '16 at 12:50
  • I see. My motivation is to explain differentiation easier, in which domains aren't of interest; $(x\mapsto x^2)' = x\mapsto 2x$ in both $\mathbb{R}$ and $\mathbb{C}$, or any subsets of these. I'd love to read your foundation once it's ready, so I can get a different view on lambdas. – Frank Vel Jul 16 '16 at 13:25
  • @FrankVel, for what it's worth, I tend to think of expressions of the form $$\frac{\partial}{\partial x} \tau$$ as shorthand for $(x \mapsto \tau)'(x),$ possibly with some added "typing" as above. For example: $$\frac{\partial}{\partial x} x^2 = (x \mapsto x^2)'(x) = (x \mapsto 2x)(x) = 2x$$ – goblin GONE Jul 16 '16 at 16:51
  • @FrankVel, can we just continue the discussion here, since MathJax isn't yet supported in the comment. In reply to your comment, I agree that it's a little confusing. A better approach uses "uniform substitution operators": $$\frac{\partial}{\partial x} \tau = \lim_{h \rightarrow 0}\frac{(x:= x+h)\tau - \tau}{h}$$ The idea is that $(x:= A)B$ means the result of replacing every instance of $x$ in $B$ with $A$. There's a relationship to lambda abstraction, too: $$(x:=A)B = (x \mapsto B)A$$ – goblin GONE Jul 17 '16 at 13:42
  • By the way, you actually need substitution operators to reason rigorously about Leibniz notation: from $$\frac{\partial}{\partial x} x^2 = 2x$$ we deduce $$(x:=3)\frac{\partial}{\partial x} x^2 = (x:=3) 2x.$$ Since uniform substitution commutes with functions, this implies $$(x:=3)\frac{\partial}{\partial x} x^2 = 6.$$ But since uniform substitution doesn't commute with differentiation, it doesn't follows that $$\frac{\partial}{\partial x} 3^2 = 6,$$ which would be absurd. – goblin GONE Jul 17 '16 at 13:46
  • Why change the order? Why not just define $$\dfrac{\partial}{\partial x}x^2(x:=3) = \left(\dfrac{\partial}{\partial x}x^2\right)(x:=3)$$ To me it seems more reasonable to define $$(x\mapsto B)(A) = \hat{B}(A)$$ This would make the expression similar to existing syntax: $$\dfrac{\partial}{\partial x}\left(x\mapsto x^2\right) = \dfrac{\partial}{\partial x}\hat{x}^2 = 2\hat{x} = x\mapsto 2x$$ And $$\dfrac{\partial}{\partial \hat{x}}\hat{x}^2(3) = 2\hat{x}(3) = 2(3) = 6$$ Your syntax doesn't seem to easily distinguish between an expression $B$ and a lambda abstraction $x\mapsto B$. – Frank Vel Jul 17 '16 at 14:33
  • @FrankVel, the first part, about not changing the order, is a good comment; and, lots of people would denote $(x:=A)B$ as $B(x:=A)$ for exactly that reason. But uniform substitution has connections to "procedural programming" that no-one really seems aware of, and from that point of view, its better to use $(x:=A)B$ and put it on the left. The rest of your comment doesn't make much sense to me. For me, $x$ is already a function; we don't need to put a hat over it. To me, "variable" just means "function whose domain isn't completely clear." – goblin GONE Jul 17 '16 at 14:47
  • the reason I made this question was to find a name for a function whose domain isn't clear... I'd also argue that there is a clear distinction between a variable and a function. A variable isn't really a well-defined word in maths, but using $x^2$ as a "function" ought to cause confusion, even though $x\mapsto x^2$ isn't better. I know $(x)f$ is preferable to $f(x)$ at times, so I guess you have your reasons. While it's useful to think of $x^2$ or $x\mapsto x^2$ as functions, they are not, but they're so useful that there should be a better term for them than "lambda abstraction"... – Frank Vel Jul 17 '16 at 15:03