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

Use Vector_symbolic_dense also for symbolic subrings of SR, not just SR #31999

Open
mkoeppe opened this issue Jun 17, 2021 · 11 comments
Open

Use Vector_symbolic_dense also for symbolic subrings of SR, not just SR #31999

mkoeppe opened this issue Jun 17, 2021 · 11 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 17, 2021

(split out from #31982)

We change the function sage.modules.free_module.element_class so that it uses the element class Vector_symbolic_dense not only for free modules over the ring SR but also for free modules over subrings of SR such as the symbolic constants ring.

In fact, we dispatch through a new method _free_module_element_class_dense.

CC: @egourgoulhon @mjungmath @tscrim

Component: symbolics

Author: Matthias Koeppe

Branch/Commit: u/mkoeppe/use_vector_symbolic_dense_for_all_symbolic_rings__not_just_sr @ 52396f4

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

@mkoeppe mkoeppe added this to the sage-9.4 milestone Jun 17, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 17, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 17, 2021

New commits:

a1eccc9sage.modules.free_module.element_class: Use Vector_callable_symbolic_dense also for whose modules over rings whose base rings are symbolic rings/subrings
dbfe7acsrc/sage/modules/free_module.py: Update copyright years according to 'git blame -w --date=format:%Y src/sage/modules/free_module.py | sort -k2'
cfd813bsage.modules.free_module.element_class: For rings with SR base ring, delegate to new method _free_module_element_class_dense
278aa2bCallableSymbolicExpressionRing_class: Fix doctest
e33586dVector_symbolic_dense: Fix pickling

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 17, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 17, 2021

Commit: e33586d

@tscrim
Copy link
Collaborator

tscrim commented Jun 17, 2021

comment:3

What about if we have something like R = SR['t']['x']? Then the base ring of R is SR['t'], which is not SR. How do you want to handle that?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2021

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

52396f4sage.modules.free_module.element_class: Do not handle the case of rings whose base rings are symbolic

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2021

Changed commit from e33586d to 52396f4

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 18, 2021

comment:5

OK, this needs more thought. For now I have reduced the scope of the ticket. Ready for review.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Use Vector_symbolic_dense for all symbolic rings, not just SR Use Vector_symbolic_dense also for symbolic subrings of SR, not just SR Jun 18, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2021

comment:7

The pickling error first observed in #31982 unsurprisingly also shows up here:

sage -t --long --random-seed=0 src/sage/algebras/lie_algebras/quotient.py  # 1 doctest failed
sage -t --long --random-seed=0 src/sage/modules/free_module_element.pyx  # 1 doctest failed

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 19, 2021

comment:8

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 2, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe mkoeppe removed this from the sage-10.0 milestone Mar 16, 2023
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

2 participants