Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/manifolds/differentiable/tangent_space.py: WIP isomorphism w…
Browse files Browse the repository at this point in the history
…ith inner product space
  • Loading branch information
Matthias Koeppe committed Aug 28, 2022
1 parent d341422 commit 368ded7
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions src/sage/manifolds/differentiable/tangent_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,65 @@ class TangentSpace(FiniteRankFreeModule):
sage: p2 == p
True
An isomorphism of the tangent space with an inner product space with distinguished basis::
sage: g = M.metric('g')
sage: g[:] = ((1, 0), (0, 1))
sage: Q_Tp_xy = g[c_xy.frame(),:](*p.coordinates(c_xy)); Q_Tp_xy
[1 0]
[0 1]
sage: W_Tp_xy = VectorSpace(SR, 2, inner_product_matrix=Q_Tp_xy)
sage: Tp.bases()[0]
Basis (∂/∂x,∂/∂y) on the Tangent space at Point p on the 2-dimensional differentiable manifold M
sage: phi_Tp_xy = Tp.isomorphism_with_fixed_basis(Tp.bases()[0], codomain=W_Tp_xy); phi_Tp_xy
Generic morphism:
From: Tangent space at Point p on the 2-dimensional differentiable manifold M
To: Ambient quadratic space of dimension 2 over Symbolic Ring
Inner product matrix:
[1 0]
[0 1]
sage: Q_Tp_uv = g[c_uv.frame(),:](*p.coordinates(c_uv)); Q_Tp_uv
[1/2 0]
[ 0 1/2]
sage: W_Tp_uv = VectorSpace(SR, 2, inner_product_matrix=Q_Tp_uv)
sage: Tp.bases()[1]
Basis (∂/∂u,∂/∂v) on the Tangent space at Point p on the 2-dimensional differentiable manifold M
sage: phi_Tp_uv = Tp.isomorphism_with_fixed_basis(Tp.bases()[1], codomain=W_Tp_uv); phi_Tp_uv
Generic morphism:
From: Tangent space at Point p on the 2-dimensional differentiable manifold M
To: Ambient quadratic space of dimension 2 over Symbolic Ring
Inner product matrix:
[1/2 0]
[ 0 1/2]
sage: t1, t2 = Tp.tensor((1,0)), Tp.tensor((1,0))
sage: t1[:] = (8, 15)
sage: t2[:] = (47, 11)
sage: t1[Tp.bases()[0],:]
[8, 15]
sage: phi_Tp_xy(t1), phi_Tp_xy(t2)
((8, 15), (47, 11))
sage: phi_Tp_xy(t1) * phi_Tp_xy(t2)
541
sage: Tp.change_of_basis(Tp.bases()[0], Tp.bases()[1])
Traceback (most recent call last): # ???
...
ValueError: the change of basis from 'Basis (∂/∂x,∂/∂y) on the Tangent space at Point p on the 2-dimensional differentiable manifold M' to 'Basis (∂/∂u,∂/∂v) on the Tangent space at Point p on the 2-dimensional differentiable manifold M' cannot be computed
sage: t1[Tp.bases()[1],:] # ???
Traceback (most recent call last):
...
ValueError: no basis could be found for computing the components in the Basis (∂/∂u,∂/∂v) on the Tangent space at Point p on the 2-dimensional differentiable manifold M
sage: phi_Tp_uv(t1), phi_Tp_uv(t2)
Traceback (most recent call last):
...
ValueError: no basis could be found for computing the components in the Basis (∂/∂u,∂/∂v) on the Tangent space at Point p on the 2-dimensional differentiable manifold M
sage: phi_Tp_uv(t1) * phi_Tp_uv(t2)
Traceback (most recent call last):
...
ValueError: no basis could be found for computing the components in the Basis (∂/∂u,∂/∂v) on the Tangent space at Point p on the 2-dimensional differentiable manifold M
.. SEEALSO::
:class:`~sage.tensor.modules.finite_rank_free_module.FiniteRankFreeModule`
Expand Down

0 comments on commit 368ded7

Please sign in to comment.