8324 | | """ |

8325 | | Return True if the cyclotomic field self is isomorphic as a number |

8326 | | field to other. |

8327 | | |

8328 | | EXAMPLES:: |

8329 | | |

8330 | | sage: CyclotomicField(11).is_isomorphic(CyclotomicField(22)) |

8331 | | True |

8332 | | sage: CyclotomicField(11).is_isomorphic(CyclotomicField(23)) |

8333 | | False |

8334 | | sage: CyclotomicField(3).is_isomorphic(NumberField(x^2 + x +1, 'a')) |

8335 | | True |

8336 | | """ |

8337 | | if not isinstance(other, NumberField_generic): |

8338 | | raise ValueError, "other must be a generic number field." |

8339 | | return self.Hom(other).order() > 0 |

8340 | | |

| 8324 | """ |

| 8325 | Return True if the cyclotomic field self is isomorphic as a number |

| 8326 | field to other. |

| 8327 | |

| 8328 | EXAMPLES:: |

| 8329 | |

| 8330 | sage: CyclotomicField(11).is_isomorphic(CyclotomicField(22)) |

| 8331 | True |

| 8332 | sage: CyclotomicField(11).is_isomorphic(CyclotomicField(23)) |

| 8333 | False |

| 8334 | sage: CyclotomicField(3).is_isomorphic(NumberField(x^2 + x +1, 'a')) |

| 8335 | True |

| 8336 | sage: CyclotomicField(18).is_isomorphic(CyclotomicField(9)) |

| 8337 | True |

| 8338 | sage: CyclotomicField(10).is_isomorphic(NumberField(x^4 - x^3 + x^2 - x + 1, 'b')) |

| 8339 | True |

| 8340 | |

| 8341 | Check :trac:`14300`:: |

| 8342 | |

| 8343 | sage: K = CyclotomicField(4) |

| 8344 | sage: N = K.extension(x^2-5, 'z') |

| 8345 | sage: K.is_isomorphic(N) |

| 8346 | False |

| 8347 | sage: K.is_isomorphic(CyclotomicField(8)) |

| 8348 | False |

| 8349 | """ |

| 8350 | if is_CyclotomicField(other): |

| 8351 | return self.zeta_order() == other.zeta_order() |

| 8352 | return NumberField_generic.is_isomorphic(self, other) |

| 8353 | |