# Showing that a binary operation is well-defined

Let ##G = \{x \in \mathbb{R} ~: 0 \le x < 1 \}##. Let ##x, y \in G##.I have to determine whether ##x \cdot y = x + y - \lfloor x + y \rfloor## is well-defined. However, it seems obvious. Since addition, subtraction, and the floor function are all well-defined functions in and of themselves, isn't it clear that the supposed operation in question is well-defined?

fresh_42
Mentor
2021 Award
Well, yes, since the definition of the operation doesn't allow ambiguities. Formally, we will have to show that ##x+y-\lfloor x+y\rfloor \neq u+v-\lfloor u+v \rfloor## requires ##x \notin \{\,u,v\,\}## or ##y \notin \{\,u,v\,\}##. So assumed ##x=u## show that ##y \notin \{\,u,v\,\} ## and also ##x=v## implies ##y \notin \{\,u,v\,\}##. Written in this explicit way, it is far less obvious. At least it's a good exercise, in order to get used to the question. Obvious or not, it's always important to check.

andrewkirk
Homework Helper
Gold Member
You are right. Your argument is sufficient to show the dot operator is well-defined.

My guess is that they meant to ask a different question. The hint is that they use G for the set, which suggests they may be thinking of groups. I think they meant to specify that ##G=\mathbb R / \mathbb Z## where those two elements are considered as Abelian groups under addition. For G thus defined it follows from known theorems about quotient groups that the + operation is well defined, but it remains to be proved that the floor operation is, although proving that is pretty easy. It can either be proved explicitly for the quotient group, or by proving that the quotient group is isomorphic to the group [0,1) in the OP via the obvious isomorphism, and that the dot operation is well-defined on the group [0,1) as you showed above.

It is usually in the context of quotient entities that the question of well-definedness arises.

Well, yes, since the definition of the operation doesn't allow ambiguities. Formally, we will have to show that ##x+y-\lfloor x+y\rfloor \neq u+v-\lfloor u+v \rfloor## requires ##x \notin \{\,u,v\,\}## or ##y \notin \{\,u,v\,\}##. So assumed ##x=u## show that ##y \notin \{\,u,v\,\} ## and also ##x=v## implies ##y \notin \{\,u,v\,\}##. Written in this explicit way, it is far less obvious. At least it's a good exercise, in order to get used to the question. Obvious or not, it's always important to check.
Is one way to write the property of a binary operation being well-defined the following? For ##x,~y,~x',~y' \in G##, if ##x = x'## and ##y = y'## then ##x \cdot y = x' \cdot y'##

This is how I have seen it. If this is the case, isn't it trivial to prove that the binary operation in question is well-defined, since we simply write
##x \cdot y = x + y - \lfloor x + y \rfloor## and then substitute ##x## with ##x'## and ##y## with ##y'## to get the result?

fresh_42
Mentor
2021 Award
Is one way to write the property of a binary operation being well-defined the following? For ##x,~y,~x',~y' \in G##, if ##x = x'## and ##y = y'## then ##x \cdot y = x' \cdot y'##

This is how I have seen it. If this is the case, isn't it trivial to prove that the binary operation in question is well-defined, since we simply write
##x \cdot y = x + y - \lfloor x + y \rfloor## and then substitute ##x## with ##x'## and ##y## with ##y'## to get the result?
Sure. I just thought it's a good habit always to check.

@andrewkirk 's answer is a better example: assume ##x,y \in \mathbb{R}/\mathbb{Z}## with the same definition of multiplication. Then it really has to be shown. In this case, ##G## is just one possible set of representatives of ##\mathbb{R}/\mathbb{Z}##. He is also right, that usually this question is important if the elements are sets represented by one of its elements, e.g. equivalence classes such as cosets. Saying ##x=x'## and ##y=y'## in your example already finishes the proof, as there are no two ways for an element to equal another. But if the elements are ##[x]=x+\mathbb{Z}## then there is no unique representative; ##[x]=[x']## means only ##x-x' \in \mathbb{Z}##.

Since ##G \cong \mathbb{R}/\mathbb{Z}## I agree with his suspicion, that those classes are probably meant. I just haven't seen it, before he mentioned it. So the better exercise is: Show that ##[x]\,\cdot \,[y] := [\,x+y - \lfloor x+y \rfloor \, ]## is well-defined.

Mr Davis 97
Infrared
For your operation to be a binary operation, it has to be a map $G\times G\to G$. I think the point of the question is to verify that if $x,y$ are in $(0,1]$, then $x\cdot y$ is also in $[0,1)$, and that we should not assume something else (about equivalence classes) is meant.