Wikipedia:Reference desk/Archives/Mathematics/2021 February 11

= February 11 =

Is there a term that mathematicians use for what computer scientists call "partial application"?
Wikipedia has an article on partial application, which is a term used in computer science (programming language research in particular, I believe). It refers to the process of taking an $$n$$-variable function $$f$$ and creating a related function $$g$$ by fixing the values of some of the independent variables of $$f$$. This is certainly done in math, but when I tried to think of a name for it that's used in math writings, I drew a blank. Is there a term that mathematicians use for the concept? --134.242.92.97 (talk) 16:45, 11 February 2021 (UTC)
 * Parametric function and conditional probability are examples of functions with some fixed function arguments (often called parameters) in math. -- 18:46, 11 February 2021 (UTC)
 * Probably Partial function is the term you seek. --CiaPan (talk) 22:29, 11 February 2021 (UTC)
 * Absolutely not. --JBL (talk) 22:54, 11 February 2021 (UTC)
 * It's a restriction. Here the subset of the domain is "those points where the fixed variables have the appropriate value" or whatever.  The current situation, in which Restriction (mathematics) is not linked from Partial application, should be amended. --JBL (talk) 22:56, 11 February 2021 (UTC)
 * I considered "restriction", but I think it refers to something different. In this case, the domain of $$g$$ is not a subset of that of $$f$$. The relation between the two domains is that of a projection instead. --134.242.92.97 (talk) 23:36, 11 February 2021 (UTC)
 * I see, you want to say that $$g(x) = f(x, y_0)$$ takes input x, which is different from the map $$f(x, y)|_{y = y_0}$$ which takes inputs $$(x, y_0)$$. I suppose that formally this is true and the functions differ by the application of a projection, but it's not an interesting or important formality -- I think I would still use the word "restriction" to describe this and expect to be understood by other mathematicians. --JBL (talk) 00:59, 12 February 2021 (UTC)
 * Here is an example of this usage "in the wild": Function_of_several_real_variables. --JBL (talk) 18:17, 12 February 2021 (UTC)
 * (ec) Given a function $$f:X\times Y\to Z,$$ and some value $$x\in X$$, we can define a function $$f^x:Y\to Z$$ by $$f^x(y)=f(x,y).$$ The section calls this partial application a "restriction". But it does not quite fit the definition given at . The domain of the restricted function as defined there is a subset of the original domain, but the domain of $$f^x$$ is $$Y,$$ which is not a subset of $$X\times Y$$. The set $$\{x\}\times Y$$ is, but this is not the domain of $$f^x.$$ Of course, $$\{x\}\times Y$$ and $$Y$$ are isomorphic, but there may be many isomorphisms, so without an unambiguous rule which one to appeal to, this cannot be dealt with by handwaving. Conversely, given a function $$f:\R\setminus\{0\}\to\R,$$ we can define a restriction $$f_{+}:\R_{+}\to\R,$$ being the unique function that agrees with $$f$$ on the positive reals but is not defined elsewhere. This restriction is not a partial application. Also, if we allow isomorphisms between the new domain and a subset of the old domain, then given a function $$f:X\times X\to Y,$$ we can define a restricted function $$f^\Delta:X\to Y$$ for which $$f^\Delta(x)=f(x,x).$$ Again, this is not a partial application.  --Lambiam 00:29, 12 February 2021 (UTC)
 * without an unambiguous rule which one to appeal to In this case, there is an unambiguous rule that one can appeal to. --JBL (talk) 00:59, 12 February 2021 (UTC)
 * Consider the functions defined by $$f(x,y)=x{+}y$$ and $$g(u)=u.$$ We have $$g(u)=f(0,u)=f(u,0),$$ so $$g$$ can be obtained as a partial application of $$f$$ in two different ways. Can you illustrate the rule for the example? Which of the two isomorphisms should we take? --Lambiam 07:13, 12 February 2021 (UTC)
 * You are under a mis-perception about the context in which this occurs: this idea is only of interest when the particular substitution actually is specified. Also, can I make a general request that you not interact with me when I post here unless absolutely necessary?  I find your tone and behavior constantly grating.  Thanks.  --JBL (talk) 11:45, 12 February 2021 (UTC)
 * The last comment seems somewhat inappropriate. I don't think remarks of a personal nature belong here. --RDBury (talk) 13:55, 12 February 2021 (UTC)


 * It's interesting that, judging by the disagreements above, and even though this operation is simple and commonly used, there doesn't seem to be a widely accepted name for it. One example of it being used is in the definition of Partial derivative (see the section Basic definition.) I agree with Lambiam's suggestion that this is not the usual definition of restriction, but the linked section in Binary function does not cite a source so it's hard to tell if this is an "official" definition or only meant to apply within the article. Another source would be helpful. --RDBury (talk) 13:55, 12 February 2021 (UTC)


 * I think that the mathematicians here are getting caught up unduly in the precision of mathematical language, and that the term partially-specified would cover the OP's request. It's an expression applicable to any area where the scope of a problem has been reduced by estimating or specifying some of the quantities in advance. →2A00:23C6:AA08:E500:FD80:7F76:ABB3:D20C (talk) 16:15, 12 February 2021 (UTC)
 * I don't think that this is the intention of the question. In computer science, and particularly the field of functional programming, the sense is that of, given a fully specified function of several parameters ("arguments" in maths speak), to obtain a function of fewer parameters by freezing some but not all parameters to specific values. These specific values do not correspond to quantities whose values need to be estimated or specified in solving a problem. In a "normal" (complete) function application, values are supplied for all parameters. For example, take the exponentiation function, expressed in prefix form by $$ttp(x,n)=x^n.$$. A complete function application is seen in $$ttp(6,4)=1296.$$ We can define $$square(x)=ttp(x,2),$$ or, in a special functional notation for partial application, $$square=ttp(\underline{~},2),$$ and use this notation in expressions like $$ttp(\underline{~},2)(a)$$. --Lambiam 18:02, 12 February 2021 (UTC)


 * The use in the Binary function article, "Restrictions of ordinary functions", is strange. I can only assume that "ordinary function" here means "univariate function". The functions being confined, however, are multivariate; the "ordinary" functions are the result of the procedure. I could not find a definition in the Encyclopedia of Mathematics or MathWorld, but they contain numerous uses. I checked a small sample, only finding the same notion of a restriction to a subset of the function domain as defined in our article Restriction (mathematics). A good example is at Birkhoff's Theorem. --Lambiam 17:37, 12 February 2021 (UTC)
 * Informally, I would call it a "slice", and I wouldn't be surprised if that word is explicitly defined to mean this concept, somewhere. --Trovatore (talk) 03:00, 16 February 2021 (UTC)
 * In ALGOL 68 terminology, a slice is the notation for obtaining a subarray by the partial indexing of an array; see . This term has since become common for this operation also for other programming languages; see Array slicing. Haskell programmers have a term for a notation for obtaining a unary function by the partial application of, specifically, a binary operation. This is called a section; see . For example, if  denotes exponentiation, then the squaring function can be written as  . However, the type system of Haskell takes a curried view of binary operators; since transforming operator   to function   entails reducing the type from   to , this is only morally a partial application.  --Lambiam 07:51, 16 February 2021 (UTC)

I think this doesn't come up in regular math too much. There is the idea of a functional (such as a differential operator) but you usually wouldn't refer to its result by it's own name. Like if f is a function, f' would be its derivative, which is sort of the partial application of D (the derivative operator) to f, but you usually wouldn't phrase it that way. Or you might write a fixed parameter with a vertical bar, like $$f(x,y)\|_{y=3}$$. 2602:24A:DE47:BB20:50DE:F402:42A6:A17D (talk) 06:22, 18 February 2021 (UTC)