Path: blob/master/src/sage/rings/commutative_algebra.py
8817 views
"""1Abstract base class for commutative algebras2"""34#*****************************************************************************5# Copyright (C) 2005 William Stein <[email protected]>6#7# Distributed under the terms of the GNU General Public License (GPL)8#9# This code is distributed in the hope that it will be useful,10# but WITHOUT ANY WARRANTY; without even the implied warranty of11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12# General Public License for more details.13#14# The full text of the GPL is available at:15#16# http://www.gnu.org/licenses/17#*****************************************************************************1819from sage.rings.ring import CommutativeAlgebra2021def is_CommutativeAlgebra(x):22"""23Check to see if ``x`` is a :class:`CommutativeAlgebra`.2425EXAMPLES::2627sage: sage.rings.commutative_algebra.is_CommutativeAlgebra(sage.rings.ring.CommutativeAlgebra(ZZ))28True29"""30return isinstance(x, CommutativeAlgebra)313233