Edge Rewrite
Jump to content

Talk:Function application

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 1 month ago by Farkle Griffen in topic Function vs Function symbol

Relation application

[edit]

Application can be of relations in general; function application is a special case for when the relation is functional. Can something be mentioned about this? I don't know whether anyone has used the term ‘relation application’ in literature. See also: relation composition. —James Haigh (talk) 2015-09-08T04:24:17Z

Yes, this article seems to be a tangle that confuses functions vs. relations vs. functors vs the general concept of application; I slapped an "expert attention needed" tag on it. linas (talk) 00:53, 22 May 2026 (UTC)Reply

Function vs Function symbol

[edit]

@Jochen Burghardt, you're right, I should have been clearer, but I do believe "function symbol" is right. It is not that X is the domain of f, but rather, X is the domain set we are about to assign to f.

And we really do mean "symbol", not the function itself. For example, { (0,0), (1,1), (2,2) } is a function, but we wouldn't use this in that axiom. Farkle Griffen (talk) 22:52, 13 January 2025 (UTC)Reply

It might be better to separate the function from the symbol.
Maybe "Given some relation R such that R is a function with a domain X and codomain Y, and a function symbol 'f' ..." Farkle Griffen (talk) 22:57, 13 January 2025 (UTC)Reply
I agree that one wouldn't write e.g. { (0,0), (1,1), (2,2) }(x) to denote a function application, so "symbol" seems indeed to be important.
On the other hand, the axiom schema (btw: which one exactly do you mean? Zermelo–Fraenkel_set_theory#Axiom_schema_of_replacement?) should apply to all functions, independently of whether they have got a name or not, so "symbol" there is inappropriate, imo.
In your above answer, I didn't understand why you introduced a relation symbol R (which was never used before in Function_application#Set_theory). What about Given any symbol f denoting a function with a given domain X and codomain Y, ...? - Jochen Burghardt (talk) 20:04, 14 January 2025 (UTC)Reply
There's two notions of "function" that we're dealing with here: I'll call these "functions" and "set-functions". In first-order logic (which ZF is defined in), functions are primitive objects, so "function application" doesn't really need to be defined. But in the language of ZF set theory, there are no functions, and so "function application" doesn't exist, all we have are set-functions (sets of ordered pairs).
If we want to define bona-fide function application in ZF, we have to add a function letter to the language for the set-function we want to realize. The second source I added to that section (Mendelson) explains adding a function letter to a first-order language.
There are some ambiguity issues if we let the same letter denote the set and the function, and it seems like it would only be more confusing for the reader if we do it like that, which is why I suggest introducing R. Farkle Griffen (talk) 19:59, 22 January 2025 (UTC)Reply
"btw: which one exactly do you mean?"
This would be introducing a new axiom to ZF to define the new function letter (so, technically this would be a different theory, but it's a conservative extension, so it doesn't add anything apart from convenience). Farkle Griffen (talk) 20:15, 22 January 2025 (UTC)Reply
@Jochen Burghardt, I'd like to apologiseit seems I was wrong about the definition. See Mendelson, p.245, section "definitions" and the accompanying footnote. He is a bit more explicit in showing function application is indeed a binary operation or which takes in any two sets, and thus "{ (0,0), (1,1), (2,2) }(x)" is well-defined. I'll update the article Farkle Griffen (talk) 16:25, 14 July 2025 (UTC)Reply
That's all correct, but it's not a function symbol. That's reserved for symbols available in the signature for the first-order theory in question (in this case \in and sometimes \varnothing). Caleb Stanford (talk) 00:26, 25 May 2026 (UTC)Reply
It is indeed a function symbol. You are correct that it would be included in the signature of the theory (hence, the requirement of an extension by definition). Farkle Griffen (talk) 01:03, 25 May 2026 (UTC)Reply
As Mendelsen states clearly on p. 231 (6Ed.): "NBG has a single predicate letter A2 but no function letter or individual constants." As Mendelsen also clearly states, on page 235 in conjunction with introducing this and some other related notations it is possible to extend the signature after a definition with new constants and function letters, and associated axioms, without any fundamental increase in expressiveness: "In connection with these definitions, the reader should review Section 2.9 and, in particular, Proposition 2.28, which assures us that the introduction of new individual constants and function letters...adds nothing essentially new to the theory NBG." The point is the new definition is constructed as a matter of meta-mathematics, in that we could have just as well omitted the new symbol and obtained the same results (see proof of Proposition 2.28 on page 103) - and this is also the way that Mendelsen develops things, but this is notably not part of the first-order theory of sets itself, but rather a generalization WLOG. (If it were, then there would be no single "first-order theory" of sets with one signature, but rather many such first-order theories one for each group of mathematicians which chose to define some extra symbols in a certain way.)
By the way, if you are providing a source to a textbook, you should provide the page number as an argument (pp= or with template:sfn). Caleb Stanford (talk) 21:46, 25 May 2026 (UTC)Reply
Ah I missed the page number 185 in your cite, sorry and you are using 3rd Ed., please disregard the last sentence! I'll add strikethrough. Caleb Stanford (talk) 21:54, 25 May 2026 (UTC)Reply
Again, everything you said is correct. But it also doesn't contradict the article or any response I gave, so I'm not sure what exactly you're responding to. If you just found the article unclear and edited it to better match you understanding, that's fine too. I don't see an issue with the original or current version. Farkle Griffen (talk) 20:46, 30 May 2026 (UTC)Reply

merge 2026-05-18

[edit]

merge looks great! Thanks Farkle Griffen (talk · contribs) for taking the initiative on this. Caleb Stanford (talk) 07:03, 18 May 2026 (UTC)Reply

Perhaps this article should be split in two; one article which defines the (computer programming) function called "apply" as used in computer programming, and another called "apply" for the operator (e.g. sometimes a functor, and not a function) used in mathematics. Implying that everything dealt with here is a "function" and that this article is about "function application" is misleading, and I think it runs counter to textbooks. (But I have no such textbook in front of me. I'm not an expert in descriptive set theory, I just occasionally leaf through rando books. Things like condensed sets are the latest head-scratchers.) linas (talk) 23:58, 21 May 2026 (UTC)Reply
FWIW, I asked google, and it reminded me that apply is not a function (and the process of applying is not the same thing as function application) whenever you have partial orders, cobordisms, or any category where you are missing an exponential object. Thus I slapped an "expert attention needed" on this article, as it appears to be a mashup of several unrelated ideas. Splitting out the blargle about programming might be the easiest way to start reforming this into something that doesn't taste like oatmeal with glass shards in it. linas (talk) 00:18, 22 May 2026 (UTC)Reply
Well, OK, so this feels more like a pebble in my shoe than glass in my porridge. To deal with the pebble:
-- The "apply operator" in lambda calculus and in combinatory logic. Here, "apply" is a structural operator, and not a function nor a functor (because there are no functions, and the thing being applied is not a function but a structure.)
-- Same as above, but for model theory. The concept is again that of an operation on structures.
-- Then a long blargle about category theory. Here, "apply" has several forms. To start with, apply as morphism from the tensor product of an object and an internal-hom to another object viz where is the internal hom.
-- Then a general sketch of "apply" w.r.t. adjunction and natural transformations.
-- For rigid category, let be the dual object, then "apply" is the dual paring where is the tensor unit and is used to define the inner product and the trace operator in these categories. (e.g. finite-dimensional matrices, and the trace class operators in functinal analysis.)
-- For the category of modules, "apply" is just the action of the tensor category on the module category.
-- 2-category where "apply" is the same thing as composition. I think. Something like that.
-- Use "apply" to apply a condensed set to a profinite set. This works, because these are sheaves, they're locally cartesian closed, and this allows to "apply" a derivative or "apply" an integral to topological vector spaces, where they are not ordinarily defined.
  • Then on to "apply" in set theory. I understand this a whole lot less, and am on much shakier ground. (The article impredicativity contains an extract of letter from Russel to Frege about why "apply" is problematic in set theory.) The sketch would go something like this:
-- For effective descriptive set theory and I guess descriptive set theory itself. The concept of "apply" somehow gets you up the firt few rungs of the Borel hierarchy and something something lightface.
-- The concept of "apply" in ordinal analysis. I also don't understand this, but these is how the "impredicative ordinals" first appear, because you can only apply functions up to the Church-Kleene ordinal or the Feferman-Schutte ordinal. After this point, the concept of "function application" breaks down, because of Turing halting problem. This is wayyy over my head. Something to do with "applying computable functions" or "applying recursive functions" to ordinal notation, or maybe just the recursively-enumerable ones.
-- The concept of uniformization (set theory) and/or Wadge degrees, where, given a relation you want to find a function such that hold true. That is, the "apply operation" is what you do to uniformize. Or something like that. I don't get it. (I think that the core idea is that it's more or less the same thing as being adjoint to currying, but the conventional language of adjoints will not work in this context.)
The upshot of this is that I think you can only call these ideas "function application" if you are on the set-theory side of the planet, and even there, you rest on shaky ground. As I write this, the obvious solution is to rename this article to "application", and ditch the word "function", and then try to handle functions as a narrow special case, the simplest case. The advanced topics should probably go into a distinct, separate article, so you don't get smoke coming out of the ears of college engineering students. linas (talk) 02:42, 22 May 2026 (UTC)Reply
Yes, the current article simply mixes too many things to be coherent, and at its current level of detail has a hodge-podge, indiscriminate collection feel to it. I think several clearly-scoped sub-articles/stubs should be forked off. This article should be kept focused on function application/evaluation: notation, lambda calculus, set-theoretic formalization, categorical evaluation, and a short programming-language section. The programming material about language-specific apply functions (and especially list-argument calling conventions) could be shortened here and, if enough sourced material remains, split into a separate programming article. However, I also think the reason given in expert tag seems a bit overblown. The issue is not that categorical evaluation is "unrelated" to function application. It is a higher-level abstraction of the same operation. The article needs clearer scope and better separation of the different viewpoints. I think something along the following lines would be an appropriate structure: Notation, In lambda calculus and logic, In set theory, In category theory, In programming languages. Separate articles should then be created for the various generalizations or refinements. Sławomir Biały (talk) 06:14, 22 May 2026 (UTC)Reply
WP:Broad-concept articles are fine and normal. This article has a lot, but nothing more than any other BCA. I agree the article is in bad shape, but this seems like criticizing a start-class article for being a start-class article. Currently, none of the subtopics here has enough content to be split off. What this article needs is curation; expert attention is usually for fine-tuning a very specific detail of an article, not asking experts to expand the article substantially, that's the job of editors. The "expert attention needed" tag should probably be removed. Farkle Griffen (talk) 15:34, 22 May 2026 (UTC)Reply
I agree with Farkle - many opportunities for improvement, but some of your suggestions here would instead muddy the waters with the category theoretic or other advanced viewpoints. The article should be an introduction to function application as a concept, not only in category theory. It is not clear why you think that function application in computer programming doesn't have any relation to function application from mathematics. Caleb Stanford (talk) 17:54, 22 May 2026 (UTC)Reply
I find your comments fairly confusing. In my view the primary problem with your suggestion is that there is nothing particularly special about apply as opposed to the other topics covered here as it relates to computer science. It is not that apply is the only notation or usage of function application in computer science. Really the only difference between function application in computer science and in mathematics is that in computer science the application is restricted to computable functions. Caleb Stanford (talk) 17:47, 22 May 2026 (UTC)Reply
In short: half of this article has nothing to do with "functions". The things being applied are functors, transforms, operators or other structures, and not "functions". So calling it "function application" is just wrong. linas (talk) 18:02, 22 May 2026 (UTC)Reply
A low-brow example: the Dirac delta function is not actually a "function"; its a "distribution"; and is an example of what one does with rigid categories. linas (talk) 18:05, 22 May 2026 (UTC)Reply
I just reviewed the "in programming section" more carefully. This section is in very poor shape. It is primarily about variadic function application, and should potentiall move there. Much better would be a section discussing the usage of function application in computer science and the syntax for it in various languages. Caleb Stanford (talk) 18:13, 22 May 2026 (UTC)Reply
As to your point, I agree, but don't really see this as the right distinction for an introductory article. For example, the article on operator (mathematics) begins "In mathematics, an operator is generally a mapping or function"... Everything is a function, in a sense. I do find the section on function application as an operator highly relevant here. The variadic apply stuff, well.... less so. Caleb Stanford (talk) 18:17, 22 May 2026 (UTC)Reply
Well, this article is the result of a merge. I did not look carefully on what things looked like before the merge, but I'm proposing an un-merge, or some split of introductory from advanced topics. Here's another example: in lambda calculus, the expression is not a "function": it has no domain or codomain; its just an expression. Yet lambda calc is maybe the simplest setting where the generic concept of "apply" can be introduced. linas (talk) 01:25, 23 May 2026 (UTC)Reply
Wikipedia doesn't generally separate "introductory" from "advanced" topics. That is usually considered a WP:Redundant fork. There are WP:Introductory articles, but I don't think the more technical part of a hypothetical completed version of this article meets the criterion of "significant interest to non-technical readers". It's perfectly fine for an article to cover introductory and technical content; see Addition and Matrix (mathematics). If you have an issue with calling function application a function you're welcome to edit the article.
Also, in foundations of mathematics (set theory and lambda calculus/type theory), I believe the term you're looking for is Function symbol. Farkle Griffen (talk) 01:50, 23 May 2026 (UTC)Reply
apply applies a (variadic) function to its list of arguments. It's plainly closely related to function application, or to variadic functions. I don't think it needs its own article and personally I'd not see it meeting GNG. Re: lambda term, I think you are being pedantic. That's a term denoting a function taking any argument and returning x. Caleb Stanford (talk) 06:05, 23 May 2026 (UTC)Reply
apply and "function application" are distinct. apply is the function with two inputs f and a, the first of which is a function, and it performs function application. It applies f to a; it returns f(a). This is a meaningful difference in programming, since you could, for example, map apply. When you just call a function, you don't call apply; if you did, you'd get into an infinite regress, since apply is itself a function and would necessitate calls to apply. The other major context in which apply appears, also mentioned in the old article, is category theory. It's essential for defining exponential objects. In this context, talking about apply is more natural than talking about function application because apply is a morphism.
While apply is closely related to function application, it's a separate concept. They appear in different contexts. The BooleanTalk 07:45, 23 May 2026 (UTC)Reply
This is the clearest abstract rationale for splitting. It is clear from reading the article that there are really (at least) two different concepts being combined. One is the combinator apply while the other is the more primitive/elementary function application. These are not the same thing (which is obvious to a reader), but it is somewhat hard to demarcate the difference. I think this provides the demarcation. Sławomir Biały (talk) 08:05, 23 May 2026 (UTC)Reply
I don't think anyone is saying they are the same thing. As you state, "apply... performs function application" and they are plainly closely related. I suspect that a correct discussion of these issues also does not overly focus on variadic function application - a quick read of exponential object shows the apply map has more or less nothing to do with variadic functions. Caleb Stanford (talk) 00:03, 25 May 2026 (UTC)Reply
I suppose that makes sensethe Apply article doesn't have much content (even though it's kinda long), so it makes sense to merge it into another article. I'll try to expand the Apply section to have more material, because I suspect there's more that can be said about it, and eventually separate it into its own page, but in the meantime, they can stay as one article. The BooleanTalk 22:04, 25 May 2026 (UTC)Reply
That would be great! Cheers if you are able to do that! :-) Caleb Stanford (talk) 22:06, 25 May 2026 (UTC)Reply
Meanwhile, the part about "binary function symbol" (which may have been referenced earlier on this discussion) is completely wrong. In axiomatic first-order set theory, function application is not a binary function symbol but rather a definition of a notation, which stands for the formula listed on the article (as set theory is a first-order theory over only the relation symbol $\in$, and sometimes also $\varnothing$).
I think we can all agree the article needs a lot of work :-) I'd urge those looking to try to make sure to explain from an elementary point of view, as this article has to be first understood by non-experts. Caleb Stanford (talk) 00:20, 25 May 2026 (UTC)Reply
"not a binary function symbol but rather a definition of a notation"
This is a bit misguided: it is indeed a notation, that notation is called a function symbol. The notation f(x) cannot be reduced to a formula (notably, a formula represents a truth value, not an object).
A base set theory only has . Most set theories won't even include since it can be defined from the previous. Farkle Griffen (talk) 01:11, 25 May 2026 (UTC)Reply
See my comments above - introduction of new symbols is WLOG as a meta-theorem, but it isn't an allowed deduction rule of FOL (c.f. Mendelsen, above). Caleb Stanford (talk) 21:48, 25 May 2026 (UTC)Reply
Agreed with Caleb Stanford,
"Apply" is reasonably under the umbrella term of "Function application", and should be mentioned anyway. There are several different ways this term is formalized, and any reasonable form of this article should cover all notable forms.
Currently this article is not bloated, and all the concepts here reasonably fit. Nothing really needs to be WP:SPLIT. And there's no problem with splitting later if the "apply" content outgrows its due weight here. Farkle Griffen (talk) 01:20, 25 May 2026 (UTC)Reply