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

Tensor product and coefficients #24900

Open
hivert opened this issue Mar 5, 2018 · 11 comments
Open

Tensor product and coefficients #24900

hivert opened this issue Mar 5, 2018 · 11 comments

Comments

@hivert
Copy link

hivert commented Mar 5, 2018

Tensor products of combinatorial free modules still use an old version of
cartesian product. As a consequence extracting a coefficient is not possible:

sage: F = CombinatorialFreeModule(ZZ, [1,2]); F.__custom_name = "F"
sage: G = CombinatorialFreeModule(ZZ, [3,4]); G.__custom_name = "G"
sage: T = tensor([F, G]); T
sage: T.basis()[(1,3)].coefficient((1,3))
...
NotImplementedError:

I fix that. As a side effect, this change the result of an_element so that I
have to fix a few doctests.

Moreover, building the tensor of two infinite dimensional FM now raises a correct
warning:

sage: F = CombinatorialFreeModule(ZZ, NN)
sage: T = tensor([F, F]); T
Free module generated by Non negative integer semiring over Integer Ring ⊗ Free module generated by Non negative integer semiring over Integer Ring
sage: T.an_element()
/home/data/Sage-Install/sage-dev/local/lib/python2.7/site-packages/sage/categories/sets_cat.py:2159: UserWarning: Sage is not able to determine whether the factors of this Cartesian product are finite. The lexicographic ordering might not go through all elements.
  warn("Sage is not able to determine whether the factors of "
2*B[0] ⊗ B[1] + B[0] ⊗ B[0] + 3*B[0] ⊗ B[2] + B[42] ⊗ B[42]

I'm hiding this by asking only finite dim FM.

Depends on #19195

CC: @nthiery @tscrim @mkoeppe

Component: linear algebra

Keywords: tensor product, free modules

Author: Florent Hivert

Branch/Commit: public/cartesian_24900 @ bfa36e7

Issue created by migration from https://trac.sagemath.org/ticket/24900

@hivert hivert added this to the sage-8.2 milestone Mar 5, 2018
@hivert
Copy link
Author

hivert commented Mar 5, 2018

@hivert
Copy link
Author

hivert commented Mar 5, 2018

Author: Florent Hivert

@hivert
Copy link
Author

hivert commented Mar 5, 2018

Commit: 009c70a

@hivert
Copy link
Author

hivert commented Mar 5, 2018

New commits:

009c70aFix tensor prod. using old cartesian prod.

@fchapoton
Copy link
Contributor

comment:3

many failing doctests

@fchapoton
Copy link
Contributor

comment:6

rebased, just to see where this stands now


New commits:

29190d3Fix tensor prod. using old cartesian prod.

@fchapoton
Copy link
Contributor

Changed commit from 009c70a to 29190d3

@fchapoton
Copy link
Contributor

@fchapoton fchapoton modified the milestones: sage-8.2, sage-9.7 Aug 22, 2022
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 23, 2022

Changed commit from 29190d3 to bfa36e7

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 23, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

bfa36e7fix one doctest

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 30, 2022

Dependencies: #19195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants