Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/sage/rings/integral_domain.py
8817 views
1
"""
2
Abstract base class for integral domains
3
"""
4
5
#*****************************************************************************
6
# Copyright (C) 2005 William Stein <[email protected]>
7
#
8
# Distributed under the terms of the GNU General Public License (GPL)
9
#
10
# This code is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# General Public License for more details.
14
#
15
# The full text of the GPL is available at:
16
#
17
# http://www.gnu.org/licenses/
18
#*****************************************************************************
19
20
from sage.rings.ring import IntegralDomain
21
22
def is_IntegralDomain(R):
23
"""
24
Check if ``R`` is an instance of :class:`~sage.rings.ring.IntegralDomain`.
25
26
EXAMPLES::
27
28
sage: sage.rings.integral_domain.is_IntegralDomain(QQ)
29
True
30
sage: sage.rings.integral_domain.is_IntegralDomain(ZZ)
31
True
32
"""
33
return isinstance(R, IntegralDomain)
34
35