Jump to content

Talk:Function (mathematics): Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Line 624: Line 624:
::::::An informal paragraph on p. 51 in Apostol's ''Calculus'' indeed contains this error (a typo? better not speculate), which makes it unsuitable here. A Wikipedia article should contain no logical errors, a fortiori in an introductory context because setting misconceptions straight afterwards is always more difficult. As for the intended audience of ~18 year olds, I don't know whether this is a Wikipedia rule, but it is a reasonable working hypothesis. We also must assume a minimum of interest in mathematics (otherwise, why read the article?). In Apostol's time (1960s) set theory was unknown in most high schools. Nowadays this has changed, and Apostol's formal definition on p. 53 is perfectly accessible to that audience. After all, the first paragraph you quoted (from p. 50) assumes the reader knows about sets. The formal definition has the extra advantage of also appearing in other textbooks (e.g. Flett), and is less prone to the misconceptions caused by prematurely mentioning the set Y (hence the warning by Flett). So I think your suggestion to follow Apostol's path is worth pursuing. Selectivity is important. [[User:Boute|Boute]] ([[User talk:Boute|talk]]) 09:05, 2 March 2024 (UTC)
::::::An informal paragraph on p. 51 in Apostol's ''Calculus'' indeed contains this error (a typo? better not speculate), which makes it unsuitable here. A Wikipedia article should contain no logical errors, a fortiori in an introductory context because setting misconceptions straight afterwards is always more difficult. As for the intended audience of ~18 year olds, I don't know whether this is a Wikipedia rule, but it is a reasonable working hypothesis. We also must assume a minimum of interest in mathematics (otherwise, why read the article?). In Apostol's time (1960s) set theory was unknown in most high schools. Nowadays this has changed, and Apostol's formal definition on p. 53 is perfectly accessible to that audience. After all, the first paragraph you quoted (from p. 50) assumes the reader knows about sets. The formal definition has the extra advantage of also appearing in other textbooks (e.g. Flett), and is less prone to the misconceptions caused by prematurely mentioning the set Y (hence the warning by Flett). So I think your suggestion to follow Apostol's path is worth pursuing. Selectivity is important. [[User:Boute|Boute]] ([[User talk:Boute|talk]]) 09:05, 2 March 2024 (UTC)
:::::::In other words, we should skip the gentle explanatory prose and cut straight to something unmotivated and inscrutable, so as to maximize novice readers' confusion? No thanks. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 09:40, 2 March 2024 (UTC)
:::::::In other words, we should skip the gentle explanatory prose and cut straight to something unmotivated and inscrutable, so as to maximize novice readers' confusion? No thanks. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 09:40, 2 March 2024 (UTC)
Keep up the good work, Jacobolus. I have nothing to add today, but two things have become clear. 1) Your views are the standard, referenced views. And 2) The people pushing their own views will argue 'til the cows come home. [[User:Rick Norwood|Rick Norwood]] ([[User talk:Rick Norwood|talk]]) 10:59, 2 March 2024 (UTC)

Revision as of 10:59, 2 March 2024


Towards a coherent article about functions (mathematics)

Rationale The following outline is a suggestion for prospective editors. For various reasons (stability of edits and links to related articles) I prefer not doing any editing myself, but present these notes as a resource for others. The basic rationale is that the article should center on helping the readers rather than on the personal preferences of the writers/editors. Therefore I will not start with my own preferred definition but with a reader-oriented one with the following characteristics: (a) utmost simplicity; (b) enhancing clarity by adhering to the principle of separation of concerns, in this case separating the concept of function pure and simple from characterizing a function as being from to ; (c) the most general one in view of its algebraic properties, especially around composition; (d) prevalent in basic university/college textbooks in mathematics; (e) a convenient logical basis for explaining/understanding/comparing other variants. It is fortunate that all these properties happen to coincide. Also fortunate is that in the current literature there are essentially only two variants, simply distinguished by whether or not the notion of a codomain plays any role, so covering both remains very manageable. Also clarifying for the readers are brief justifications of the design decisions behind the definitions, without turning the article into a fully-fledged tutorial that is too long for Wikipedia. In view of the many misconceptions observed in the printed literature and on the web (including Wikipedia), a substantial package of references is indispensable. The text follows next. Boute (talk) 13:18, 15 February 2022 (UTC)[reply]

Outline for a new version of the article

Outline for the article (text starts here)

The concept of a function or a mapping has been described (Herstein[1], page 9) as "probably the single most important and universal notion that runs through all of mathematics". Evidently this also pertains to all other branches of science (physics, engineering etc.) where mathematics is used.

In present-day mathematics, there are essentially two major variants of the function concept, and in a balanced account both must be addressed. For this purpose, we designate them as (A) the plain variant and (B) the labeled variant, which has a codomain. The subject matter also requires ample references, also because different formulations often define the same variant, thereby clarifying each other. About a dozen paragraphs suffice for giving the reader a structured guide through the rather varied literature.

A. Functions: the plain variant

This variant is the simplest and also the most widespread throughout the sciences, including (but not limited to) calculus/analysis[2][3][4][5][6][7][8][9][10], set theory[11][12][13][14][15][16][17], logic[18][19], algebra[1], discrete mathematics[20][21][22], computer science[23][24], and mathematical physics[25]. Authors and specific page numbers will be mentioned later.

A.1 Basic definition One of the simplest formulations is provided by Apostol[2] (p.53):

"A function is a set of ordered pairs no two of which have the same first member."

In general, a collection of ordered pairs is called a graph or a relation and is called functional[12][23] or determinate[21] if no two pairs have the same first member (or component). Thus the preceding definition can be rephrased by saying that a function is a functional graph ((Bourbaki[12] p. 77). Formulations that are equivalent in content and style appear in calculus/analysis (Apostol[2] p. 53, Flett[6], p. 4), set theory (Bourbaki[12] p. 77, Dasgupta[13] p. 8, Quine[15] p. 21, Suppes[16] p. 57, Tarski & Givant[17] p. 3), logic (Mendelson[18] p. 6, Tarski[19] p. 98), discrete mathematics (Scheinerman[22] p. 73), computer science ((Meyer[23] p. 25, Reynolds[24] p. 452). The wordings differ but all define the same concept, apart from the fact that some authors[11][15][17] apply them to classes instead of mere sets.

A.2 Conventions The set of all first members of the ordered pairs in a graph (or relation) is called the domain of and is written or . The set of all second members is called the range of and is written or . Let be a function (functional graph). For each in the domain of there is exactly one such that . Hence is uniquely determined by and . It is therefore properly called the value of at and can be unambiguously denoted by some suitable combination of and , the common "default" form being or . Other forms may be chosen as convenient by prior agreement, such as or . A common example of the latter is writing for matrix transposition.

A.3 The function equality theorem (Apostol[2] p. 54) Functions and are equal () if and only if (a) and have the same domain and (b) for every in this domain. This theorem follows directly from set equality and holds for all formulations (preceding and following) of the definition of plain functions. It implies that a (plain) function is fully specified by its domain and the value for each in that domain. An illustration follows next.

A.4 Function composition This is the most important operation on functions. For any (plain) functions and , the composition (also written ) is also a function, specified as follows: (a) the domain of is the set of all values in the domain of such that is in the domain of and (b) for any such , the value of is given by or, written with less clutter, (see Apostol[2] p. 140, Flett[6] p. 11, Suppes[16] p. 87, Tarski & Givant[17] p. 3, Mendelson[18] p. 7, Meyer[23] p. 32, Reynolds[24] p. 450,452). Composition has the interesting property that, for all functions , and , we have . This associativity allows making the parentheses optional and writing, for instance, .

A.5 Conveying domain and range information The literature presents numerous conventions for relating the domain and/or range of a (plain) function to sets and . A helpful preamble is the following legend.

statement meaning
is a partial function on
is a (total) function on
statement meaning
is (in)to
is onto

For instance (Apostol[2] p. 578, Flett[6] p. 5, Dasgupta [13] p. 10, Scheinerman[22] p. 169, Meyer[23] p. 26, Reynolds[24] p. 458):

A (total) function from (in)to is a function with domain and range included in .

Flett[6] (p. 5) warns that such phrases only conveys information about the domain and the range but does not define a new kind of function. A function from to is commonly introduced by writing , where can be interpreted as the set of all (total) functions from (in)to (Meyer[23] p. 26, Reynolds[24] p. 458), in other contexts also written . As a logical consequence, stipulates that (a) the domain of is and (b) the values are in and can be further specified, for instance, by a formula. This style is very convenient, as illustrated by the following function specifications

with and with .

By definition, both specify the same function () which is onto but not onto . Consider also

with and with .

Here and are respectively the positive and negative square root function. Both are functions from to but is onto whereas is onto .

Similarly, a partial function from to is a function with domain included in and range included in . For instance, in calculus/analysis most functions are defined on some subset (interval, region, ...) of , , , and so on hence are partial on these sets. For the set of partial functions from (in)to one finds various notations, such as (Meyer[23] p. 26) and (Reynolds[24] p. 458).

As a very interesting illustration, the reader can verify that, given and , the composition is a partial function from to and that is a total function from to iff , which trivially holds in case .

Important remark: as in natural language, onto is used as a preposition, mentioning explicitly (Flett[6] p. 5, Scheinerman[22] p. 172; more references follow in the next paragraph). A function that is onto is sometimes called surjective on or a surjection on . Scheinerman[22] (p, 172) designates omitting as "mathspeak", but it is not harmless and may cause misunderstandings.

A.6 A shortcut formulation for a function from to Quite a few authors (Bartle & Sherbert[4] p. 5, Royden[8] p. 8, Halmos[14] p. 30, Herstein[1] p. 10, Gerstein[20] p. 110, [25] Gries & Schneider[21] p. 280, Szekeres[25] p. 10) do not start from the basic definition given earlier but directly define a function from (in)to as a subset of such that for every in there is exactly one in such that . Less often, some authors (Bartle[3] p. 13, Gries and Schneider[21] p. 280) use a formulation that amounts to replacing "exactly one" by "at most one", which effectively defines a partial function from to .

Important remark: appearances notwithstanding, this shortcut formulation logically defines exactly the same kind of function as the basic definition with exactly the same properties and conventions. In particular:,

  • The function equality theorem holds as stated (only mentioned explicitly by Gerstein[20] p. 113).
  • Composition is defined for any functions , , although some authors overlook this and define only for and , which reduces generality by assuming .
  • Any function is a function from its domain to any superset of its range. Hence the versatile specification style illustrated by the examples , , , remains applicable.
  • As before, onto-ness is specified with respect to a set, using "onto" as a preposition (Bartle[3] p. 13, Bartle & Sherbert[4] p.7, Royden[8] p. 8, Halmos[14] p. 31, Herstein[1] p. 12, Gerstein[20] p. 118, Szekeres[25] p. 11).

A.7 Separating the plain function concept from its graph Whereas defining a function as a graph is very precise and rigorous, it creates some ambiguities for certain common conventions. Just two examples: (i) writing for -fold function composition and for the -fold Cartesian product, and (ii) defining sequences (in particular pairs) as functions on some subset of the natural numbers. Some definitions (Carlson[5] p. 182, Kolmogorov & Fomin[7] p. 5, Rudin[9] p. 21) avoid this by defining a function from to less formally as associating "in some manner" a unique value in with every value in , called the domain of . This can be captured as follows:

A (plain) function is an entity that is fully specified by a domain, which is a collection (set or a class) of values, and by a unique value assigned to each element in this domain.

As noted by Royden[8] (footnote p. 8) this formulation can be made precise by taking the statement of the function equality theorem (A.3) as an axiom. The range of is then the set of all values for in the domain of . All earlier auxiliary formulations carry through literally as stated, namely, fully general composition (A.4) and conveying domain/range information (A5). The graph of is then the set of all pairs for in the domain of and is denoted by . Evidently if and only if . This may be useful in simplifying certain proofs and definitions (e.g., for inverses).

B. Functions: the labeled variant and the notion of codomain

Recall that, for plain functions, the appearance of in specifies that , without making an attribute of (in contrast , which is specified to be the domain). How to exploit this flexibility in function specifications was demonstrated by the examples , , , .

Dasgupta[13] (p. 10) points out that making an attribute of in a proper fashion requires explicitly attaching to to form a triplet . Mac Lane[26] (p. 27) calls this modification labelling. In general,

A (labeled) function is a triplet where is a (plain) partial function from to .

The set is called the source of and is called the target of or the codomain of . The domain and the range of are those of . Similar formulations, sometimes identifying domain and source, are given by Bourbaki[12] p. 76, Adámek & al.[27] footnote p. 14, Bird & De Moor[28] p. 26, Pierce[29] p. 2. Some of the major differences with the plain varianr are:

  • Equality of labeled functions requires equality for source, domain, codomain and images.
  • For a labeled function , the following terminology holds: (i) is partial means that , (ii) is total means that , and (iii) or is surjective means that .
  • Composition is defined only in case . In case is total this means that , which is quite restrictive when compared to the plain variant.

References

  1. ^ a b c d Herstein, Israel N. (1964). Topics in Algebra. Lexington, Mass: Xerox College Publishing. ISBN 0-536-00258-4.
  2. ^ a b c d e f Apostol, Tom M. (1967). Calculus, Volume I (Second ed.). New York: Wiley. ISBN 9971-51-396-X.
  3. ^ a b c Bartle, Robert G. (1964). The Elements of Real Analysis. New York: Wiley.
  4. ^ a b c Bartle, Robert G.; Sherbert, Donald R. (2011). Introduction to Real Analysis (4th ed.). New York: Wiley. ISBN 9780471433316.
  5. ^ a b Carlson, Robert (2006). A Concrete Introduction to Real Analysis. Boca Raton: Chapmam & Hall/CRC. ISBN 1-58488-654-4.
  6. ^ a b c d e f Flett, Thomas M. (1966). Mathematical Analysis. New York: McGraw-Hill.
  7. ^ a b Kolmogorov, Andrey L.; Fomin, Sergey V. (1975). Introductory Real Analysis. New York: Dover. ISBN 0-486-61226-0.
  8. ^ a b c d Royden, Halsey L. (1968). Real Analysis. New York: Macmillan.
  9. ^ a b Rudin, Walter (1964). Principles of Mathematical Analysis (Second ed.). New York: McGraw-Hill.
  10. ^ Thomas, Jeorge B. Jr.; Weir, Maurice W.; Hass, Joel; Giordano, Frank R. (2005). Thomas' Calculus (Eleventh ed.). Boston: Pearson/Addison Wesley. ISBN 0-321-24335-8.
  11. ^ a b Bernays, Paul (1991). Axiomatic Set Theory. New York: Dover Publications Inc. ISBN 0-486-66637-9.
  12. ^ a b c d e Bourbaki, Nicolas (1954). Theorie des ensembles. Paris: Hermann & Cie.
  13. ^ a b c d Dasgupta, Abhijit (2014). Set Theory. New York: Birkhauser/Springer. ISBN 978-1-4614-8853-8.
  14. ^ a b c Halmos, Paul (1960). Naive Set Theory. New York: Van Nostrand Reinhold.
  15. ^ a b c Quine, Willard Van Orman (1969). Set Theory and its Logic. Cambridge, Mass.: Belknap Press/Harvard. ISBN 0674802071.
  16. ^ a b c Suppes, Patrick (1972). Axiomatic Set Theory. New York: Dover Publications Inc. ISBN 0-486-61630-4.
  17. ^ a b c d Tarski, Alfred; Givant, Steven (1987). A Formalization of Set Theory Without Variables. Providence, RI: American Mathematical Society. ISBN 0-8218-1041-3.
  18. ^ a b c Mendelson, Elliott (1987). Introduction to Mathematical Logic. Pacific Grove, CA: Wadsworth & Brooks/Cole. ISBN 0-534-06624-0.
  19. ^ a b Tarski, Alfred (1995). Introduction to Logic. New York: Dover Publications Inc. ISBN 0-486-28462-X.
  20. ^ a b c d Gerstein, Larry J. (2012). Introduction to Mathematical Structures and Proofs. New York: Springer. ISBN 978-1-4614-4264-6.
  21. ^ a b c d Gries, David; Schneider, Fred B. (2010). A Logical Approach to Discrete Math. New York: Springer. ISBN 1441928359.
  22. ^ a b c d e Scheinerman, Edward R. (2013). Mathematics -- A Discrete Introduction (third ed.). Boston: Cengage Learning. ISBN 0-8400-4942-0.
  23. ^ a b c d e f g Meyer, Bertrand (1991). Introduction to the Theory of Programming Languages. New York: Prentice Hall. ISBN 0-13-498502-8.
  24. ^ a b c d e f Reynolds, John C. (2009). Theories of Programming Languages. Cambridge: Cambridge University Press. ISBN 978-0-521-10697-9.
  25. ^ a b c d Szekeres, Peter (2004). A Course in Modern Mathematical Physics. Cambridge, UK: Cambridge University Press. ISBN 0-521-82960-7.
  26. ^ Mac Lane, Saunders (1971). Categories for the Working Mathematician. New York: Springer. ISBN 0-387-90036-5.
  27. ^ Adámek, Jiří; Herrlich, Horst; Strecker, George E. (2004). Abstract and Concrete Categories - The Joy of Cats. open source: GNU Free Documentation Licence.
  28. ^ Bird, Richard; De Moor, Oege (1997). Algebra of Programming. Harlow: Prentice Hall/Pearson. ISBN 0-13-507245-X.
  29. ^ Pierce, Benjamin C. (1991). Basic Category Theory for Computer Scientists. Cambridge, Mass.: The MIT Press. ISBN 0-262-66071-7.

Last updated: Boute (talk) 13:18, 15 February 2022 (UTC)[reply]

Any hidden (collapsed} text needs a visible summary or abstract. Summary This proposal is a resource for editors to improve the article. It starts with the simplest and most widely used definition (in essentially two formulations), which also serves as the basis for explaining more complicated ones. Function composition receives special attention because it is the most important operation on functions. Various misconceptions are resolved, especially regarding codomains. About 30 literature references support the information given. These sources are selected for reliability but, whenever possible, also for being easy to find. Boute (talk) 05:35, 17 August 2022 (UTC)[reply]

Discussion

I have collapsed the proposal for distinguishing easily this long proposal from the discussion about it.

This proposal contains interesting ideas. However, the present article result from a consensus involving many editors. It is written for beginners in mathematics, who must not be confused by technical considerations that are outside their knowledge. At a first glance this has not being considered by the author of the proposal. So, IMO, the proposal can be useful for improving some points of the article and sourcing, but not is not worth to be expanded into a new version of the article. D.Lazard (talk) 15:20, 15 February 2022 (UTC)[reply]

With very few exceptions, all material in the proposal was written to be understandable by beginners. A good indication of the level is that all material comes from properly referenced introductory textbooks. Moreover, the material is presented in such a sequence that the interested reader can stop at any time, even (in the extreme) after the first paragraph with the initial definition. I understand the complaint about length of the proposal, but in reality the proposal is quite short in comparison with the reality it must properly reflect. Don't forget that the article about functions is considered "vital". The definition in the current Wikipedia has been shown to be logically defective and definitely does not reflect the view on functions prevalent in the open literature, as demonstrated by the references. Talking about codomains before the simpler variant has been presented is about the most confusing thing one can do to beginners. Unfortunately, in half a dozen randomly selected introductory textbooks that attempt to introduce the concept of codomain, this causes a logical error (contact me by email for the references). Boute (talk) 08:30, 16 February 2022 (UTC)[reply]
I disagree definitively with your proposal:
Your "plain" definition implies that the range of a function is a set. So, it is impossible to specify a function without specifying first a set that contains the range. This is this set that is called the codomain. So, in the practice of most users, only "labeled" functions are considered. Moreover, if emphasis is put on "plain" functions, there is no more concept of a surjective function. So, emphasizing on "plain" functions, or giving the same weight to both definitions may confuse most readers.
You assert that you have found a logical error in the article (more exactly in textbooks that follow the same approach). You must be more explicit and open a discussion about this alleged error.
As far as I know, the "plain" definition is used only in mathematical logic and related area. This seems the opinion of the authors of Wikipedia article, as this definition appears only in § In the foundations of mathematics and set theory and § In computer science (with the mention of lambda calculus). Nevertheless, these mention could deserve to be expanded, maybe by adding a new section for comparing and discussing the two definitions. But, again, only one definition must appear in the main part to the article. D.Lazard (talk) 09:37, 16 February 2022 (UTC)[reply]
The "plain" definition is the one used in all 25 references cited for that variant in the proposal, covering many branches of science. Please look at them before making unfounded statements. None of these sources mention a codomain at all, since it is not needed for that variant. What you claim to be "impossible" (in a non sequitur) is in fact entirely normal. The logical errors in the current Wikipedia definition were clearly explained in my comments on these talk pages last month (see here). Not looking at the references and disregarding logical analysis is the main cause of confusion in these discussion pages. Boute (talk) 10:06, 16 February 2022 (UTC)[reply]
First of all, I want to thank Boute for the valuable material, in particular the sources, in the outline. I feel most (or even all) of them should be used (I'd move some of them to other articles, like function composition), but this will take some time, especially since it is adressed to talk page readers, not to article readers (WP:EPSTYLE).
I also agree with Boute that the definition in the article, while (I believe) trying to explain the concept of labeled function, fails to do so properly. I suggest to change at least section Function_(mathematics)#Definition to Given two sets X and Y, a function f from X to Y is an assignment of an element of Y to each element of X. X is called the domain of f and Y is called the codomain of f. This would fix Boute's above argument ("ad D"). I'd also apply the same change to the lead, but this can be discussed separately. (By the way: In the "Definitions" section, I'd like to see a formal version using ∀∃, or at least an English sentence without any ambiguity w.r.t the quantification order; cf. also User_talk:Jochen_Burghardt#Function_(mathematics),_"one"_or_"an".)
As for the discussion about "plain" and/or "labeled" version, I am, however, inclinded towards a presentation that is "abstract", i.e. representation-independent, as long as possible. The concept of a function is pretty much abstract, and can be understood, and applied, independent of its "implementation" in set theory. As an analogy: the concept or ordered pair is usually introduced by "specifying" just its properties; after that, remarks on possible implementations may, or may not, follow. (The notion of "specification" and "implementation" are borrowed from formal verification in computer science.) In category theory and in universal algebra, (labeled) functions are used, under the name "morphism" and "homomorphism", respectively, without referring to the set implementation. Also the "dynamic" aspect of a function, illustrated by File:Function_machine2.svg, fits well with an abstract description (e.g. "put some string in, get some integer out", no need to know Cartesian products), without needing an understanding of the set implementation. However, Boute's outline (necessarily) starts with implementation details almost from the beginning.
Nevertheless, both plain and labeled implementations should be presented in the article, with their interrelations and discrepancies. I'm not sure about how to achieve this. Maybe, the section Function_(mathematics)#Relational_approach could be split into "Relational approach (plain)" and "Relational approach (labeled)", and maybe even accompanied by "Algebraic approach" (mentioning homomorphisms and morphisms as primitives - an expert should comment on this)? - Jochen Burghardt (talk) 13:12, 16 February 2022 (UTC)[reply]
I agree with Jochen Burghardt that, ideally, we should define a function by its properties rather than by its representation as a (functional) set/class of pairs (FSOP). This is why item A.7 in my proposal separates the two. However, as I mentioned in the "rationale", the article should serve the interests of the readers rather than our own preferences. A central issue is the order of presentation. There are many reasons for starting with the plain variant. It is the simplest, and most represented throughout the sciences, so readers will encounter it most often. Composition is defined most generally (for any pair of functions), which explains the absence of the labeled variant in calculus texts. It supports the easiest way to describe the labeled variant (as a triplet with a plain function as one of its components). I have not yet heard any arguments for starting with the labeled variant, which seems backwards. In any case, the definition should be properly referenced. The current Wikipedia formulation is incorrectly attributed to Halmos, who really says on page 30

"If and are sets, then a function from (or on) to (or into) is a relation such that and such that, for each in there is a unique element in with ."

Clearly the plain variant. For defining the labeled variant it does not suffice adding something like "Given sets and ". These sets must be attached explicitly to the function in the definition, as in a 1975 paper by Hilary B Shuard : " A function consists of two sets and and a rule which attaches to each exactly one .". This is clearly the labeled variant. With any formulation for this variant, the extra complication of attaching the set to the function must be justified to the satisfaction of the discerning reader. No such justification can be found in the literature, apart from the circular "to satisfy a certain axiom", which shifts the burden of justification to the axiom. Aside: even category can be generalized by omitting the disjointness axiom for hom-sets (Mac Lane's book, last sentence page 27), which eliminates the need for codomains and frees composition from unnecessary restrictions (this evidently works for the axiomatic formulation of category theory; defining a category as a graph is more rigid since it requires unique endpoints for each arrow). Even so, the article we are discussing is about functions, not category theory, so we should not add exta sources of confusion. Boute (talk) 09:01, 17 February 2022 (UTC)[reply]
Your opinions as "complication", or "limiting" below, or "burden", are just your opinion and not objective qualities of the two definitions. The choice of going for the set theoretical definition (what you call plain variant) or for the morphism (labeled) has advantages or disadvantages depending on what you want to do with the concept of function. Lets also note that a large volume of literature defines function and doesn't really pay attention to the distinction. Even in your quote from Halmos, which you consider "clearly the plain variant", you see him say "or into Y". That doesn't make sense. A function defined as a relation looses the "into Y information". With the definition of function as a relation, there is no notion of surjectivity and codomain. Thatwhichislearnt (talk) 15:54, 1 February 2024 (UTC)[reply]
[As a matter of policy, I stop posting anything further here (lost effort), but will gladly reply to personal emails.]
If you read my earlier posts (open the green box in this Talk section), you will see plenty of arguments, not just an "opinion". Better still, send me an email and you will receive an itemized list justifying the term "burden". Boute (talk) 09:18, 14 February 2024 (UTC)[reply]
No thanks. Opinions about definitions are only philosophical, not math. It is not my interest. I also have not doubt that every argumentation about the supposed "burden" is only a lack of understanding of how viewing a function as a morphism, instead of as a relation, can help express information (the most immediate one being the codomain). Again, choices of definition depend on context. I suppose when talking to students in an introduction to calculus you would like to talk about "the sine function" and not pay attention to the codomain. They already have many other new theoretical detail to pay attention to. However, when doing algebraic topology you do want to pay attention to whether you are lifting a map across an inclusion function, for example. Thatwhichislearnt (talk) 15:03, 14 February 2024 (UTC)[reply]

Alas, (today) the definition stated in the article is still self-contradicting. Moreover, the citations do not match the statement. Halmos says something quite different (not bogged down by codomains). The cited reference in the encyclopedia also says something quite different (introduces codomains without contradiction) Boute (talk) 03:47, 16 July 2022 (UTC)[reply]

I noticed that Halmos's definition is different from the article. Why not go with his definition (copied below)?
If X and Y are sets, a function from (or on) X to (or into) Y is a relation f such that dom f = X and such that for each x in X there is a unique element y in Y with (x, y) f
174.112.98.128 (talk) 17:42, 10 May 2023 (UTC)[reply]
As you suggest, Halmos's definition would indeed be a good start. Apostol uses even fewer words: "a function is a set of ordered pairs no two of which have the same first component". Sets might be generalized to classes here. To answer your question: many wikipedia editors are rather adamant to include the notion "codomain" right from the start, apparently just because the word exists. Technically the codomain notion is very limiting in many ways (starting with function composition) and in textbook definitions it is a source of logical contradictions. Boute (talk) 07:36, 5 June 2023 (UTC)[reply]
It is actually the other way around. It is very common for books to start with the set theoretical definition of function, just by imitation, to then mindlessly consider the notions of surjectivity and codomain. What leads to contradictions is never the choice of definition, but not paying attention to the choice that was made. Also "function composition", the is no problem with either definition? If anything making the co-domain part of the function makes one conscious of inclusion mappings, instead of tacitly ignoring them. Thatwhichislearnt (talk) 16:06, 2 February 2024 (UTC)[reply]

Addendum Taking a brief look at how this article fared in the past two years, I still see the same defects. In particular, let f be a function from X to Y according to the current Wikipedia definition. Now let U be any subset of X and V be any superset of Y. Then f maps every element of U to an element of V, so its domain is U and its codomain is V with the current Wikipedia definition. So both domain and codomain are in fact ill-defined. Boute (talk) 11:49, 12 February 2024 (UTC)[reply]

From what I can tell, the current definition has the domain and codomain as part of the specification of a function. If you change the domain and codomain, you get a different function. –jacobolus (t) 13:16, 12 February 2024 (UTC)[reply]
Look at the predicate after the verb "is" in "is an assignment of an element of Y to each element of X". If you change to and , it is no longer "to each element of X". So, the domain is uniquely determined by what the the function is. The codomain is the one that can be argued is not determined by what the function is in that definition, since keeping X and changing to the function still is what it was before. I think the statement was kept somewhat informal, such that one can interpret either way regarding whether the codomain is or not part of the function. Thatwhichislearnt (talk) 14:28, 12 February 2024 (UTC)[reply]
The current (Wikipedia) definition does not say "is an assignment" but "assigns", which muddles things. But let's take your wording, because it clearly separates the definiendum ("A function from X to Y") from the definiens ("is an assignment etc."). The definiendum cannot make X and Y part of the function, even if you start with "Let X and Y be sets. A function from X to Y is an assignment etc.", Anyway, what I wanted to express with my brief addendum is my low expectation that a simple and logically tight definition will ever emerge in this article, unless someone honestly takes into account the actual literature, starting with the many references I provided 2 years ago. In the current article, even the reference to Halmos is mistaken. I'll sign off now, and am curious about whether any progress will be visible in 2026. Boute (talk) 01:11, 14 February 2024 (UTC)[reply]
That's not muddling, and it's not a definition. It's saying what a function does. Saying what a function is requires more assumptions, and the lead of an article like this is not the place for precise rigorous definitions. —David Eppstein (talk) 02:26, 14 February 2024 (UTC)[reply]
[As a matter of policy, I will not post anything further here (a waste of time), but will gladly reply to personal emails.]
As observed by David, the current text is indeed not a definition, but this is precisely the reason why it fully deserves being called "muddling". Even if one is against rigor in the lead of an article, one should not accept a situation that causes self-contradictions or ill-defined concepts that require extensive provisos and repair work afterwards. The choice is this: do we serve the readers, or some hidden agenda (self-interest, intellectual investment in one's own research or published books etc.)? Googling "criminal algebraists-axiomatisators") reveals Arnold's healthy warning against the latter attitude. Serving the readers is best achieved by starting with simplicity without sacrificing precision. An excellent principle is separation of concerns (Dijkstra), in this case: defining function without starting with "from X to Y; such qualifications can be introduced afterwards. For instance, although it is not my preferred definition (it is too concrete), I quote from Apostol, Flett and various others: "A function is a set of ordered pairs no two of which have the same first component". Boute (talk) 09:08, 14 February 2024 (UTC)[reply]
The set theory definition of function is not the only definition of function. It is just a fact of life that at this current moment of time, there are two inequivalent definitions of function. One that determines the codomain, one that doesn't. Both determine the domain. An encyclopedia should inform on that. None of those definitions is more adequate than the other. It is just a choice depending on needs, the context, or preference. The set theory definition is older, the definitions that make the codomain part of the function fit better with the more recent push to present mathematics from a category theory point of view. At the end of the day, it doesn't really matter as long as one is consistent. Wikipedia only needs to mention both, select one for the rest of the article, and be consistent to it. Thatwhichislearnt (talk) 14:49, 14 February 2024 (UTC)[reply]
set theory definition is older – the set theory definition dates more or less from the late 19th century, but didn't become widely adopted until the 20th century sometime. Our page History of the function concept does a decent job of covering this the history through the mid 20th century (the parts about recent history could use further elaboration). –jacobolus (t) 15:57, 14 February 2024 (UTC)[reply]
An category theory from the mid to second half of the 20th. What does your post imply? I don't understand. I myself cannot improve the History section, if it needs to be improved. I don't have relevant literature. All I meant to say is that while some have personal affection for the set theory definition, it also has inadequacies when you move it to more modern contexts. Who knows if in 200 years everyone will be including the codomain or not as part of the function. There is little point in fighting about definitions. Thatwhichislearnt (talk) 16:16, 14 February 2024 (UTC)[reply]
You are reading the first paragraph, which doesn't necessarily need to be precise. I quoted from the section called Definition, where one would expect to have more details. In this article, there is one further step going to the section called Formal definition. In both of those the definition of choice does determine the domain, and doesn't determine the codomain. That's all. Thatwhichislearnt (talk) 14:39, 14 February 2024 (UTC)[reply]

"A function on S"

A user edited recently and claimed that a "function on means a function " which I know is not true. I know it just means with being unspecified. It's very common to say for example "a real-valued function on ". However I added then that some authors define it as , but now I question this. I could not find an example of this. What is your opinion?

@Monywillbethebest: do you have an example where it is used this way?--Tensorproduct (talk) 07:41, 7 September 2023 (UTC)[reply]

Fn.[4] in the lead of Homogeneous relation is a source for the analogous sitation on binary relations, a generalization of unary functions. - Jochen Burghardt (talk) 08:20, 7 September 2023 (UTC)[reply]
@Jochen Burghardt: Sorry, I don't understand what you mean. What is "Fn.[4]"? What does a "homogeneous relation" have to do with my question? Maybe you misunderstood my question. My question is just if there are actually authors that use the sentence "a function on " as a synonym for an endofunction . Because in analysis if one says for example "a function on a manifold " it does only mean and not . And in real analysis "a function on " would be . But maybe some authors do it differently, that is why I ask. I am not a native English speaker but for me the sentence should be "a function on to " to define .--Tensorproduct (talk) 13:26, 7 September 2023 (UTC)[reply]
"Fn.[4]" means "Footnote [4]". As I said above, a binary relation is a generalization of a unary function. A homogeneous relation is a binary relation where domain and range coindice. It is therefore a generalization of an endofunction.
That is, for relations, the wording "on S" (as used in [4]) indiciates that both domain and range is S. - Jochen Burghardt (talk) 16:08, 7 September 2023 (UTC)[reply]
@Jochen Burghardt I am still confused about your answer. 1) you mean the reference or the footnotes? Because the footnote 4 is a statement about elementary function: "Here "elementary" has not exactly its common sense: ..." which I fail to see how that is relevant with my question. 2) You mean when the sentence is "a binary relation on ", then it should be interpreted as "a binary relation over ? Is that what you mean? If so, then I would still argue that this is different from the statement "a function on ".--Tensorproduct (talk) 17:12, 7 September 2023 (UTC)[reply]
(1) There is only one footnote [4] in the article, and this is what I mean. (2) Yes, you got me right here. - Jochen Burghardt (talk) 21:18, 7 September 2023 (UTC)[reply]
Hello, sorry for the late reply, my laptop was sent for repair,
Yes, I saw this convention used in many places, and i did not know of it, which is why i thought to edit this since it would help others also (for example in my country, our standard books use this convention, also in olympiad books and questions, this is very often used) .... should i link the photos of books also? Monywillbethebest (talk) 06:47, 10 September 2023 (UTC)[reply]
@Monywillbethebest Well you can give me sources (book titles with page number is fine). Maybe some authors use it that way, but this is not a convention in mathematics. I don't know any books that use it that way. The sentence is "a function on/from INTO/TO " and one also says for example "a real/complex-valued function on ". For example in measure theory, if one says "a measurable function on S" that is understood as and not . What do you mean by "in my country, our standard books...", are you talking about English books or other languages? And what level of mathematics? I think we should stick to university books and not lower levels.--Tensorproduct (talk) 08:43, 10 September 2023 (UTC)[reply]

Definition issues

[Rescued 2 recent posts into the middle of an old discussion, by restoring them here:]

While many authors ostensibly use the "labeled" definition (in which the codomain is part of the function), I have observed that they are often inconsistent in their use of it. Is the codomain of the sine function the reals, or just the interval [-1_+1]? In the "labeled" view, either or , not both.
As for surjective, in the "plain" definition one defines " is surjective on a set "; which is more conveniently stated as ", where is the image of (which is uniquely defined by the set of pairs).--Jorge Stolfi (talk) 19:07, 15 November 2023 (UTC)[reply]

A mathematics article, more than any other, should start with a definition of its topic -- not merely with statements of some interesting properties. The definition of function as set of ordered pairs is the simplest that is mathematically precise, and is perfectly valid for all fields that use that concept -- even for those who would rather define it in some indirect or more abstract way. Yes, it requires the concept of "set" -- but it is impossible to write an encyclopedia article about "function" that would be mathematically correct and understandable by a reader who does not know what a "set" is. --Jorge Stolfi (talk) 19:07, 15 November 2023 (UTC)[reply]

[ Jochen Burghardt (talk) 21:10, 15 November 2023 (UTC) ][reply]

As I wrote in more detail on my talk page: Stolfi's attempts to install one specific definition from advanced mathematics into the lead of an article whose topic is already the subject of middle-school mathematics (in the form of graphing real functions) is a violation of WP:TECHNICAL and a way to make our articles unreadable and offputting (see recent WT:WPM thread on accessibility of mathematics articles). It is also a violation of WP:NPOV in favoring one specific definition as the only definition when there are multiple definitions possible and in use. —David Eppstein (talk) 21:15, 15 November 2023 (UTC)[reply]
Having restored the posts doesn't mean I'd agree with Stolfi. Having read the discussion at User_talk:David_Eppstein#Function_(mathematics), I'd just like to add that the 1st lead sentence is not just some "interesting property", but a pretty precise informal definition. - Jochen Burghardt (talk) 21:30, 15 November 2023 (UTC)[reply]
Thanks Jurgen for recovering my posts. While I don't have the energy to fight any more, let me refer to my comment on David's Talk page about the supposed precision of the word "associate". And then add this: Wikipedia is meant to be an encyclopedia, that is, a reference book -- not a textbook, or popularization book. Making people like mathematics (or any other science) is not one of its goals. Yes, articles should be written so as to be useful to the widest possible readership, which means they must avoid unnecessary jargon and technical concepts -- but they should be written for those readers who come here to find out what a word like "function" precisely means. Hardly anyone will come to this article looking for an "informal definition": they already have that, thank you...
All the best, --Jorge Stolfi (talk) 16:11, 18 November 2023 (UTC)[reply]
Speaking of which, I find it somewhat curious that there is no mention in this article of type theory and the way that functions are formalized in type theory. —David Eppstein (talk) 21:22, 15 November 2023 (UTC)[reply]

definition discussion continued

I agree with Stolfi's comment that it makes sense to define a function as a set of ordered pairs such that each first element is paired with exactly one second element. The comment is that this kind of definition runs contrary to the notion that this page is aimed at a middle school audience. This seems to contradicted by the fact that in sentence one of this article, we are talking about sets X and Y as being the domain and codomain of our function.

A simple way to understand functions as sets of ordered pairs in which each input has a unique output is to state it as such and then give some simple examples:

{(1,2),(2,4),(3,6)} is a function. Each input is paired with only one output.

{(1,2),(2,2),(3,2)} is a function.

{(1,2),(1,4)} is not a function because the input of "1" has two different outputs.

{(x,y)|y=2x, x is any real number} is a function and is commonly referred to as f(x)=2x. This function has infinitely many ordered pairs, one for each number (input value) in the real number system.

This kind of introduction would be much more digestible as an introduction to the notion of functions than what is on the page now. This kind of treatment is even acknowledged under the subtopic "Total, Univalent Relation", though it is buried in such complex language that a new learner to the topic will find it hard to digest the simple ideas that lay within the discussion. This hardly complies with the notion that this is a topic commonly found in middle school. 2600:1700:2EC7:1C80:0:0:0:3D (talk) 21:52, 26 December 2023 (UTC)[reply]

The definition of "function" in the article is limited and inaccurate. For example it only includes one independent variable. Something like the following is much better:
"A mathematical function is a rule that gives value of a dependent variable that corresponds to specified values of one or more independent variables. A function can be represented in several ways, such as by a table, a formula, a graph, or by a computer algorithm." Rjdeadly (talk) 15:11, 2 January 2024 (UTC)[reply]
"A function of more than one variable" is merely a form of words for referring to a function for which the domain is a set of ordered pairs. JBW (talk) 16:31, 2 January 2024 (UTC)[reply]
It is not clear from the article nor from the definition of Domain (which is obscure in itself for the lead) that it can contain more than one variable, and all the examples given show only one, which is misleading. The lead should be accessible. Then it goes on to say "functions were originally the idealization of how a varying quantity depends on another quantity" so clearly it is talking about one variable. Rjdeadly (talk) 18:56, 2 January 2024 (UTC)[reply]
If you mean that it is not clear from the article that the variable which is the argument of a function may be an element of a set of ordered pairs (or in other words that the domain of a function may be a Cartesian product) then that is true, and it might be helpful to mention that somewhere. However, there is no fundamental difference between a function which maps elements of a set of ordered pairs to somewhere and a function which maps elements of any other kind of set to somewhere, and the failure to mention that Cartesian product are not forbidden to be domains of functions does not make the definition "inaccurate". JBW (talk) 20:05, 2 January 2024 (UTC)[reply]
There is a meaningful conceptual difference (and you can come up with definitions of function where the difference matters in a technical way as well, if you try). In this article we should describe how people think of functions, not only a specific (relatively recent) formal definition given in one or another source.
The key here is the idea of the dimension or degrees of freedom of the domain. We should somewhere in this article discuss this topic, including infinite-dimensional examples such as "operators" or "higher-order functions" or which take functions as an element of the domain or codomain. –jacobolus (t) 20:32, 2 January 2024 (UTC)[reply]
I'm not sure that going into such depth would be helpful; it might be just another of the many cases where making an article more complete from the point of view of a mathematician serves to make it less accessible to most readers of the encyclopaedia. However, I do agree that the concept of a function of more than one variable should be mentioned, in a form accessible to most readers. I have posted some content about this, but I think I did a very bad job of it, so I shall have another look at it, with a view to improving it. JBW (talk) 20:44, 2 January 2024 (UTC)[reply]
OK, I have now made an attempt at a better description. However, any improvements from other editors wll be welcome. JBW (talk) 20:52, 2 January 2024 (UTC)[reply]
Maybe it would be helpful to make a new article at Multivariate function instead of redirecting that title to Function of several real variables. Such an article could discuss the way a function of k variables can be formally thought of as a function of a "single variable" whose domain is a set of k-tuples, etc. –jacobolus (t) 01:53, 3 January 2024 (UTC)[reply]
@Jacobolus: That may be a good idea. That way the information about that formalism would be available to read, but would leave this article to describe the basic idea in a way less likely to be confusing to a typical reader. A fundamental problem with coverage of mathematical topics in Wikipedia is that Wikipedia is not structured in graded chapters, moving from an elementary standpoint to a more advanced one, so there's a conflict between the desirability of making articles accessible to an elementary readership and the desirability of providing more than just a very elementary coverage. Segregating a more advanced treatment into a separate article is not an ideal solution, but it can be useful in some cases, and this may be one such case. (Incidentally, I think my first posts in this section were really unhelpful, and I regret having made them.) JBW (talk) 14:36, 4 January 2024 (UTC)[reply]
I have changed the target of Multivariate function to Function (mathematics)#Multivariate function. I have no clear idea whether a separate article is needed. In any case, the new target section must be more visible (nearer to the beginning), and, if a separate article is created, a summary must be kept here, with a {{main article}} template. D.Lazard (talk) 15:55, 4 January 2024 (UTC)[reply]

Presently, multivariate functions are firstly defined in a very short section § Functions of more than one variable, which, strangely, is the sixth and last subsection of § Notation. Section § Multivariate function appears very late in the article, and this may be problematic for many readers who are interested in general definitions rather than in technical details. So, I suggest to move § Multivariate function as the first subsection of § Definition, and to clean up accordingly the section and the remainder of the article. D.Lazard (talk) 15:55, 4 January 2024 (UTC)[reply]

Overall the notation section seems somewhat bloated with material that isn't necessary so close to the top of the page, and ends up being somewhat distracting. I wonder if we can summarize this information into a couple paragraphs sufficient to explain the notation used elsewhere in the article, and split the rest into a separate "notation for functions" article or possibly move it down toward the bottom somewhere. –jacobolus (t) 18:52, 4 January 2024 (UTC)[reply]
More generally, the whole article is presented in a awfully pedantic way. For example, the definition in terms of relations requires from its beginning the knowledge of Cartesian products and of the terminology of the theory of relations. I have started to fix this. For the moment, I have started to fix section § Definition, I have renamed the section on relations as § Formal definition, and added an historical explanation of the coexistence of two apparently very different definitions. D.Lazard (talk) 11:55, 6 January 2024 (UTC)[reply]

"function from the reals to the reals" edit

I have made an edit that corrects an incorrect statement, only to see that change be undone so that the statement is once again incorrect.

The section in question contains the following:

". . .one might only know that the domain is contained in a larger set . . . However, a "function from the reals to the reals" does not mean that the domain of the function is the whole set of the real numbers, but only that the domain is a set of real numbers that contains a non-empty open interval."

The function {(1,2),(2,4)} is a function that falls under this "function from a the reals to the reals" as each number in the domain and range is a real number. However the domain of this function does not contain a non-empty open interval. I edited this section to say ..."but only that the domain is a subset of the real numbers." This edit was undone twice, each time to the formerly incorrect statement.

I assume that someone with some mathematical knowledge is looking after these edits and don't understand why this error has been insisted upon. 2600:1700:2EC7:1C80:0:0:0:3D (talk) 22:16, 26 December 2023 (UTC)[reply]

I can only assume that the statement is intended to refer to some specific use of the word "function" in analysis; clearly it is not true if we take "function" in a purely algebraic meaning, as it depends on a topology on the reals. Perhaps D.Lazard can clarify this, since he both posted the text originally and restored it after you had reverted it. JBW (talk) 21:55, 28 December 2023 (UTC)[reply]
It is explicitly said that this paragraph is about the use of the term "function" in mathematical analysis. Nevertheless, I have slightly changed the formulation for not excluding your example. However, nobody would call your example a "function from the reals to the reals", but rather a function from the integers to the integes (or to the reals). D.Lazard (talk) 23:21, 28 December 2023 (UTC)[reply]

The phrase "a function from the reals to the reals" is used as verbal shorthand in casual conversation, to make a distinction between real variables and complex variables. In writing a technical article, a careful mathematician is more likely to write "a real valued function of a real variable". Now, as mentioned above, technically {(1,2),(2,4)} is a real valued function of a real variable, just as Texas is technically a plot of land on which one could build a house. But a mathematician would naturally call {(1,2),(2,4)} a set of ordered pairs of natural numbers. More generally, the use of "real" suggests that the domain and codomain are larger than the rationals and smaller than the complex numbers, though it only explicitly says the latter: no complex numbers.

Here in Wikipedia, we have to be even more careful than someone writing a math article for a refereed journal, because we have readers who are professional mathematicians and readers who think they know all about mathematics because they took Algebra I in high school. It seems to me the paragraph is now well written as it stands.Rick Norwood (talk) 16:04, 4 January 2024 (UTC)[reply]

There are 27 "often"

Someone really liked to write "often". At the moment there are 27 of them in the article. Most, if not all, don't really add anything. Also, source for those claims of frequency? Even if sourced, I bet the justification of the claim in the source would be questionable, if any. Thatwhichislearnt (talk) 19:26, 31 January 2024 (UTC)[reply]

Many different conventions exist about mathematical functions, so the article often [sorry!] needs to speak about conventions adopted by a majority, or a large community. I'll rephrase some occurrences where the adopting community is not that large, imo. - Jochen Burghardt (talk) 13:26, 1 February 2024 (UTC)[reply]
 Done: reduced the count to 17, for now. - Jochen Burghardt (talk) 13:39, 1 February 2024 (UTC)[reply]

"These conditions are exactly the formalization of the above definition of a function."

This sentence in the section about the formal definition is, strictly speaking, incorrect.

While "above definition" that it refers to contains the notions of "domain" and "codomain" of a function, the set theory definition as a relation, looses the notion of codomain.

One cannot tell what was the codomain, or talk about concepts like surjective, from the definition of function as a relation.

The article should warn as early as possible that there are two non-equivalent definitions of functions in common use. Many books, specially Calculus books, can be seen mixing the two, defining functions as relations and then later considering the notion of surjectivity. If I remember correctly Apostol's is one that takes care of distinguishing the two concepts. Thatwhichislearnt (talk) 19:44, 31 January 2024 (UTC)[reply]

The sentence "A function is uniquely represented by the set of all [and a pair follows]", while correct for the set theory definition (as a relation) is in conflict with surjectivity and codomain being a properties or not of a function, that appear later in the article. Thatwhichislearnt (talk) 20:50, 31 January 2024 (UTC)[reply]

"every mathematical operation is defined as a multivariate function"

This claim is incorrect and contradicts the linked article on [mathematical operation]. Nulladic and unary operations are not necessarily multivariate functions. Either the "every" should not be there, or link to a more restrictive concept than mathematical operation. Thatwhichislearnt (talk) 21:08, 31 January 2024 (UTC)[reply]

I added a note explaning that n (number of parameters) may also be 0 or 1. - Jochen Burghardt (talk) 13:51, 1 February 2024 (UTC)[reply]
You edit didn't change the erroneous sentence. That whole section is a bit delicate, since the notion of *multivariate* can be objective (when the nature of the objects of the domain are tuples) or subjective (the domain can consist of tuples, but the function is still viewed as of a single variable). I think the note blurs the distinction. That can cause more confusion instead of less. It also introduces the confusion between a constant as nullary operation and a constant function. That nullary operations are constant is incidental, due to there being only one null-tuple. But not all constant functions are nullary. Thatwhichislearnt (talk) 16:47, 1 February 2024 (UTC)[reply]
The sentence is not erroneous; and my footnote was intended to clarify that. A multivariate function can have 0, 1, 2, 3, ... parameters, according to the given definition.
"Constant function" is a notion from (e.g.) calculus, and is to be distinguished from "constant" used in formal logic (see e.g. First-order_logic#Non-logical_symbols: "Function symbols of valence 0 are called constant symbols"). Jochen Burghardt (talk) 16:46, 3 February 2024 (UTC)[reply]
The sentence is trivially erroneous, since not all mathematical operations are defined as multivariate functions. Period. And in your second paragraph you are preaching to the choir. That is what I was pointing out. Thatwhichislearnt (talk) 21:31, 4 February 2024 (UTC)[reply]
I am unconvinced that this "definition" is sufficiently generally recognised to be stated as a fact. Who says it is defined in that way? What reliable source indicates that this is the usual definition? Unless one can be provided, this statement does not belong in the article. JBW (talk) 12:16, 5 February 2024 (UTC)[reply]

Possible typo? Only I don't know enough about maths to say for sure...

Hi. New here. Thanks for your patience.

Quoting the section headed 'Definition' in paragraph 3:

" A function f, its domain X, and its codomain Y are often specified by the notation f:X -> Y In this case, one may write x |-> y instead of f(y). "

I've added the bold emphasis to the f(y) as it seems to me that this could be a typo: shouldn't this be y = f(x)? Like I say in the title, however, I don't know enough about maths to say for sure. Seems odd though, especially as everything relating to the function upto this point in the article is regarding the function f mapping x to y, so why is the function f now mapping y to, presumably, some other codomain? Really aware of my ignorance on this subject (hence why I'm reading the article in the first place...)

Anyway, if someone more knowledgable than me can speak to this, then great.

--

Also, on an unrelated point, I feel like there must be a more elegant way to ref. to a section of wikipedia than the rough quote/approximation I've used above. Does anyone know an article that provides guidance for how to use these talk pages that includes information on how to ref. to specific parts of a wiki article? Thanks. Prfect23 (talk) 07:32, 16 February 2024 (UTC)[reply]

 Fixed
To refer to a section of the article you may use the template {{alink}}; for exanple, your above concern refers to section § Definition. To quote a part of text, you may display the source of the article by clicking on an edit button (or on the button "read the souce" if you have not the edit rights on this article); then select and copy the part of text to be quoted; and then past it in the edit window of the talk page.
I'll post on your talk page a "welcome" template with many useful links. D.Lazard (talk) 10:31, 16 February 2024 (UTC)[reply]

Formal definition - replacement

The current definition is overcomplicated, and at the same time jagged and incomplete, and seems not to meet the requirements of modern mathematics.

This is because

  • the concept of relationship was introduced unnecessarily (it has its uses, but here it is off topic)
  • a function seems to be a fragmented entity (we actually don't know what it is) that has some realtion and may be domain and codomain
  • in old definition is written: "function is ... a relation" - if so we will not be able to say whether the function is surjective or not - because we must have information about the codomain (relation not contains such information) (actually, based on the old definition, it is not clear whether a function is just a relation or maybe "something" else that also includes a domain and codomain)


Let us introduce the following, more direct, simple, complet and uniform "new definition" (it is actually not new concept):


Solution - new formal definition

A function is a Set consisting of following elements:

  • domain that is any set
  • codomain that is also any set
  • graph being a set of pairs such that


where means "there is exactly one"

Notation

In traditional notation we usually separate domain and codomain definitions from graph e.g.: "The function is given by the formula " (formula represents graph W). By new definition this notation just describes following set: . Of course, using new definition we not need to change traditional notation.

If you omit to provide the domain and codomain for a given function in traditional notation, it means that this information must be derived from the graph or context - which is often the case (and justifies separating the definition of the graph in the notation).


Examples

Lets look on following four examples with similar graphs:

  • , by definition it is:
  • , by definition it is )
  • , by definition it is:
  • , by definition it is:

distinction:

  • f is not g because g has 2 elements (domain = codomain) and f has 3 elements (so f and g must be different sets)
  • f is not h because h has 2 elements
  • f is not k because f contains element that contains pair (0,0) - the k not contains element with such pair
  • g is not h because it not contains element .
  • g is not k because k has 3 elements
  • h is not k because k has 3 elements

properties that can be easily derived from the new definition:

Conclusion

New definition:

  • defines functions as a set - a basic mathematical concept - and not as a fragmented "something"
  • explicitly defines a codomain which allows us to determine whether the function is surjective
  • does not introduce redundant concepts (relation - Occam's razor)
  • is clean, intuitive and simple

— Preceding unsigned comment added by Kamil Kielczewski (talkcontribs) 13:14, 23 February 2024 (UTC)[reply]

Please sign your posts on the talk page with four tildes (~~~~). Also, since your post is answered, you must not modify it; instead, you should open a new post after the answer.
The new formal definition you suggest is incorrect, since in a set, the elements are not ordered. So, if would be a set, one could not distinguish between the domain and the codomain. Moreover, the phrasing "a function is ..." is incorrect, as nobody writes a function this way.
Even if it would be corrected, your definition would consist essentially in replacing the definition "A binary relation between two sets X and Y is a subset W of the set of all ordered pairs (x, y) such that and " by the formula This may be shorter to read, but makes certainly reading more difficult. Note also that in all formulations, the domain and the codomain are parts of the definition of a function; so, your main concern is wrong, that the given definition would not allow defining a surjection. D.Lazard (talk) 14:53, 23 February 2024 (UTC)[reply]
1. You write " if {X,Y,Z} would be a set, one could not distinguish between the domain and the codomai" - this is false statement. Set {X, Y, W} (which is simpler structure than (X,Y,W)) where W is subset of , contains enough information to deduce what element is graph, what is domain and what is codomain (I even give some "edge" examples which shows that). This is NOT NOTATION. This is DEFINITION - precise, avoiding redundancy, using the simplest possible concepts - but still concise and short.
2. "nobody writes a function this way." - untrue. Usually everybody use traditional handy notation - but not confuse notation with definition. Counterexample: e.g. my topology professor sometimes use this definition instead traditional notation to show some sophisticated things.
3. As I wrote in the proposed change, the old definition is formulated in such a way that it is not known what a function actually is (it is fragmented "something") - which only proves that the old definition is simply weak and leads to errors (because even in the old definition itself it is written: "A function with domain X and codomain Y is a binary relation R between" (this means that function is binary relation - but binary relation not contains information about function codomain - so this is false/confusing statement - (4 examples I give also shows that binary relation ("graph") is not enough). With old definition - the reader is left with a puzzle: function is binary-relaton or not - it is somehing more?
4 You try to mix old definition witch new and write "This may be shorter to read, but makes certainly reading more difficult." - no. Just look on old definition, and look on new definition separately (dont't mix them) - the new one is simpler, more clean and more intuitive (because whe use concept of set of pairs in direct way and set simple intuitive condition to that set). My proposition is to replace old definition with new one (remove old content of "Formal definition" except first pharagraph which can be optionally moved to the end of previous section - for clarity - to not to disturb the definition section witch meta info) - so no update old definition; no mix them; Optionally below new definition we can add explanation how to read quantifiers symbols using "natural language".
5. Apart from the other arguments I presented in the proposal to which you did not respond, I would like to emphasize that Introduce binary-relation insead using pairs from directly is obviously unnecessary complication. This actually makes old definition essentialy more difficult.
Kamil Kielczewski (talk) 15:37, 23 February 2024 (UTC)[reply]
I see no references to published sources in your long posts in this thread. Are you proposing to replace the sourced definitions in our article with original research? That's a non-starter. —David Eppstein (talk) 18:18, 23 February 2024 (UTC)[reply]
No - because definition in "Formal definition" section in article is not sourced. Above proposition is also no original research. This is old concept of define function as some set. My proposition is to replace unclear, complex fuzzy old definition with simple, clear and complete definition. Kamil Kielczewski (talk) 18:30, 23 February 2024 (UTC)[reply]
"This is old concept of define function as some set": you must provide a source that defines a function as a set.
"complex fuzzy, simple, clear and complete"". This is your own opinion. It has no value for Wikipedia, if you do not provide a reliable source asserting the same.
"Set {X, Y, W} where W is subset of ": this is nonsensical since the sets {X, Y, W} and {Y, X, W} are equal, while In other words with your definition, alleged to be clear, the domain and the codomain are confused. D.Lazard (talk) 20:46, 23 February 2024 (UTC)[reply]
1. "This is your own opinion. It has no value for Wikipedia, " this is again false statement. Actually I give arguments above - you ignore them. If that arguments are wrong - give counter argument. However I will provide proof that old definition is not complete and fuzzy - step by step:
  • definition states: "A function with domain X and codomain Y is a binary relation R between X and Y"
  • top part of definition defines what is binary relation: "A binary relation between two sets X and Y is a subset of the set of all ordered pairs... " - this means that R is set (of pairs).
  • Ok so acording to this definition function f is set R which looks as follows where and .
  • but there is a problem - if only set is given then we can not deduce codomain Y (because is not guaranteed that all elements from Y will be used in binary relation R) e.g is suriective or not? It depends of what is te codomain of f... . If e.g. then it is suriective, if is not suriective. But this definition that f is R not provide such information about Y...
  • so this definition that function f is set R is not comlete (we lose information about codomain when we define function in that way).
  • however, if someone state that function is something more than R because it also has domain and codomain - then this is fuzzy part: is funtion is binary relation R or not (not= something more than R) ?
2. "you must provide ..." - As you can see, old definition is very poor and week - actually old definition is wrong and does not meet the standards of modern mathematics (which can be verified by everyone - by above proof). I hope above proof is clear - However, if you have any doubts in above proof, indicate where. My goal is to remove wrong definition by good definition.
3. "this is nonsensical since the sets {X, Y, W} and {Y, X, W} are equal, while " - again you write false statement. If you read new definition, then it is clear that domain is denoted by X, codomain is denoted by Y and W is subset of . The order of elements in set f={W,Y,X} doesn't matter. If I wrtie and where and you will also say that set A and B are nonesense?
4. If you have still doubts then I will expalin one example - how to determine domain and codomain for function defined as follows: : 1. You detect that W is because there is no other set of pairs. 2. You detect that first element of each pair is positive real number, and all positive real numbers are used - also you see that is element of f - so must be domain. 3. So the last element of set f which is must be codomain Y. It is clear that f is not surjective. So based on informations included in new definition of f we can write it using traditional notation (but remember that it is only notation - not definition) - so new definition of function f contains ALL informations about this function.
5. In the other hand, if we try to define abouve funtion (this is only notation - dont confuse it with definition) according to old definition - it will be following binary relation (which is set of pairs which old definition states): . Analysing this set we can determine that domain is but we can not determine what is codomain Y since we know that binary relation not allways use all elements of codomain. If someone see f dedined using only old definition and say that f is suriective or even it is bijection, - he will make mistake. That person based only on old definition of f will be unable to rewrite it coretly using traditional notation. Kamil Kielczewski (talk) 22:06, 23 February 2024 (UTC)[reply]

You wrote:"so acording to this definition function f is set R which looks as follows

where and ."

This a wrong rewrite of the definition. The correct translation of the definition in terms of formulas is: a function from X to Y is a set R such that

As you are discussing a definition that is not the one given in our article, everything that you wrote after the above quotation is possibly correct (this is not my opinion) but is not relevant to a discussion on the content of the article.

If you prefer you may replace "a function from X to Y is a set R such that" with "a function is a triple of sets such that". Personally, I find that the latter formulation is unnecessary pedantry. D.Lazard (talk) 15:23, 24 February 2024 (UTC)[reply]

(I will continue points/threads numeration from my previous commment)
6. "This a wrong rewrite of the definition" - this is at most a misunderstanding (I assume that formula after word "and" is "one statement" (inside brakcets), and I assume it is obvious of context of our discussion that R is subset of - My oversight - I should have written in a more precise manner.). Taking this into account, we have described the same set R. But this is not crucial and does not change the correctness of the further argument. The key point in that proof was that R (and f) in old definition are only SET OF PAIRS - this cause the problem witch old definition.
7. "As you are discussing a definition that is not the one given in our article" - this is a false statement. I am discussing the definition given in the article.
8. "everything that you wrote after the above quotation ... is not relevant to a discussion on the content of the article." - this is a false statement. I divided my last comment into 5 separate usually independent points - you cannot assume that if one point had an error, all of them are wrong or off-topic. If any of these points are incorrect, present your arguments - unless you agree with them.
9. "a function is a triple" - as I wrote earlier, your proposal to use triple (X,Y,R) is an ill-conceived, overly complicated structure. A function can be defined using only a simple set {X,Y,W} due to special structure of graph W (because we can always distinguish the graph W from the domain X and the codomain Y due to the axiom of regularity) . Maybe instead of R or W, we should use just G (graph) which is a more descriptive symbol. Look on example presented in point 4 in my last comment. If you think this is not true - show me a counterexample: a set consistent with the new definition that can be read in an ambiguous way - as two different functions written in traditional notation. And show me a function written in traditional notation that cannot be written as a set consistent with the new definition (in similar way I show you counter example in point 5 in my last comment for old definition)
10. Moreover, introducing the additional concept of "binary relation" is an unnecessary multiplication of entities. Explain to me - what does binary relation bring to the definition of a function besides complication? We can suffice with a set of pairs instead. A good definition should be as simple as possible. Kamil Kielczewski (talk) 19:59, 24 February 2024 (UTC)[reply]
Per WP:DISENGAGE, only the last point deserve to be answered. My answer to this last point is that Wikipedia is neither a textbook nor a collection of mathematical monographies. For details see WP:Here to build an encyclopedia and WP:What Wikipedia is not. D.Lazard (talk) 19:10, 25 February 2024 (UTC)[reply]
11. "Wikipedia is neither a textbook nor a collection of mathematical monographies" -
So this is your argument for using the clearly redundant and complicating definition of "binary relation" (instead the direct "set of pairs")? You provided two links - I didn't find any justification in either of them for using unnecessary complications in simple mathematical definitions. Explain this.
12. In light of the link you provided "What Wikipedia is not" it follows that the current incorrect definition cannot be replaced by your hastily invented, not fully thought-out (personal invention) concept of using the triplet (X,Y,R). Especially since there are simpler, known concepts, for example, {X,Y,W}.
13. (re 10) "only the last point deserve to be answered" does not constitute a substantive argument for point 9, i.e., your personal proposal to use the triplet f=(X,Y,R) (which is overly complicated structure) instead of f={X,Y,W} (which is simpler but sufficient structure).
14. The old incorrect formal definition should be completely removed and replaced with a modern, simple, correct definition. Kamil Kielczewski (talk) 20:43, 25 February 2024 (UTC)[reply]
@Kamil Kielczewski – have you tried to figure out what other sources aimed at a broad audience of non-specialists use as a definition for "function"? (for example, general-purpose encyclopedias, introductory textbooks, expository survey papers for scientists or historians of science, semi-technical popular math books, etc.). As a general matter (I haven't examined this in great detail), in my opinion this article should ideally give a high-level survey of the most common conceptions of function typically employed by various kinds of mathematicians, each phrased in the most accessible way practical and thus hopefully at least somewhat legible for e.g. high school students and laypeople. I think we should shy away from excessively formal or technical details of various concepts, and should try to focus on the broad idea and its basic implications rather than picking on the pedantic edge cases of specific definitions. YMMV. –jacobolus (t) 02:04, 26 February 2024 (UTC)[reply]
15. I don't entirely agree with you. Mathematics is a specific field where there is no room for compromise - if something is wrong (which can often be easily demonstrated by showing a counterexample), it should not be accepted as correct - and mislead others. At the beginning of this thread (at the top), I proposed replacing the existing incorrect formal definition of function with a correct one that is simpler than the old one
16. The most challenging aspect of the new definition is (old definition also use quantifiers), but we can add an explanation in natural language on how to read the quantifiers: for every x in X, there exists exactly one y in Y such that the pair (x,y) belongs to W. ). The new definition, due to its simplicity, is easier to understand than the old one
17. I agree that publishing various good solutions in one article is ok. Kamil Kielczewski (talk) 06:25, 26 February 2024 (UTC)[reply]
@D.Lazard You did not address points 11, 12, 13 and 14 (from my earlier comments) - I understand that you agree with them. If not, then present substantive arguments. Kamil Kielczewski (talk) 09:41, 27 February 2024 (UTC)[reply]
I disagree with everything you wrote and I have absolutely no obligation to respond to any of your injunctions ("present substantive arguments"). As said above, I disengage from this disruptive discussion. Please, consider the first sentence of this post as my answer to all your future posts on this talk page. D.Lazard (talk) 11:06, 27 February 2024 (UTC)[reply]
Your disagreement is just your private opinion - and I'm asking for arguments.
So what we do with current wrong old formal definition of function? (what was shown above).
Unless you want to leave it and mislead people Kamil Kielczewski (talk) 12:27, 27 February 2024 (UTC)[reply]
@Kamil Kielczewski If you want to persist in this one, you should (1) distill your criticism down to the shortest length you can make it, and (2) try to find existing published sources discussing this rather than basing it on your own logical reasoning, and link us to those sources. –jacobolus (t) 15:41, 27 February 2024 (UTC)[reply]

I suggest to cease discussing, or to base future contributions on reliable sources (WP:RS). This is what David Eppstein proposed on 23 Feb already. - Jochen Burghardt (talk) 17:21, 27 February 2024 (UTC)[reply]

Formal definition - remove old, introduce new

Why old definition is bad?

The old definition says (I quote): "A function with domain X and codomain Y is a binary relation" and "A binary relation between two sets X and Y is a subset of the set of all ordered pairs... ". This means, therefore, that a function f is a subset of a set of pairs, that is , such that there is no guarantee that all elements from Y are paired in the set f. This causes the definition to be ambiguous (and thus incorrect), as illustrated by the following example:

according to the old definition and so which is not true because codomain for is while for is . The function is a bijection while is not. But in light of the old definition, it is impossible to determine whether a function is a surjective (and therefore a bijection) because it has lost information about the codomain Y.

New definition

The function is an ordered triple consisting of the following elements:

  • a domain that is any set
  • a codomain that is also any set
  • a graph being a set of pairs, such that

Explanation: the graph is such a set of pairs, that for every element from there exists exactly one from such that the pair is in the set (meaning this pair is a "point" on the function's graph).

Sources:

Why new definition is better?

  • Is simpler because it does not introduce the unnecessary concept of binary relation (actually the graph G in the new definition is a binary relation, but this information can be given in a different section outside of the formal definition)
  • Unlike the old definition, the new one uses quantifiers in a simpler and more direct way that reflects the intuitive property of a function's graph.
  • Because in the new definition, the domain and codomain are explicitly indicated, there is no problem with determining whether a function is a surjection/bijection.
  • The new one has sources provided, unlike the old one

Examles in new defnition

The functions f and g, which demonstrated the ambiguity of the old definition, are distinguishable for the new one, that is, (the triples differ in the second element - for it is and for it is ):

by new definition:

by new definition

Notes

  • As users @JochenBurghardt and @Jacobolus suggested - I found sources for the new and distilled the problems of the old definition (I do it in new thread to to avoid the distraction of old records)
  • I propose that in the "Formal definition" section of this article, the first paragraph (historical sketch) be moved outside of this section (e.g., directly before it) to focus the reader's attention, and the old incorrect definition should be completely removed and replaced with the new one.
  • Initially, I insisted on using the set {X,Y,G} instead of the triple (X,Y,W), but firstly, the sources use the triple, and secondly, using the set would require reconstructing the domain and codomain from the graph G, which could necessitate certain additional assumptions, for example, the axiom of choice... Therefore, although the structure of the set is simpler, the triple allows for a greater generality of functions, which offers more benefits.
  • A function is a central element of modern mathematics, therefore the formal definition should be correct.
  • Do you have any questions or is there anything else you would like to know or discuss?

Kamil Kielczewski (talk) 00:19, 29 February 2024 (UTC)[reply]

I think you misunderstand the current text. The formal definitions section does not define "a function" to be a set of pairs. It defines "a function with domain X and codomain Y" to be a set of pairs. If you like, you can think of this as meaning that there is a type X→Y of functions from X to Y, and that the inhabitants of this type are sets of pairs. They are not triples, because in describing an inhabitant of type X→Y it would be redundant to specify X and Y themselves. You could plausibly instead define a type of all functions, using triples as you suggest, and some authors do this, but this leads to difficulties elsewhere: for instance, composition of types X→Y and Y→Z is a well-defined operation, but there is no "composition" operation on all pairs of functions.
Taking a step back, much of the heat and confusion in these discussions comes from an attitude that there can be only one correct definition of a function and that we should present only that one definition and pretend that the others don't exist. That attitude violates WP:NPOV. We should describe with appropriate balance the different approaches that have been used, and not try to decide here which one of those is best. —David Eppstein (talk) 02:56, 29 February 2024 (UTC)[reply]
1. "I think you misunderstand the current text. (...) It defines "a function with domain X and codomain Y" to be a set of pairs": If I misunderstood something - then explain to me precisely - Does "to be a set of pairs" mean something more than a set of pairs? So, what exactly set are we talking about? And how does this solve the problem of determining whether a given function, using the old definition, is a surjection? Please refer to the presented counterexample.
2. " but there is no "composition" operation on all pairs of functions": I see no problem in defining the composition of two functions defined as triples. Where exactly do you see a problem here? (maybe use some example to show the problem).
3. " composition of types X→Y and Y→Z is a well-defined operation": Do you want to introduce another concept to formal function definition - such as type - which dispels the ambiguities of the old definition?
4. "these discussions comes from an attitude that there can be only one correct definition of a function and that we should present only that one definition and pretend that the others don't exist. ":A function is a central concept in mathematics. If we adopt the old definition, we will have a problem with determining surjections and bijections (which is an important property of functions - often used). Therefore, okay - we might leave the old definition if you want - but in some additional section named, for example, "Alternative formal definitions" where these definitions will be presented along with indicating their limitations. What do you think about this? Kamil Kielczewski (talk) 07:14, 29 February 2024 (UTC)[reply]
Among the functions from X to Y, the surjections are the ones for which every element of Y is in the image of the function. There is no counterexample. You are describing a function from X to Y, and a function from X to Z, that happen to be described by the same sets of pairs. But they are inhabitants of different types, so as long as one specifies the type, there is no ambiguity. Do you, perhaps, think that mathematics is an untyped language, like Javascript, where questions like "is 1 a member of 1/2" are meaningful? —David Eppstein (talk) 07:26, 29 February 2024 (UTC)[reply]
5. From what you're saying, it follows that a definition of type must be added to the definition of a function, and information about its type must be added to the function itself. So, are you suggesting that a function should be such a pair: a graph and a type?
I would like to point out that in the new definition, there is no such problem, i.e., a function is simply a triple, and there is no need to define any "type". Kamil Kielczewski (talk) 07:35, 29 February 2024 (UTC)[reply]
I think that in actual mathematical discourse every mathematical object carries around a type. The type is not the thing; it is what kind of thing it is. When you use one of your triples to describe a function, you are thinking of it as having the type of function. You can apply it, you can compose it, you can do the things that you do with functions. You cannot add it to an integer because it has the wrong type. If you carried out the set-theoretic definition of integer addition to the set-theoretic encoding of a function as a triple and the set-theoretic encoding of a natural number (or the different encodings of the same number as an integer or a rational number or a real or a complex), you would get garbage, not anything meaningful like the pointwise addition with a constant integer-valued function. That does not mean that a function is really a quadruple (function-type,domain,range,graph): it is a triple, but a triple that you are using as a function. In exactly the same way, when I use the bare graph of a function to describe it, I am thinking of it as having a more constrained type: the type of a function from X to Y, for some X and Y. It can be applied, but only to elements of type X. It can be precomposed, but only with things whose type is a function from Y to something else. It still cannot be added to integers, because it has the wrong type. You are writing as if there is only one kind of mathematical object, and maybe to a foundational set theorist there are only sets, so you don't need to say what type of thing anything is (it is a set). But most mathematicians are not foundational set theorists and we need to describe mathematics as it is actually used, not just how it is encoded to people who want to encode it as only one kind of thing. —David Eppstein (talk) 08:15, 29 February 2024 (UTC)[reply]
Not quite, because if we define a function solely by its graph G (thus according to the old definition), we lose information about the codomain, and we will need to convey this information additionally (outside of the definition). The triple definition automatically incorporates this important information.
If you like referring to programming languages, then consider this:
class OldFunctionType {
graph: map<object, object>
}
class NewFunctionType {
domain: set<object>;
codomain: set<object>;
graph: map<object, object>;
}
In the (pseudo) "type" NewFunctionType, you simply have more information about the function that allows you to determine if it is a surjection. In OldFunctionType, we've lost this important information. Kamil Kielczewski (talk) 08:57, 29 February 2024 (UTC)[reply]
If you encode a function solely by a triple, you lose the information that it is a function and not just a triple of arbitrary things. How is that any different? —David Eppstein (talk) 15:58, 29 February 2024 (UTC)[reply]
8. It differs quite significantly: Assume someone knows both the old and new definition - in that case:
  • when given a triple, they will be able to determine if it is a function and whether that function is a surjection.
  • when given only a set of pairs, they will also be able to determine if it is a function, but will not be able to determine if it is a surjection.
Indeed, in mathematics, it is a common situation where someone analyzes a certain object and recognizes, for example, that it is a group, or a function, etc. It is not necessarily the case, as you say, that one must know a priori what a given object is, because by knowing various definitions, they can determine this themselves. Kamil Kielczewski (talk) 18:13, 29 February 2024 (UTC)[reply]
False, incorrect, misleading, and wrong. It is not a common case that someone examines a certain set, discovers "oh, this set happens to match the set-theoretic encoding of a complex number according to the scheme used by [reference]", and starts doing complex arithmetic on that set. One recognizes that something is a group not from its encoding, but from its behavior. Set-theoretic encodings do not capture behavior. Types do. —David Eppstein (talk) 18:18, 29 February 2024 (UTC)[reply]
10. When I said "it is a common situation in mathematics," I of course meant it from my own private perspective - this is my private opinion - I didn't intend to mislead anyone.
"One recognizes that something is a group not from its encoding, but from its behavior." - no - whether something is a group or not is recognized by examining if it meets the definition of a group. (and similarly with recognizing functions, graphs, etc.)
For example, if I receive a set - then I can determine that it meets the (new) definition of a function - therefore, it is a function.
Similarly, if someone receives a set with an addition operation - then they can determine that it meets the definition of a group - therefore, it is a group - and consequently, they can use the known properties of the group in further considerations of (E,+).
Therefore, good definitions are quite critical. Kamil Kielczewski (talk) 20:52, 29 February 2024 (UTC)[reply]
To you, there appears to be no distinction between "a set that meets the set-theoretic encoding of a function" and "a function". I imagine that, in the same way, to you, there would be no distinction between "a set that meets the set-theoretic definition of a real number" and "a real number". So if I gave you a set F encoding the group multiplication function for some specific encoding of the Klein 4-group, and I gave you a different set P encoding the real number π, and you happened to notice that F could also be interpreted as an encoding of a real number, you would happily add F+P as real numbers and think that the result was meaningful? —David Eppstein (talk) 23:31, 29 February 2024 (UTC)[reply]
11. I have the impression that we are straying from the topic. Let's go back:
A function is either a surjection or not - either this can be determined based on the definition or not. Notation is one thing and definition is another. Notation derives from the definition. In traditional notation, we might write a function like this:
  • according to the old definition, this function would be such a set:
  • according to the new definition, this function would be such a triple:
as you can see, the old definition narrows a function down to its graph G - and this causes - that a person who looks only at such defined functions - in the case of the old definition will not be able to reconstruct the codomain and determine whether it is, for example, a surjection.
If we do not accept some definition of a function - then the traditional notation has an unclear meaning - then we do not know what a function is. Therefore, the definition is very important. Kamil Kielczewski (talk) 00:15, 1 March 2024 (UTC)[reply]
I have the impression that we are not straying from the topic, but rather that despite all my attempts at probing what you think you mean by a definition, all you can do is to respond with exactly the same assertions that you already added to the discussion long ago. That is to say, my attempts to bring you into a dialogue rather than a monologue have failed. Since dialogue is necessary for building consensus, and consensus is necessary for making change to Wikipedia articles, I think we should consider the conversation over and leave your proposals as having failed to gain consensus. —David Eppstein (talk) 01:02, 1 March 2024 (UTC)[reply]
" despite all my attempts at probing what you think you mean by a definition " 13. This is off-topic. In this discussion, we are not concerned with what I have in mind as the definition - we are only examining the definitions themselves - both old and new - in a precise way.
You also introduced some concept of a "type" - but you didn't define it precisely - and you want to discuss it. Kamil Kielczewski (talk) 06:37, 1 March 2024 (UTC)[reply]
It seems to me that fundamentally this is about a misunderstanding, on your part @Kamil Kielczewski, of the intended meaning of the definition currently in the article, based on what seems to me like an excessively literal and narrow reading, which you keep insisting is the only possible interpretation even as several people including a number of professional mathematicians tell you that is not quite right. Disclaimer: I am not an accredited professional mathematician, just an interested amateur.
I could certainly believe that some improvements / clarifications could be made to the definitions given here and their explanations. For example, I think it might be helpful to explicitly mention in § Formal definition that this definition defines a function based on its graph, the way Pinter does in the document you linked.
But I don't think demanding that everything in mathematics is precisely and only a set is the most neutral or reader-helpful change. Indeed if anything I would like to see more emphasis and more extended discussion about the ways functions are understood differently at different times / in different contexts. –jacobolus (t) 01:38, 1 March 2024 (UTC)[reply]
14. " It seems to me that fundamentally this is about a misunderstanding, on your part @Kamil Kielczewski, of the intended meaning of the definition currently in the article, based on what seems to me like an excessively literal and narrow reading " This is another argument in favor of the necessity to remove the old definition (or place it in a different section). A mathematical definition should be as simple as possible, precise, clear, and unequivocal, rather than vague, incomplete, and ambiguous. Note that the new definition does not have these kinds of ambiguities. Kamil Kielczewski (talk) 06:49, 1 March 2024 (UTC)[reply]
Let me be more precise: when typical anticipated readers come to
A function f from a set X to a set Y is an assignment of an element of Y to each element of X. The set X is called the domain of the function and the set Y is called the codomain of the function. [...] However, it cannot be formalized, since there is no mathematical definition of an "assignment". [...] set-theoretic definition [...] A function with domain X and codomain Y is a binary relation R between X and Y
they understand X and Y to be intrinsically part of the specification of the function. The text directly implies that every function has a particular domain ("the domain of the function") and codomain. The language is not ambiguous, and is cemented by the repeated use of these phrases which make it clear that the domain and codomain are intrinsic to the function. (There are some disclaimers included about how sometimes the domain and codomain are only implicitly specified for convenience.)
The issue is that you are taking one phrase out of context. You are unpacking "is a binary relation" to "is a subset of the set of all ordered pairs ..." and you are then discarding the first part of the sentence of the definition (before "is") and also discarding the immediately following sentence. This makes for a strained and excessively pedantic (mis)reading.
Some authors directly state that the function "is" a triple with instead of stating that a function from to is . In practice these two variants are equivalent. The difference is that the "triple" formulation is a bit more cumbersome to read but is perhaps more aligned with the pedagogical structure of an introductory set theory course / with the aesthetic preferences of some specific authors. –jacobolus (t) 16:59, 1 March 2024 (UTC)[reply]
16. "the domain and codomain are intrinsic to the function" I completely agree with this.
Therefore, a binary relation cannot be equated with a function. This is because binary relation does not always contain complete information about the codomain.
Thus, the notation from the section "Formal definition" with content:
"A function with domain X and codomain Y is a binary relation R ..."
is incorrect/false statement, as f is not a binary relation.
At most, the graph G of the function f can be defined as a binary relation.
Simply put, a binary relation is too poor a structure/concept to fully describe a function (meaning the domain, the codomain and the graph). I also wan Kamil Kielczewski (talk) 21:19, 1 March 2024 (UTC)[reply]
Here's Mayer's definition:
Let be sets. A function with domain and codomain is an ordered triple where is a rule which assigns to each element of a unique element of The element of which assigns to an element of is denoted by We call the -image of or the image of under The notation is an abbreviation for " is a function with domain and codomain We read "" as " is a function from to "
This seems to me effectively the same as the definition currently in the article, but slightly more pedantic. It is almost exactly identical to D.Lazard's comment, If you prefer you may replace "a function from to is a set such that" with "a function is a triple of sets such that", except with "set" replaced by "rule" (such a rule could be formally defined as a set). –jacobolus (t) 04:48, 29 February 2024 (UTC)[reply]
7. Mayer uses a triple (A,B,f) to define function, but I do not see him defining what a rule f exactly is but he wrote "f is a rule which assigns to each element of A a unique element of B", it looks that a rule can be expressed like graph G in new definition, and there is no need to introduce the additional concept of a "binary relation" R (which D.Lazard refer to). The graph G can be interpreted as a kind of relation, but this is additional information that can be placed outside the 'Formal Definition' section. Kamil Kielczewski (talk) 08:11, 29 February 2024 (UTC)[reply]
Here's Pinter's definition:
A function is generally defined as follows: If and are classes, then a function from to is a rule which to every element assigns a unique element ; to indicate this connection between and we usually write [...] The graph of a function is defined as follows: If is a function from to then the graph of is the class of all ordered pairs such that [...]
Since a function and its graph are essentially one and the same thing, we may, if we wish, define a function to be a graph. There is an important advantage to be gained by doing this—namely, we avoid having to introduce the word rule as a new undefined concept of set theory. For this reason it is customary, in rigorous treatments of mathematics, to introduce the notion of function via that of graph. We shall follow that procedure here.
As far as I can tell this is nearly precisely the same as the current definition here. –jacobolus (t) 05:03, 29 February 2024 (UTC)[reply]
Pinter's note defining a function as a "rule" and then explicitly pointing out that it can also be defined as the graph (set of ordered pairs) might not be a bad approach though. I wouldn't be against that. (Though I also don't think it's necessary.) –jacobolus (t) 05:07, 29 February 2024 (UTC)[reply]
6. On page 52 (on my proposal, 35 is the wrong page number) Pinter's pdf (below of section "2 FUNDAMENTAL CONCEPTS AND DEFINITIONS") we see:
2.1 Definition A function from A to B is a triple of objects (f,A,B) , where A and B are classes and f is a subclass of A × B with the following properties. (...)
Pinter generalized the concept of a function as triples to classes (top of page 53) - in practice, however, sets are usually used, therefore the new foundational definition should remain unchanged and be based on sets, and information about generalization to classes can possibly be added in a separate article section. Kamil Kielczewski (talk) 07:54, 29 February 2024 (UTC)[reply]
What do you think is the difference between "binary relation" and "subclass of "? From what I can tell the latter description is nothing more or less than the definition of the former. I still don't understand what the hangup is here. –jacobolus (t) 15:10, 29 February 2024 (UTC)[reply]
9. Short answer: "binary relation" is a redundant and unnecessary concept that adds nothing to the definition of a function - except for complication ("let's not introduce unnecessary entities" Occam's razor). Introducing this concept only muddies the waters and distracts the reader's attention.
Long answer: through an exaggerated similar analogy - would the following definition of even numbers be reasonable: "Let's start with the fact that a group is a non-empty set G and an operation...(here the definition of a group). Even numbers are elements of a group, whose set is of the form "
I know, it's not a perfect analogy - but doesn't it highlight the absurdity of introducing the concept of a group in order to define even numbers? Although even numbers with addition do form a group, defining the concept of a group in order to define the concept of an even number is redundant, unnecessary, and only obscures the main definition we are concerned with.
Similarly (though not identically), in the case of the old definition of a function - introducing the concept of a binary relation (even though a function is such a relation, just as even numbers with addition form a certain group) only introduces unnecessary complication and obscures the basic definition - that is, the definition of a function.
The additional information that a function is a certain binary relation should be placed in a different section - outside the formal definition of a function.. Instead of introducing the definition of a binary relation, the Cartesian product should be used directly as in the new definition of function. Kamil Kielczewski (talk) 20:29, 29 February 2024 (UTC)[reply]

It seems to me that the essential fact about functions is that they are either 1) a rule, written out in words, that allows you to change an input to an output or 2) a set of ordered pairs, with each input paired with a single output. The advantage of the second idea is that it is more mathematical and less linguistic. But since nobody can ever actually produce even a countably infinite subset of the set of ordered pairs of y=x^2, we actually fall back on the rule: multiply the input by itself. As for the common ordered-triple definition, since we can reproduce (A, B, f) by saying that f is a set of ordered pairs, and A is the set of all first elements of the ordered pairs, and B is the set of all second elements of the ordered pairs, the ordered-triple definition does not seem to add anything to the concept.

And, while we are on the subject, if the function has n inputs and m outputs, then the order pair is an n-tuples paired with an m-tuple. For example, an element of f(x,y)=<x, y, x+y> is the ordered pair ((x,y),(x,y,x+y)).

Using the sources, we should either define a function as a set of ordered pairs or as a rule giving a unique output for any given input. Anything more will only confuse readers. Either of these definitions is simple, reliable, referenced, necessary, and sufficient. Rick Norwood (talk) 17:38, 29 February 2024 (UTC)[reply]

12. "As for the common ordered-triple definition, since we can reproduce (A, B, f)" - no, based only on the graph, we cannot reconstruct the codomain. (details and example in section "Why old definition is bad?" above)
"the ordered-triple definition does not seem to add anything to the concept " what about determining whether a function is a surjection (and bijection) or not?
I also wrote a few other positive aspects of the definition based on the triple in section "Why new definition is better?" above. Kamil Kielczewski (talk) 00:43, 1 March 2024 (UTC)[reply]

All the definitions referred to in this discussion (including the definitions in the article) agree that a function consists of a domain, a codomain and something else that associates exactly one element of the codomain with every element of the domain. This "something" may be called a "rule", a "process" or an "assignment", but the exact term is unimportant since these terms are not mathematically defined. More formally, the "something" is a set of pairs whose first elements belong to the domain and the second ones belong to the codomain; this set of pairs having the property that it contains exactly one pair for each element of the domain. The only difference between these various definitions lies in the wording and in the common mathematical terms and notations that are used (set-builder notation, binary relation, Cartesian product, etc.). As the readers of the article may have very different backgrounds, the definition of these auxiliary terms must be recalled, but those terms that are commonly used in sources must be kept in the article, for not confusing people that learnt a definition using these terms. This is what has been done in § Formal definition for binary relation and Cartesian product.

So, there is no reason to continue discussing on the replacement of a "old" definition by a "new" one, when the two definitions are essentially the same. IMO, this thread must be closed. D.Lazard (talk) 10:40, 1 March 2024 (UTC)[reply]

D.Lazard You didn't sign off on the last changes (above summary), but I was able to determine from the change history that you made that entry.Please sign your comments. My answer to your summary is below:
15. The discussion is ongoing - it's too early to summarize it. Especially because:
  • as I described in the proposal in section "Why old definition is bad?", the old definition is problematic. (I agree that the old definition can be moved to another section, for example, "Alternative Formal Definitions"). No counterarguments have been presented to dispute this.
  • both definitions differ (the old definition narrows a function down to the graph G from the new definition)
  • moreover, the new definition is based on simpler concepts than the old definition (no binary relation is used, and also quantifiers directly illustrate the concept of a graph), and readers familiar with the old definition should not have any problems understanding the new one.
  • furthermore, we must also think about new readers for whom the new definition, due to its simplicity and directness, will be easier to understand.
Kamil Kielczewski (talk) 11:12, 1 March 2024 (UTC)[reply]
Sorry, I forgot to sign. I fixed it with the correct time stamp.
In the article, it is written: A function with domain X and codomain Y is a binary relation R between X and Y that .... This means clearly than the domain and the codomain are parts of the definition. So, this very long section is devoted only to discuss your wrong interpretation of this sentence, namely that the codomain would not be included in the definition. Your "new" definition is strictly equivalent with the one of the article. So the above wall of text is totally useless, and continuing this way is WP:disruptive editing. D.Lazard (talk) 14:47, 1 March 2024 (UTC)[reply]
No. "A function with domain X and codomain Y is a binary relation R between X and Y that..." - this is a false statement because, by its very definition, a binary relation does not always contain the entire codomain. So we have two possibilities:
  • either the function f is not a binary relation,
  • or the function f is a binary relation, but in that case, it cannot contain full information about the codomain Y.
As you can see - the old definition is ambiguous/fuzzy. Kamil Kielczewski (talk) 15:16, 1 March 2024 (UTC)[reply]

Total reset needed for this article

Outsiders watching the style of this discussion would probably think about a pond of frogs. When one person replies to another, three more jump in between; others exhibit adolescent behavior in explicitly refusing even to hear any technical arguments; still others wield Wikipedia rules instead of logic. All this is only to say that a total reset is urgently needed, and that restraint is needed to avoid derailing the entire project. I will set the example in exercising restraint, and add a brief note only when logic is all too severely violated. Otherwise I just observe the proceedings...

In any case, can we at least agree on the following points?

- The article should primarily serve the readers, not some personal hidden agenda.

- The current state of the art requires (at least) two conceptually different definitions.

- The simplest of these would be the best starting point.

- Any definition should be referenced accurately (immediately verifiable, no misquotes). The reason for insisting on this last point is not some bureaucratic consideration but the hope that in the literature of the past hundred years there is at least one formulation people are prepared to quote literally, even if it does not fit their own dream definition. Functions are not rocket science but high school material. Boute (talk) 05:14, 1 March 2024 (UTC)[reply]

You should try to make the same point without the insulting preface. Comparing people to frogs and calling them children is not an exemplary "exercise in restraint". –jacobolus (t) 15:47, 1 March 2024 (UTC)[reply]
No insult, but a general observation in empathy with potential outsiders, and apparently an effective wake-up call. Restraint here obviously means making only contributions that improve the paper. Look at the pages and pages wasted on an high-school level issue. What would outsiders think? Boute (talk) 19:41, 1 March 2024 (UTC)[reply]
I'm not clear what you're hoping for. I guess you want someone to answer the complaint politely one time and thereafter just let the critic talk to themselves / shout into the void without reply? –jacobolus (t) 20:27, 1 March 2024 (UTC)[reply]
Re "high-school level issue": a big part of the problem here is that this is not (only) a high school level issue. We need to describe functions at a level that can be understood by high school students, which is a high school level issue. But we also need to describe functions with the understanding gained from research into the foundations of mathematics, in set theory (well covered in this discussion), in type theory (not so well covered), and maybe also with some discussion of constructivism (currently not covered at all), at a level far above high school mathematics. The need to treat these things at multiple levels significantly adds to the difficulty of formulating an article that anyone interested in only a single level can be satisfied with. —David Eppstein (talk) 21:35, 1 March 2024 (UTC)[reply]
To substantively address your comment though: I think everyone wants the article to serve readers (in particular including high school students and early undergraduates). I agree with you that it would be nice to immediately reference one or several sources about any definition(s) here, though I don't think an exact quotation is necessary to insert inline into the text, and making basic material look like a quotations can even be kind of confusing to readers (exact quotations in footnotes can be helpful though). –jacobolus (t) 16:37, 1 March 2024 (UTC)[reply]
Please don't distort clear messages. Good intentions need constant reminders. Evidently basic material should not look like quotations, but in a Wikipedia article a definition should be traceable literally to some source, because not observing this principle is precisely the cause of the endless repetitive discussions we are witnessing here. Don't believe that the literature of the past hundred years does not contain excellent candidate definitions (examples found by opening the hidden text box at the start of this discussion page). Enough generalities, make a solid proposal and submit it for discussion. Boute (talk) 20:19, 1 March 2024 (UTC)[reply]
Is the hidden "Outline for a new version of the article" supposed to be text to go directly into the article? I personally find it to be incredibly confusing and distracting, and not written in anything like the encyclopedic "house style" I expect for Wikipedia articles. I don't think it's suitable to go into a Wikipedia article as-is, but perhaps contains some useful ideas which could be turned to productive use; the sources themselves seem fine to cite. –jacobolus (t) 20:36, 1 March 2024 (UTC)[reply]
Logical error: it was clearly stated that the outline was meant as a resource to the other editors, and that integration into an article was left to them. Boute (talk) 02:26, 2 March 2024 (UTC)[reply]
Fair enough, and thanks for answering the question. I don't personally see a clear way to do that, and even each portion is rewritten as flowing encyclopedic prose, I find the organization confusing. Maybe someone else has concrete ideas of how to write some section(s) based on that, but I don't think you can reasonably expect someone to appear to do such translation for you. –jacobolus (t) 03:37, 2 March 2024 (UTC)[reply]
Your outline cites Apostol's Calculus. Here is what Apostol says:
The word "function" was introduced into mathematics by Leibniz, who used the term primarily to refer to certain kinds of mathematical formulas. It was later realized that Leibniz's idea of function was much too limited in its scope, and the meaning of the word has since undergone many stages of generalization. Today [1960s], the meaning of function is essentially this: Given two sets, say and a function is a correspondence which associates with each element of one and only one element of The set is called the domain of the function. Those elements of associated with the elements in form a set called the range of the function. (This may be all of but it need not be.)
Letters of the English and Greek alphabets are often used to denote functions. The particular letters and are frequently used for this purpose. If is a given function and is an object of its domain, the notation is used to designate that object in the range which is associated to by the function and it is called the value of at or the image of under The symbol is read as " of ."
The function idea may be illustrated schematically in many ways. For example, in Figure 1.3(a) the collections and are thought of as sets of points and an arrow is used to suggest a "pairing" of a typical point in with the image point in Another scheme is shown in Figure 1.3(b). Here the function is imagined to be like a machine into which objects of the collection are fed and objects of are produced. When an object is fed into the machine, the output is the object .
Although the function idea places no restriction on the nature of the objects in the domain and in the range in elementary calculus we are primarily interested in functions whose domain and range are sets of real numbers. Such functions are called real-valued functions of a real variable, or, more briefly, real functions, and they may be illustrated geometrically by a graph in the -plane. We plot the domain on the -axis, and above each point in wit plot the point where The totality of such points is called the graph of the function.
Leaving aside definitional disagreements about the range of a function, this seems overall like a nice introduction to me, which could quite plausibly be cited here and recommended to readers as a source to read. –jacobolus (t) 20:56, 1 March 2024 (UTC)[reply]
Possibly a good start, but which edition of Apostol's Calculus are you using? The second edition (Wiley, 1967) literally states on page 53:
" A function f is a set of ordered pairs (x, y) no two of which have the same first member. "
and goes on (same page) defining domain and range as, respectively, the set of first and second members.
Did Apostol (in your assumed quotation: edition? page?) really say in one paragraph that the range need not be all of Y and later on call Y the range? Sorry, but as this stands, it cannot be plausibly cited. Boute (talk) 02:53, 2 March 2024 (UTC)[reply]
This is the 2nd edition of Apostol, from a couple pages before the part you are quoting; it's essential context for the "formal" version, considering the intended audience of ~18 year olds. –jacobolus (t) 03:38, 2 March 2024 (UTC)[reply]
An informal paragraph on p. 51 in Apostol's Calculus indeed contains this error (a typo? better not speculate), which makes it unsuitable here. A Wikipedia article should contain no logical errors, a fortiori in an introductory context because setting misconceptions straight afterwards is always more difficult. As for the intended audience of ~18 year olds, I don't know whether this is a Wikipedia rule, but it is a reasonable working hypothesis. We also must assume a minimum of interest in mathematics (otherwise, why read the article?). In Apostol's time (1960s) set theory was unknown in most high schools. Nowadays this has changed, and Apostol's formal definition on p. 53 is perfectly accessible to that audience. After all, the first paragraph you quoted (from p. 50) assumes the reader knows about sets. The formal definition has the extra advantage of also appearing in other textbooks (e.g. Flett), and is less prone to the misconceptions caused by prematurely mentioning the set Y (hence the warning by Flett). So I think your suggestion to follow Apostol's path is worth pursuing. Selectivity is important. Boute (talk) 09:05, 2 March 2024 (UTC)[reply]
In other words, we should skip the gentle explanatory prose and cut straight to something unmotivated and inscrutable, so as to maximize novice readers' confusion? No thanks. –jacobolus (t) 09:40, 2 March 2024 (UTC)[reply]

Keep up the good work, Jacobolus. I have nothing to add today, but two things have become clear. 1) Your views are the standard, referenced views. And 2) The people pushing their own views will argue 'til the cows come home. Rick Norwood (talk) 10:59, 2 March 2024 (UTC)[reply]