diff --git a/src/sage/manifolds/chart.py b/src/sage/manifolds/chart.py index 54d4ea5c71f..b2d329e064b 100644 --- a/src/sage/manifolds/chart.py +++ b/src/sage/manifolds/chart.py @@ -2317,7 +2317,6 @@ def _tighten_bounds(self): self._restrictions = new_restrictions self._fast_valid_coordinates = None - def restrict(self, subset, restrictions=None): r""" Return the restriction of the chart to some open subset of its domain. diff --git a/src/sage/manifolds/differentiable/automorphismfield_group.py b/src/sage/manifolds/differentiable/automorphismfield_group.py index 0791f0b9f24..72955d48b3c 100644 --- a/src/sage/manifolds/differentiable/automorphismfield_group.py +++ b/src/sage/manifolds/differentiable/automorphismfield_group.py @@ -175,7 +175,6 @@ def __init__(self, vector_field_module): Parent.__init__(self, category=Groups()) self._vmodule = vector_field_module - #### Parent methods #### def _element_constructor_(self, comp=[], frame=None, name=None, @@ -266,7 +265,6 @@ def _an_element_(self): #### End of parent methods #### - #### Monoid methods #### @cached_method diff --git a/src/sage/manifolds/differentiable/chart.py b/src/sage/manifolds/differentiable/chart.py index 098f85516bf..6ea06b662ed 100644 --- a/src/sage/manifolds/differentiable/chart.py +++ b/src/sage/manifolds/differentiable/chart.py @@ -679,7 +679,6 @@ def symbolic_velocities(self, left='D', right=None): return list(var(list_strings_velocities)) - #***************************************************************************** class RealDiffChart(DiffChart, RealChart): @@ -1001,7 +1000,6 @@ def __init__(self, domain, coordinates, calc_method=None, self._frame = CoordFrame(self) self._coframe = self._frame._coframe - def restrict(self, subset, restrictions=None): r""" Return the restriction of the chart to some subset. diff --git a/src/sage/manifolds/differentiable/degenerate.py b/src/sage/manifolds/differentiable/degenerate.py index 0fddd642e17..30846aa6891 100644 --- a/src/sage/manifolds/differentiable/degenerate.py +++ b/src/sage/manifolds/differentiable/degenerate.py @@ -368,7 +368,6 @@ def open_subset(self, name, latex_name=None, coord_def={}): return resu - #******************************************************************************************* from sage.manifolds.differentiable.tensorfield_paral import TensorFieldParal diff --git a/src/sage/manifolds/differentiable/degenerate_submanifold.py b/src/sage/manifolds/differentiable/degenerate_submanifold.py index 5d5ebb3de0f..67d5228f2d9 100644 --- a/src/sage/manifolds/differentiable/degenerate_submanifold.py +++ b/src/sage/manifolds/differentiable/degenerate_submanifold.py @@ -1323,7 +1323,6 @@ def principal_directions(self, screen=None): self._principal_directions[screen._name] = res return res - def mean_curvature(self, screen=None): r""" diff --git a/src/sage/manifolds/differentiable/diff_form.py b/src/sage/manifolds/differentiable/diff_form.py index ec6a8d353f3..dc682328e55 100644 --- a/src/sage/manifolds/differentiable/diff_form.py +++ b/src/sage/manifolds/differentiable/diff_form.py @@ -1556,7 +1556,6 @@ def wedge(self, other): other_r = other.restrict(dom_resu) return FreeModuleAltForm.wedge(self_r, other_r) - def interior_product(self, qvect): r""" Interior product with a multivector field. diff --git a/src/sage/manifolds/differentiable/diff_map.py b/src/sage/manifolds/differentiable/diff_map.py index 4260f233e40..ded6843afb3 100644 --- a/src/sage/manifolds/differentiable/diff_map.py +++ b/src/sage/manifolds/differentiable/diff_map.py @@ -1144,7 +1144,6 @@ def paral_comp(tcomp, chart1, chart2, coord2_1, jacob, resu._components[frame] = comp return resu - def pushforward(self, tensor): r""" Pushforward operator associated with ``self``. diff --git a/src/sage/manifolds/differentiable/integrated_curve.py b/src/sage/manifolds/differentiable/integrated_curve.py index 8b62aab4f39..74f76ab3e33 100644 --- a/src/sage/manifolds/differentiable/integrated_curve.py +++ b/src/sage/manifolds/differentiable/integrated_curve.py @@ -579,7 +579,6 @@ def fast_CoF(pos, vel, M=M): for f in transf] self._fast_changes_of_chart[CoC] = fast_transf - self._velocities = list(velocities) # converts to list # since might not already be a list (which is later required) self._curve_parameter = curve_parameter @@ -1376,13 +1375,11 @@ def jacobian(t,y): # 'tangent_vector_eval_at', and in 'plot' when plotting the # tangent vectors.) - if isinstance(sol, list): coords_sol = [point[0:dim + 1] for point in sol] else: coords_sol = sol[:, 0:dim + 1].tolist() # far faster in numpy - if verbose: print("Numerical integration completed.\n\n" + "Checking all points are in the chart domain...") @@ -1779,7 +1776,6 @@ def solve_across_charts(self, charts=None, step=None, solution_key=None, new_vel = self._fast_changes_of_frame[(new_chart.frame().restrict(inter), chart.frame().restrict(inter))](last_pts, last_vel) - ics = new_pts + new_vel chart = new_chart @@ -2434,7 +2430,6 @@ def plot_integrated(self, chart=None, ambient_coords=None, thickness = kwds.pop('thickness') aspect_ratio = kwds.pop('aspect_ratio') - # # The mapping, if present, and the chart with respect to which the curve # is plotted @@ -3425,7 +3420,6 @@ def __init__(self, parent, affine_connection, curve_parameter, velocities = chart.symbolic_velocities() - dim = parent.codomain().dim() i0 = parent.codomain().start_index() @@ -3470,7 +3464,6 @@ def __init__(self, parent, affine_connection, curve_parameter, equations_rhs_chart += [rhs.simplify_full()] equations_rhs[chart] = equations_rhs_chart - IntegratedCurve.__init__(self, parent, equations_rhs, velocities, curve_parameter, initial_tangent_vector, chart=chart, @@ -3479,7 +3472,6 @@ def __init__(self, parent, affine_connection, curve_parameter, self._affine_connection = affine_connection - def _repr_(self): r""" Return a string representation of ``self``. @@ -3825,7 +3817,6 @@ class IntegratedGeodesic(IntegratedAutoparallelCurve): def __init__(self, parent, metric, curve_parameter, initial_tangent_vector, chart=None, name=None, latex_name=None, verbose=False, across_charts=False): - r""" Construct a geodesic curve with respect to the given metric with the given initial tangent vector. diff --git a/src/sage/manifolds/differentiable/levi_civita_connection.py b/src/sage/manifolds/differentiable/levi_civita_connection.py index 3b8095004e3..7ff2643e32b 100644 --- a/src/sage/manifolds/differentiable/levi_civita_connection.py +++ b/src/sage/manifolds/differentiable/levi_civita_connection.py @@ -387,7 +387,6 @@ def _new_coef(self, frame): start_index=self._domain._sindex, output_formatter=DiffScalarField.coord_function) - def coef(self, frame=None): r""" Return the connection coefficients relative to the given frame. diff --git a/src/sage/manifolds/differentiable/manifold.py b/src/sage/manifolds/differentiable/manifold.py index e674ad8db05..e216a42ada3 100644 --- a/src/sage/manifolds/differentiable/manifold.py +++ b/src/sage/manifolds/differentiable/manifold.py @@ -2977,7 +2977,6 @@ def change_of_frame(self, frame1, frame2): " has not been defined on the {}".format(self)) return self._frame_changes[(frame1, frame2)] - def set_change_of_frame(self, frame1, frame2, change_of_frame, compute_inverse=True): r""" diff --git a/src/sage/manifolds/differentiable/manifold_homset.py b/src/sage/manifolds/differentiable/manifold_homset.py index 7152774ec75..2d35505f63c 100644 --- a/src/sage/manifolds/differentiable/manifold_homset.py +++ b/src/sage/manifolds/differentiable/manifold_homset.py @@ -777,7 +777,6 @@ def _repr_(self): description += "which actually are integrated curves" return description - def _element_constructor_(self, equations_rhs, velocities, curve_parameter, initial_tangent_vector, chart=None, name=None, latex_name=None, verbose=False, across_charts=False): @@ -1221,7 +1220,6 @@ def _repr_(self): description += "curves with respect to a certain affine connection" return description - def _element_constructor_(self, affine_connection, curve_parameter, initial_tangent_vector, chart=None, name=None, latex_name=None, verbose=False, across_charts=False): diff --git a/src/sage/manifolds/differentiable/metric.py b/src/sage/manifolds/differentiable/metric.py index 5b6e16be39c..8211ad1a625 100644 --- a/src/sage/manifolds/differentiable/metric.py +++ b/src/sage/manifolds/differentiable/metric.py @@ -662,7 +662,6 @@ def set(self, symbiform): rst = self.restrict(dom) rst.set(symbiform_rst) - def inverse(self, expansion_symbol=None, order=1): r""" Return the inverse metric. @@ -879,7 +878,6 @@ def christoffel_symbols(self, chart=None): frame = chart._frame return self.connection().coef(frame) - def christoffel_symbols_display(self, chart=None, symbol=None, latex_symbol=None, index_labels=None, index_latex_labels=None, coordinate_labels=True, only_nonzero=True, @@ -1069,7 +1067,6 @@ def riemann(self, name=None, latex_name=None): """ return self.connection().riemann(name, latex_name) - def ricci(self, name=None, latex_name=None): r""" Return the Ricci tensor associated with the metric. @@ -2271,7 +2268,6 @@ def restrict(self, subdomain, dest_map=None): self._restrictions[subdomain] = resu return self._restrictions[subdomain] - def set(self, symbiform): r""" Define the metric from a field of symmetric bilinear forms. diff --git a/src/sage/manifolds/differentiable/scalarfield.py b/src/sage/manifolds/differentiable/scalarfield.py index 1b9a3c2ae2d..ba5c5d70f2c 100644 --- a/src/sage/manifolds/differentiable/scalarfield.py +++ b/src/sage/manifolds/differentiable/scalarfield.py @@ -819,7 +819,6 @@ def differential(self) -> DiffForm: derivative = differential # allows one to use functional notation, # e.g. diff(f) for f.differential() - def lie_derivative(self, vector): r""" Compute the Lie derivative with respect to a vector field. diff --git a/src/sage/manifolds/differentiable/tensorfield_paral.py b/src/sage/manifolds/differentiable/tensorfield_paral.py index 1f5b7cf3512..555a30aad57 100644 --- a/src/sage/manifolds/differentiable/tensorfield_paral.py +++ b/src/sage/manifolds/differentiable/tensorfield_paral.py @@ -657,7 +657,6 @@ def __init__(self, vector_field_module, tensor_type, name=None, # Initialization of derived quantities: self._init_derived() - def _repr_(self): r""" String representation of ``self``. @@ -769,7 +768,6 @@ def _preparse_display(self, basis=None, format_spec=None): basis = basis.frame() return (basis, format_spec) - def _set_comp_unsafe(self, basis=None): r""" Return the components of the tensor field in a given vector frame @@ -1511,7 +1509,6 @@ def paral_lie_deriv(a, b , coord_frame, chart_cp, local_list_ind): vc[[i]].coord_function(chart).diff(ind[k]) resc[[ind]] = rsum.scalar_field() - # # 3/ Final result (the tensor) res = vf_module.tensor_from_comp(self._tensor_type, resc) diff --git a/src/sage/manifolds/differentiable/vectorfield.py b/src/sage/manifolds/differentiable/vectorfield.py index ecd41a9882f..01a9c52d93c 100644 --- a/src/sage/manifolds/differentiable/vectorfield.py +++ b/src/sage/manifolds/differentiable/vectorfield.py @@ -359,7 +359,6 @@ def __call__(self, scalar): resu.set_name(name=name, latex_name=latex_name) return resu - @options(max_range=8, scale=1, color='blue') def plot(self, chart=None, ambient_coords=None, mapping=None, chart_domain=None, fixed_coords=None, ranges=None, diff --git a/src/sage/manifolds/differentiable/vectorfield_module.py b/src/sage/manifolds/differentiable/vectorfield_module.py index f806ecf5dd3..d6ffbb2af83 100644 --- a/src/sage/manifolds/differentiable/vectorfield_module.py +++ b/src/sage/manifolds/differentiable/vectorfield_module.py @@ -1206,7 +1206,6 @@ def metric(self, name: str, signature: Optional[int] = None, latex_name: Optiona return PseudoRiemannianMetric(self, name, signature=signature[0]-signature[1], latex_name=latex_name) - def symplectic_form( self, name: Optional[str] = None, latex_name: Optional[str] = None ): diff --git a/src/sage/manifolds/differentiable/vectorframe.py b/src/sage/manifolds/differentiable/vectorframe.py index 8f8c26c0c61..a02d69da5d0 100644 --- a/src/sage/manifolds/differentiable/vectorframe.py +++ b/src/sage/manifolds/differentiable/vectorframe.py @@ -764,7 +764,6 @@ def __init__(self, vector_field_module, symbol, latex_symbol=None, # NB: set(self._restrictions.values()) is identical to # self._subframes - ###### Methods that must be redefined by derived classes of ###### ###### FreeModuleBasis ###### @@ -1777,7 +1776,6 @@ def __init__(self, chart): # - force_free=True ensures that a free module is constructed in case # it is the first call to the vector field module on chart.domain() - ###### Methods that must be redefined by derived classes of ###### ###### FreeModuleBasis ###### diff --git a/src/sage/manifolds/scalarfield.py b/src/sage/manifolds/scalarfield.py index c1bb10c7eb4..dc0507beba6 100644 --- a/src/sage/manifolds/scalarfield.py +++ b/src/sage/manifolds/scalarfield.py @@ -2657,7 +2657,6 @@ def __neg__(self): result._latex_name = '-' + self._latex_name return result - ######### CommutativeAlgebraElement arithmetic operators ######## def _add_(self, other): diff --git a/src/sage/manifolds/trivialization.py b/src/sage/manifolds/trivialization.py index dcdaad390d9..ed3a8b4ed9f 100644 --- a/src/sage/manifolds/trivialization.py +++ b/src/sage/manifolds/trivialization.py @@ -693,7 +693,6 @@ def matrix(self): """ return self._automorphism.matrix(self._frame1) - def __eq__(self, other): r""" Equality operator. diff --git a/src/sage/matrix/benchmark.py b/src/sage/matrix/benchmark.py index 811a1cbfc98..751b89c5cc3 100644 --- a/src/sage/matrix/benchmark.py +++ b/src/sage/matrix/benchmark.py @@ -562,7 +562,6 @@ def vecmat_ZZ(n=300, min=-9, max=9, system='sage', times=200): raise ValueError('unknown system "%s"'%system) - ####################################################################### # Dense Benchmarks over GF(p), for small p. ####################################################################### @@ -721,7 +720,6 @@ def matrix_add_GF(n=1000, p=16411, system='sage',times=100): raise ValueError('unknown system "%s"'%system) - # Matrix multiplication over GF(p) def matrix_multiply_GF(n=100, p=16411, system='sage', times=3): diff --git a/src/sage/matrix/compute_J_ideal.py b/src/sage/matrix/compute_J_ideal.py index 7c31c0160f1..55dcb5e7072 100644 --- a/src/sage/matrix/compute_J_ideal.py +++ b/src/sage/matrix/compute_J_ideal.py @@ -190,7 +190,6 @@ def lifting(p, t, A, G): """ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing - DX = A.parent().base() (X,) = DX.variable_names() D = DX.base_ring() @@ -203,7 +202,6 @@ def lifting(p, t, A, G): if not (A*G % p**(t-1)).is_zero(): raise ValueError("A*G not zero mod %s^%s" % (p, t-1)) - R = A*G/p**(t-1) R.change_ring(DX) @@ -351,7 +349,6 @@ def __init__(self, B): self._DX = X.parent() self._cache = {} - def find_monic_replacements(self, p, t, pt_generators, prev_nu): r""" Replace possibly non-monic generators of `N_{(p^t)}(B)` by monic @@ -432,7 +429,6 @@ def find_monic_replacements(self, p, t, pt_generators, prev_nu): return replacements - def current_nu(self, p, t, pt_generators, prev_nu): r""" Compute `(p^t)`-minimal polynomial of `B`. @@ -482,7 +478,6 @@ def current_nu(self, p, t, pt_generators, prev_nu): from sage.misc.verbose import verbose - if not all((g(self._B) % p**t).is_zero() for g in pt_generators): raise ValueError("%s not in N_{(%s^%s)}(B)" % @@ -519,7 +514,6 @@ def current_nu(self, p, t, pt_generators, prev_nu): return g - def mccoy_column(self, p, t, nu): r""" Compute matrix for McCoy's criterion. @@ -577,7 +571,6 @@ def mccoy_column(self, p, t, nu): return column - def p_minimal_polynomials(self, p, s_max=None): r""" Compute `(p^s)`-minimal polynomials `\nu_s` of `B`. @@ -768,7 +761,6 @@ def p_minimal_polynomials(self, p, s_max=None): d = self._A.ncols() G = matrix(self._DX, d, 0) - while t < s_max: deg_prev_nu = nu.degree() t += 1 @@ -812,7 +804,6 @@ def p_minimal_polynomials(self, p, s_max=None): return p_min_polys - def null_ideal(self, b=0): r""" Return the `(b)`-ideal `N_{(b)}(B)=\{f\in D[X] \mid f(B)\in M_n(bD)\}`. @@ -877,7 +868,6 @@ def null_ideal(self, b=0): return self._DX.ideal(generators) - def prime_candidates(self): r""" Determine those primes `p` where `\mu_B` might not be a @@ -910,7 +900,6 @@ def prime_candidates(self): return [p for (p, t) in factor(T.det())] - def integer_valued_polynomials_generators(self): r""" Determine the generators of the ring of integer valued polynomials on `B`. diff --git a/src/sage/media/wav.py b/src/sage/media/wav.py index c847754f2e5..9e9664595b3 100644 --- a/src/sage/media/wav.py +++ b/src/sage/media/wav.py @@ -102,7 +102,6 @@ def __init__(self, data=None, **kwds): else: raise ValueError("Must give a filename") - def save(self, filename='sage.wav'): r""" Save this wave file to disk, either as a Sage sobj or as a .wav file. diff --git a/src/sage/misc/gperftools.py b/src/sage/misc/gperftools.py index 55ee572b8c4..d6e8123e8b2 100644 --- a/src/sage/misc/gperftools.py +++ b/src/sage/misc/gperftools.py @@ -47,7 +47,6 @@ libprofiler = None - class Profiler(SageObject): def __init__(self, filename=None): diff --git a/src/sage/misc/sage_eval.py b/src/sage/misc/sage_eval.py index 4e2a9968f24..8d0416a4cfd 100644 --- a/src/sage/misc/sage_eval.py +++ b/src/sage/misc/sage_eval.py @@ -198,7 +198,6 @@ def sage_eval(source, locals=None, cmds='', preparse=True): return eval(source, sage.all.__dict__, locals) - def sageobj(x, vars=None): """ Return a native Sage object associated to ``x``, if possible and diff --git a/src/sage/modular/quasimodform/element.py b/src/sage/modular/quasimodform/element.py index 24a6b7ebfad..b92c31722ac 100644 --- a/src/sage/modular/quasimodform/element.py +++ b/src/sage/modular/quasimodform/element.py @@ -622,7 +622,6 @@ def __getitem__(self, weight): homogeneous_component = __getitem__ # alias - def serre_derivative(self): r""" Return the Serre derivative of the given quasimodular form. diff --git a/src/sage/modules/fg_pid/fgp_element.py b/src/sage/modules/fg_pid/fgp_element.py index dbaeaf8c3e0..0a0f435d779 100644 --- a/src/sage/modules/fg_pid/fgp_element.py +++ b/src/sage/modules/fg_pid/fgp_element.py @@ -120,7 +120,6 @@ def lift(self): """ return self._x - def __neg__(self): """ EXAMPLES:: @@ -135,7 +134,6 @@ def __neg__(self): P = self.parent() return P.element_class(P, -self._x) - def _add_(self, other): """ EXAMPLES:: @@ -170,7 +168,6 @@ def _add_(self, other): P = self.parent() return P.element_class(P, self._x + other._x) - def _sub_(self, other): """ EXAMPLES:: @@ -190,7 +187,6 @@ def _sub_(self, other): P = self.parent() return P.element_class(P, self._x - other._x) - def _rmul_(self, c): """ Multiplication by a scalar from the left (``self`` is on the right). @@ -293,7 +289,6 @@ def _repr_(self): """ return repr(self.vector()) - def __getitem__(self, *args): """ EXAMPLES:: diff --git a/src/sage/modules/free_module.py b/src/sage/modules/free_module.py index 41bd5633503..b7618475111 100644 --- a/src/sage/modules/free_module.py +++ b/src/sage/modules/free_module.py @@ -1830,7 +1830,6 @@ def free_resolution(self, *args, **kwds): raise NotImplementedError("the module must be a free module or " "have the base ring be a polynomial ring using Singular") - def graded_free_resolution(self, *args, **kwds): r""" Return a graded free resolution of ``self``. diff --git a/src/sage/modules/vector_space_morphism.py b/src/sage/modules/vector_space_morphism.py index b0e0846a163..8044ed8dd4c 100644 --- a/src/sage/modules/vector_space_morphism.py +++ b/src/sage/modules/vector_space_morphism.py @@ -866,7 +866,6 @@ def __init__(self, homspace, A, side="left"): if homspace.domain().dimension() != A.ncols(): raise TypeError('codomain dimension is incompatible with matrix size') - A = homspace._matrix_space(side)(A) free_module_morphism.FreeModuleMorphism.__init__(self, homspace, A, side) diff --git a/src/sage/modules/with_basis/morphism.py b/src/sage/modules/with_basis/morphism.py index 6a43cab1461..0a38d7903d0 100644 --- a/src/sage/modules/with_basis/morphism.py +++ b/src/sage/modules/with_basis/morphism.py @@ -690,7 +690,6 @@ def __init__(self, triangular="upper", unitriangular=False, self._inverse_on_support = inverse_on_support - if invertible is None and (domain.basis().keys() == codomain.basis().keys()) and \ (self._inverse_on_support==identity or domain in Modules.FiniteDimensional): invertible = True diff --git a/src/sage/modules/with_basis/representation.py b/src/sage/modules/with_basis/representation.py index 815871e038d..44b9f6115e2 100644 --- a/src/sage/modules/with_basis/representation.py +++ b/src/sage/modules/with_basis/representation.py @@ -494,7 +494,6 @@ def side(self): """ return "left" if self._left_repr else "right" - class Element(CombinatorialFreeModule.Element): def _acted_upon_(self, scalar, self_on_left=False): """ diff --git a/src/sage/monoids/free_abelian_monoid.py b/src/sage/monoids/free_abelian_monoid.py index 54771b247e4..aa0581c2c0e 100644 --- a/src/sage/monoids/free_abelian_monoid.py +++ b/src/sage/monoids/free_abelian_monoid.py @@ -220,7 +220,6 @@ def __call__(self, x): return x return self.element_class(self, x) - def __contains__(self, x): """ Return True if `x` is an element of this abelian monoid.