|
30 | 30 | from sage.categories.algebras_with_basis import AlgebrasWithBasis
|
31 | 31 | from sage.sets.family import Family
|
32 | 32 | import sage.data_structures.blas_dict as blas
|
33 |
| -from sage.rings.ring import Algebra |
34 | 33 | from sage.rings.polynomial.polynomial_ring import PolynomialRing_general
|
35 | 34 | from sage.rings.polynomial.multi_polynomial_ring_base import MPolynomialRing_base
|
36 | 35 | from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
@@ -655,7 +654,7 @@ def diff(self, p):
|
655 | 654 | return self.parent().diff_action(self, p)
|
656 | 655 |
|
657 | 656 |
|
658 |
| -class DifferentialWeylAlgebra(Algebra, UniqueRepresentation): |
| 657 | +class DifferentialWeylAlgebra(UniqueRepresentation, Parent): |
659 | 658 | r"""
|
660 | 659 | The differential Weyl algebra of a polynomial ring.
|
661 | 660 |
|
@@ -780,7 +779,7 @@ def _repr_(self) -> str:
|
780 | 779 | sage: DifferentialWeylAlgebra(R)
|
781 | 780 | Differential Weyl algebra of polynomials in x, y, z over Rational Field
|
782 | 781 | """
|
783 |
| - poly_gens = ', '.join(repr(x) for x in self.gens()[:self._n]) |
| 782 | + poly_gens = ', '.join(repr(x) for x in self.variables()) |
784 | 783 | return "Differential Weyl algebra of polynomials in {} over {}".format(
|
785 | 784 | poly_gens, self.base_ring())
|
786 | 785 |
|
@@ -986,6 +985,8 @@ def algebra_generators(self):
|
986 | 985 | d = {x: self.gen(i) for i, x in enumerate(self.variable_names())}
|
987 | 986 | return Family(self.variable_names(), lambda x: d[x])
|
988 | 987 |
|
| 988 | + gens = algebra_generators |
| 989 | + |
989 | 990 | @cached_method
|
990 | 991 | def variables(self):
|
991 | 992 | """
|
|
0 commit comments