Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Pullback of ideals

Hi. I have the the following question and I hope that somebody of you has a good idea for the implementation and an explanation of the error.

Offset: - A number field K (in general non Galois) - L the Galois closure of K - phi: K --> L an arbitrary embedding of K into L - I a fractional ideal in K and IL = phi(I)

Question: Compute the pullback of IL for general fractional ideals of K!

My approach:

  • Let V, W be two QQ vector spaces and f: V --> W a linear map (morphism). Let further V' and W' be subspaces of V and W.

  • The aim is to identify the subspace V' = f^(-1)(W') as the preimage of W' under f.

  • Let p: V x W' --> W be a linear map definied by (v,w')|--> f(v) - w' with

    ker(p):={(v,w')in V x W'| f(v)-w' = 0_W} = {(v,w'): f(v) = w'}.

Such vectors v are the vectors in the preimage of W'.

def inverseImage(IL, K, phi):
    ZK = K.maximal_order()
    dK = K.degree()
    BZK = ZK.basis()
    M = Matrix(QQ, [ list(phi(b)) for b in BZK ])
    BJ = IL.basis()
    N = Matrix(QQ, [ list(b) for b in BJ ])
    vs = M.stack(N).integer_kernel().basis()

    BI = [ sum([ v[i]*BZK[i] for i in [0..(dK - 1)] ]) for v in vs ]
    IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
    return IK

EXAMPLE 1:

sage: K = NumberField(x^6 - 2x^5 - 6x^3 + 151x^2 + 76x + 861, 'a')

sage: L. = K.galois_closure()

sage: phi = K.embeddings(L)[1]

sage: I = K.fractional_ideal([129, x - 54])

sage: I_ = inverseImage(IL, K, phi)

sage: I_ == I

TRUE

EXAMPLE 2 (and the first problem, loosing the denominator)

sage: I = K.fractional_ideal([2/3])

sage: I

Fractional ideal (2/3)

sage: I_ = inverseImage(phi(I), K, phi)

sage: I_

Fractional ideal (2)

sage: I == I_

FALSE

My improvement approach:

...
num_IL = IL.numerator().gens()[0]
denom_IL = IL.denominator().gens()[0]
IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
return IK

Now EXAMPLE 2 returns the corresponding fractional ideal I_ BUT with an incorrect ideal I_ in EXAMPLE 1. Thanks for helping!

Pullback of ideals

Hi. I have the the following question and I hope that somebody of you has a good idea for the implementation and an explanation of the error.

Offset: - :

  • A number field K (in general non Galois) - Galois)

  • L the Galois closure of K - K

  • phi: K --> L an arbitrary embedding of K into L - L

  • I a fractional ideal in K and IL = phi(I)

Question: Compute the pullback of IL for general fractional ideals of K!

My approach:

  • Let V, W be two QQ vector spaces and f: V --> W a linear map (morphism). Let further V' and W' be subspaces of V and W.

  • The aim is to identify the subspace V' = f^(-1)(W') as the preimage of W' under f.

  • Let p: V x W' --> W be a linear map definied by (v,w')|--> f(v) - w' with

    ker(p):={(v,w')in V x W'| f(v)-w' = 0_W} = {(v,w'): f(v) = w'}.

Such vectors v are the vectors in the preimage of W'.

def inverseImage(IL, K, phi):
    ZK = K.maximal_order()
    dK = K.degree()
    BZK = ZK.basis()
    M = Matrix(QQ, [ list(phi(b)) for b in BZK ])
    BJ = IL.basis()
    N = Matrix(QQ, [ list(b) for b in BJ ])
    vs = M.stack(N).integer_kernel().basis()

    BI = [ sum([ v[i]*BZK[i] for i in [0..(dK - 1)] ]) for v in vs ]
    IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
    return IK

EXAMPLE 1:

sage: K = NumberField(x^6 - 2x^5 2*x^5 - 6x^3 6*x^3 + 151x^2 151*x^2 + 76x 76*x + 861, 'a')

sage: L. = K.galois_closure()

'a') sage: L.<b> = K.galois_closure() sage: phi = K.embeddings(L)[1]

K.embeddings(L)[1] sage: I = K.fractional_ideal([129, x - 54])

54]) sage: I_ = inverseImage(IL, K, phi)

phi) sage: I_ == I

TRUE

I TRUE

EXAMPLE 2 (and the first problem, loosing the denominator)

sage: I = K.fractional_ideal([2/3]) 

sage: I

sage: I Fractional ideal (2/3)

(2/3) sage: I_ = inverseImage(phi(I), K, phi)

sage: I_

phi) sage: I_ Fractional ideal (2)

(2) sage: I == I_

FALSE

I_ FALSE

My improvement approach:

...
num_IL = IL.numerator().gens()[0]
denom_IL = IL.denominator().gens()[0]
IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
return IK

Now EXAMPLE 2 returns the corresponding fractional ideal I_ BUT with an incorrect ideal I_ in EXAMPLE 1. Thanks for helping!

Pullback of ideals

Hi. I have the the following question and I hope that somebody of you has a good idea for the implementation and an explanation of the error.

Offset:

  • A number field K (in general non Galois)

  • L the Galois closure of K

  • phi: K --> L an arbitrary embedding of K into L

  • I a fractional ideal in K and IL = phi(I)

Question: Compute How to compute the pullback of IL for general fractional ideals of K!K?

My approach:

  • Let V, W be two QQ vector spaces and f: V --> W a linear map (morphism). Let further V' and W' be subspaces of V and W.

  • The aim is to identify the subspace V' = f^(-1)(W') as the preimage of W' under f.

  • Let p: V x W' --> W be a linear map definied by (v,w')|--> f(v) - w' with

    ker(p):={(v,w')in V x W'| f(v)-w' = 0_W} = {(v,w'): f(v) = w'}.

Such vectors v are the vectors in the preimage of W'.

def inverseImage(IL, K, phi):
    ZK = K.maximal_order()
    dK = K.degree()
    BZK = ZK.basis()
    M = Matrix(QQ, [ list(phi(b)) for b in BZK ])
    BJ = IL.basis()
    N = Matrix(QQ, [ list(b) for b in BJ ])
    vs = M.stack(N).integer_kernel().basis()

    BI = [ sum([ v[i]*BZK[i] for i in [0..(dK - 1)] ]) for v in vs ]
    IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
    return IK

EXAMPLE 1:

sage: K = NumberField(x^6 - 2*x^5 - 6*x^3 + 151*x^2 + 76*x + 861, 'a')
sage: L.<b> = K.galois_closure()
sage: phi = K.embeddings(L)[1]
sage: I = K.fractional_ideal([129, x - 54])
sage: I_ = inverseImage(IL, K, phi)
sage: I_ == I
TRUE

EXAMPLE 2 (and the first problem, loosing the denominator)

sage: I = K.fractional_ideal([2/3]) 
sage: I
Fractional ideal (2/3)
sage: I_ =  inverseImage(phi(I), K, phi)
sage: I_
Fractional ideal (2)
sage: I == I_
FALSE

My improvement approach:

...
num_IL = IL.numerator().gens()[0]
denom_IL = IL.denominator().gens()[0]
IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
return IK

Now EXAMPLE 2 returns the corresponding fractional ideal I_ BUT with an incorrect ideal I_ in EXAMPLE 1. Thanks for helping!

Pullback of ideals

Hi. I have the the following question and I hope that somebody of you has a good idea for the implementation and an explanation of the error.

Offset:

  • A number field K (in general non Galois)

  • L the Galois closure of K

  • phi: K --> L an arbitrary embedding of K into L

  • I a fractional ideal in K and IL = phi(I)

Question: How to compute the pullback of IL for general (general) fractional ideals of K?

My approach:

  • Let V, W be two QQ vector spaces and f: V --> W a linear map (morphism). Let further V' and W' be subspaces of V and W.

  • The aim is to identify the subspace V' = f^(-1)(W') as the preimage of W' under f.

  • Let p: V x W' --> W be a linear map definied by (v,w')|--> f(v) - w' with

    ker(p):={(v,w')in V x W'| f(v)-w' = 0_W} = {(v,w'): f(v) = w'}.

Such vectors v are the vectors in the preimage of W'.

def inverseImage(IL, K, phi):
    ZK = K.maximal_order()
    dK = K.degree()
    BZK = ZK.basis()
    M = Matrix(QQ, [ list(phi(b)) for b in BZK ])
    BJ = IL.basis()
    N = Matrix(QQ, [ list(b) for b in BJ ])
    vs = M.stack(N).integer_kernel().basis()

    BI = [ sum([ v[i]*BZK[i] for i in [0..(dK - 1)] ]) for v in vs ]
    IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
    return IK

EXAMPLE 1:

sage: K = NumberField(x^6 - 2*x^5 - 6*x^3 + 151*x^2 + 76*x + 861, 'a')
sage: L.<b> = K.galois_closure()
sage: phi = K.embeddings(L)[1]
sage: I = K.fractional_ideal([129, x - 54])
sage: I_ = inverseImage(IL, K, phi)
sage: I_ == I
TRUE

EXAMPLE 2 (and the first problem, loosing the denominator)

sage: I = K.fractional_ideal([2/3]) 
sage: I
Fractional ideal (2/3)
sage: I_ =  inverseImage(phi(I), K, phi)
sage: I_
Fractional ideal (2)
sage: I == I_
FALSE

My improvement approach:

...
num_IL = IL.numerator().gens()[0]
denom_IL = IL.denominator().gens()[0]
IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
return IK

Now EXAMPLE 2 returns the corresponding fractional ideal I_ BUT with an incorrect ideal I_ in EXAMPLE 1. Thanks for helping!

click to hide/show revision 5
retagged

Pullback of ideals

Hi. I have the the following question and I hope that somebody of you has a good idea for the implementation and an explanation of the error.

Offset:

  • A number field K (in general non Galois)

  • L the Galois closure of K

  • phi: K --> L an arbitrary embedding of K into L

  • I a fractional ideal in K and IL = phi(I)

Question: How to compute the pullback of IL for (general) fractional ideals of K?

My approach:

  • Let V, W be two QQ vector spaces and f: V --> W a linear map (morphism). Let further V' and W' be subspaces of V and W.

  • The aim is to identify the subspace V' = f^(-1)(W') as the preimage of W' under f.

  • Let p: V x W' --> W be a linear map definied by (v,w')|--> f(v) - w' with

    ker(p):={(v,w')in V x W'| f(v)-w' = 0_W} = {(v,w'): f(v) = w'}.

Such vectors v are the vectors in the preimage of W'.

def inverseImage(IL, K, phi):
    ZK = K.maximal_order()
    dK = K.degree()
    BZK = ZK.basis()
    M = Matrix(QQ, [ list(phi(b)) for b in BZK ])
    BJ = IL.basis()
    N = Matrix(QQ, [ list(b) for b in BJ ])
    vs = M.stack(N).integer_kernel().basis()

    BI = [ sum([ v[i]*BZK[i] for i in [0..(dK - 1)] ]) for v in vs ]
    IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
    return IK

EXAMPLE 1:

sage: K = NumberField(x^6 - 2*x^5 - 6*x^3 + 151*x^2 + 76*x + 861, 'a')
sage: L.<b> = K.galois_closure()
sage: phi = K.embeddings(L)[1]
sage: I = K.fractional_ideal([129, x - 54])
sage: I_ = inverseImage(IL, K, phi)
sage: I_ == I
TRUE

EXAMPLE 2 (and the first problem, loosing the denominator)

sage: I = K.fractional_ideal([2/3]) 
sage: I
Fractional ideal (2/3)
sage: I_ =  inverseImage(phi(I), K, phi)
sage: I_
Fractional ideal (2)
sage: I == I_
FALSE

My improvement approach:

...
num_IL = IL.numerator().gens()[0]
denom_IL = IL.denominator().gens()[0]
IK = ZK.fractional_ideal([num_IL/denom_IL, BI])
return IK

Now EXAMPLE 2 returns the corresponding fractional ideal I_ BUT with an incorrect ideal I_ in EXAMPLE 1. Thanks for helping!