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

Commit

Permalink
FiniteRankFreeModule_abstract.isomorphism_with_fixed_basis: Add examp…
Browse files Browse the repository at this point in the history
…le with codomain= tensor square of a CombinatorialFreeModule
  • Loading branch information
Matthias Koeppe committed Aug 27, 2022
1 parent dafd47d commit c354770
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/sage/tensor/modules/finite_rank_free_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,23 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None):
[2 4 5]
[3 5 6]
Sending tensors to elements of the tensor square of :class:`CombinatorialFreeModule`::
sage: T20 = V.tensor_module(2, 0); T20
Free module of type-(2,0) tensors on the 3-dimensional vector space over the Rational Field
sage: e_T20 = T02.basis("e"); e_T20
<sage.tensor.modules.tensor_free_submodule_basis.TensorFreeSubmoduleBasis_comp_with_category object at 0x7fc9b93d1d60>
sage: W = CombinatorialFreeModule(QQ, [1, 2, 3]).tensor_square(); W
Free module generated by {1, 2, 3} over Rational Field # Free module generated by {1, 2, 3} over Rational Field
sage: phi_e_T20 = T20.isomorphism_with_fixed_basis(e_T20, codomain=W); phi_e_T20
Generic morphism:
From: Free module of type-(2,0) tensors on the 3-dimensional vector space over the Rational Field
To: Free module generated by {1, 2, 3} over Rational Field # Free module generated by {1, 2, 3} over Rational Field
sage: t = T20.an_element(); t.display()
1/2 e_1⊗e_1
sage: phi_e_T20(t)
1/2*B[1] # B[1]
TESTS::
sage: V = FiniteRankFreeModule(QQ, 3); V
Expand Down

0 comments on commit c354770

Please sign in to comment.