Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I define an overloaded function, for instance as follows:

$$f: \mathbb{Set}_1 \rightarrow \mathbb{Set}_3$$ $$f: \mathbb{Set}_2 \times \mathbb{Set}_2 \rightarrow \mathbb{Set}_3$$

My first question is whether it is appropriate to define an overloaded function in math, which has no problem in some programming languages of computer science.

My second question is, as there is no intersection between $\mathbb{Set}_1$ and $\mathbb{Set}_2 \times \mathbb{Set}_2$, if it is allowed to simply the notation like that:

$$f: (\mathbb{Set}_1 \uplus (\mathbb{Set}_2 \times \mathbb{Set}_2)) \rightarrow \mathbb{Set}_3$$

Could anyone help? Thank you very much.

share|improve this question
    
I suppose you could do that, but in pure math it's prudent to just define distinct functions instead of overloading one. I'm not sure what your applications are or whatever though. –  anon Aug 9 '11 at 3:32
add comment

1 Answer 1

In practice, mathematicians overload lots of symbols, such as $=, +, \times, ^{\ast}, \oplus, \otimes, ...$. However, these are very common symbols, and it is well-understood what they mean in various contexts. It is a bad idea to introduce and then overload your own symbols; that's just going to cause unnecessary confusion for a reader unless you have a compelling conceptual reason to use the same symbol (for example we use $\times$ for the group operation in any group because it will always satisfy the same axioms, and other examples of overloading come from the desire to evoke a certain analogy).

In your example I see no such reason. Do you have two specific example functions in mind?

share|improve this answer
1  
When the common symbols are overloaded, the operations they perform on their different domains are usually related; e.g. vector addition generalizes addition on the reals by adding each component. Some user defined symbols can be overloaded without confusion; e.g. a polynomial $P(x)$ acting on $\mathbb{R}$, square matrices, and differential operators ($\frac{d}{dx}$, ...). –  robjohn Aug 9 '11 at 3:53
    
Sure. I understand that to be the same reason operators are overloaded in programming. –  Qiaochu Yuan Aug 9 '11 at 3:56
    
Thanks for your comment. I have changed a little bit my post. Actually it is in a context of computer science, so the function I defined is really specific, and I do have a conceptual reason to give the two functions one name. In this case, do you think it is conventional to write their signature together with $uplus$ as my second question suggested? –  SoftTimur Aug 9 '11 at 4:01
1  
@SoftTimur: well, I've never seen anyone do it, but I'm not a computer scientist. I would have to know more about your specific example to know whether this would confuse me or not. –  Qiaochu Yuan Aug 9 '11 at 4:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.