On Jan 17, 12:16 am, Ben Linowitz <benjamin.linow...@gmail.com> wrote:
> Sorry about that. I was thinking of the number fields as being
> subfields of C by definition. What if each of the number fields came
> with a specified embedding into C?
>
> Ben

I am not sure for the case of embeddings into C, I would compute a
common superfield of L and K instead. Then, I would compute QQ-
generators of L and K, for  example, as powers of a primitive element.
I would write these basis as VectorSpaces and intersect them.

toy example:

K generated by sqrt(2)+sqrt(5)
L generated by sqrt(2)+sqrt(3)

{{{
sage: KL=QQ[sqrt(2), sqrt(3), sqrt(5)]
sage: KL.inject_variables()
Defining sqrt2, sqrt3, sqrt5
sage: genK = sqrt2+sqrt5
sage: genK.minpoly().degree()
4
sage: genL=sqrt2+sqrt3
sage: genL.minpoly().degree()
4
sage: V, V_to_KL, KL_to_V = KL.absolute_vector_space()
sage: V
Vector space of dimension 8 over Rational Field
sage: Kspace = V.subspace(map(KL_to_V, [genK**i for i in range(4)]))
sage: Lspace = V.subspace(map(KL_to_V, [genL**i for i in range(4)]))
sage: K_cap_L = Kspace.intersection(Lspace)
sage: K_cap_L
Vector space of degree 8 and dimension 2 over Rational Field
Basis matrix:
[     1      0      0      0      0      0      0      0]
[     0      1      0 -7/120      0 -7/240      0  1/960]
sage: map(V_to_KL, K_cap_L.basis())
[1, 3/5*sqrt2]
}}}

It happens that the intersection of K and L is generated over QQ by 1
and by 3/5*sqrt(2). The intersection is QQ[sqrt2]

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to