sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.42k stars 478 forks source link

is_subring is returning false negatives for number fields #15878

Open a32a02b0-cb97-434b-855a-6f35619c0d03 opened 10 years ago

a32a02b0-cb97-434b-855a-6f35619c0d03 commented 10 years ago

For example (each example was computed on the cloud):

K.<b> = NumberField(x^6 -325*x^5 + 5518*x^4 + 3655*x^3 + 718*x^2 + 51*x + 1)
F.<alpha,beta> = NumberField([x^2 - 21,x^3 + x^2 -2*x - 1])
FF.<gamma> = F.absolute_field()
FF.is_isomorphic(K)

Returns true while

FF.is_subring(K)

Returns false.

Perhaps we need to have a proper subring? No, that's still a problem.

L.<e> = NumberField(c^2 +3)
CyclotomicField(3).is_subring(L)

and

C.<z> = CyclotomicField(21)
K.is_subring(C)

Both return false, even though

L.is_isomorphic(C)

Returns true. Perhaps this is related to the fact that

K.is_subring(L)

Returns a NotImplementedError? Of course a full resolution to these errors would be better, but throwing up a NotImplementedError in each case would be much better.

CC: @sagetrac-jakobkroeker

Component: commutative algebra

Keywords: rings, homset

Stopgaps: wrongAnswerMarker

Issue created by migration from https://trac.sagemath.org/ticket/15878

orlitzky commented 10 years ago
comment:3

Maybe we could also fix the following at the same time?

sage: QQbar.is_subring(QQbar)
...
NotImplementedError

sage: RR.is_subring(RR)
..
NotImplementedError

sage: CC.is_subring(CC)
..
NotImplementedError

etc.

nbruin commented 10 years ago
comment:4

I propose this to close as "won't fix/not valid" for the reason that if R is isomorphic to a subring of S, we don't have that R is canonically identified with a subring of S. There can be a choice of isomorphism.

It may be OK to consider R a subring of S if sage has an injective coercion from R to S registered, but I'm not even sure this should always be the case even then.

orlitzky commented 10 years ago
comment:5

I opened #17287 separately for my issue, just in case.

ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 7 years ago

Stopgaps: wrongAnswerMarker