Opened 3 years ago

Last modified 3 years ago

#27905 new PLEASE CHANGE

Bug in showing the substitution of a variable with a custom "latex_name" in a multivariate polynomial

Reported by: gh-Miguel-OYeah Owned by:
Priority: minor Milestone:
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Sage version: SageMath version 8.7, Release Date: 2019-03-23

Minimal reproducible example:

%typeset_mode True
var("k1,k2,k3,k4,a1,b1,c1,d1") # Let's define some parameters
R.<p,q> = SR[] # Variables of the polynomial
poly= (c1*k1)*p*q + (c1*k2 + a1)*p + (c1*k3 + b1)*q + c1*k4 + d1 # Simple bilinear function in p and q
poly.subs(p=var("alpha")) # ---> Shows correct substitution
poly.subs(p=var("gamma",latex_name=r"\color{blue}{\gamma}", domain="real")) # ---> Shows incorrect substitution
# BUT
print(poly.subs(p=var("gamma",latex_name=r"\color{blue}{\gamma}", domain="real"))) # ---> Shows CORRECT substitution

It is a bug while showing the polynomial, but not while substituting because the print() shows the correct result.

Attachments (1)

Output - CoCalc.png (10.0 KB) - added by gh-Miguel-OYeah 3 years ago.
Sample_output

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by gh-Miguel-OYeah

Sample_output

comment:1 Changed 3 years ago by embray

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

comment:2 Changed 3 years ago by embray

  • Milestone sage-8.8 deleted

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

Note: See TracTickets for help on using tickets.