ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 22 Feb 2018 01:11:59 +0100Pullback from a transition_maphttps://ask.sagemath.org/question/41228/pullback-from-a-transition_map/Hi All,
I seem to be unable to pullback a differential form from a transition_map, although the transition_map has all the information to calculate the pullback:
sage: Space = Manifold(3, 'Space', start_index=1)
sage: cartesian3d.<x, y, z> = Space.chart()
sage: spherical.<rho, theta, phi> = Space.chart(r'rho:(0,+oo):\rho theta:(0,pi):\theta phi:(0,2*pi):\phi')
sage: C2S = spherical.transition_map(cartesian3d, [rho*sin(theta)*cos(phi), rho*sin(theta)*sin(phi), rho*cos(theta)])
sage: tau = Space.diff_form(3, 'tau', latex_name=r'\tau')
sage: tau[1,2,3] = 1
sage: Ptau = C2S.pullback(tau)
AttributeError: 'DiffCoordChange' object has no attribute 'pullback'
Why is that?
Is there any way to coerce a transition_map to become a diff_map?
Thanks,
Daniel
danielvolinskiThu, 22 Feb 2018 01:11:59 +0100https://ask.sagemath.org/question/41228/Pullback of idealshttps://ask.sagemath.org/question/41171/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!bdSun, 18 Feb 2018 15:15:17 +0100https://ask.sagemath.org/question/41171/Pullback computation hanginghttps://ask.sagemath.org/question/40852/pullback-computation-hanging/ I have the following code:
M = Manifold(3, 'M')
X.<x,y,z> = M.chart()
N = Manifold(3, 'N')
XN.<a,b1,b2> = N.chart()
omega = N.diff_form(2)
omega[0,1] = 2*b2/a^3
omega[0,2] = -2*b1/a^3
omega[1,2] = -2/a^2
Then I define a map M to N.
r = sqrt(x^2+y^2+z^2)
t = var('t', domain='real')
STSa = r^(1/2)*(r*cosh(2*r*t) - z*sinh(2*r*t))^(-1/2)
STSb1 = (x*sinh(2*r*t)/r)*STSa
STSb2 = (y*sinh(2*r*t)/r)*STSa
STS = M.diffeomorphism(N, [STSa, STSb1, STSb2])
Finally, I attempt to compute the pullback of omega to M by the map STS:
s = STS.pullback(omega)
Unfortunately, the program runs and runs and nothing ever comes out. Can anyone identify the issue? Of course, the Jacobian of the map STS will not be very nice, but this pullback should be perfectly computable.
Jeremy LaneMon, 29 Jan 2018 17:30:09 +0100https://ask.sagemath.org/question/40852/Pullback computation is hanging.https://ask.sagemath.org/question/40851/pullback-computation-is-hanging/ I have the following code:
M = Manifold(3, 'M')
X.<x,y,z> = M.chart()
N = Manifold(3, 'N')
XN.<a,b1,b2> = N.chart()
omega = N.diff_form(2)
omega[0,1] = 2*b2/a^3
omega[0,2] = -2*b1/a^3
omega[1,2] = -2/a^2
Then I define a map M to N.
r = sqrt(x^2+y^2+z^2)
t = var('t', domain='real')
STSa = r^(1/2)*(r*cosh(2*r*t) - z*sinh(2*r*t))^(-1/2)
STSb1 = (x*sinh(2*r*t)/r)*STSa
STSb2 = (y*sinh(2*r*t)/r)*STSa
STS = M.diffeomorphism(N, [STSa, STSb1, STSb2])
Finally, I attempt to compute the pullback of omega to M by the map STS:
s = STS.pullback(omega)
Unfortunately, the program runs and runs and nothing ever comes out. Can anyone identify the issue? Of course, the Jacobian of the map STS will not be very nice, but this pullback should be perfectly computable.
Jeremy LaneMon, 29 Jan 2018 17:28:30 +0100https://ask.sagemath.org/question/40851/differential form pullbackhttps://ask.sagemath.org/question/40623/differential-form-pullback/ Hi All,
I have a differential form defined in 3D Cartesian Coordinates
$\mathit{{\sigma}}=\frac{x\mathit{dy}\mathit{dz}}{a}-\frac{y\mathit{dx}\mathit{dz}}{a}$
and the following map
$g:\[{a}{\ast}\cos(\theta), {a}{\ast}\sin(\theta), z\]$
How do I calculate the pullback $g^{\ast}(\theta,z)$ of $\sigma$ in SageMath
I've seen all the documentation of pullback in "manifold.pdf" but I am unable to apply those examples to my case.
Thanks.
danielvolinskiMon, 15 Jan 2018 18:22:09 +0100https://ask.sagemath.org/question/40623/