looks weird to me.
I cc this to sage-nt, just in case.
>
> This is reversed from how I might imagine it should work.
> I expect that QQ[x]/m(x) is abstractly defined, not necessarily
> embedded into CC.
> On the other hand QQ[ a ] for some algebraic number a is a specific
> embedding.
>
> In the case of deg m(x) = 2 there is only one embedding into CC, so I
> can see
> that sage might consider QQ[2^(1/2)] and NumberField(x^2-2) to be
> equal.
> (although there are two embeddings!)
>
> For x^3-2 there is more than one embedding into CC, so I would not
> expect
> sage to consider the two constructions equal.
>
> My main motivation is that I want to illustrate the theory of number
> fields with
> my students, including subtleties like the difference between a field,
> defined
> as the quotient of a polynomial ring, and a particular embedding.
> In sage there are often many ways to construct the same object.
> In some cases they are pseudonyms, in others there are fine
> distinctions,
> which can lead to confusion. I want to make this as smooth as
> possible
> for my students.
>
> Thanks in advance for any insight offered.
>
> Mike
Dima
This is because "b" in K.<b> = ... is not really used in the
construction of QQ[2^(1/3)]:
sage: QQ[2^(1/3)]
Number Field in a with defining polynomial x^3 - 2
So QQ[2^(1/3)] constructs a number field with generator name "a" and
defining polynomial x^3-2. As you already have a field with generator
name "a" and polynomial x^3-2, they are identified. The fact that you
supplied the letter "b" is not used (which I think is a bug):
sage: K.<b> = QQ[2^(1/3)]
sage: K
Number Field in a with defining polynomial x^3 - 2
sage: b
a
>> sage: F.<a> = NumberField(x^2-2)
>> sage: K.<b> = QQ[2^(1/2)]
>> sage: F == K
>> False
Here it is slightly different. The number 2^(1/2) is sqrt(2), and Sage
then does not use the generic name "a", but the more useful name "sqrt2":
sage: QQ[2^(1/2)]
Number Field in sqrt2 with defining polynomial x^2 - 2
This time, F and K do not have the same generator name ("a" versus
"sqrt2").
If you now type
sage: L.<sqrt2> = NumberField(x^2-2)
sage: L == K
True
So it does matter what you name the variable. Testing equality of number
fields in Sage here just means: are variable names, defining polynomials
equal?