-
-
Notifications
You must be signed in to change notification settings - Fork 405
/
commutative_ring.py
37 lines (31 loc) · 1.3 KB
/
commutative_ring.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
Abstract base class for commutative rings
"""
#*****************************************************************************
# Copyright (C) 2005 William Stein <wstein@gmail.com>
#
# Distributed under the terms of the GNU General Public License (GPL)
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# The full text of the GPL is available at:
#
# http://www.gnu.org/licenses/
#*****************************************************************************
from sage.misc.superseded import deprecation
deprecation(20011, "the module sage.rings.commutative_ring is deprecated and will be removed")
from sage.rings.ring import CommutativeRing
def is_CommutativeRing(R):
"""
Check to see if ``R`` is a :class:`CommutativeRing`.
EXAMPLES::
sage: import sage.rings.commutative_ring
doctest:...: DeprecationWarning: the module sage.rings.commutative_ring is deprecated and will be removed
See http://trac.sagemath.org/20011 for details.
sage: sage.rings.commutative_ring.is_CommutativeRing(ZZ)
True
"""
return isinstance(R, CommutativeRing)