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

From Wikipedia, the free encyclopedia
Mathematics desk
< February 10 << Jan | February | Mar >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 11[edit]

Is there a term that mathematicians use for what computer scientists call "partial application"?[edit]

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 -variable function and creating a related function by fixing the values of some of the independent variables of . 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)[reply]

Parametric function and conditional probability are examples of functions with some fixed function arguments (often called parameters) in math. --{{u|Mark viking}} {Talk} 18:46, 11 February 2021 (UTC)[reply]
Probably Partial function is the term you seek. --CiaPan (talk) 22:29, 11 February 2021 (UTC)[reply]
Absolutely not. --JBL (talk) 22:54, 11 February 2021 (UTC)[reply]
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)[reply]
I considered "restriction", but I think it refers to something different. In this case, the domain of is not a subset of that of . The relation between the two domains is that of a projection instead. --134.242.92.97 (talk) 23:36, 11 February 2021 (UTC)[reply]
I see, you want to say that takes input x, which is different from the map which takes inputs . 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)[reply]
Here is an example of this usage "in the wild": Function_of_several_real_variables#Univariable_functions_associated_with_a_multivariable_function. --JBL (talk) 18:17, 12 February 2021 (UTC)[reply]
(ec) Given a function and some value , we can define a function by The section Binary function § Restrictions to ordinary functions calls this partial application a "restriction". But it does not quite fit the definition given at Restriction (mathematics) § Formal definition. The domain of the restricted function as defined there is a subset of the original domain, but the domain of is which is not a subset of . The set is, but this is not the domain of Of course, and 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 we can define a restriction being the unique function that agrees with 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 we can define a restricted function for which Again, this is not a partial application.  --Lambiam 00:29, 12 February 2021 (UTC)[reply]
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)[reply]
Consider the functions defined by and We have so can be obtained as a partial application of 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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
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 . A complete function application is seen in We can define or, in a special functional notation for partial application, and use this notation in expressions like .  --Lambiam 18:02, 12 February 2021 (UTC)[reply]
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)[reply]
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)[reply]
In ALGOL 68 terminology, a slice is the notation for obtaining a subarray by the partial indexing of an array; see ALGOL 68 § struct, union & [:]: Structures, unions and arrays. 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 Haskell features § Function calls. For example, if ^ denotes exponentiation, then the squaring function can be written as (^2). However, the type system of Haskell takes a curried view of binary operators; since transforming operator to function (⊛x) entails reducing the type from a(bc) to ac, this is only morally a partial application.  --Lambiam 07:51, 16 February 2021 (UTC)[reply]

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 . 2602:24A:DE47:BB20:50DE:F402:42A6:A17D (talk) 06:22, 18 February 2021 (UTC)[reply]