Opened 5 years ago

Last modified 5 weeks ago

#24430 new enhancement

normalization: `variable` vs `variable_name` vs `variables`

Reported by: vdelecroix Owned by:
Priority: major Milestone:
Component: algebra Keywords:
Cc: mmezzarobba, bruno, jdemeyer Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by vdelecroix)

The elements/parents of polynomial-like objects have different methods to access the variables. This ticket stands for normalizing them.

First of all, CategoryObject has

  • an (rather unspecified) attribute _names
  • variable_names: return the values of _names
  • variable_name: return the first item in _names

(see also #21380)

On parent, beyond the one inherited from CategoryObject there are:

  • uni or multivariate (Laurent)PolynomialRing and PowerSeries: variable_names_recursive
  • LaurentPowerSeries: none

And for the elements:

  • UnivariatePolynomial: variable_name and variables
  • MultivariatePolynomial: variable (uncomprehensible) and variables
  • (Laurent)PowerSeries: variable (returning a string)

Change History (6)

comment:1 Changed 5 years ago by vdelecroix

Summary: normalization variable, variable_name, variablesnormalization: `variable` vs `variable_name` vs `variables`

comment:2 Changed 5 years ago by vdelecroix

Description: modified (diff)

comment:3 Changed 5 years ago by vdelecroix

Cc: jdemeyer added
Description: modified (diff)

comment:4 Changed 5 years ago by vdelecroix

Description: modified (diff)

comment:5 Changed 5 years ago by bruno

Note: for MultivariatePolynomials, variable(i) returns the i-th variable. For some implementation, the parameter i defaults to 0 but not all of them.

comment:6 Changed 5 weeks ago by mkoeppe

Milestone: sage-8.2
Note: See TracTickets for help on using tickets.