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

Latex representation of WeylAlgebras omits polynomial parts #20582

Closed
vit-tucek mannequin opened this issue May 10, 2016 · 11 comments
Closed

Latex representation of WeylAlgebras omits polynomial parts #20582

vit-tucek mannequin opened this issue May 10, 2016 · 11 comments

Comments

@vit-tucek
Copy link
Mannequin

vit-tucek mannequin commented May 10, 2016

R.<x> = QQ[]
W = DifferentialWeylAlgebra(R)
W.inject_variables()
latex(x*dx)

produces

Defining x, dx
\frac{\partial}{\partial x}

CC: @tscrim @darijgr

Component: algebra

Keywords: Weyl Algebra

Author: Vít Tuček

Branch/Commit: 333811a

Reviewer: Travis Scrimshaw

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

@vit-tucek vit-tucek mannequin added this to the sage-7.3 milestone May 10, 2016
@vit-tucek vit-tucek mannequin added c: algebra labels May 10, 2016
@vit-tucek
Copy link
Mannequin Author

vit-tucek mannequin commented May 12, 2016

@vit-tucek
Copy link
Mannequin Author

vit-tucek mannequin commented May 12, 2016

Commit: 7b2bc21

@vit-tucek
Copy link
Mannequin Author

vit-tucek mannequin commented May 12, 2016

New commits:

7b2bc21Fix latex representation for elements of Weyl Algebras

@vit-tucek vit-tucek mannequin added the s: needs review label May 12, 2016
@vit-tucek vit-tucek mannequin modified the milestones: sage-7.3, sage-7.2 May 12, 2016
@vit-tucek
Copy link
Mannequin Author

vit-tucek mannequin commented May 12, 2016

comment:3

Is there a reason for duplicating the functionality of repr_lincomb of sage.misc.misc with repr_from_monomials?

@vit-tucek vit-tucek mannequin modified the milestones: sage-7.2, sage-7.3 May 17, 2016
@tscrim
Copy link
Collaborator

tscrim commented May 18, 2016

comment:6

Replying to @vit-tucek:

Is there a reason for duplicating the functionality of repr_lincomb of sage.misc.misc with repr_from_monomials?

IIRC, it had to do with the spacing. The repr_from_monomials was more of a clone of how polynomial rings printed their elements (of which, they do not currently outsource to a separate function), which had more spacing than repr_lincomb.

From looking at the code, your fix looks good. However I want to try to see if I can do some slight cleanup so it is easier to read before I set it to a positive review. (I will need a few days to do so.)

@tscrim
Copy link
Collaborator

tscrim commented May 20, 2016

@tscrim
Copy link
Collaborator

tscrim commented May 20, 2016

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented May 20, 2016

comment:7

I have pushed some changes in which I changed the logic to use join and (in my personal opinion) more understandable. If you agree with my changes, then you can set a positive review (with also adding your name to the authors field).


New commits:

ab48f85Merge branch 'u/vittucek/latex_representation_of_weylalgebras_omits_polynomial_parts' of trac.sagemath.org:sage into public/algebras/fix_weyl_algebra_latex-20582
787cf91Reverting back the conf_sub.py mode.
333811aMaking an attempt at a better latex generating function.

@tscrim
Copy link
Collaborator

tscrim commented May 20, 2016

Changed commit from 7b2bc21 to 333811a

@vit-tucek
Copy link
Mannequin Author

vit-tucek mannequin commented May 20, 2016

Author: Vít Tuček

@vbraun
Copy link
Member

vbraun commented May 21, 2016

Changed branch from public/algebras/fix_weyl_algebra_latex-20582 to 333811a

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