What do we call the (proper-class) function $$\mathrm{eval}(*,*)$$ such that for all functions $g$ and all $x \in \mathrm{dom} \;g$ we have $\mathrm{eval}(g,x) = g(x)$ ? I looked up 'evaluation function' but it seems to be a concept in game theory as opposed to the concept I'm looking for.
Asked
Active
Viewed 179 times
0
-
So what if there's a clash? "Normal function" has a meaning in set theory and in probability theory. I can assure you, the two notions do not coincide. – Asaf Karagila Aug 17 '13 at 03:18
-
@AsafKaragila, I don't care if there's a clash, but I can't get more information on the function until I know its standard name. – goblin GONE Aug 17 '13 at 03:20
-
What sort of information would you like to find? – Asaf Karagila Aug 17 '13 at 03:20
-
@AsafKaragila, in particular, I'm wondering if we can get away with only one $\mathrm{eval}$ function. Like, can I write $\mathrm{eval}(\mathrm{eval},(f,x))$ ? This sort of thing doesn't work in ZFC as I'm sure you're well aware, but maybe in other systems. – goblin GONE Aug 17 '13 at 03:23
-
What other systems? – Asaf Karagila Aug 17 '13 at 03:27
-
In lambda calculus, the eval function would make sense, but would be trivial. In particular, we would say that $$\text{eval}(g,x)=\text{eval}(g)=g(x)$$ That is, "eval" would register as the identity function on any function. – Ben Grossmann Aug 17 '13 at 03:29
-
1Alternatively, you could define $$\text{eval}(x,g) = \text{eval}(x) = g(x)$$ That is, we would write $$\text{eval}=\lambda x.[\lambda f.[f(x)]]$$ – Ben Grossmann Aug 17 '13 at 03:33
1 Answers
2
The most common name I've seen for the function that applies a function to an argument is "apply". However, I've also seen "eval" and several other names.
In a programming languages context, the name "apply" is fairly standard, although its exact semantics varies significantly between languages. "eval" in this context is more commonly used to refer to a function that parses and evaluates an expression from a string or abstract syntax tree, e.g. $\mathrm{eval}(``\ 2+3+1+1") = 7$ (note the quotation marks indicating a string of characters).
Aaron Rotenberg
- 375
- 1
- 11
-
I see. From what I gather from that Wikipedia page, it appears that $\mathrm{apply}$ and $\mathrm{eval}$ are used quite differently in the programming language community. In particular, if $2+3+1+1$ is a multiset of natural numbers, then we might write: $\mathrm{eval}(2+3+1+1) = 7$. But we certainly would not write $\mathrm{apply}(2+3+1+1) = 7$. – goblin GONE Jul 16 '15 at 01:01
-