ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 21 Oct 2022 16:33:13 +0200Sage fails to check if NumberField is UFDhttps://ask.sagemath.org/question/64545/sage-fails-to-check-if-numberfield-is-ufd/The field Q(sqrt(-5)) if not a unique factorization domain. Yet the code below:
K.<z> = NumberField( x^2+5 )
print( K.is_unique_factorization_domain( ) )
print( K.is_euclidean_domain() )
print( K.class_group(proof=False) )
suggests that it is, but has the non-trivil ideal class group, which is a contradiction (K cannot be neither UFD or Euclidean domain if it is not the Principal ideal domain - but it isn't due to the nontrivial class group).
The output of the code is:
True
True
Class group of order 2 with structure C2 of Number Field in z with defining polynomial x^2 + 5
Am I doing it wrong? How do I check whether field is UFD correctly?Fri, 21 Oct 2022 10:43:14 +0200https://ask.sagemath.org/question/64545/sage-fails-to-check-if-numberfield-is-ufd/Answer by slelievre for <p>The field Q(sqrt(-5)) if not a unique factorization domain. Yet the code below:</p>
<pre><code>K.<z> = NumberField( x^2+5 )
print( K.is_unique_factorization_domain( ) )
print( K.is_euclidean_domain() )
print( K.class_group(proof=False) )
</code></pre>
<p>suggests that it is, but has the non-trivil ideal class group, which is a contradiction (K cannot be neither UFD or Euclidean domain if it is not the Principal ideal domain - but it isn't due to the nontrivial class group). </p>
<p>The output of the code is:</p>
<pre><code>True
True
Class group of order 2 with structure C2 of Number Field in z with defining polynomial x^2 + 5
</code></pre>
<p>Am I doing it wrong? How do I check whether field is UFD correctly?</p>
https://ask.sagemath.org/question/64545/sage-fails-to-check-if-numberfield-is-ufd/?answer=64548#post-id-64548In a field there are no nonzero non-invertible elements.
Being "unique factorisation" or "euclidean" depends on properties of such elements.
Better ask such questions about the ring of integers of that field:
sage: OK = K.ring_of_integers()
sage: OK in UniqueFactorizationDomains
False
sage: OK in EuclideanDomains
False
Fri, 21 Oct 2022 16:33:13 +0200https://ask.sagemath.org/question/64545/sage-fails-to-check-if-numberfield-is-ufd/?answer=64548#post-id-64548