# HG changeset patch
# User Minh Van Nguyen <nguyenminh2@gmail.com>
# Date 1249845363 25200
# Node ID d63f79700dd8888926ff2b21818e5ea60e9e19e6
# Parent  87b600f2b8d586ea15239b60720ba6a89e11e44c
trac 6718: spell-check all modules under sage/matrix

diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/action.pyx
--- a/sage/matrix/action.pyx
+++ b/sage/matrix/action.pyx
@@ -87,7 +87,7 @@
     cpdef Element _call_(self, g, s):
         """
         EXAMPLES:
-        Respects compatable subdivisions:
+        Respects compatible subdivisions:
             sage: M = matrix(5, 5, prime_range(100))
             sage: M.subdivide(2,3); M
             [ 2  3  5| 7 11]
@@ -117,7 +117,7 @@
             [1048]
             [3056]
             
-        If the subdivisions aren't compatable, ignore them. 
+        If the subdivisions aren't compatible, ignore them. 
             sage: N.subdivide(1,1); N
             [ 0| 1]
             [--+--]
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/constructor.py
--- a/sage/matrix/constructor.py
+++ b/sage/matrix/constructor.py
@@ -46,7 +46,7 @@
     To construct a multiple of the identity (`cI`), you can
     specify square dimensions and pass in `c`. Calling matrix()
     with a Sage object may return something that makes sense. Calling
-    matrix() with a numpy array will convert the array to a matrix.
+    matrix() with a NumPy array will convert the array to a matrix.
     
     The ring, number of rows, and number of columns of the matrix can
     be specified by setting the ring, nrows, or ncols parameters or by
@@ -588,9 +588,9 @@
                     try:
                         return matrix( [list(row) for row in list(num_array)])
                     except TypeError:
-                        raise TypeError("cannot convert numpy matrix to SAGE matrix")
+                        raise TypeError("cannot convert NumPy matrix to Sage matrix")
                 else:
-                    raise TypeError("cannot convert numpy matrix to SAGE matrix")
+                    raise TypeError("cannot convert NumPy matrix to Sage matrix")
 
                 return m
             elif nrows is not None and ncols is not None:
@@ -954,7 +954,7 @@
 
 def block_matrix(sub_matrices, nrows=None, ncols=None, subdivide=True):
     """
-    Returns a larger matrix made by concatinating the sub_matrices
+    Returns a larger matrix made by concatenating the sub_matrices
     (rows first, then columns). For example, the matrix
 
     ::
@@ -1010,7 +1010,7 @@
         [    3     9|   -3    -9|-5/12   3/8|  300   900]
         [    6    10|   -6   -10|  1/4  -1/8|  600  1000]
     
-    It handle baserings nicely too::
+    It handle base rings nicely too::
     
         sage: R.<x> = ZZ['x']
         sage: block_matrix([1/2, A, 0, x-1])
@@ -1044,7 +1044,7 @@
     elif ncols is None:
         ncols = int(n/nrows)
     if nrows * ncols != n:
-        raise ValueError, "Given number of rows (%s), columns (%s) incompatable with number of submatrices (%s)" % (nrows, ncols, n)
+        raise ValueError, "Given number of rows (%s), columns (%s) incompatible with number of submatrices (%s)" % (nrows, ncols, n)
 
     # empty matrix
     if n == 0:
@@ -1085,7 +1085,7 @@
         if R is not ZZ:
             base = sage.categories.pushout.pushout(base, R)
         
-    # finally concatinate
+    # finally concatenate
     for i in range(nrows):
         for j in range(ncols):
             # coerce
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/docs.py
--- a/sage/matrix/docs.py
+++ b/sage/matrix/docs.py
@@ -77,7 +77,7 @@
 entries. Once a matrix `A` is made immutable using
 ``A.set_immutable()`` the entries of `A`
 cannot be changed, and `A` can never be made mutable again.
-However, properies of `A` such as its rank, characteristic
+However, properties of `A` such as its rank, characteristic
 polynomial, etc., are all cached so computations involving
 `A` may be more efficient. Once `A` is made
 immutable it cannot be changed back. However, one can obtain a
@@ -212,6 +212,6 @@
 
        - Kernels of matrices
          Implement only a left_kernel() or right_kernel() method, whichever requires
-         the least overhead (usually meaning little or no transpose'ing).  Let the
+         the least overhead (usually meaning little or no transposing).  Let the
          methods in the matrix2 class handle left, right, generic kernel distinctions.
 """
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix0.pyx
--- a/sage/matrix/matrix0.pyx
+++ b/sage/matrix/matrix0.pyx
@@ -398,12 +398,12 @@
         
         Matrices are always mutable by default, i.e., you can change their
         entries using ``A[i,j] = x``. However, mutable matrices
-        aren't hasheable, so can't be used as keys in dictionaries, etc.
+        aren't hashable, so can't be used as keys in dictionaries, etc.
         Also, often when implementing a class, you might compute a matrix
         associated to it, e.g., the matrix of a Hecke operator. If you
         return this matrix to the user you're really returning a reference
         and the user could then change an entry; this could be confusing.
-        Thus you shoulds set such a matrix immutable.
+        Thus you should set such a matrix immutable.
         
         EXAMPLES::
         
@@ -415,7 +415,7 @@
             [10   1]
             [ 2   3]
         
-        Mutable matrices are not hasheable, so can't be used as keys for
+        Mutable matrices are not hashable, so can't be used as keys for
         dictionaries::
         
             sage: hash(A)
@@ -427,7 +427,7 @@
             ...
             TypeError: mutable matrices are unhashable
         
-        If we make A immutable it suddenly is hasheable.
+        If we make A immutable it suddenly is hashable.
         
         ::
         
@@ -519,7 +519,7 @@
 ##             sage: a._get_very_unsafe(0,1)
 ##             1
 
-##         If you do \code{a.\_get\_very\_unsafe(0,10)} you'll very likely crash SAGE
+##         If you do \code{a.\_get\_very\_unsafe(0,10)} you'll very likely crash Sage
 ##         completely.
 ##         """
 ##         return self.get_unsafe(i, j)
@@ -1679,7 +1679,7 @@
         from sage.server.support import EMBEDDED_MODE
 
         # jsmath doesn't know the command \hline, so have to do things
-        # differently (and not as atractively) in embedded mode:
+        # differently (and not as attractively) in embedded mode:
         # construct an array with a subarray for each block.
         if len(row_divs) + len(col_divs) > 0 and EMBEDDED_MODE:
             for r in range(len(row_divs)+1):
@@ -3795,7 +3795,7 @@
         of coefficients. A dense matrix and a sparse matrix are equal if
         their coefficients are the same.
         
-        EXAMPLES: EXAMPLE cmparing sparse and dense matrices::
+        EXAMPLES: EXAMPLE comparing sparse and dense matrices::
         
             sage: matrix(QQ,2,range(4)) == matrix(QQ,2,range(4),sparse=True)
             True
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix1.pyx
--- a/sage/matrix/matrix1.pyx
+++ b/sage/matrix/matrix1.pyx
@@ -31,7 +31,7 @@
 
     def _pari_init_(self):
         """
-        Return a string defining a gp representation of self.
+        Return a string defining a GP representation of self.
 
         EXAMPLES::
 
@@ -1059,7 +1059,7 @@
 
         - Jaap Spies (2006-02-18)
 
-        - Didier Deshommes: some pyrex speedups implemented
+        - Didier Deshommes: some Pyrex speedups implemented
         """
         if not PY_TYPE_CHECK(rows, list):
             raise TypeError, "rows must be a list of integers"
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix2.pyx
--- a/sage/matrix/matrix2.pyx
+++ b/sage/matrix/matrix2.pyx
@@ -939,7 +939,7 @@
         Return the determinant of self.
         
         ALGORITHM: For small matrices (n4), this is computed using the
-        naive formula For integral domains, the charpoly is computed (using
+        naive formula For integral domains, the characteristic polynomial is computed (using
         hessenberg form) Otherwise this is computed using the very stupid
         expansion by minors stupid *naive generic algorithm*. For matrices
         over more most rings more sophisticated algorithms can be used.
@@ -3531,7 +3531,7 @@
 
         if not self.base_ring().is_exact():
             from warnings import warn
-            warn("Using generic algorithm for an inexact ring, which may result in garbarge from numerical precision issues.")
+            warn("Using generic algorithm for an inexact ring, which may result in garbage from numerical precision issues.")
 
         V = []
         from sage.rings.qqbar import QQbar
@@ -5129,7 +5129,7 @@
 
         EXAMPLES:
 
-        Here is an example over the real double field; internally, this uses scipy::
+        Here is an example over the real double field; internally, this uses SciPy::
 
             sage: r = matrix(RDF, 5, 5, [ 0,0,0,0,1, 1,1,1,1,1, 16,8,4,2,1, 81,27,9,3,1, 256,64,16,4,1 ])
             sage: m = r * r.transpose(); m
@@ -5294,7 +5294,7 @@
             10000
         
         In this example the Hadamard bound has to be computed
-        (automatically) using mpfr instead of doubles, since doubles
+        (automatically) using MPFR instead of doubles, since doubles
         overflow::
         
             sage: a = matrix(ZZ, 2, [2^10000,3^10000,2^50,3^19292])
@@ -6226,7 +6226,7 @@
 def _dim_cmp(x,y):
     """
     Used internally by matrix functions. Given 2-tuples (x,y), returns
-    their comparision based on the first component.
+    their comparison based on the first component.
     
     EXAMPLES::
     
@@ -6285,7 +6285,7 @@
     """
     Returns all possible sublists of length t from range(n)
     
-    Based on algoritm T from Knuth's taocp part 4: 7.2.1.3 p.5 This
+    Based on algorithm T from Knuth's taocp part 4: 7.2.1.3 p.5 This
     function replaces the one based on algorithm L because it is
     faster.
     
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_complex_double_dense.pyx
--- a/sage/matrix/matrix_complex_double_dense.pyx
+++ b/sage/matrix/matrix_complex_double_dense.pyx
@@ -24,7 +24,7 @@
 
 AUTHORS:
 
-- Jason Grout (2008-09): switch to numpy backend
+- Jason Grout (2008-09): switch to NumPy backend
 
 - Josh Kantor
 
@@ -93,7 +93,7 @@
     #   * set_unsafe
     #   * get_unsafe
     #   * __richcmp__    -- always the same
-    #   * __hash__       -- alway simple
+    #   * __hash__       -- always simple
     ########################################################################
     def __new__(self, parent, entries, copy, coerce):
         global numpy
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_cyclo_dense.pyx
--- a/sage/matrix/matrix_cyclo_dense.pyx
+++ b/sage/matrix/matrix_cyclo_dense.pyx
@@ -1081,7 +1081,7 @@
 
         OUTPUT:
             matrix over GF(p) whose columns correspond to the entries
-            of all the charpolys of the reduction of self modulo all
+            of all the characteristic polynomials of the reduction of self modulo all
             the primes over p.
 
         EXAMPLES:
@@ -1095,12 +1095,12 @@
             [4 0 0]
             [0 0 0]        
         """
-        tm = verbose("Computing characteristic polynomial of cyclomotic matrix modulo %s."%p)
+        tm = verbose("Computing characteristic polynomial of cyclotomic matrix modulo %s."%p)
         # Reduce self modulo all primes over p
         R, denom = self._reductions(p)
         # Compute the characteristic polynomial of each reduced matrix
         F = [A.charpoly('x') for A in R]
-        # Put the charpolys together as the rows of a mod-p matrix
+        # Put the characteristic polynomials together as the rows of a mod-p matrix
         k = R[0].base_ring()
         S = matrix(k, len(F), self.nrows()+1, [f.list() for f in F])
         # multiply by inverse of reduction matrix to lift
@@ -1467,7 +1467,7 @@
                         found += 1
                     else:
                         # this means that the rank profile mod this
-                        # prime is worse than those that came befroe,
+                        # prime is worse than those that came before,
                         # so we just loop
                         p = previous_prime(p)
                         continue
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_dense.pyx
--- a/sage/matrix/matrix_dense.pyx
+++ b/sage/matrix/matrix_dense.pyx
@@ -204,7 +204,7 @@
 
     def antitranspose(self):
         """
-        Returns the anittranspose of self, without changing self.
+        Returns the antitranspose of self, without changing self.
         
         EXAMPLES::
         
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_double_dense.pyx
--- a/sage/matrix/matrix_double_dense.pyx
+++ b/sage/matrix/matrix_double_dense.pyx
@@ -1,5 +1,5 @@
 """
-Dense matrices using a numpy backend.  This serves as a base class for
+Dense matrices using a NumPy backend.  This serves as a base class for
 dense matrices over Real Double Field and Complex Double Field.
 
 EXAMPLES:
@@ -23,7 +23,7 @@
     True
 
 AUTHORS:
-    -- Jason Grout, Sep 2008: switch to numpy backend, factored out the Matrix_double_dense class
+    -- Jason Grout, Sep 2008: switch to NumPy backend, factored out the Matrix_double_dense class
     -- Josh Kantor
     -- William Stein: many bug fixes and touch ups.
 """
@@ -86,7 +86,7 @@
     #   * set_unsafe
     #   * get_unsafe
     #   * __richcmp__    -- always the same
-    #   * __hash__       -- alway simple
+    #   * __hash__       -- always simple
     ########################################################################
     def __new__(self, parent, entries, copy, coerce):
         """
@@ -104,7 +104,7 @@
         
         EXAMPLE:
         In this example, we throw away the current matrix and make a
-        new unitialized matrix representing the data for the class.
+        new uninitialized matrix representing the data for the class.
             sage: a=matrix(RDF, 3, range(9))
             sage: a.__create_matrix__()
         """
@@ -260,7 +260,7 @@
 
         # We call the self._python_dtype function on the value since
         # numpy does not know how to deal with complex numbers other
-        # than the builtin complex number type.
+        # than the built-in complex number type.
         cdef int status
         status = cnumpy.PyArray_SETITEM(self._matrix_numpy,
                         cnumpy.PyArray_GETPTR2(self._matrix_numpy, i, j), 
@@ -883,7 +883,7 @@
         Compute the log of the absolute value of the determinant
         using LU decomposition.
 
-        NOTE: This is useful if the usual determinant overlows.
+        NOTE: This is useful if the usual determinant overflows.
 
         EXAMPLES:
             sage: m = matrix(RDF,2,2,range(4)); m
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_generic_dense.pyx
--- a/sage/matrix/matrix_generic_dense.pyx
+++ b/sage/matrix/matrix_generic_dense.pyx
@@ -73,7 +73,7 @@
                     entries = list(entries)
                     is_list = 1
                 except TypeError:
-                    raise TypeError, "entries must be coercible to a list or the basering"
+                    raise TypeError, "entries must be coercible to a list or the base ring"
                     
         else:
             is_list = 1
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_integer_2x2.pyx
--- a/sage/matrix/matrix_integer_2x2.pyx
+++ b/sage/matrix/matrix_integer_2x2.pyx
@@ -159,7 +159,7 @@
                         entries = list(entries)
                         is_list = 1
                     except TypeError:
-                        raise TypeError, "entries must be coercible to a list or the basering"
+                        raise TypeError, "entries must be coercible to a list or the base ring"
                     
         else:
             is_list = 1
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_integer_dense.pyx
--- a/sage/matrix/matrix_integer_dense.pyx
+++ b/sage/matrix/matrix_integer_dense.pyx
@@ -609,7 +609,7 @@
         # TODO: This is about 6-10 slower than MAGMA doing what seems to be the same thing.
         # Moreover, NTL can also do this quickly.  Why?   I think both have specialized
         # small integer classes. (dmharvey: yes, NTL does not allocate any memory when
-        # intialising a ZZ to zero.)
+        # initializing a ZZ to zero.)
         _sig_on
         cdef Py_ssize_t i
         for i from 0 <= i < self._nrows * self._ncols:
@@ -1139,7 +1139,7 @@
         mpz_clear(h)
         mpz_clear(x)
         
-        return 0   # no error occured.
+        return 0   # no error occurred.
         
     def _multiply_multi_modular(left, Matrix_integer_dense right):
         """
@@ -1223,7 +1223,7 @@
         cdef mod_int **row_list
         row_list = <mod_int**>sage_malloc(sizeof(mod_int*) * n)
         if row_list == NULL:
-            raise MemoryError, "out of memory allocating multi-modular coefficent list"
+            raise MemoryError, "out of memory allocating multi-modular coefficient list"
 
         _sig_on
         for i from 0 <= i < nr:
@@ -1280,13 +1280,13 @@
             raise NotImplementedError, "modulus to big"
         cdef mod_int** matrix = <mod_int**>sage_malloc(sizeof(mod_int*) * self._nrows)
         if matrix == NULL:
-            raise MemoryError, "out of memory allocating multi-modular coefficent list"
+            raise MemoryError, "out of memory allocating multi-modular coefficient list"
         
         cdef Py_ssize_t i, j
         for i from 0 <= i < self._nrows:
             matrix[i] = <mod_int *>sage_malloc(sizeof(mod_int) * self._ncols)
             if matrix[i] == NULL:
-                raise MemoryError, "out of memory allocating multi-modular coefficent list"
+                raise MemoryError, "out of memory allocating multi-modular coefficient list"
             for j from 0 <= j < self._ncols:
                 matrix[i][j] = mpz_fdiv_ui(self._matrix[i][j], n)
 
@@ -1762,7 +1762,7 @@
         
         ALGORITHM: 1. Replace input by a matrix of full rank got from a
         subset of the rows. 2. Divide out any common factors from rows. 3.
-        Check max_dets random dets of submatrices to see if their gcd
+        Check max_dets random dets of submatrices to see if their GCD
         (with p) is 1 - if so matrix is saturated and we're done. 4.
         Finally, use that if A is a matrix of full rank, then
         `hnf(transpose(A))^{-1}*A` is a saturation of A.
@@ -2310,7 +2310,7 @@
            if False, impacts how determinants are computed.
         
         
-        By convention if self has 0 columnss, the right kernel is of dimension 0,
+        By convention if self has 0 columns, the right kernel is of dimension 0,
         whereas the right kernel is the whole domain if self has 0 rows.
         
         EXAMPLES::
@@ -3124,8 +3124,8 @@
 
            The rank is cached.
         
-        ALGORITHM: First check if the matrix has maxim posible rank by
-        working modulo one random prime. If not call Linbox's rank
+        ALGORITHM: First check if the matrix has maxim possible rank by
+        working modulo one random prime. If not call LinBox's rank
         function.
         
         EXAMPLES::
@@ -3157,7 +3157,7 @@
         if r == self._nrows or r == self._ncols:
             self.cache('rank', r)
             return r
-        # Detecting full rank didn't work -- use Linbox's general algorithm. 
+        # Detecting full rank didn't work -- use LinBox's general algorithm. 
         r = self._rank_linbox()
         self.cache('rank', r)
         return r
@@ -3252,7 +3252,7 @@
             sage: A.determinant(algorithm='linbox')
             Traceback (most recent call last):
             ...
-            RuntimeError: you must pass the proof=False option to the determinant command to use Linbox's det algorithm
+            RuntimeError: you must pass the proof=False option to the determinant command to use LinBox's det algorithm
             sage: A.determinant(algorithm='linbox',proof=False)
             -21
             sage: A._clear_cache()
@@ -3293,7 +3293,7 @@
             return matrix_integer_dense_hnf.det_padic(self, proof=proof, stabilize=stabilize)
         elif algorithm == 'linbox':
             if proof:
-                raise RuntimeError, "you must pass the proof=False option to the determinant command to use Linbox's det algorithm"
+                raise RuntimeError, "you must pass the proof=False option to the determinant command to use LinBox's det algorithm"
             d = self._det_linbox()
         elif algorithm == 'pari':
             d = self._det_pari()
@@ -3358,7 +3358,7 @@
 
         cdef long dim
         cdef mpz_t *mp_N
-        time = verbose('computing nullspace of %s x %s matrix using IML'%(self._nrows, self._ncols))
+        time = verbose('computing null space of %s x %s matrix using IML'%(self._nrows, self._ncols))
         _sig_on
         dim = nullspaceMP (self._nrows, self._ncols, self._entries, &mp_N)
         _sig_off
@@ -3372,7 +3372,7 @@
             mpz_clear(mp_N[i])
         free(mp_N)
 
-        verbose("finished computing nullspace", time)
+        verbose("finished computing null space", time)
         M._initialized = True
         return M
     
@@ -4656,7 +4656,7 @@
     def _det_pari(self, int flag=0):
         """
         Determinant of this matrix using Gauss-Bareiss. If (optional)
-        flag is set to 1, use classical gaussian elimination.
+        flag is set to 1, use classical Gaussian elimination.
 
         For efficiency purposes, this det is computed entirely on the
         PARI stack then the PARI stack is cleared.  This function is
@@ -4897,7 +4897,7 @@
     cdef mod_int **row_list
     row_list = <mod_int**>sage_malloc(sizeof(mod_int*) * n)
     if row_list == NULL:
-        raise MemoryError, "out of memory allocating multi-modular coefficent list"
+        raise MemoryError, "out of memory allocating multi-modular coefficient list"
     
     _sig_on
     for i from 0 <= i < nr:
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_integer_dense_hnf.py
--- a/sage/matrix/matrix_integer_dense_hnf.py
+++ b/sage/matrix/matrix_integer_dense_hnf.py
@@ -16,7 +16,7 @@
 def max_det_prime(n):
     """
     Return the largest prime so that it is reasonably efficiency to
-    compute modulo that prime with n x n matrices in Linbox.
+    compute modulo that prime with n x n matrices in LinBox.
 
     INPUT:
         n -- a positive integer
@@ -299,7 +299,7 @@
     Solve B*x = a when the last row of $B$ contains huge entries using
     a clever trick that reduces the problem to solve C*x = a where $C$
     is $B$ but with the last row replaced by something small, along
-    with one easy nullspace computation.  The latter are both solved
+    with one easy null space computation.  The latter are both solved
     $p$-adically.
     
     INPUT:
@@ -784,7 +784,7 @@
 
 def probable_hnf(A, include_zero_rows, proof):
     """
-    Return the HNF of A or raise an exception if someting involving
+    Return the HNF of A or raise an exception if something involving
     the randomized nature of the algorithm goes wrong along the way.
     Calling this function again a few times should result it in it
     working, at least if proof=True.
@@ -990,7 +990,7 @@
             H, pivots = probable_hnf(A, include_zero_rows = include_zero_rows, proof=True)
         except (AssertionError, ZeroDivisionError, TypeError):
             raise
-            #verbose("Assertion occured when computing HNF; guessed pivot columns likely wrong.")
+            #verbose("Assertion occurred when computing HNF; guessed pivot columns likely wrong.")
             #continue
         else:
             if is_in_hnf_form(H, pivots):
@@ -1103,7 +1103,7 @@
     both dense and sparse.
 
     INPUT:
-        times -- number of times to randomly try matrices with eash shape
+        times -- number of times to randomly try matrices with each shape
         n -- number of rows
         m -- number of columns
         proof -- test with proof true
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_integer_sparse.pyx
--- a/sage/matrix/matrix_integer_sparse.pyx
+++ b/sage/matrix/matrix_integer_sparse.pyx
@@ -50,7 +50,7 @@
     #   * set_unsafe
     #   * get_unsafe
     #   * __richcmp__    -- always the same
-    #   * __hash__       -- alway simple
+    #   * __hash__       -- always simple
     ########################################################################
     def __new__(self, parent, entries, copy, coerce):
         self._initialized = False
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_mod2_dense.pyx
--- a/sage/matrix/matrix_mod2_dense.pyx
+++ b/sage/matrix/matrix_mod2_dense.pyx
@@ -80,7 +80,7 @@
     [0 0 1]
 
 TODO:
-   - make linbox frontend and use it
+   - make LinBox frontend and use it
      - charpoly ?
      - minpoly ?
    - make Matrix_modn_frontend and use it (?)
@@ -248,7 +248,7 @@
         there is a position smallest (i,j) in \code{self} where
         \code{self[i,j]} is zero but \code{right[i,j]} is one. This
         (i,j) is smaller than the (i,j) if \code{self} and
-        \code{right} are exchanged for the comparision.
+        \code{right} are exchanged for the comparison.
 
         INPUT:
             right -- a matrix
@@ -376,7 +376,7 @@
         # would cancel, so we only need the parity of how many of each 
         # possible i0 occur. This is stored in the bits of running_xor.
         # Similarly, running_parity is the xor of the i1 needed. It's called
-        # parity because i1 is constant accross a word, and for each word
+        # parity because i1 is constant across a word, and for each word
         # the number of i1 to add is equal to the number of set bits in that 
         # word (but because two cancel, we only need keep track of the 
         # parity. 
@@ -1633,7 +1633,7 @@
 def from_png(filename):
     r"""
     Returns a dense matrix over GF(2) from a 1-bit PNG image read from
-    \code{filename}. No attempt is made to verify that the filname string
+    \code{filename}. No attempt is made to verify that the filename string
     actually points to a PNG image.
 
     INPUT:
@@ -1679,7 +1679,7 @@
     
     INPUT:
         A -- a matrix over GF(2)
-        filename -- a string for a file in a writeable position
+        filename -- a string for a file in a writable position
 
     EXAMPLE:
         sage: from sage.matrix.matrix_mod2_dense import from_png, to_png
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_modn_dense.pyx
--- a/sage/matrix/matrix_modn_dense.pyx
+++ b/sage/matrix/matrix_modn_dense.pyx
@@ -1284,7 +1284,7 @@
             [1 5 1]
             [1 5 1]
         
-        Recaling need not include the entire row.
+        Rescaling need not include the entire row.
         
         ::
         
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_mpolynomial_dense.pyx
--- a/sage/matrix/matrix_mpolynomial_dense.pyx
+++ b/sage/matrix/matrix_mpolynomial_dense.pyx
@@ -1,5 +1,5 @@
 """
-Dense matrice over multivariate polynomials over fields.
+Dense matrices over multivariate polynomials over fields.
 
 This implementation inherits from Matrix_generic_dense, i.e. it is not
 optimized for speed only some methods were added.
@@ -9,7 +9,7 @@
 
 #*****************************************************************************
 #
-#   SAGE: System for Algebra and Geometry Experimentation    
+#   Sage: System for Algebra and Geometry Experimentation    
 #
 #       Copyright (C) 2007 William Stein <wstein@gmail.com>
 #
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_rational_dense.pyx
--- a/sage/matrix/matrix_rational_dense.pyx
+++ b/sage/matrix/matrix_rational_dense.pyx
@@ -1040,7 +1040,7 @@
         
         -  ``algorithm``
 
-           - 'default': use whatever is the defalt for A\*B when A, B
+           - 'default': use whatever is the default for A\*B when A, B
              are over ZZ.
 
            - 'multimodular': use a multimodular algorithm
@@ -1726,7 +1726,7 @@
         since then we know that ker(g(A)) = `ker(g(A)^n)`.
         
         If dual is True, also returns the corresponding decomposition of V
-        under the action of the transpose of A. The factors are guarenteed
+        under the action of the transpose of A. The factors are guaranteed
         to correspond.
         
         INPUT:
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_rational_sparse.pyx
--- a/sage/matrix/matrix_rational_sparse.pyx
+++ b/sage/matrix/matrix_rational_sparse.pyx
@@ -54,7 +54,7 @@
     #   * set_unsafe
     #   * get_unsafe
     #   * __richcmp__    -- always the same
-    #   * __hash__       -- alway simple
+    #   * __hash__       -- always simple
     ########################################################################
     def __new__(self, parent, entries, copy, coerce):
         # set the parent, nrows, ncols, etc. 
@@ -403,7 +403,7 @@
         Return the denominator of this matrix.
 
         OUTPUT:
-            -- SAGE Integer
+            -- Sage Integer
 
         EXAMPLES:
             sage: b = matrix(QQ,2,range(6)); b[0,0]=-5007/293; b
@@ -544,7 +544,7 @@
         # Change self's data to point to E's.
         self._matrix = E._matrix
 
-        # Make sure that E's destructure doesn't delete self's data.
+        # Make sure that E's destructor doesn't delete self's data.
         E._matrix = NULL
         E._initialized = False
         return E.pivots()
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_real_double_dense.pyx
--- a/sage/matrix/matrix_real_double_dense.pyx
+++ b/sage/matrix/matrix_real_double_dense.pyx
@@ -24,7 +24,7 @@
     
 AUTHORS:
 
-- Jason Grout (2008-09): switch to numpy backend, factored out the
+- Jason Grout (2008-09): switch to NumPy backend, factored out the
   Matrix_double_dense class
 
 - Josh Kantor
@@ -95,7 +95,7 @@
     #   * set_unsafe
     #   * get_unsafe
     #   * __richcmp__    -- always the same
-    #   * __hash__       -- alway simple
+    #   * __hash__       -- always simple
     ########################################################################
     def __new__(self, parent, entries, copy, coerce):
         global numpy
@@ -111,8 +111,8 @@
 
     cdef set_unsafe_double(self, Py_ssize_t i, Py_ssize_t j, double value):
         """
-        Set the (i,j) entry to value without any typechecking or
-        boundchecking.
+        Set the (i,j) entry to value without any type checking or
+        bound checking.
         
         This currently isn't faster than calling self.set_unsafe; should
         we speed it up or is it just a convenience function that has the
@@ -122,7 +122,7 @@
 
     cdef double get_unsafe_double(self, Py_ssize_t i, Py_ssize_t j):
         """
-        Get the (i,j) entry without any typechecking or boundchecking.
+        Get the (i,j) entry without any type checking or bound checking.
         
         This currently isn't faster than calling self.get_unsafe; should
         we speed it up or is it just a convenience function that has the
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_space.py
--- a/sage/matrix/matrix_space.py
+++ b/sage/matrix/matrix_space.py
@@ -29,7 +29,7 @@
 import weakref
 import operator
 
-# SAGE matrix imports
+# Sage matrix imports
 import matrix
 import matrix_generic_dense
 import matrix_generic_sparse
@@ -63,7 +63,7 @@
 import sage.groups.matrix_gps.matrix_group_element
 
 
-# SAGE imports
+# Sage imports
 import sage.structure.coerce
 import sage.structure.parent_gens as parent_gens
 import sage.rings.ring as ring
@@ -456,13 +456,13 @@
                     elif sage.modules.free_module.is_FreeModule(S):
                         return matrix_action.MatrixVectorAction(self, S)
                     else:
-                        # action of basering
+                        # action of base ring
                         return sage.structure.coerce.RightModuleAction(S, self)
                 else:
                     if sage.modules.free_module.is_FreeModule(S):
                         return matrix_action.VectorMatrixAction(self, S)
                     else:
-                        # action of basering
+                        # action of base ring
                         return sage.structure.coerce.LeftModuleAction(S, self)
             else:
                 return None
@@ -727,7 +727,7 @@
             ...
             NotImplementedError: object does not support iteration
         """
-        #Make sure that we can interate over the base ring
+        #Make sure that we can iterate over the base ring
         base_ring = self.base_ring()
         base_iter = iter(base_ring)
 
@@ -1196,7 +1196,7 @@
     Given a dictionary of coordinate tuples, return the list given by
     reading off the nrows\*ncols matrix in row order.
     
-    EXAMLES::
+    EXAMPLES::
     
         sage: from sage.matrix.matrix_space import dict_to_list
         sage: d = {}
@@ -1325,7 +1325,7 @@
         assert(m00.rank() == 0)
 
     # Check that the empty 0x3 and 3x0 matrices are not invertible and that
-    # computing the detemininant raise the proper exception. 
+    # computing the determinant raise the proper exception. 
     for ms0 in [MatrixSpace(ring, 0, 3, sparse=sparse),
                 MatrixSpace(ring, 3, 0, sparse=sparse)]:
         mn0  = ms0(0)
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_sparse.pyx
--- a/sage/matrix/matrix_sparse.pyx
+++ b/sage/matrix/matrix_sparse.pyx
@@ -697,7 +697,7 @@
 
         - Jaap Spies (2006-02-18)
 
-        - Didier Deshommes: some pyrex speedups implemented
+        - Didier Deshommes: some Pyrex speedups implemented
 
         - Jason Grout: sparse matrix optimizations
         """
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/matrix_symbolic_dense.pyx
--- a/sage/matrix/matrix_symbolic_dense.pyx
+++ b/sage/matrix/matrix_symbolic_dense.pyx
@@ -401,7 +401,7 @@
 
     def factor(self):
         """
-        Operates pointwise on each element.
+        Operates point-wise on each element.
         
         EXAMPLES::
         
@@ -416,7 +416,7 @@
 
     def expand(self):
         """
-        Operates pointwise on each element.
+        Operates point-wise on each element.
         
         EXAMPLES::
         
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/strassen.pyx
--- a/sage/matrix/strassen.pyx
+++ b/sage/matrix/strassen.pyx
@@ -30,7 +30,7 @@
     Uses strassen multiplication at high levels and then uses
     MatrixWindow methods at low levels. EXAMPLES: The following matrix
     dimensions are chosen especially to exercise the eight possible
-    parity combinations that ocould ccur while subdividing the matrix
+    parity combinations that could occur while subdividing the matrix
     in the strassen recursion. The base case in both cases will be a
     (4x5) matrix times a (5x6) matrix.
     
@@ -263,7 +263,7 @@
     -  ``A`` - matrix window
     
     -  ``cutoff`` - size at which algorithm reverts to
-       naive gaussian elemination and multiplication must be at least 1.
+       naive Gaussian elimination and multiplication must be at least 1.
     
     
     OUTPUT: The list of pivot columns
@@ -586,7 +586,7 @@
 
 ##     EXAMPLES:
 ##         The following matrix dimensions are chosen especially to exercise the
-##         eight possible parity combinations that ocould ccur while subdividing
+##         eight possible parity combinations that could occur while subdividing
 ##         the matrix in the strassen recursion. The base case in both cases will
 ##         be a (4x5) matrix times a (5x6) matrix.
 
diff -r 87b600f2b8d5 -r d63f79700dd8 sage/matrix/tests.py
--- a/sage/matrix/tests.py
+++ b/sage/matrix/tests.py
@@ -45,7 +45,7 @@
     sage: A.parent()
     Full MatrixSpace of 2 by 2 dense matrices over Symbolic Ring
 
-We test an example det computation where linbox gave an incorrect
+We test an example determinant computation where LinBox gave an incorrect
 result:
     sage: L=[-32672924, 402859388, -140623668, 430658721, 106946787, 621276047,-192782447, 431682021, 102255307, 94626176, -34905583, -95358049, 19932420, 123725915, 52076617, -202693998, -104950285, 75183320, 90638691, -10508577, -159993345, 544819075, -205041193, 530536794, 34425198, 812190067, -260981874, 580644585, 123763815, 100094135, -69769038, -119580389, 66415448, 141833716, 62768834, -269408072, -133259211, 100392022, 122810015, -14169559, -116742143, 255636730, -101946387, 229909806, -23983454, 370713224, -122485286, 271167855, 52843557, 36798922, -40542776, -53268126, 45195782, 57579762, 26577120, -124502451, -59510085, 46572885, 57450083, -6605856, 15000427, -30582942, 12516546, -26821359, 4119829, -44014478, 14639368, -32285711, -6171530, -4068360, 4862805, 6668897, -5647699, -6841120, -3067309, 14771590, 7115903, -5537058, -6739292, 775422, 7350404, 230921981, -76923414, 258735233, 86438125, 362368415, -110372559, 248213386, 62007340, 60606320, -15120637, -56148382, 2793135, 76364724, 31673380, -117264550, -61940375, 43368039, 52065723, -6050134, -151307549, 78679036, -46266959, 18647207, -117585287, 85433954, -37642136, 80027656, 2018840, -16574471, -34635562, -6981346, 53375886, -7793292, 519003, -33205642, -9545608, 12868856, 17687995, -1966305, -363614357, 1120703653, -426407076, 1075510629, 37584638, 1662076505, -536823334, 1193214389, 250295666, 197458670, -149948886, -243590352, 148290926, 284338202, 126789390, -552585008, -271574842, 206055077, 252487220, -29112407, -24118132, 125489794, -45531102, 127679943, 19878772, 189727909, -59873328, 133891226, 30235317, 26062022, -13427908, -28437884, 11088522, 35371542, 15314003, -62344332, -31541764, 23159538, 28169710, -3257928, 23875931, -55361113, 21777071, -50092756, 4072588, -80196200, 26290253, -58432798, -11789547, -8211985, 8277760, 11589279, -9463444, -12750488, -5909614, 26780705, 12871707, -9986858, -12330558, 1418788, -123640072, 350287850, -134402037, 331686546, 2311861, 516848375, -167690026, 372647615, 77107961, 59330726, -48837778, -74960963, 49935779, 86475403, 39012673, -172208210, -84008378, 64235307, 78969119, -9098718, 29206401, -58665698, 23367942, -51628286, 7704232, -84008009, 27841118, -62026237, -12049237, -7882950, 9778971, 11364995, -11528692, -12326307, -6027486, 28258762, 13229006, -10541794, -13232024, 1518814, -15226123, -162474710, 52643231, -186629243, -70538436, -257338018, 77581589, -174915120, -44964751, -45100633, 8768165, 39990351, 1319955, -55787679, -23007336, 82911599, 44234087, -30609520, -36691281, 4268583, -3067101, -187862053, 62406108, -208934856, -67593203, -293436726, 89390112, -201449078, -50438313, -48568925, 12749582, 44690794, -3756544, -61132699, -25770007, 94967436, 49821864, -35071658, -42392728, 4922722, -83860746, 387091065, -141493308, 390611827, 53261700, 584183024, -185296915, 413534644, 91854856, 78421794, -44059309, -86512345, 37363320, 106897933, 46669076, -192648548, -96693655, 71636948, 87410231, -10100657, -56763493, 123532651, -49071162, 111379401, -11435705, 179568616, -59393552, 131295311, 25428711, 17842335, -20018876, -25373934, 22014146, 27645710, 12901369, -60462971, -28718167, 22624087, 28023128, -3220309, 74635684, 42414796, -4598855, 80612787, 85891705, 84744646, -20275295, 47713903, 20441907, 28852448, 11300266, -16245887, -24534126, 30219206, 10703344, -24779029, -16921909, 8890606, 9568309, -1154549, -129928022, 450121954, -169305350, 439469539, 30630839, 672148465, -215901643, 479926644, 102311525, 83254236, -57276284, -99501795, 53823660, 117995313, 51970498, -222955007, -110479289, 83108429, 101494954, -11712185, -144442660, 396456359, -153843052, 373857888, -1782212, 585684397, -190815470, 422383108, 85815948, 66107666, -56349192, -86531733, 56862804, 97958280, 43498721, -195572942, -95613139, 73115455, 89344289, -10295212, 10964325, -5070815, 2648146, -839025, 8356359, -4976355, 2255047, -5129380, -209043, 1262716, 2672540, -558453, -4261247, 1210201, -101067, 2031870, 246414, -752782, -1334683, 146103, 117556641, -635133625, 229805379, -649558626, -106084208, -963569121, 304047081, -678780364, -153015989, -133365649, 68083651, 144472798, -54146381, -180316114, -77858131, 316948599, 160367139, -117807494, -143206514, 16562032]
     sage: M = Matrix(Integers(),20,20,L)
