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

Commit

Permalink
TensorFreeModule.basis: Add example from egourgoulhon
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Aug 29, 2022
1 parent 1e7430a commit 046887c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/sage/tensor/modules/tensor_free_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,24 @@ def basis(self, symbol, latex_symbol=None, from_family=None,
e_1⊗e_1
e_1⊗e_2 + e_2⊗e_1
e_2⊗e_2
sage: M = FiniteRankFreeModule(ZZ, 2)
sage: e = M.basis('e')
sage: f = M.basis('f', from_family=(-e[1], e[0]))
sage: for b in f: b.display()
f_0 = -e_1
f_1 = e_0
sage: S = M.tensor_module(2, 0, sym=(0,1))
sage: fS = S.basis('f')
sage: for b in fS: b.display()
e_1⊗e_1
-e_0⊗e_1 - e_1⊗e_0
e_0⊗e_0
sage: for b in fS: b.display(f)
f_0⊗f_0
f_0⊗f_1 + f_1⊗f_0
f_1⊗f_1
"""
return TensorFreeSubmoduleBasis_sym(self, symbol=symbol, latex_symbol=latex_symbol,
indices=indices, latex_indices=latex_indices,
Expand Down

0 comments on commit 046887c

Please sign in to comment.