Jump to content

Talk:Function (mathematics)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Rick Norwood (talk | contribs) at 17:40, 29 February 2024 (→‎Formal definition - remove old, introduce new). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


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]
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]

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]