Artificial intelligent assistant

An Equivalence Relation: Introspection into a Particular Well-Defined Quotient * * * ## DATA: > Let $f:\mathbb{Z}\setminus \\{0\\}\rightarrow \mathbb{N}$ be a function defined by $$f(n) = \\{k~:~n=2^km,~m\in \cal{O}\\},$$ where $\cal{O}$ is the set of odd integers. > > Let $v:\mathbb{Q}\setminus \\{0\\}\rightarrow \mathbb{Z}$ be a function defined by $$v\pmatrix{\frac{a}{b}}=f(a)-f(b).$$ * * * ## QUESTION: Is $v$ well-defined? * * * ## KNOWN: Let $X$ be a set and $\sim$ be an equivalence relation on $X$. Let $f:X\rightarrow Y$. If $\forall x,x'\in X$ we have that $x\sim x' \implies f(x)=f(x')$, then $f$ defines a function $X_{/\sim}\rightarrow Y$ by $[x] \mapsto f(x)$. In this case, we say $f$ is "well defined" on the quotient $X_{/\sim}$. * * *

Recall that we obtain $\Bbb Q$ by quoting the set $\Bbb Z\times (\Bbb Z-\\{0\\})$ with the equivalence relation $$(a,b)\sim (a',b')\iff ab'=a'b$$

This hints that we should see $v$ as a map $$\
u:\Bbb Z\times (\Bbb Z-\\{0\\})\to\Bbb N$$ defined as $$\
u(a,b)=f(a)-f(b)$$

and we ought to prove (or disprove) that $ab'=a'b\implies \
u(a,b)=\
u(a',b')$.

Note that if $m$ is odd, $$\
u(mn,mk)=\
u(n,k)$$ since $\text{odd}\times \text{odd}=\text{odd}$. Similarily, if $m=2^j$ is even, $$\
u(2^jn,2^jk)=j+f(n)-(j+f(k))=f(n)-f(k)=\
u(n,k)$$

Since this considers all possible alterations on the pair $n,k$, we conclude $\
u$ is well-defined.

**OBS** $\
u(a,b)$ simply returns the exponent of $2$ (negative or positive) in $$\frac{a}{b}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e6ada4d263715035c53acf901e40d769