Revision as of 15:52, 16 June 2003 editMiguel~enwiki (talk | contribs)3,710 edits function(programming) and subprogram← Previous edit | Revision as of 15:53, 16 June 2003 edit undoMiguel~enwiki (talk | contribs)3,710 editsmNo edit summaryNext edit → | ||
Line 157: | Line 157: | ||
] | ] | ||
Much of the content that would go into 'function (programming)' or 'function (computing)' is covered in 'subprogram'. but in a way that IMHO doesn't do justice to the importance of functions and makes too many explicit references to specific computer languages. There seems to be a tension between the way computer scientists and mathematicians want pages to look here on Misplaced Pages. -- | Much of the content that would go into 'function (programming)' or 'function (computing)' is covered in 'subprogram'. but in a way that IMHO doesn't do justice to the importance of functions and makes too many explicit references to specific computer languages. There seems to be a tension between the way computer scientists and mathematicians want pages to look here on Misplaced Pages. -- ] |
Revision as of 15:53, 16 June 2003
There should probably be a distinction between the range and codomain. I say this because I can't remember the exact definition of each, and I would like to be able to look it up on wikipedia!
If you consider a function f from S to T, where S, T are non-empty, as a rule that assigns to each element of S (the domain) an unique element in T (the codomain), then:
The subset of T defined as {all y in T, such that y=f(x) for some x in S} is the range of f.
Since you have defined function differently (not in terms of sets), it is hard to know exactly where to put this.
Actually, I wrote the above, but I did not write the definition on the main page. For that I would have used a more precise formulation, e.g., something out Singer and Thorpe's ugrad topology text. I let the main page more or less stand as the level of math here (on wikipedia) seems to be about 2d year level, and this is just fine for that. DMD
IMO, there should be a variety of "levels" of discourse on Misplaced Pages. The function article, for example, right now, is totally useless for nonmathematicians. It also, no doubt, does not reflect the latest research about functions. Eventually, we're going to want to include information to enlighten and please everyone.
Personally, I think basic explanations for a lay audience are crucial to an encyclopedia, and the math section is sorely lacking those. Is it because you're incapable of producing such explanations, mathematicians? Or is it that you just don't wanna? --LMS---- The definition of a function has not changed since I first studied Math. I am not aware of a state of the art definition. And yes, the definition could be more understandable to the lay man. More important the second definition of a function as a set of ordered pairs is wrong. No function can contain the ordered pairs (0,1) and (0,-1) because a function would assign to the first element "0" a unique element from the codomain, not both "1" and "-1."
You misrepresent what it says: a function can be considered as a set of ordered pairs, but not every set of ordered pairs defines a function. GWO
I stand corrected. Apologies.
However, to define a function in a really understandable way would require something like tables and even diagrams. I think the Math people are literally crippled by the limitations of the Wiki software. I have been trying to figure out how to explain what Calculus is about for months--but the inability to use diagrams always stops me in my tracks. The Mapping entry describes the same basic concept. Is that page so un-understandable??? AnonymousCoward
Part of the problem is that mathematical notions such as functions are just plain hard to understand. For example, the statement found on the function page "Continuous Functions are those whose domains and ranges are sets of real numbers and which satisfy additional constraints." is just wrong. For example, finite dimensional linear operators are perfectly reasonable continuous functions taking elements from one linear space (domain) to another (codomain, which may be the same space). Explaining this requires that reader understand a slightly more abstract and precise definition of function than so far given, and understanding the structure of a finite dimensional linear space. And we have a further conundrum, because the "range" of a linear operator has a precise technical meaning, which is not the same as codomain.
But I just cannot see how to explain such things in "layman's terms".
Taking a larger view, I suspect that part of the problem with math on wiki is the same as with math in general. It's hard. I can scream through a sci-fi or detective paperback at something like 100 pages/hour. Getting through a page of math at the level I am capable of comprehending (4th year/1st year grad) is something like 2-4 hours per page, on average. Sometimes more: one particular paper out of (the journal) Solid Mechanics Archives has occupied the better part of 6 weekends so far, and I have only gotten through 4 of 6 sections.
Math is hard. It's hard for almost all mathematicians too. Can wikipedia offer something for both the lay reader and the amateur mathematician? DMD
Well, my point, which I evidently didn't make clear enough, is that basic concepts like "function" and "set" and a lot of other basic concepts can receive a relatively unrigorous introduction. See Set Theory for an excellent example. Anyone who has read any basic text in math or logic knows that it can be done and to great effect. Now, I'm not saying (what would indeed be absurd) that a "simple" version of everything in math category should or can be given. Obviously, it can't, nor should we try to give one. (Of course, in any case, we should always strive for maximum clarity, and not just conceptual clarity but clarity to all sorts of adequately-prepared readers.) I just would like to see, associated with very basic concepts and theorems, some attempt at giving the sorts of explanations that one ordinarily gives to beginners, in order to help them get a fix on those concepts. If you don't think that can be done, it must have been too long since you were a beginner yourself. :-)
By the way, A.C., if you want, you can always e-mail images to jasonr at bomis dot com, and he can upload them to the server and tell you where they live. It's as simple as that... --LMS
It would like to suggest to merge this entry with the one for "Mapping". The two are already indicated as synonymous anyway. I have prepared a version in Suggestion. If I don't hear any big objections I will make the neccessary changes. (My own feeling is that there should be something added about n-ary functions with more than 1 arguement.)
Another suggestion I would like to make is move the whole thing to "Mathematical function". The current beginning "In Mathematics" already suggests something like that and currently there are not too many references to "function" so I could easiliy fix that.
So, waddayasay Wikipedians? -- Jan Hidders
I approve, since I already pointed out that functions and mappings are used interchangeably most of the time today. I only worry that as simple as you make it, someone will claim the material is too "specialist." For that reason, I would include a large variety of examples. Functions, limits and continuity need all need precise, yet understandable explanations. That what I goddasay..RoseParks
Eventually it should be titled "Function (Mathematics)", but we don't have parens yet (Usemod 0.92). For now I don't see any problem with an article titled "function". --LDC
I totally agree, Jan. I also agree with LDC's comment (function is an important concept in Ancient philosophy, philosophy of biology, and ethics as well). Examples are always helpful, too... The article for now could live on function or mapping, and then what I'd love to see (though I can't produce myself) is an explanation, on the page where the article doesn't live, a brief explanation of any differences in meaning between "function" and "mapping." --LMS
Ok. Thank you for your replies. I will put it under 'function' and make a small remark in 'mapping' on the difference (of which I am not really too sure). I'll think about some more examples, but I'm a bit timepressed. Maybe somebody else has some ideas. -- JanHidders
The following is imported from "Mathematical Function/Talk". I redirected Mathematical Function to Function. --AxelBoldt
How do people think about merging this article with Function and then redirecting there? This article's definition isn't even very mathematical. --AxelBoldt
I think they should be merged. The author of Mathematical Function probably felt that function is still too formal, and that is probably true. So perhaps we should merge this article with the part of Function that gives some examples. But maybe other people would like to start the article with an informal introduction, and only after that introduce the formal definition. So perhaps the following would be best:
- (initial abstract description) A function is a means of associating with every element in a certain set an unique element in another set.
- (informal discussion) some examples, use in mathematics, et cetera (this would contain the stuff from Mathematical Function
- (formal definition) the formal definition in set theory that function now starts with
- (terminology) one-to-one, injective, et cetera
- (see also:)
-- JanHidders
I think the difference between a mapping and a function is that a mapping X->Y can send one element of X to more than one element of Y.
Eg. Let f: R -> R be defined by f(x) = x
Then f is a function, but f is only a mapping. -- Tarquin
I have seen "multi-valued function" for that kind of thing, but not mapping. --AxelBoldt
...so that a multi-valued function cannot be called a function? I don't like that... isn't there another term for that? --Seb
good point, I've seen & used "multi-valued function". On reflection, I think usage of function / mapping / transformation varied among my lecturers at uni, and some sought to make a useful distinction. -- Tarquin
It's a shame we have to wait until a consistent vocabulary becomes well-established among mathematicians before we can clear things up... --Seb
What about "binary relation"? --Seb
Yes, functions are binary relations, but special ones. Maybe we can use "set-valued function" instead of "multi-valued function". This seems to be a logical and self-explanatory term. AxelBoldt Yes, functions are binary relations, but special ones. Maybe we can use "set-valued function" instead of "multi-valued function". It seems to be a logical and self-explanatory name. AxelBoldt
what is the difference between the codomain and range of a function?
- The function f : R -> R with f(x) = x has codomain R and range the non-negative reals. Range is the set of all outputs that the function produces; codomain is the set that all those outputs have to be a member of. If the range and the codomain are the same, then the function is onto, or surjective. AxelBoldt 04:38 Nov 26, 2002 (UTC)
I have just uploaded three images: mathmap.png, an example on functions; notMap1.png, an example on not a function (but a multivalued function); and notMap2.png, an example on not a function (but a partial function). I will soon put the images in this page. Wshun
After rewriting, the article is shorter and the paragraph below doesn't seem to fit. It is because the difference between the set-valued definition and the usual explicit formula definition is hidden by the "magic" word relation. However, this is a good paragraph and someone may like to put it back:
This definition of function provides mathematicians with a number of useful advantages over the "explicit formula" definition:
- Clearly, if we already have an explicit formula for f(x), we can construct the set of pairs f; so nothing is lost by this definition.
- The definition allows us to consider functions in the abstract which, as a practical matter, could never be evaluated. In particular, functions which would require an infinite number of operations to evaluate can be considered as a set which has been given as a whole, rather than calculated.
- In many cases, there is no explicit formula which amounts to more than a "table" of arguments and values; the above definition accommodates these types of functions naturally.
- We can talk about sets of functions without specifying them exactly; for example, given the domain R of real numbers, and the codomain N of natural numbers, we can talk about the set of all functions of the form f: R → N, or some subset of these functions which satisfy other criteria. Mathematicians are often interested in such generalizations.
- In some cases, it may be unclear whether or not some binary relation f is "truly" a function; the definition provides a way of proving the existence of a well-defined function without actually specifying an explicit formula.
Would it make sense to replace this with a decent disambiguation page? Right now we start with a history paragraph about the mathematical concept, then the computer science paragraph mentions concepts that haven't even been defined, then the sociology paragraph uses a completely different notion of function, then the math starts. The notion of function in biology should also be explained somewhere, and the etymology. AxelBoldt 02:48 14 Jun 2003 (UTC)
There obviously is a case for separating out the biology and sociology. But I think putting the computer science elsewhere would actually diminish the content.
(Later)
Well, now the computer science wording on domain and codomain is gone. Really, I think this is unhelpful.
You are right. I reintroduced it at the end of the paragraph on domain and codomain. I realized that the correspondence sets<->datatypes makes a perfect source of examples and motivation for the concept of "partial function" and the distinction between "codomain" and "range", but I don't know how to write that coherently and, more important, briefly. -- Miguel
Well, maybe a solution is to have a function (mathematics) page and a function (computing) page. Or maybe there is a way to talk about function-as-relation, and function-as-expression; that could be put on a function page that was really disambiguating and fixing ideas. Currently a function is a "machine" and then that idea is quickly dropped. Perhaps I do favour a 'function (mathematics)' page for the bulk of the current material.
Much of the content that would go into 'function (programming)' or 'function (computing)' is covered in 'subprogram'. but in a way that IMHO doesn't do justice to the importance of functions and makes too many explicit references to specific computer languages. There seems to be a tension between the way computer scientists and mathematicians want pages to look here on Misplaced Pages. -- Miguel