@@ -301,7 +301,7 @@ def _repr_variables_(self):
301
301
return s + ', ' .join (str (v ) for v in sorted (self ._vars_ , key = str ))
302
302
303
303
304
- def is_variable_valid (self , variable ):
304
+ def has_valid_variable (self , variable ):
305
305
r"""
306
306
Return whether the given ``variable`` is valid in this subring.
307
307
@@ -316,7 +316,7 @@ def is_variable_valid(self, variable):
316
316
EXAMPLES::
317
317
318
318
sage: from sage.symbolic.subring import GenericSymbolicSubring
319
- sage: GenericSymbolicSubring(vars=tuple()).is_variable_valid (x)
319
+ sage: GenericSymbolicSubring(vars=tuple()).has_valid_variable (x)
320
320
Traceback (most recent call last):
321
321
...
322
322
NotImplementedError: Not implemented in this abstract base class
@@ -351,7 +351,7 @@ def _element_constructor_(self, x):
351
351
"""
352
352
expression = super (GenericSymbolicSubring , self )._element_constructor_ (x )
353
353
assert (expression .parent () is self )
354
- if not all (self .is_variable_valid (var )
354
+ if not all (self .has_valid_variable (var )
355
355
for var in expression .variables ()):
356
356
raise TypeError ('%s is not contained in %s' % (x , self ))
357
357
return expression
@@ -626,7 +626,7 @@ def _repr_(self):
626
626
(self ._repr_variables_ ())
627
627
628
628
629
- def is_variable_valid (self , variable ):
629
+ def has_valid_variable (self , variable ):
630
630
r"""
631
631
Return whether the given ``variable`` is valid in this subring.
632
632
@@ -642,11 +642,11 @@ def is_variable_valid(self, variable):
642
642
643
643
sage: from sage.symbolic.subring import SymbolicSubring
644
644
sage: S = SymbolicSubring(accepting_variables=('a',))
645
- sage: S.is_variable_valid ('a')
645
+ sage: S.has_valid_variable ('a')
646
646
True
647
- sage: S.is_variable_valid ('r')
647
+ sage: S.has_valid_variable ('r')
648
648
False
649
- sage: S.is_variable_valid ('x')
649
+ sage: S.has_valid_variable ('x')
650
650
False
651
651
"""
652
652
return SR (variable ) in self ._vars_
@@ -811,7 +811,7 @@ def _repr_(self):
811
811
(self ._repr_variables_ ())
812
812
813
813
814
- def is_variable_valid (self , variable ):
814
+ def has_valid_variable (self , variable ):
815
815
r"""
816
816
Return whether the given ``variable`` is valid in this subring.
817
817
@@ -827,11 +827,11 @@ def is_variable_valid(self, variable):
827
827
828
828
sage: from sage.symbolic.subring import SymbolicSubring
829
829
sage: S = SymbolicSubring(rejecting_variables=('r',))
830
- sage: S.is_variable_valid ('a')
830
+ sage: S.has_valid_variable ('a')
831
831
True
832
- sage: S.is_variable_valid ('r')
832
+ sage: S.has_valid_variable ('r')
833
833
False
834
- sage: S.is_variable_valid ('x')
834
+ sage: S.has_valid_variable ('x')
835
835
True
836
836
"""
837
837
return SR (variable ) not in self ._vars_
@@ -918,7 +918,7 @@ def _an_element_(self):
918
918
Symbolic Subring rejecting the variables some_some_variable, some_variable
919
919
"""
920
920
v = SR .an_element ()
921
- while not self .is_variable_valid (v ):
921
+ while not self .has_valid_variable (v ):
922
922
v = SR ('some_' + str (v ))
923
923
return self (v )
924
924
@@ -1016,7 +1016,7 @@ def _repr_(self):
1016
1016
return 'Symbolic Constants Subring'
1017
1017
1018
1018
1019
- def is_variable_valid (self , variable ):
1019
+ def has_valid_variable (self , variable ):
1020
1020
r"""
1021
1021
Return whether the given ``variable`` is valid in this subring.
1022
1022
@@ -1032,11 +1032,11 @@ def is_variable_valid(self, variable):
1032
1032
1033
1033
sage: from sage.symbolic.subring import SymbolicSubring
1034
1034
sage: S = SymbolicSubring(no_variables=True)
1035
- sage: S.is_variable_valid ('a')
1035
+ sage: S.has_valid_variable ('a')
1036
1036
False
1037
- sage: S.is_variable_valid ('r')
1037
+ sage: S.has_valid_variable ('r')
1038
1038
False
1039
- sage: S.is_variable_valid ('x')
1039
+ sage: S.has_valid_variable ('x')
1040
1040
False
1041
1041
"""
1042
1042
return False
0 commit comments