def graded_algebra(self): r""" Return the associated graded module to ``self``. See :class:`~sage.algebras.associated_graded.AssociatedGradedAlgebra` for the definition and the properties of this. If the filtered module ``self`` with basis is called `A`, then this method returns `\operatorname{gr} A`. The method :meth:`to_graded_conversion` returns the canonical `R`-module isomorphism `A \to \operatorname{gr} A` induced by the basis of `A`, and the method :meth:`from_graded_conversion` returns the inverse of this isomorphism. The method :meth:`projection` projects elements of `A` onto `\operatorname{gr} A` according to their place in the filtration on `A`. .. WARNING:: When not overridden, this method returns the default implementation of an associated graded module -- namely, ``AssociatedGradedAlgebra(self)``, where ``AssociatedGradedAlgebra`` is :class:`~sage.algebras.associated_graded.AssociatedGradedAlgebra`. But some instances of :class:`FilteredModulesWithBasis` override this method, as the associated graded module often is (isomorphic) to a simpler object (for instance, the associated graded module of a graded module can be identified with the graded module itself). Generic code that uses associated graded modules (such as the code of the :meth:`induced_graded_map` method below) should make sure to only communicate with them via the :meth:`to_graded_conversion`, :meth:`from_graded_conversion` and :meth:`projection` methods (in particular, do not expect there to be a conversion from ``self`` to ``self.graded_algebra()``; this currently does not work for Clifford algebras). Similarly, when overriding :meth:`graded_algebra`, make sure to accordingly redefine these three methods, unless their definitions below still apply to your case (this will happen whenever the basis of your :meth:`graded_algebra` has the same indexing set as ``self``, and the partition of this indexing set according to degree is the same as for ``self``). EXAMPLES:: sage: A = ModulesWithBasis(ZZ).Filtered().example() sage: A.graded_algebra() Graded Module of An example of a filtered module with basis: the free module on partitions over Integer Ring """ from sage.algebras.associated_graded import AssociatedGradedAlgebra return AssociatedGradedAlgebra(self)
def graded_algebra(self): r""" Return the associated graded module to ``self``. See :class:`~sage.algebras.associated_graded.AssociatedGradedAlgebra` for the definition and the properties of this. .. SEEALSO:: :meth:`~sage.categories.filtered_modules_with_basis.ParentMethods.graded_algebra` EXAMPLES:: sage: W.<x,y> = algebras.DifferentialWeyl(QQ) sage: W.graded_algebra() Graded Algebra of Differential Weyl algebra of polynomials in x, y over Rational Field """ from sage.algebras.associated_graded import AssociatedGradedAlgebra return AssociatedGradedAlgebra(self)
def graded_algebra(self): r""" Return the associated graded algebra to ``self``. See :class:`~sage.algebras.associated_graded.AssociatedGradedAlgebra` for the definition and the properties of this. If the filtered algebra ``self`` with basis is called `A`, then this method returns `\operatorname{gr} A`. The method :meth:`to_graded_conversion` returns the canonical `R`-module isomorphism `A \to \operatorname{gr} A` induced by the basis of `A`, and the method :meth:`from_graded_conversion` returns the inverse of this isomorphism. The method :meth:`projection` projects elements of `A` onto `\operatorname{gr} A` according to their place in the filtration on `A`. .. WARNING:: When not overridden, this method returns the default implementation of an associated graded algebra -- namely, ``AssociatedGradedAlgebra(self)``, where ``AssociatedGradedAlgebra`` is :class:`~sage.algebras.associated_graded.AssociatedGradedAlgebra`. But many instances of :class:`FilteredAlgebrasWithBasis` override this method, as the associated graded algebra often is (isomorphic) to a simpler object (for instance, the associated graded algebra of a graded algebra can be identified with the graded algebra itself). Generic code that uses associated graded algebras (such as the code of the :meth:`induced_graded_map` method below) should make sure to only communicate with them via the :meth:`to_graded_conversion`, :meth:`from_graded_conversion`, and :meth:`projection` methods (in particular, do not expect there to be a conversion from ``self`` to ``self.graded_algebra()``; this currently does not work for Clifford algebras). Similarly, when overriding :meth:`graded_algebra`, make sure to accordingly redefine these three methods, unless their definitions below still apply to your case (this will happen whenever the basis of your :meth:`graded_algebra` has the same indexing set as ``self``, and the partition of this indexing set according to degree is the same as for ``self``). .. TODO:: Maybe the thing about the conversion from ``self`` to ``self.graded_algebra()`` on the Clifford at least could be made to work? (I would still warn the user against ASSUMING that it must work -- as there is probably no way to guarantee it in all cases, and we shouldn't require users to mess with element constructors.) EXAMPLES:: sage: A = AlgebrasWithBasis(ZZ).Filtered().example() sage: A.graded_algebra() Graded Algebra of An example of a filtered algebra with basis: the universal enveloping algebra of Lie algebra of RR^3 with cross product over Integer Ring """ from sage.algebras.associated_graded import AssociatedGradedAlgebra return AssociatedGradedAlgebra(self)