Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance sage.tensor to support general rectangular arrays #38247

Open
amanmoon opened this issue Jun 20, 2024 · 0 comments · May be fixed by #38249
Open

Enhance sage.tensor to support general rectangular arrays #38247

amanmoon opened this issue Jun 20, 2024 · 0 comments · May be fixed by #38249
Labels
c: linear algebra gsoc: 2024 Tag for GSoC2024 issues/PRs

Comments

@amanmoon
Copy link
Contributor

amanmoon commented Jun 20, 2024

Problem Description

The current implementation of sage.tensor only supports tensors of the form (M*) k (x) (M) l
We propose to lift this restriction and enable the creation of more general rectangular tensors.

Proposed Solution

  1. Make the self._fmodule argument in the TensorFreeModule.__init__ and FreeModuleTensor.__init__ class to store all the modules used in the creation of the tensor product module as a tuple.
  2. Modify all the methods in sage.tensor keeping the above changes in mind.
  3. Make the self._tensor_type argument conditional, it will not be initiated when the user creates tensor product of different modules.

The final API should look as follows:

N = FiniteRankFreeModule(ZZ, 3, name='N')
M = FiniteRankFreeModule(ZZ, 4, name='M')
T = tensor([N, N.dual(), M, M.dual()]) # this will be of type TensorFreeModule_with_category
t = T.element() # this will construct an element on T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: linear algebra gsoc: 2024 Tag for GSoC2024 issues/PRs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants