Abstract base classes for rings¶
- class sage.rings.abc.AlgebraicField[source]¶
Bases:
AlgebraicField_common
Abstract base class for
AlgebraicField
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(QQbar, sage.rings.abc.AlgebraicField) # needs sage.rings.number_field True sage: isinstance(AA, sage.rings.abc.AlgebraicField) # needs sage.rings.number_field False
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(QQbar, sage.rings.abc.AlgebraicField) # needs sage.rings.number_field True >>> isinstance(AA, sage.rings.abc.AlgebraicField) # needs sage.rings.number_field False
import sage.rings.abc isinstance(QQbar, sage.rings.abc.AlgebraicField) # needs sage.rings.number_field isinstance(AA, sage.rings.abc.AlgebraicField) # needs sage.rings.number_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.AlgebraicField.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.qqbar.AlgebraicField'>] sage: len(sage.rings.abc.AlgebraicField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.AlgebraicField.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.qqbar.AlgebraicField'>] >>> len(sage.rings.abc.AlgebraicField.__subclasses__()) <= Integer(1) True
sage.rings.abc.AlgebraicField.__subclasses__() # needs sage.rings.number_field len(sage.rings.abc.AlgebraicField.__subclasses__()) <= 1
- class sage.rings.abc.AlgebraicField_common[source]¶
Bases:
Field
Abstract base class for
AlgebraicField_common
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(QQbar, sage.rings.abc.AlgebraicField_common) # needs sage.rings.number_field True sage: isinstance(AA, sage.rings.abc.AlgebraicField_common) # needs sage.rings.number_field True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(QQbar, sage.rings.abc.AlgebraicField_common) # needs sage.rings.number_field True >>> isinstance(AA, sage.rings.abc.AlgebraicField_common) # needs sage.rings.number_field True
import sage.rings.abc isinstance(QQbar, sage.rings.abc.AlgebraicField_common) # needs sage.rings.number_field isinstance(AA, sage.rings.abc.AlgebraicField_common) # needs sage.rings.number_field
By design, other than the abstract subclasses
AlgebraicField
andAlgebraicRealField
, there is only one direct implementation subclass:sage: sage.rings.abc.AlgebraicField_common.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.abc.AlgebraicField'>, <class 'sage.rings.abc.AlgebraicRealField'>, <class 'sage.rings.qqbar.AlgebraicField_common'>] sage: len(sage.rings.abc.AlgebraicField_common.__subclasses__()) <= 3 True
>>> from sage.all import * >>> sage.rings.abc.AlgebraicField_common.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.abc.AlgebraicField'>, <class 'sage.rings.abc.AlgebraicRealField'>, <class 'sage.rings.qqbar.AlgebraicField_common'>] >>> len(sage.rings.abc.AlgebraicField_common.__subclasses__()) <= Integer(3) True
sage.rings.abc.AlgebraicField_common.__subclasses__() # needs sage.rings.number_field len(sage.rings.abc.AlgebraicField_common.__subclasses__()) <= 3
- class sage.rings.abc.AlgebraicRealField[source]¶
Bases:
AlgebraicField_common
Abstract base class for
AlgebraicRealField
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(QQbar, sage.rings.abc.AlgebraicRealField) # needs sage.rings.number_field False sage: isinstance(AA, sage.rings.abc.AlgebraicRealField) # needs sage.rings.number_field True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(QQbar, sage.rings.abc.AlgebraicRealField) # needs sage.rings.number_field False >>> isinstance(AA, sage.rings.abc.AlgebraicRealField) # needs sage.rings.number_field True
import sage.rings.abc isinstance(QQbar, sage.rings.abc.AlgebraicRealField) # needs sage.rings.number_field isinstance(AA, sage.rings.abc.AlgebraicRealField) # needs sage.rings.number_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.AlgebraicRealField.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.qqbar.AlgebraicRealField'>] sage: len(sage.rings.abc.AlgebraicRealField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.AlgebraicRealField.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.qqbar.AlgebraicRealField'>] >>> len(sage.rings.abc.AlgebraicRealField.__subclasses__()) <= Integer(1) True
sage.rings.abc.AlgebraicRealField.__subclasses__() # needs sage.rings.number_field len(sage.rings.abc.AlgebraicRealField.__subclasses__()) <= 1
- class sage.rings.abc.CallableSymbolicExpressionRing[source]¶
Bases:
SymbolicRing
Abstract base class for
CallableSymbolicExpressionRing_class
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: f = x.function(x).parent() # needs sage.symbolic sage: isinstance(f, sage.rings.abc.CallableSymbolicExpressionRing) # needs sage.symbolic True
>>> from sage.all import * >>> import sage.rings.abc >>> f = x.function(x).parent() # needs sage.symbolic >>> isinstance(f, sage.rings.abc.CallableSymbolicExpressionRing) # needs sage.symbolic True
import sage.rings.abc f = x.function(x).parent() # needs sage.symbolic isinstance(f, sage.rings.abc.CallableSymbolicExpressionRing) # needs sage.symbolic
By design, there is a unique direct subclass:
sage: sage.rings.abc.CallableSymbolicExpressionRing.__subclasses__() # needs sage.symbolic [<class 'sage.symbolic.callable.CallableSymbolicExpressionRing_class'>] sage: len(sage.rings.abc.CallableSymbolicExpressionRing.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.CallableSymbolicExpressionRing.__subclasses__() # needs sage.symbolic [<class 'sage.symbolic.callable.CallableSymbolicExpressionRing_class'>] >>> len(sage.rings.abc.CallableSymbolicExpressionRing.__subclasses__()) <= Integer(1) True
sage.rings.abc.CallableSymbolicExpressionRing.__subclasses__() # needs sage.symbolic len(sage.rings.abc.CallableSymbolicExpressionRing.__subclasses__()) <= 1
- class sage.rings.abc.ComplexBallField[source]¶
Bases:
Field
Abstract base class for
ComplexBallField
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(CBF, sage.rings.abc.ComplexBallField) # needs sage.libs.flint True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(CBF, sage.rings.abc.ComplexBallField) # needs sage.libs.flint True
import sage.rings.abc isinstance(CBF, sage.rings.abc.ComplexBallField) # needs sage.libs.flint
By design, there is a unique direct subclass:
sage: sage.rings.abc.ComplexBallField.__subclasses__() # needs sage.libs.flint [<class 'sage.rings.complex_arb.ComplexBallField'>] sage: len(sage.rings.abc.ComplexBallField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.ComplexBallField.__subclasses__() # needs sage.libs.flint [<class 'sage.rings.complex_arb.ComplexBallField'>] >>> len(sage.rings.abc.ComplexBallField.__subclasses__()) <= Integer(1) True
sage.rings.abc.ComplexBallField.__subclasses__() # needs sage.libs.flint len(sage.rings.abc.ComplexBallField.__subclasses__()) <= 1
- class sage.rings.abc.ComplexDoubleField[source]¶
Bases:
Field
Abstract base class for
ComplexDoubleField_class
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(CDF, sage.rings.abc.ComplexDoubleField) # needs sage.rings.complex_double True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(CDF, sage.rings.abc.ComplexDoubleField) # needs sage.rings.complex_double True
import sage.rings.abc isinstance(CDF, sage.rings.abc.ComplexDoubleField) # needs sage.rings.complex_double
By design, there is a unique direct subclass:
sage: sage.rings.abc.ComplexDoubleField.__subclasses__() # needs sage.rings.complex_double [<class 'sage.rings.complex_double.ComplexDoubleField_class'>] sage: len(sage.rings.abc.ComplexDoubleField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.ComplexDoubleField.__subclasses__() # needs sage.rings.complex_double [<class 'sage.rings.complex_double.ComplexDoubleField_class'>] >>> len(sage.rings.abc.ComplexDoubleField.__subclasses__()) <= Integer(1) True
sage.rings.abc.ComplexDoubleField.__subclasses__() # needs sage.rings.complex_double len(sage.rings.abc.ComplexDoubleField.__subclasses__()) <= 1
- class sage.rings.abc.ComplexField[source]¶
Bases:
Field
Abstract base class for
ComplexField_class
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(CC, sage.rings.abc.ComplexField) # needs sage.rings.real_mpfr True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(CC, sage.rings.abc.ComplexField) # needs sage.rings.real_mpfr True
import sage.rings.abc isinstance(CC, sage.rings.abc.ComplexField) # needs sage.rings.real_mpfr
By design, there is a unique direct subclass:
sage: sage.rings.abc.ComplexField.__subclasses__() # needs sage.rings.real_mpfr [<class 'sage.rings.complex_mpfr.ComplexField_class'>] sage: len(sage.rings.abc.ComplexField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.ComplexField.__subclasses__() # needs sage.rings.real_mpfr [<class 'sage.rings.complex_mpfr.ComplexField_class'>] >>> len(sage.rings.abc.ComplexField.__subclasses__()) <= Integer(1) True
sage.rings.abc.ComplexField.__subclasses__() # needs sage.rings.real_mpfr len(sage.rings.abc.ComplexField.__subclasses__()) <= 1
- class sage.rings.abc.ComplexIntervalField[source]¶
Bases:
Field
Abstract base class for
ComplexIntervalField_class
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(CIF, sage.rings.abc.ComplexIntervalField) # needs sage.rings.complex_interval_field True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(CIF, sage.rings.abc.ComplexIntervalField) # needs sage.rings.complex_interval_field True
import sage.rings.abc isinstance(CIF, sage.rings.abc.ComplexIntervalField) # needs sage.rings.complex_interval_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.ComplexIntervalField.__subclasses__() # needs sage.rings.complex_interval_field [<class 'sage.rings.complex_interval_field.ComplexIntervalField_class'>] sage: len(sage.rings.abc.ComplexIntervalField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.ComplexIntervalField.__subclasses__() # needs sage.rings.complex_interval_field [<class 'sage.rings.complex_interval_field.ComplexIntervalField_class'>] >>> len(sage.rings.abc.ComplexIntervalField.__subclasses__()) <= Integer(1) True
sage.rings.abc.ComplexIntervalField.__subclasses__() # needs sage.rings.complex_interval_field len(sage.rings.abc.ComplexIntervalField.__subclasses__()) <= 1
- class sage.rings.abc.IntegerModRing[source]¶
Bases:
object
Abstract base class for
IntegerModRing_generic
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(Integers(7), sage.rings.abc.IntegerModRing) True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(Integers(Integer(7)), sage.rings.abc.IntegerModRing) True
import sage.rings.abc isinstance(Integers(7), sage.rings.abc.IntegerModRing)
By design, there is a unique direct subclass:
sage: sage.rings.abc.IntegerModRing.__subclasses__() [<class 'sage.rings.finite_rings.integer_mod_ring.IntegerModRing_generic'>] sage: len(sage.rings.abc.IntegerModRing.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.IntegerModRing.__subclasses__() [<class 'sage.rings.finite_rings.integer_mod_ring.IntegerModRing_generic'>] >>> len(sage.rings.abc.IntegerModRing.__subclasses__()) <= Integer(1) True
sage.rings.abc.IntegerModRing.__subclasses__() len(sage.rings.abc.IntegerModRing.__subclasses__()) <= 1
- class sage.rings.abc.NumberField_cyclotomic[source]¶
Bases:
Field
Abstract base class for
NumberField_cyclotomic
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: K.<zeta> = CyclotomicField(15) # needs sage.rings.number_field sage: isinstance(K, sage.rings.abc.NumberField_cyclotomic) # needs sage.rings.number_field True
>>> from sage.all import * >>> import sage.rings.abc >>> K = CyclotomicField(Integer(15), names=('zeta',)); (zeta,) = K._first_ngens(1)# needs sage.rings.number_field >>> isinstance(K, sage.rings.abc.NumberField_cyclotomic) # needs sage.rings.number_field True
import sage.rings.abc K.<zeta> = CyclotomicField(15) # needs sage.rings.number_field isinstance(K, sage.rings.abc.NumberField_cyclotomic) # needs sage.rings.number_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.NumberField_cyclotomic.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.number_field.number_field.NumberField_cyclotomic'>] sage: len(sage.rings.abc.NumberField_cyclotomic.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.NumberField_cyclotomic.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.number_field.number_field.NumberField_cyclotomic'>] >>> len(sage.rings.abc.NumberField_cyclotomic.__subclasses__()) <= Integer(1) True
sage.rings.abc.NumberField_cyclotomic.__subclasses__() # needs sage.rings.number_field len(sage.rings.abc.NumberField_cyclotomic.__subclasses__()) <= 1
- class sage.rings.abc.NumberField_quadratic[source]¶
Bases:
Field
Abstract base class for
NumberField_quadratic
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: K.<sqrt2> = QuadraticField(2) # needs sage.rings.number_field sage: isinstance(K, sage.rings.abc.NumberField_quadratic) # needs sage.rings.number_field True
>>> from sage.all import * >>> import sage.rings.abc >>> K = QuadraticField(Integer(2), names=('sqrt2',)); (sqrt2,) = K._first_ngens(1)# needs sage.rings.number_field >>> isinstance(K, sage.rings.abc.NumberField_quadratic) # needs sage.rings.number_field True
import sage.rings.abc K.<sqrt2> = QuadraticField(2) # needs sage.rings.number_field isinstance(K, sage.rings.abc.NumberField_quadratic) # needs sage.rings.number_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.NumberField_quadratic.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.number_field.number_field.NumberField_quadratic'>] sage: len(sage.rings.abc.NumberField_quadratic.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.NumberField_quadratic.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.number_field.number_field.NumberField_quadratic'>] >>> len(sage.rings.abc.NumberField_quadratic.__subclasses__()) <= Integer(1) True
sage.rings.abc.NumberField_quadratic.__subclasses__() # needs sage.rings.number_field len(sage.rings.abc.NumberField_quadratic.__subclasses__()) <= 1
- class sage.rings.abc.Order[source]¶
Bases:
object
Abstract base class for
Order
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: x = polygen(ZZ, 'x') sage: K.<a> = NumberField(x^2 + 1); O = K.order(2*a) # needs sage.rings.number_field sage: isinstance(O, sage.rings.abc.Order) # needs sage.rings.number_field True
>>> from sage.all import * >>> import sage.rings.abc >>> x = polygen(ZZ, 'x') >>> K = NumberField(x**Integer(2) + Integer(1), names=('a',)); (a,) = K._first_ngens(1); O = K.order(Integer(2)*a) # needs sage.rings.number_field >>> isinstance(O, sage.rings.abc.Order) # needs sage.rings.number_field True
import sage.rings.abc x = polygen(ZZ, 'x') K.<a> = NumberField(x^2 + 1); O = K.order(2*a) # needs sage.rings.number_field isinstance(O, sage.rings.abc.Order) # needs sage.rings.number_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.Order.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.number_field.order.Order'>] sage: len(sage.rings.abc.Order.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.Order.__subclasses__() # needs sage.rings.number_field [<class 'sage.rings.number_field.order.Order'>] >>> len(sage.rings.abc.Order.__subclasses__()) <= Integer(1) True
sage.rings.abc.Order.__subclasses__() # needs sage.rings.number_field len(sage.rings.abc.Order.__subclasses__()) <= 1
- class sage.rings.abc.RealBallField[source]¶
Bases:
Field
Abstract base class for
RealBallField
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(RBF, sage.rings.abc.RealBallField) # needs sage.libs.flint True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(RBF, sage.rings.abc.RealBallField) # needs sage.libs.flint True
import sage.rings.abc isinstance(RBF, sage.rings.abc.RealBallField) # needs sage.libs.flint
By design, there is a unique direct subclass:
sage: sage.rings.abc.RealBallField.__subclasses__() # needs sage.libs.flint [<class 'sage.rings.real_arb.RealBallField'>] sage: len(sage.rings.abc.RealBallField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.RealBallField.__subclasses__() # needs sage.libs.flint [<class 'sage.rings.real_arb.RealBallField'>] >>> len(sage.rings.abc.RealBallField.__subclasses__()) <= Integer(1) True
sage.rings.abc.RealBallField.__subclasses__() # needs sage.libs.flint len(sage.rings.abc.RealBallField.__subclasses__()) <= 1
- class sage.rings.abc.RealDoubleField[source]¶
Bases:
Field
Abstract base class for
RealDoubleField_class
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(RDF, sage.rings.abc.RealDoubleField) True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(RDF, sage.rings.abc.RealDoubleField) True
import sage.rings.abc isinstance(RDF, sage.rings.abc.RealDoubleField)
By design, there is a unique direct subclass:
sage: sage.rings.abc.RealDoubleField.__subclasses__() [<class 'sage.rings.real_double.RealDoubleField_class'>] sage: len(sage.rings.abc.RealDoubleField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.RealDoubleField.__subclasses__() [<class 'sage.rings.real_double.RealDoubleField_class'>] >>> len(sage.rings.abc.RealDoubleField.__subclasses__()) <= Integer(1) True
sage.rings.abc.RealDoubleField.__subclasses__() len(sage.rings.abc.RealDoubleField.__subclasses__()) <= 1
- class sage.rings.abc.RealField[source]¶
Bases:
Field
Abstract base class for
RealField_class
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(RR, sage.rings.abc.RealField) # needs sage.rings.real_mpfr True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(RR, sage.rings.abc.RealField) # needs sage.rings.real_mpfr True
import sage.rings.abc isinstance(RR, sage.rings.abc.RealField) # needs sage.rings.real_mpfr
By design, there is a unique direct subclass:
sage: sage.rings.abc.RealField.__subclasses__() # needs sage.rings.real_mpfr [<class 'sage.rings.real_mpfr.RealField_class'>] sage: len(sage.rings.abc.RealField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.RealField.__subclasses__() # needs sage.rings.real_mpfr [<class 'sage.rings.real_mpfr.RealField_class'>] >>> len(sage.rings.abc.RealField.__subclasses__()) <= Integer(1) True
sage.rings.abc.RealField.__subclasses__() # needs sage.rings.real_mpfr len(sage.rings.abc.RealField.__subclasses__()) <= 1
- class sage.rings.abc.RealIntervalField[source]¶
Bases:
Field
Abstract base class for
RealIntervalField_class
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(RIF, sage.rings.abc.RealIntervalField) # needs sage.rings.real_interval_field True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(RIF, sage.rings.abc.RealIntervalField) # needs sage.rings.real_interval_field True
import sage.rings.abc isinstance(RIF, sage.rings.abc.RealIntervalField) # needs sage.rings.real_interval_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.RealIntervalField.__subclasses__() # needs sage.rings.real_interval_field [<class 'sage.rings.real_mpfi.RealIntervalField_class'>] sage: len(sage.rings.abc.RealIntervalField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.RealIntervalField.__subclasses__() # needs sage.rings.real_interval_field [<class 'sage.rings.real_mpfi.RealIntervalField_class'>] >>> len(sage.rings.abc.RealIntervalField.__subclasses__()) <= Integer(1) True
sage.rings.abc.RealIntervalField.__subclasses__() # needs sage.rings.real_interval_field len(sage.rings.abc.RealIntervalField.__subclasses__()) <= 1
- class sage.rings.abc.SymbolicRing[source]¶
Bases:
CommutativeRing
Abstract base class for
SymbolicRing
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(SR, sage.rings.abc.SymbolicRing) # needs sage.symbolic True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(SR, sage.rings.abc.SymbolicRing) # needs sage.symbolic True
import sage.rings.abc isinstance(SR, sage.rings.abc.SymbolicRing) # needs sage.symbolic
By design, other than the abstract subclass
CallableSymbolicExpressionRing
, there is only one direct implementation subclass:sage: sage.rings.abc.SymbolicRing.__subclasses__() # needs sage.symbolic [<class 'sage.rings.abc.CallableSymbolicExpressionRing'>, <class 'sage.symbolic.ring.SymbolicRing'>] sage: len(sage.rings.abc.SymbolicRing.__subclasses__()) <= 2 True
>>> from sage.all import * >>> sage.rings.abc.SymbolicRing.__subclasses__() # needs sage.symbolic [<class 'sage.rings.abc.CallableSymbolicExpressionRing'>, <class 'sage.symbolic.ring.SymbolicRing'>] >>> len(sage.rings.abc.SymbolicRing.__subclasses__()) <= Integer(2) True
sage.rings.abc.SymbolicRing.__subclasses__() # needs sage.symbolic len(sage.rings.abc.SymbolicRing.__subclasses__()) <= 2
- class sage.rings.abc.UniversalCyclotomicField[source]¶
Bases:
Field
Abstract base class for
UniversalCyclotomicField
.This class is defined for the purpose of
isinstance()
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: K = UniversalCyclotomicField() # needs sage.libs.gap sage.rings.number_field sage: isinstance(K, sage.rings.abc.UniversalCyclotomicField) # needs sage.libs.gap sage.rings.number_field True
>>> from sage.all import * >>> import sage.rings.abc >>> K = UniversalCyclotomicField() # needs sage.libs.gap sage.rings.number_field >>> isinstance(K, sage.rings.abc.UniversalCyclotomicField) # needs sage.libs.gap sage.rings.number_field True
import sage.rings.abc K = UniversalCyclotomicField() # needs sage.libs.gap sage.rings.number_field isinstance(K, sage.rings.abc.UniversalCyclotomicField) # needs sage.libs.gap sage.rings.number_field
By design, there is a unique direct subclass:
sage: sage.rings.abc.UniversalCyclotomicField.__subclasses__() # needs sage.libs.gap sage.rings.number_field [<class 'sage.rings.universal_cyclotomic_field.UniversalCyclotomicField'>] sage: len(sage.rings.abc.NumberField_cyclotomic.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.UniversalCyclotomicField.__subclasses__() # needs sage.libs.gap sage.rings.number_field [<class 'sage.rings.universal_cyclotomic_field.UniversalCyclotomicField'>] >>> len(sage.rings.abc.NumberField_cyclotomic.__subclasses__()) <= Integer(1) True
sage.rings.abc.UniversalCyclotomicField.__subclasses__() # needs sage.libs.gap sage.rings.number_field len(sage.rings.abc.NumberField_cyclotomic.__subclasses__()) <= 1
- class sage.rings.abc.pAdicField[source]¶
Bases:
Field
Abstract base class for
pAdicFieldGeneric
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(Zp(5), sage.rings.abc.pAdicField) # needs sage.rings.padics False sage: isinstance(Qp(5), sage.rings.abc.pAdicField) # needs sage.rings.padics True
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(Zp(Integer(5)), sage.rings.abc.pAdicField) # needs sage.rings.padics False >>> isinstance(Qp(Integer(5)), sage.rings.abc.pAdicField) # needs sage.rings.padics True
import sage.rings.abc isinstance(Zp(5), sage.rings.abc.pAdicField) # needs sage.rings.padics isinstance(Qp(5), sage.rings.abc.pAdicField) # needs sage.rings.padics
By design, there is a unique direct subclass:
sage: sage.rings.abc.pAdicField.__subclasses__() # needs sage.rings.padics [<class 'sage.rings.padics.generic_nodes.pAdicFieldGeneric'>] sage: len(sage.rings.abc.pAdicField.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.pAdicField.__subclasses__() # needs sage.rings.padics [<class 'sage.rings.padics.generic_nodes.pAdicFieldGeneric'>] >>> len(sage.rings.abc.pAdicField.__subclasses__()) <= Integer(1) True
sage.rings.abc.pAdicField.__subclasses__() # needs sage.rings.padics len(sage.rings.abc.pAdicField.__subclasses__()) <= 1
- class sage.rings.abc.pAdicRing[source]¶
Bases:
IntegralDomain
Abstract base class for
pAdicRingGeneric
.This class is defined for the purpose of
isinstance
tests. It should not be instantiated.EXAMPLES:
sage: import sage.rings.abc sage: isinstance(Zp(5), sage.rings.abc.pAdicRing) # needs sage.rings.padics True sage: isinstance(Qp(5), sage.rings.abc.pAdicRing) # needs sage.rings.padics False
>>> from sage.all import * >>> import sage.rings.abc >>> isinstance(Zp(Integer(5)), sage.rings.abc.pAdicRing) # needs sage.rings.padics True >>> isinstance(Qp(Integer(5)), sage.rings.abc.pAdicRing) # needs sage.rings.padics False
import sage.rings.abc isinstance(Zp(5), sage.rings.abc.pAdicRing) # needs sage.rings.padics isinstance(Qp(5), sage.rings.abc.pAdicRing) # needs sage.rings.padics
By design, there is a unique direct subclass:
sage: sage.rings.abc.pAdicRing.__subclasses__() # needs sage.rings.padics [<class 'sage.rings.padics.generic_nodes.pAdicRingGeneric'>] sage: len(sage.rings.abc.pAdicRing.__subclasses__()) <= 1 True
>>> from sage.all import * >>> sage.rings.abc.pAdicRing.__subclasses__() # needs sage.rings.padics [<class 'sage.rings.padics.generic_nodes.pAdicRingGeneric'>] >>> len(sage.rings.abc.pAdicRing.__subclasses__()) <= Integer(1) True
sage.rings.abc.pAdicRing.__subclasses__() # needs sage.rings.padics len(sage.rings.abc.pAdicRing.__subclasses__()) <= 1