Am I understanding this right? (function defined with equivalence relation) I was given this question (there were prior questions defining the equivelence relation ~)
Let $E$ be the set of equivelence classes of $\sim$. Define $f$ from $E$ to $\mathbb R$,
$$f:=\{([(x,y)],r)|x=yr,\: x,y,r\text{ in }\mathbb R\}.$$
I'm trying to understand what it means; is the following correct?

$f:[(x,y)] \mapsto r$, 
$E=(\mathbb R \times {\mathbb R\setminus \{0\}})/\sim$: i.e. the Quotient set of $(\mathbb R\times (\mathbb R\setminus \{0\}))$ by $\sim$.
$(x,y)$ was earlier defined as an element of $(\mathbb R \times (\mathbb R\setminus\{0\})$.

Am I understanding this right?
My function takes in a equivlence class, $[(x,y)]$ and returns a real value $r$, fufilling the condition that $x=yr$?
 A: Yes; the function is defined to take equivalence classes as inputs, and return reals as values. If you put in the class of $(x,y)$, which is $[(x,y)] = \{(a,b)\in \mathbb{R}\times\mathbb{R}^{\star}\,|\, (x,y)\sim (a,b)\}$, it returns a real number $r$. Which real number? The real number $r$ such that $x=yr$. (I'm using $\mathbb{R}^{\star}$ to denote the nonzero real numbers) The function takes equivalence classes as inputs, and has real numbers as outputs.
You would need to make sure that this function is well defined, though; that is, the definition of the function depends on the name you give the equivalence class; but the class $[(x,y)]$ has many different "names"; it can also be called $[(a,b)]$ for some other real numbers $a$ and $b$. So you need to make sure that if $[(x,y)]=[(a,b)]$ (that is, if $(x,y)\sim (a,b)$) then the real number $r$ such that $x=yr$ is the same as the real number $s$ such that $a=bs$. Otherwise, what you describe would not be a function.
A: That looks right to me.  Recall that a function $f : X \to Y$ is formally a subset of $X \times Y$, i.e. a set of ordered pairs $(x,y), x \in X, y \in Y$, with the property that if $(x,y) \in f$ and $(x,z) \in f$ then $y=z$.
Here $X$ is the set $E$ of equivalence classes, and $Y = \mathbb{R}$.  You are told that $f$ is the set of ordered pairs $([(x,y)],r)$ for which $x = yr$.  One has to check that this is well-defined with respect to the equivalence relation ~: if $x=yr$ and $(x,y)~(x',y')$, then $x'=y'r$.  Then $f$ makes sense as a set.  To check that it is a function, one should check that if $([(x,y)], r) \in f$ and $([(x,y)], r') \in f$ (i.e. $x=yr$ and $x=yr'$) then $r=r'$ (which should follow since $y \ne 0$ by assumption).
