Skip to content

Commit

Permalink
gh-38819: fixing some typos
Browse files Browse the repository at this point in the history
    
just fixing some typos found using something like

`egrep -IRw  --no-filename -o '[a-z]+[^i ]ons?' src/sage/ | sort | uniq
-c | sort -rn`

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
    
URL: #38819
Reported by: Frédéric Chapoton
Reviewer(s): Sebastian A. Spindler
  • Loading branch information
Release Manager committed Oct 25, 2024
2 parents e028ecc + fca106e commit 1b5ea27
Show file tree
Hide file tree
Showing 42 changed files with 67 additions and 65 deletions.
2 changes: 1 addition & 1 deletion src/sage/algebras/fusion_rings/shm_managers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ cdef class FvarsHandler:
else:
self.fvars = np.ndarray((self.ngens, ), dtype=self.fvars_t)
self.child_id = 0
# Populate with initialziation data
# Populate with initialization data
for sextuple, fvar in init_data.items():
if isinstance(fvar, MPolynomial_libsingular):
fvar = _flatten_coeffs(poly_to_tup(fvar))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def _acted_upon_(self, scalar, self_on_left=False):

class FaithfulRepresentationNilpotentPBW(CombinatorialFreeModule, Representation_abstract):
r"""
Return a faithful reprensetation of a nilpotent Lie algebra
Return a faithful representation of a nilpotent Lie algebra
constructed using the PBW basis.
Let `L` be a `k`-step nilpotent Lie algebra. Define a weight function
Expand Down
2 changes: 1 addition & 1 deletion src/sage/all__sagemath_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)')

# scipy 1.18 introduced reprecation warnings on a number of things they are moving to
# scipy 1.18 introduced deprecation warnings on a number of things they are moving to
# numpy, e.g. DeprecationWarning: scipy.array is deprecated
# and will be removed in SciPy 2.0.0, use numpy.array instead
# This affects networkx 2.2 up and including 2.4 (cf. :issue:29766)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ class NorthwestDiagrams(Diagrams):
Combinatorial northwest diagrams
Additionally, there are natural constructions of a northwest diagram
given the data of a permutation (Rothe diagrams are the protypical example
given the data of a permutation (Rothe diagrams are the prototypical example
of northwest diagrams), or the data of a partition of an integer, or a
skew partition.
Expand All @@ -1222,7 +1222,7 @@ class NorthwestDiagrams(Diagrams):
To turn a Ferrers diagram into a northwest diagram, we may call
:meth:`from_partition`. This will return a Ferrer's diagram in the
set of all northwest diagrams. For many use-cases it is probably better
to get Ferrer's diagrams by the corresponding method on partitons, namely
to get Ferrer's diagrams by the corresponding method on partitions, namely
:meth:`sage.combinat.partitions.Partitions.ferrers_diagram`::
sage: mu = Partition([7,3,1,1])
Expand Down
8 changes: 4 additions & 4 deletions src/sage/combinat/matrices/hadamard_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ def hadamard_matrix_from_sds(n, existence=False, check=True):

def hadamard_matrix_cooper_wallis_construction(x1, x2, x3, x4, A, B, C, D, check=True):
r"""
Create a Hadamard matrix using the contruction detailed in [CW1972]_.
Create a Hadamard matrix using the construction detailed in [CW1972]_.
Given four circulant matrices `X_1`, X_2, X_3, X_4` of order `n` with entries (0, 1, -1)
such that the entrywise product of two distinct matrices is always equal to `0` and that
Expand All @@ -1135,7 +1135,7 @@ def hadamard_matrix_cooper_wallis_construction(x1, x2, x3, x4, A, B, C, D, check
- ``C`` -- the matrix described above
- ``D`` -- the matrix described above
- ``check`` -- boolean (default: ``True``); if ``True``, check that the resulting
matrix is Hadamard before returing it
matrix is Hadamard before returning it
EXAMPLES::
Expand Down Expand Up @@ -1302,7 +1302,7 @@ def _get_baumert_hall_units(n, existence=False):
- ``n`` -- integer; the size of the Baumert-Hall units
- ``existence`` -- boolean (default: ``False``); if ``True``, only check whether
the units can be contructed
the units can be constructed
OUTPUT:
Expand Down Expand Up @@ -2395,7 +2395,7 @@ def williamson_goethals_seidel_skew_hadamard_matrix(a, b, c, d, check=True):

def skew_hadamard_matrix_spence_construction(n, check=True):
r"""
Construct skew Hadamard matrix of order `n` using Spence constrution.
Construct skew Hadamard matrix of order `n` using Spence construction.
This function will construct skew Hadamard matrix of order `n=2(q+1)` where `q` is
a prime power with `q = 5` (mod 8). The construction is taken from [Spe1977]_, and the
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/parallelogram_polyomino.py
Original file line number Diff line number Diff line change
Expand Up @@ -3043,7 +3043,7 @@ def get_node_position_from_box(self, box_position, direction, nb_crossed_nodes=N
INPUT:
- ``box_position`` -- the position of the statring cell
- ``box_position`` -- the position of the starting cell
- ``direction`` -- the direction (0 or 1)
Expand Down
8 changes: 4 additions & 4 deletions src/sage/combinat/plane_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ def from_antichain(self, A) -> PP:
pp_matrix[x][y] = z + 1

# For each value in current antichain, fill in the rest of the matrix by
# rule M[y,z] = Max(M[y+1,z], M[y,z+1]) antichiain is now in plane partition format
# rule M[y,z] = Max(M[y+1,z], M[y,z+1]) antichain is now in plane partition format
if A:
for i in range(a):
i = a - (i + 1)
Expand Down Expand Up @@ -2161,7 +2161,7 @@ def from_antichain(self, acl) -> PP:
pp_matrix[x][y] = (z+1)

# For each value in current antichain, fill in the rest of the
# matrix by rule M[y,z] = Max(M[y+1,z], M[y,z+1]) antichiain is
# matrix by rule M[y,z] = Max(M[y+1,z], M[y,z+1]) antichain is
# now in plane partition format.
if acl != []:
for i in range(b):
Expand Down Expand Up @@ -2368,7 +2368,7 @@ def from_antichain(self, acl) -> PP:
pp_matrix[y][x] = z + 1 # z,y,x

# for each value in current antichain, fill in the rest of the matrix by
# rule M[y,z] = Max(M[y+1,z], M[y,z+1]) antichiain is now in plane partition format
# rule M[y,z] = Max(M[y+1,z], M[y,z+1]) antichain is now in plane partition format
if acl != []:
for i in range(b):
i = b - (i + 1)
Expand Down Expand Up @@ -3166,7 +3166,7 @@ def from_antichain(self, acl) -> PP:
n = a
N = n // 2
pp_matrix = [[0] * (c) for i in range(b)]
# creates a matrix for the plane parition populated by 0s
# creates a matrix for the plane partition populated by 0s
# EX: [[0,0,0], [0,0,0], [0,0,0]]
width = N - 1
height = N - 1
Expand Down
11 changes: 6 additions & 5 deletions src/sage/combinat/specht_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,14 +748,15 @@ def retract(self):
B = self.basis()
COB = matrix([b.lift().to_vector() for b in B]).T
P, L, U = COB.LU()
# Since U is upper triangular, the nonzero entriesm must be in the
# upper square portiion of the matrix
# Since U is upper triangular, the nonzero entries must be in the
# upper square portion of the matrix
n = len(B)

Uinv = U.matrix_from_rows(range(n)).inverse()
# This is a slight abuse as the codomain should be a module with a different
# S_n action, but we only use it internally, so there isn't any problems
PLinv = (P*L).inverse()
# This is a slight abuse as the codomain should be a module
# with a different
# S_n action, but we only use it internally, so there is no problem
PLinv = (P * L).inverse()

def retraction(elt):
vec = PLinv * elt.to_vector(order=self._support_order)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/databases/cubic_hecke_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ class section(Enum):
in the case of cubic Hecke algebras on more than 4 strands
- ``markov_trace`` -- file cache for intermediate results of long
calculations in order to recover the results already obtained by
preboius attemps of calculation until the corresponding intermediate
previous attemps of calculation until the corresponding intermediate
step
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/functions/piecewise.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _subs_(self, subs_map, options, parameters, x):
return subs_map.apply_to(func, 0)
raise ValueError(f'point {point} is not in the domain')

raise ValueError('substition not allowed')
raise ValueError('substitution not allowed')

@staticmethod
def in_operands(ex):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/hyperplane_arrangement/arrangement.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def intersection_poset(self, element_label='int'):
[[0], [1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]]
By passing the argument ``element_label="subset"``, each element of the
intesection poset is labelled by the set of indices of the hyperplanes
intersection poset is labelled by the set of indices of the hyperplanes
whose intersection is said element. The index of a hyperplane is its
index in ``self.hyperplanes()``. ::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3454,7 +3454,7 @@ cdef class CombinatorialPolyhedron(SageObject):
num_threads = 1

if parallelization_depth > dim - 1:
# Is a very bad choice anyway, but prevent segmenation faults.
# Is a very bad choice anyway, but prevent segmentation faults.
parallelization_depth = dim - 1

if dual == -1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ cdef struct iter_s:
bint dual # if 1, then iterate over dual Polyhedron
face_t face # the current face of the iterator
FaceStatus face_status
size_t *atom_rep # a place where atom-representaion of face will be stored
size_t *coatom_rep # a place where coatom-representaion of face will be stored
size_t *atom_rep # a place where atom-representation of face will be stored
size_t *coatom_rep # a place where coatom-representation of face will be stored
int current_dimension # dimension of current face, dual dimension if ``dual``
int dimension # dimension of the polyhedron
int output_dimension # only faces of this (dual?) dimension are considered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ cdef inline void face_list_delete_faces_by_array(face_list_t faces, bint *delete
cdef inline void face_list_delete_faces_by_face(face_list_t faces, face_t face) noexcept:
r"""
Remove all faces such that the ``i``-th bit in ``face`` is not set
descreasing ``faces.n_faces``.
decreasing ``faces.n_faces``.
.. WARNING::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/graphs/edge_connectivity.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ cdef class GabowEdgeConnectivity:
Allocate data structure for the new tree/forest.
This method also initializes data structures for this tree index. Data
structures for a given tree index are allocatated only once.
structures for a given tree index are allocated only once.
INPUT:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/graphs/generators/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def CorrelationGraph(seqs, alpha, include_anticorrelation):
Return a correlation graph with a node per sequence in ``seqs``.
Edges are added between nodes where the corresponding sequences have a
correlation coeffecient greater than alpha.
correlation coefficient greater than alpha.
If ``include_anticorrelation`` is ``True``, then edges are also added
between nodes with correlation coefficient less than ``-alpha``.
Expand Down Expand Up @@ -440,7 +440,7 @@ def CorrelationGraph(seqs, alpha, include_anticorrelation):
from numpy import corrcoef
from sage.matrix.constructor import Matrix

# compute pairwise correlation coeffecients
# compute pairwise correlation coefficients
corrs = corrcoef(seqs)

# compare against alpha to get adjacency matrix
Expand Down
4 changes: 2 additions & 2 deletions src/sage/graphs/generators/distance_regular.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1869,8 +1869,8 @@ def is_classical_parameters_graph(list array):
graphs with classical parameters, then this function returns a tuple
consisting of the parameters `(d, b, \alpha, \beta)` and a fourth parameter
which is the enum ``CalssicalParametersGraph`` indicating the family with
the given itersection array.
If the array doesn't belong to any classical parameter graph, then this
the given intersection array.
If the array does not belong to any classical parameter graph, then this
function returns ``False``.
If the array belongs to a sporadic graph rather than a family of graphs,
then the function returns ``False``. This is to reduce the overlap with
Expand Down
2 changes: 1 addition & 1 deletion src/sage/graphs/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -9048,7 +9048,7 @@ def least_effective_resistance(self, nonedgesonly=True):
resistances
* :meth:`effective_resistance` --
compuetes effective resistance for a single node pair
computes effective resistance for a single node pair
* See :wikipedia:`Resistance_distance` for more details.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/knots/free_knotinfo_monoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def _search_composition(self, max_cr, knot, hpoly):
INPUT:
- ``max_cr`` -- max number of crorssing to stop searching
- ``max_cr`` -- max number of crossing to stop searching
- ``knot`` -- instance of :class:`~sage.knots.knot.Knot`
- ``hpoly`` -- Homfly polynomial to search for a component
Expand Down
2 changes: 1 addition & 1 deletion src/sage/knots/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -3908,7 +3908,7 @@ def _markov_move_cmp(self, braid):
to the given braid in the following sense. If both braids have the same
number of strands it is checked if they are conjugated to each other in
their common braid group (Markov move I). If the number of strands differs,
the braid having less strands is extended by Markov moves II (appendening
the braid having less strands is extended by Markov moves II (appending
the largest generator or its inverse recursively) until a common braid
group can be achieved, where conjugation is tested.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_mat_GF2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ cdef class ntl_mat_GF2():
[0 0 0 0 0 0 0 0 0 0]
]
``Abar`` is in row echolon form now::
``Abar`` is in row echelon form now::
sage: first_nonzero_indices = [Abar._sage_().row(i).nonzero_positions()[0] for i in range(A.rank())]
sage: all(first_nonzero_indices[i] < first_nonzero_indices[i+1] for i in range(A.rank()-1))
Expand Down Expand Up @@ -573,7 +573,7 @@ cdef class ntl_mat_GF2():
sage: A_image.row_space() == Abar_image.row_space()
True
X is in row echolon form::
X is in row echelon form::
sage: first_nonzero_indices = [row.nonzero_positions()[0] for row in Abar_image.rows()]
sage: all(first_nonzero_indices[i] < first_nonzero_indices[i+1] for i in range(Abar_image.nrows() - 1))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/manifolds/continuous_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ def display(self, chart1=None, chart2=None):
EXAMPLES:
A simple reparamentrization::
A simple reparametrization::
sage: R.<t> = manifolds.RealLine()
sage: I = R.open_interval(0, 2*pi)
Expand Down
7 changes: 4 additions & 3 deletions src/sage/matrix/matrix2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4554,7 +4554,7 @@ cdef class Matrix(Matrix1):

Over inexact rings:

For inexact rings one should avoid echolonizing if possible::
For inexact rings one should avoid echelonizing if possible::

sage: A = Matrix(
....: [[ 0.0, 0.5, 0.8090169944],
Expand Down Expand Up @@ -4801,7 +4801,7 @@ cdef class Matrix(Matrix1):
:meth:`kernel` is exactly equal to :meth:`left_kernel`.

For inexact rings use :meth:`right_kernel_matrix` with
``basis='computed'`` to avoid echolonizing.
``basis='computed'`` to avoid echelonizing.

INPUT:

Expand Down Expand Up @@ -5161,6 +5161,7 @@ cdef class Matrix(Matrix1):
def left_kernel(self, *args, **kwds):
r"""
Return the left kernel of this matrix, as a vector space or free module.

This is the set of vectors ``x`` such that ``x*self = 0``.

.. NOTE::
Expand All @@ -5169,7 +5170,7 @@ cdef class Matrix(Matrix1):
:meth:`kernel` is exactly equal to :meth:`left_kernel`.

For inexact rings use :meth:`right_kernel_matrix` with
``basis='computed'`` (on the transpose of the matrix) to avoid echolonizing.
``basis='computed'`` (on the transpose of the matrix) to avoid echelonizing.

INPUT:

Expand Down
2 changes: 1 addition & 1 deletion src/sage/matroids/database_matroids.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ def K5(groundset='abcdefghij'):
Return the graphic matroid `M(K_5)`.
`M(K_5)` is an excluded minor for the class of cographic matroids. It is
the `3`-dimensional Desargues configuration.
the `3`-dimensional Desargues configuration.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modules/matrix_morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def __mul__(self, right):
Codomain: Vector space of dimension 2 over Rational Field
We can test interraction between morphisms with different ``side``::
We can test interaction between morphisms with different ``side``::
sage: V = ZZ^2
sage: m = matrix(2, [1,1,0,1])
Expand Down
4 changes: 2 additions & 2 deletions src/sage/modules/with_basis/invariant.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ def _repr_(self):
M = M._module
return f"({self._semigroup})-invariant submodule of {M}"

def _latex_(self):
def _latex_(self) -> str:
r"""
Return a latex representaion of ``self``.
Return a latex representation of ``self``.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/plot/plot3d/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ cdef class Graphics3d(SageObject):
# Instead, the tachyon aspectratio is set to match nonsquare
# drawing area in "figsize".

# Parameters are mostly taken from tachyion.py,
# Parameters are mostly taken from tachyon.py,
# but camera_center is renamed camera_position.
# Apparently reST strips () from default parameters in the automatic documentation.
# Thus, I replaced () by [] as default values.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/asymptotic/term_monoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -4399,7 +4399,7 @@ def __init__(self, parent, growth, valid_from, **kwds):
...
ValueError: B-Term has valid_from variables defined which do not occur in the term.
"""
# BTerms must have positive cofficients
# BTerms must have positive coefficients
coefficient = abs(kwds['coefficient'])

super().__init__(parent=parent, growth=growth, coefficient=coefficient)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/complex_interval.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,7 @@ cdef _circle_invert_standard(
# crosses the x-Axis, the north east or south east diagonal, respectively.
#
# Given standard form, the input also has to cross the north east
# diagonal and x-Axis if it corsses the south east diagonal.
# diagonal and x-Axis if it crosses the south east diagonal.
#
# Thus, we are left with five cases:
#
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/continued_fraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def _mpfr_(self, R):
....: fields.append(RealField(prec=prec, rnd=rnd))
sage: for n in range(3000): # long time, not tested, known bug (see :issue:`29957`)
....: a = QQ.random_element(num_bound=2^(n%100))
....: if a.denominator() % 8 == 0: # not precices enough # :issue:`29957`
....: if a.denominator() % 8 == 0: # not precise enough # :issue:`29957`
....: continue
....: cf = continued_fraction(a)
....: for R in fields:
Expand Down
Loading

0 comments on commit 1b5ea27

Please sign in to comment.