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?