I'm trying to evaluate whether or not $\gcd(p,q) = \gcd(-p,q)$ for non-zero integers $p$ and $q$.
I was wondering if it's possible to find $\gcd(-p,q)$.
If so, this statement should be true, correct?
I'm trying to evaluate whether or not $\gcd(p,q) = \gcd(-p,q)$ for non-zero integers $p$ and $q$.
I was wondering if it's possible to find $\gcd(-p,q)$.
If so, this statement should be true, correct?
Somebody has a good proof on proofwiki which makes sense to me. It shows that $$ \gcd\{a,b\}=\gcd\{|a|,b\}=\gcd\{a,|b|\}=\gcd\{|a|,|b|\} . $$
Define the $\gcd$ like a categorial universal property. This avoids having to make use of an ordering $\leq$ on the ring in which you desire a $\gcd$.
Let $R$ be a commutative ring with $1$.
Define $\gcd(a,b)$ to be any element $d \in R$ such that $d \mid a, b$ and if $e \mid a,b$ then $e \mid d$.
Then when $R = \Bbb{Z}$, $\gcd(-n, m),$ for $n,m \gt 0$ always has two elements, but they are "isomorphic" meaning they're the same upto a unit factor: $d = (-1)d'$.
So simply define $\gcd$ as you do "product" in a category i.e. there can be many products of objects $A, B$ but they are all isomorphic.