Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/algebras/algebra.py
4096 views
1
"""
2
Abstract base class for algebras
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 Algebra
21
22
def is_Algebra(x):
23
r"""
24
Return True if x is an Algebra
25
26
EXAMPLES:
27
sage: from sage.algebras.algebra import is_Algebra
28
sage: R.<x,y> = FreeAlgebra(QQ,2)
29
sage: is_Algebra(R)
30
True
31
"""
32
return isinstance(x, Algebra)
33
34