code stringlengths 17 6.64M |
|---|
def supersingular_j(FF):
"\n Return a supersingular j-invariant over the finite\n field FF.\n\n INPUT:\n\n - ``FF`` -- finite field with p^2 elements, where p is a prime number\n\n OUTPUT:\n\n - finite field element -- a supersingular j-invariant\n defined over the finite field FF\n\n E... |
@richcmp_method
class SupersingularModule(HeckeModule_free_module):
'\n The module of supersingular points in a given characteristic, with\n given level structure.\n\n The characteristic must not divide the level.\n\n .. NOTE:: Currently, only level 1 is implemented.\n\n EXAMPLES::\n\n sage:... |
def plane_inequality(v):
'\n Return the inequality for points on the same side as the origin\n with respect to the plane through ``v`` normal to ``v``.\n\n EXAMPLES::\n\n sage: from sage.modules.diamond_cutting import plane_inequality\n sage: ieq = plane_inequality([1, -1]); ieq\n [2... |
def jacobi(M):
'\n Compute the upper-triangular part of the Cholesky/Jacobi\n decomposition of the symmetric matrix ``M``.\n\n Let `M` be a symmetric `n \\times n`-matrix over a field `F`.\n Let `m_{i,j}` denote the `(i,j)`-th entry of `M` for any\n `1 \\leq i \\leq n` and `1 \\leq j \\leq n`. Then... |
def diamond_cut(V, GM, C, verbose=False):
'\n Perform diamond cutting on polyhedron ``V`` with basis matrix ``GM``\n and radius ``C``.\n\n INPUT:\n\n - ``V`` -- polyhedron to cut from\n\n - ``GM`` -- half of the basis matrix of the lattice\n\n - ``C`` -- radius to use in cutting algorithm\n\n ... |
def calculate_voronoi_cell(basis, radius=None, verbose=False):
'\n Calculate the Voronoi cell of the lattice defined by basis\n\n INPUT:\n\n - ``basis`` -- embedded basis matrix of the lattice\n\n - ``radius`` -- radius of basis vectors to consider\n\n - ``verbose`` -- whether to print debug inform... |
class FGP_Element(ModuleElement):
"\n An element of a finitely generated module over a PID.\n\n INPUT:\n\n - ``parent`` -- parent module M\n\n - ``x`` -- element of M.V()\n\n EXAMPLES::\n\n sage: V = span([[1/2,1,1],[3/2,2,1],[0,0,1]],ZZ); W = V.span([2*V.0+4*V.1, 9*V.0+12*V.1, 4*V.2])\n ... |
def FGP_Module(V, W, check=True):
"\n INPUT:\n\n - ``V`` -- a free `R`-module\n\n - ``W`` -- a free `R`-submodule of `V`\n\n - ``check`` -- bool (default: ``True``); if ``True``, more checks\n on correctness are performed; in particular, we check the data\n types of ``V`` and ``W``, and that... |
def is_FGP_Module(x):
'\n Return ``True`` if x is an FGP module, i.e., a finitely generated\n module over a PID represented as a quotient of finitely generated\n free modules over a PID.\n\n EXAMPLES::\n\n sage: V = span([[1/2,1,1],[3/2,2,1],[0,0,1]],ZZ)\n sage: W = V.span([2*V.0 + 4*V.1... |
class FGP_Module_class(Module):
"\n A finitely generated module over a PID presented as a quotient `V/W`.\n\n INPUT:\n\n - ``V`` -- an `R`-module\n\n - ``W`` -- an `R`-submodule of `V`\n\n - ``check`` -- bool (default: ``True``)\n\n EXAMPLES::\n\n sage: A = (ZZ^1)/span([[100]], ZZ); A\n ... |
def random_fgp_module(n, R=ZZ, finite=False):
'\n Return a random FGP module inside a rank n free module over R.\n\n INPUT:\n\n - ``n`` -- nonnegative integer\n\n - ``R`` -- base ring (default: ``ZZ``)\n\n - ``finite`` -- bool (default: ``True``); if True, make the random module finite\n\n EXAMP... |
def random_fgp_morphism_0(*args, **kwds):
'\n Construct a random fgp module using :func:`random_fgp_module`,\n then construct a random morphism that sends each generator\n to a random multiple of itself.\n\n Inputs are the same as to :func:`random_fgp_module`.\n\n EXAMPLES::\n\n sage: import... |
def _test_morphism_0(*args, **kwds):
'\n EXAMPLES::\n\n sage: import sage.modules.fg_pid.fgp_module as fgp\n sage: s = 0 # we set a seed so results clearly and easily reproducible across runs.\n sage: set_random_seed(s); v = [fgp._test_morphism_0(1) for _ in range(30)]\n sage: set_... |
class FGP_Morphism(Morphism):
'\n A morphism between finitely generated modules over a PID.\n\n EXAMPLES:\n\n An endomorphism::\n\n sage: V = span([[1/2,1,1],[3/2,2,1],[0,0,1]],ZZ); W = V.span([2*V.0+4*V.1, 9*V.0+12*V.1, 4*V.2])\n sage: Q = V/W; Q\n Finitely generated module V/W over... |
def FGP_Homset(X, Y):
"\n EXAMPLES::\n\n sage: V = span([[1/2,1,1],[3/2,2,1],[0,0,1]],ZZ); W = V.span([2*V.0+4*V.1, 9*V.0+12*V.1, 4*V.2]); Q = V/W\n sage: Q.Hom(Q) # indirect doctest\n Set of Morphisms from Finitely generated module V/W over Integer Ring with invariants (4, 12) t... |
class FGP_Homset_class(Homset):
"\n Homsets of :class:`~sage.modules.fg_pid.fgp_module.FGP_Module`\n\n TESTS::\n\n sage: V = span([[1/2,1,1],[3/2,2,1],[0,0,1]],ZZ); W = V.span([2*V.0+4*V.1, 9*V.0+12*V.1, 4*V.2]); Q = V/W\n sage: H = Hom(Q,Q); H # indirect doctest\n Set of Morphisms f... |
def is_FilteredVectorSpace(X):
"\n Test whether ``X`` is a filtered vector space.\n\n This function is for library use only.\n\n INPUT:\n\n - ``X`` -- anything.\n\n OUTPUT:\n\n Boolean.\n\n EXAMPLES::\n\n sage: from sage.modules.filtered_vector_space import is_FilteredVectorSpace\n ... |
def FilteredVectorSpace(arg1, arg2=None, base_ring=QQ, check=True):
'\n Construct a filtered vector space.\n\n INPUT:\n\n This function accepts various input that determines the vector space and filtration.\n\n - Just the dimensionFilteredVectorSpace(dimension): Return the trivial filtration\n (w... |
def normalize_degree(deg):
"\n Normalized the degree\n\n - ``deg`` -- something that defines the degree (either integer or\n infinity).\n\n OUTPUT:\n\n Plus/minus infinity or a Sage integer.\n\n EXAMPLES::\n\n sage: from sage.modules.filtered_vector_space import normalize_degree\n ... |
def construct_from_dim_degree(dim, max_degree, base_ring, check):
'\n Construct a filtered vector space.\n\n INPUT:\n\n - ``dim`` -- integer. The dimension.\n\n - ``max_degree`` -- integer or infinity. The maximal degree where\n the vector subspace of the filtration is still the entire space.\n\n... |
def construct_from_generators(filtration, base_ring, check):
'\n Construct a filtered vector space.\n\n INPUT:\n\n - ``filtration`` -- a dictionary of filtration steps. Each\n filtration step is a pair consisting of an integer degree and a\n list/tuple/iterable of vector space generators. The i... |
def construct_from_generators_indices(generators, filtration, base_ring, check):
'\n Construct a filtered vector space.\n\n INPUT:\n\n - ``generators`` -- a list/tuple/iterable of vectors, or something\n convertible to them. The generators spanning various\n subspaces.\n\n - ``filtration`` -... |
class FilteredVectorSpace_class(FreeModule_ambient_field):
def __init__(self, base_ring, dim, generators, filtration, check=True):
'\n A descending filtration of a vector space\n\n INPUT:\n\n - ``base_ring`` -- a field. The base field of the ambient vector space.\n\n - ``dim``... |
class FPElement(IndexedFreeModuleElement):
'\n A module element of a finitely presented graded module over\n a connected graded algebra.\n\n TESTS::\n\n sage: from sage.modules.fp_graded.module import FPModule\n sage: FPModule(SteenrodAlgebra(2), [0])([Sq(2)])\n Sq(2)*g[0]\n '
... |
class FreeGradedModuleElement(IndexedFreeModuleElement):
'\n Create a module element of a finitely generated free graded left module\n over a connected graded algebra.\n\n EXAMPLES::\n\n sage: from sage.modules.fp_graded.free_module import FreeGradedModule\n sage: M = FreeGradedModule(Steen... |
class FreeGradedModuleHomspace(FPModuleHomspace):
'\n Homspace between two free graded modules.\n '
Element = FreeGradedModuleMorphism
|
class FreeGradedModule(CombinatorialFreeModule):
"\n Create a finitely generated free graded module over a connected\n graded algebra, with generators in specified degrees.\n\n INPUT:\n\n - ``algebra`` -- the graded connected algebra over which the module is\n defined; this algebra must be equipp... |
class FreeGradedModuleMorphism(FPModuleMorphism):
"\n Create a homomorphism from a finitely generated free graded module\n to a graded module.\n\n INPUT:\n\n - ``parent`` -- a homspace in the category of finitely generated free\n modules\n\n - ``values`` -- a list of elements in the codomain; ... |
class FPModuleHomspace(Homset):
from .morphism import FPModuleMorphism as Element
def _element_constructor_(self, values):
'\n Construct a morphism contained in ``self``.\n\n This function is not part of the public API, but is used by\n :meth:`Hom` method to create morphisms.\n\n... |
class FPModule(UniqueRepresentation, IndexedGenerators, Module):
'\n A finitely presented module over a connected graded algebra.\n\n INPUT:\n\n One of the following:\n\n - ``arg0`` -- a morphism such that the module is the cokernel, or\n a free graded module, in which case the output is the same... |
def _create_relations_matrix(module, relations, source_degs, target_degs):
'\n The action by the given relations can be written as multiplication by\n the matrix `R = (r_{ij})_{i,j}` where each entry is an algebra element and\n each row in the matrix contains the coefficients of a single relation.\n\n ... |
class FPModuleMorphism(Morphism):
'\n Create a homomorphism between finitely presented graded modules.\n\n INPUT:\n\n - ``parent`` -- a homspace of finitely presented graded modules\n - ``values`` -- a list of elements in the codomain; each element\n corresponds to a module generator in the domai... |
@cached_function
def _top_dim(algebra):
'\n The top dimension of ``algebra``\n\n This returns infinity if the algebra is infinite-dimensional. If\n the algebra has a ``top_class`` method, then it is used in the\n computation; otherwise the computation may be slow.\n\n EXAMPLES::\n\n sage: fr... |
class SteenrodFPModuleHomspace(FPModuleHomspace):
Element = SteenrodFPModuleMorphism
|
class SteenrodFreeModuleHomspace(SteenrodFPModuleHomspace, FreeGradedModuleHomspace):
Element = SteenrodFreeModuleMorphism
|
class SteenrodModuleMixin():
'\n Mixin class for common methods of the Steenrod algebra modules.\n '
def profile(self):
'\n Return a finite profile over which ``self`` can be defined.\n\n Any finitely presented module over the Steenrod algebra can be\n defined over a finite... |
class SteenrodFPModule(FPModule, SteenrodModuleMixin):
'\n Create a finitely presented module over the Steenrod algebra.\n\n .. SEEALSO::\n\n The thematic tutorial on `Steenrod algebra modules\n <../../../../../../thematic_tutorials/steenrod_algebra_modules.html>`_.\n\n INPUT:\n\n One of... |
class SteenrodFreeModule(FreeGradedModule, SteenrodModuleMixin):
def _Hom_(self, Y, category):
'\n The internal hook used by the free function\n :meth:`sage.categories.homset.hom.Hom` to create homsets\n involving ``self``.\n\n TESTS::\n\n sage: from sage.modules.fp... |
class SteenrodFPModuleMorphism(FPModuleMorphism):
def profile(self):
'\n Return a finite profile over which ``self`` can be defined.\n\n This is in some ways the key method for these morphisms. As\n discussed in the "Theoretical background" section of\n :mod:`sage.modules.fp_g... |
class SteenrodFreeModuleMorphism(FreeGradedModuleMorphism, SteenrodFPModuleMorphism):
pass
|
def profile_elt(elt, char=2):
'\n Return the smallest sub-Hopf algebra containing ``elt``.\n\n INPUT:\n\n - ``elt`` -- element of the Steenrod algebra (or a sub-Hopf algebra\n of it) or list(s) representing it\n - ``char`` (optional, default 2) -- the characteristic\n\n ``elt`` could also be a... |
def enveloping_profile_elements(alist, char=2):
'\n Return the profile function for the smallest sub-Hopf algebra\n containing the list of elements passed.\n\n INPUT:\n\n - ``alist`` -- list of Steenrod algebra elements\n - ``char`` (optional, default 2) -- the characteristic\n\n As with :func:`... |
def find_min_profile(prof, char=2):
'\n Return the smallest valid profile function containing a tuple of\n non-negative integers,\n\n INPUT:\n\n - ``prof`` -- a list or tuple of nonnegative integers\n - ``char`` (optional, default 2) -- the characteristic\n\n OUTPUT:\n\n - a valid profile con... |
class FreeModuleFactory(UniqueFactory):
'\n Factory class for the finite-dimensional free modules with standard basis\n '
def create_key(self, base_ring, rank, sparse=False, inner_product_matrix=None):
'\n TESTS::\n\n sage: loads(dumps(ZZ^6)) is ZZ^6\n True\n ... |
def FreeModule(base_ring, rank_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, with_basis='standard', rank=None, basis_keys=None, **args):
'\n Create a free module over the given commutative ``base_ring``\n\n ``FreeModule`` can be called with the following positional arguments:\n\n - ``Fr... |
def VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *, with_basis='standard', dimension=None, basis_keys=None, **args):
"\n EXAMPLES:\n\n The base can be complicated, as long as it is a field.\n\n ::\n\n sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x... |
def span(gens, base_ring=None, check=True, already_echelonized=False):
"\n Return the span of the vectors in ``gens`` using scalars from ``base_ring``.\n\n INPUT:\n\n - ``gens`` - a list of either vectors or lists of ring elements\n used to generate the span\n\n - ``base_ring`` - default: ``None`... |
def basis_seq(V, vecs):
'\n This converts a list vecs of vectors in V to a Sequence of\n immutable vectors.\n\n Should it? I.e. in most ``other`` parts of the system the return type\n of basis or generators is a tuple.\n\n EXAMPLES::\n\n sage: V = VectorSpace(QQ,2)\n sage: B = V.gens(... |
def is_FreeModule(M):
'\n Return True if M inherits from FreeModule_generic.\n\n EXAMPLES::\n\n sage: from sage.modules.free_module import is_FreeModule\n sage: V = ZZ^3\n sage: is_FreeModule(V)\n True\n sage: W = V.span([ V.random_element() for i in range(2) ])\n s... |
@richcmp_method
class Module_free_ambient(Module):
'\n Base class for modules with elements represented by elements of a free\n module.\n\n Modules whose elements are represented by elements of a free module (such\n as submodules, quotients, and subquotients of a free module) should be\n either a s... |
class FreeModule_generic(Module_free_ambient):
"\n Base class for all free modules.\n\n INPUT:\n\n - ``base_ring`` -- a commutative ring\n\n - ``rank`` -- a non-negative integer\n\n - ``degree`` -- a non-negative integer\n\n - ``sparse`` -- boolean (default: ``False``)\n\n - ``coordinate_ring... |
class FreeModule_generic_domain(FreeModule_generic):
'\n Base class for free modules over an integral domain.\n '
def __init__(self, base_ring, rank, degree, sparse=False, coordinate_ring=None, category=None):
"\n Create a free module over an integral domain.\n\n EXAMPLES::\n\n ... |
class FreeModule_generic_pid(FreeModule_generic_domain):
'\n Base class for all free modules over a PID.\n '
def __init__(self, base_ring, rank, degree, sparse=False, coordinate_ring=None, category=None):
"\n Create a free module over a PID.\n\n EXAMPLES::\n\n sage: Fre... |
class FreeModule_generic_field(FreeModule_generic_pid):
'\n Base class for all free modules over fields.\n '
def __init__(self, base_field, dimension, degree, sparse=False, category=None):
'\n Creates a vector space over a field.\n\n EXAMPLES::\n\n sage: FreeModule(QQ, ... |
class FreeModule_ambient(FreeModule_generic):
'\n Ambient free module over a commutative ring.\n '
def __init__(self, base_ring, rank, sparse=False, coordinate_ring=None, category=None):
"\n The free module of given rank over the given base_ring.\n\n INPUT:\n\n - ``base_ri... |
class FreeModule_ambient_domain(FreeModule_generic_domain, FreeModule_ambient):
"\n Ambient free module over an integral domain.\n\n EXAMPLES::\n\n sage: FreeModule(PolynomialRing(GF(5), 'x'), 3)\n Ambient free module of rank 3 over the principal ideal domain\n Univariate Polynomial Rin... |
class FreeModule_ambient_pid(FreeModule_generic_pid, FreeModule_ambient_domain):
'\n Ambient free module over a principal ideal domain.\n '
def __init__(self, base_ring, rank, sparse=False, coordinate_ring=None, category=None):
"\n Create the ambient free module of given rank over the gi... |
class FreeModule_ambient_field(FreeModule_generic_field, FreeModule_ambient_pid):
'\n\n '
def __init__(self, base_field, dimension, sparse=False, category=None):
'\n Create the ambient vector space of given dimension over the given\n field.\n\n INPUT:\n\n - ``base_fiel... |
class RealDoubleVectorSpace_class(FreeModule_ambient_field):
def __init__(self, n):
FreeModule_ambient_field.__init__(self, sage.rings.real_double.RDF, n)
def coordinates(self, v):
return v
|
class ComplexDoubleVectorSpace_class(FreeModule_ambient_field):
def __init__(self, n):
FreeModule_ambient_field.__init__(self, sage.rings.complex_double.CDF, n)
def coordinates(self, v):
return v
|
class FreeModule_submodule_with_basis_pid(FreeModule_generic_pid):
'\n Construct a submodule of a free module over PID with a distinguished basis.\n\n INPUT:\n\n - ``ambient`` -- ambient free module over a principal ideal domain `R`,\n i.e. `R^n`;\n\n - ``basis`` -- list of elements of `K^n`, whe... |
class FreeModule_submodule_pid(FreeModule_submodule_with_basis_pid):
'\n An `R`-submodule of `K^n` where `K` is the\n fraction field of a principal ideal domain `R`.\n\n EXAMPLES::\n\n sage: M = ZZ^3\n sage: W = M.span_of_basis([[1,2,3],[4,5,19]]); W\n Free module of degree 3 and ran... |
class FreeModule_submodule_with_basis_field(FreeModule_generic_field, FreeModule_submodule_with_basis_pid):
"\n An embedded vector subspace with a distinguished user basis.\n\n EXAMPLES::\n\n sage: M = QQ^3; W = M.submodule_with_basis([[1,2,3], [4,5,19]]); W\n Vector space of degree 3 and dime... |
class FreeModule_submodule_field(FreeModule_submodule_with_basis_field):
'\n An embedded vector subspace with echelonized basis.\n\n EXAMPLES:\n\n Since this is an embedded vector subspace with echelonized basis,\n the echelon_coordinates() and user coordinates() agree::\n\n sage: V = QQ^3\n ... |
def element_class(R, is_sparse):
"\n The class of the vectors (elements of a free module) with base ring\n R and boolean is_sparse.\n\n EXAMPLES::\n\n sage: FF = FiniteField(2)\n sage: P = PolynomialRing(FF,'x')\n sage: sage.modules.free_module.element_class(QQ, is_sparse=True)\n ... |
@richcmp_method
class EchelonMatrixKey():
'\n A total ordering on free modules for sorting.\n\n This class orders modules by their ambient spaces, then by dimension,\n then in order by their echelon matrices. If a function returns a list\n of free modules, this can be used to sort the output and thus ... |
def is_FreeModuleHomspace(x):
"\n Return ``True`` if ``x`` is a free module homspace.\n\n Notice that every vector space is a free module, but when we construct\n a set of morphisms between two vector spaces, it is a\n ``VectorSpaceHomspace``, which qualifies as a ``FreeModuleHomspace``,\n since th... |
class FreeModuleHomspace(sage.categories.homset.HomsetWithBase):
def __call__(self, A, **kwds):
'\n INPUT:\n\n - A -- either a matrix or a list/tuple of images of generators,\n or a function returning elements of the codomain for elements of the domain.\n - check -- bool (de... |
def IntegerLattice(basis, lll_reduce=True):
'\n Construct a new integer lattice from ``basis``.\n\n INPUT:\n\n - ``basis`` -- can be one of the following:\n\n - a list of vectors\n\n - a matrix over the integers\n\n - an element of an absolute order\n\n - ``lll_reduce`` -- (default: ``T... |
class FreeModule_submodule_with_basis_integer(FreeModule_submodule_with_basis_pid):
"\n This class represents submodules of `\\ZZ^n` with a distinguished basis.\n\n However, most functionality in excess of standard submodules over PID\n is for these submodules considered as discrete subgroups of `\\ZZ^n`... |
def is_FreeModuleMorphism(x):
'\n EXAMPLES::\n\n sage: V = ZZ^2; f = V.hom([V.1, -2*V.0])\n sage: sage.modules.free_module_morphism.is_FreeModuleMorphism(f)\n True\n sage: sage.modules.free_module_morphism.is_FreeModuleMorphism(0)\n False\n '
return isinstance(x, FreeM... |
class FreeModuleMorphism(matrix_morphism.MatrixMorphism):
def __init__(self, parent, A, side='left'):
'\n INPUT:\n\n - ``parent`` - a homspace in a (sub) category of free modules\n\n - ``A`` - matrix\n\n - side -- side of the vectors acted on by the matrix (defa... |
class BaseIsomorphism1D(Morphism):
'\n An isomorphism between a ring and a free rank-1 module over the ring.\n\n EXAMPLES::\n\n sage: R.<x,y> = QQ[]\n sage: V, from_V, to_V = R.free_module(R)\n sage: from_V\n Isomorphism morphism:\n From: Ambient free module of rank 1 ov... |
class BaseIsomorphism1D_to_FM(BaseIsomorphism1D):
'\n An isomorphism from a ring to its 1-dimensional free module\n\n INPUT:\n\n - ``parent`` -- the homset\n - ``basis`` -- (default 1) an invertible element of the ring\n\n EXAMPLES::\n\n sage: R = Zmod(8)\n sage: V, from_V, to_V = R.f... |
class BaseIsomorphism1D_from_FM(BaseIsomorphism1D):
'\n An isomorphism to a ring from its 1-dimensional free module\n\n INPUT:\n\n - ``parent`` -- the homset\n - ``basis`` -- (default 1) an invertible element of the ring\n\n EXAMPLES::\n\n sage: R.<x> = QQ[[]]\n sage: V, from_V, to_V ... |
def FreeQuadraticModule(base_ring, rank, inner_product_matrix, sparse=False, inner_product_ring=None):
'\n Create the free quadratic module over the given commutative ring of the given rank.\n\n INPUT:\n\n - ``base_ring`` -- a commutative ring\n\n - ``rank`` -- a nonnegative integer\n\n - ``inner_p... |
def QuadraticSpace(K, dimension, inner_product_matrix, sparse=False):
"\n EXAMPLES:\n\n The base can be complicated, as long as it is a field::\n\n sage: F.<x> = FractionField(PolynomialRing(ZZ,'x'))\n sage: D = diagonal_matrix([x,x-1,x+1])\n sage: V = QuadraticSpace(F,3,D)\n sag... |
def is_FreeQuadraticModule(M):
'\n Return ``True`` if `M` is a free quadratic module.\n\n EXAMPLES::\n\n sage: from sage.modules.free_quadratic_module import is_FreeQuadraticModule\n sage: U = FreeModule(QQ,3)\n sage: is_FreeQuadraticModule(U)\n False\n sage: V = FreeModul... |
class FreeQuadraticModule_generic(free_module.FreeModule_generic):
'\n Base class for all free quadratic modules.\n\n Modules are ordered by inclusion in the same ambient space.\n\n TESTS:\n\n We compare rank three free modules over the integers,\n rationals, and complex numbers::\n\n sage: ... |
class FreeQuadraticModule_generic_pid(free_module.FreeModule_generic_pid, FreeQuadraticModule_generic):
'\n Class of all free modules over a PID.\n '
def __init__(self, base_ring, rank, degree, inner_product_matrix, sparse=False):
'\n Create a free module over a PID.\n\n EXAMPLES:... |
class FreeQuadraticModule_generic_field(free_module.FreeModule_generic_field, FreeQuadraticModule_generic_pid):
'\n Base class for all free modules over fields.\n '
def __init__(self, base_field, dimension, degree, inner_product_matrix, sparse=False):
'\n Create a vector space over a fie... |
class FreeQuadraticModule_ambient(free_module.FreeModule_ambient, FreeQuadraticModule_generic):
'\n Ambient free module over a commutative ring.\n '
def __init__(self, base_ring, rank, inner_product_matrix, sparse=False):
'\n The free module of given rank over the given ``base_ring``.\n\... |
class FreeQuadraticModule_ambient_domain(free_module.FreeModule_ambient_domain, FreeQuadraticModule_ambient):
'\n Ambient free quadratic module over an integral domain.\n '
def __init__(self, base_ring, rank, inner_product_matrix, sparse=False):
"\n EXAMPLES::\n\n sage: FreeMo... |
class FreeQuadraticModule_ambient_pid(free_module.FreeModule_ambient_pid, FreeQuadraticModule_generic_pid, FreeQuadraticModule_ambient_domain):
'\n Ambient free quadratic module over a principal ideal domain.\n '
def __init__(self, base_ring, rank, inner_product_matrix, sparse=False):
'\n ... |
class FreeQuadraticModule_ambient_field(free_module.FreeModule_ambient_field, FreeQuadraticModule_generic_field, FreeQuadraticModule_ambient_pid):
def __init__(self, base_field, dimension, inner_product_matrix, sparse=False):
'\n Create the ambient vector space of given dimension over the given fi... |
class FreeQuadraticModule_submodule_with_basis_pid(free_module.FreeModule_submodule_with_basis_pid, FreeQuadraticModule_generic_pid):
'\n An `R`-submodule of `K^n` with distinguished basis, where `K` is\n the fraction field of a principal ideal domain `R`.\n\n Modules are ordered by inclusion.\n\n EXA... |
class FreeQuadraticModule_submodule_pid(free_module.FreeModule_submodule_pid, FreeQuadraticModule_submodule_with_basis_pid):
'\n An `R`-submodule of `K^n` where `K` is the fraction field of a\n principal ideal domain `R`.\n\n EXAMPLES::\n\n sage: M = ZZ^3\n sage: W = M.span_of_basis([[1,2,3... |
class FreeQuadraticModule_submodule_with_basis_field(free_module.FreeModule_submodule_with_basis_field, FreeQuadraticModule_generic_field, FreeQuadraticModule_submodule_with_basis_pid):
"\n An embedded vector subspace with a distinguished user basis.\n\n EXAMPLES::\n\n sage: M = QQ^3; W = M.submodule... |
class FreeQuadraticModule_submodule_field(free_module.FreeModule_submodule_field, FreeQuadraticModule_submodule_with_basis_field):
'\n An embedded vector subspace with echelonized basis.\n\n EXAMPLES:\n\n Since this is an embedded vector subspace with echelonized basis,\n the methods :meth:`echelon_co... |
def IntegralLattice(data, basis=None):
'\n Return the integral lattice spanned by ``basis`` in the ambient space.\n\n A lattice is a finitely generated free abelian group `L \\cong \\ZZ^r`\n equipped with a non-degenerate, symmetric bilinear form\n `L \\times L \\colon \\rightarrow \\ZZ`. Here, lattic... |
def IntegralLatticeDirectSum(Lattices, return_embeddings=False):
'\n Return the direct sum of the lattices contained in the list ``Lattices``.\n\n INPUT:\n\n - ``Lattices`` -- a list of lattices ``[L_1,...,L_n]``\n - ``return_embeddings`` -- (default: ``False``) a boolean\n\n OUTPUT:\n\n The dir... |
def IntegralLatticeGluing(Lattices, glue, return_embeddings=False):
'\n Return an overlattice of the direct sum as defined by ``glue``.\n\n INPUT:\n\n - ``Lattices`` -- a list of lattices `[L_1,...,L_n]`\n - ``glue`` -- a list where the elements are lists in the form `[g_1,...,g_n]`;\n here `g_i`... |
class FreeQuadraticModule_integer_symmetric(FreeQuadraticModule_submodule_with_basis_pid):
'\n This class represents non-degenerate, integral,\n symmetric free quadratic `\\ZZ`-modules.\n\n INPUT:\n\n - ``ambient`` -- an ambient free quadratic module\n - ``basis`` -- a list of elements of ambient o... |
def local_modification(M, G, p, check=True):
'\n Return a local modification of `M` that matches `G` at `p`.\n\n INPUT:\n\n - ``M`` -- a `\\ZZ_p`-maximal lattice\n\n - ``G`` -- the gram matrix of a lattice isomorphic to `M` over `\\QQ_p`\n\n - ``p`` -- a prime number\n\n OUTPUT:\n\n an integr... |
def is_MatrixMorphism(x):
'\n Return True if x is a Matrix morphism of free modules.\n\n EXAMPLES::\n\n sage: V = ZZ^2; phi = V.hom([3*V.0, 2*V.1])\n sage: sage.modules.matrix_morphism.is_MatrixMorphism(phi)\n True\n sage: sage.modules.matrix_morphism.is_MatrixMorphism(3)\n ... |
class MatrixMorphism_abstract(sage.categories.morphism.Morphism):
def __init__(self, parent, side='left'):
'\n INPUT:\n\n - ``parent`` - a homspace\n\n - ``A`` - matrix\n\n\n EXAMPLES::\n\n sage: from sage.modules.matrix_morphism import MatrixMorphism\n ... |
class MatrixMorphism(MatrixMorphism_abstract):
'\n A morphism defined by a matrix.\n\n INPUT:\n\n - ``parent`` -- a homspace\n\n - ``A`` -- matrix or a :class:`MatrixMorphism_abstract` instance\n\n - ``copy_matrix`` -- (default: ``True``) make an immutable copy of\n the matrix ``A`` if it ... |
def gram_schmidt(B):
'\n Return the Gram-Schmidt orthogonalization of the entries in the list\n B of vectors, along with the matrix mu of Gram-Schmidt coefficients.\n\n Note that the output vectors need not have unit length. We do this\n to avoid having to extract square roots.\n\n .. NOTE::\n\n ... |
class QuotientModuleFunctor(ConstructionFunctor):
'\n Construct the quotient of a module by a submodule.\n\n INPUT:\n\n - ``relations`` -- a module\n\n .. NOTE::\n\n This construction functor keeps track of the basis of defining\n ``relations``. It can only be applied to free modules int... |
def MultiFilteredVectorSpace(arg, base_ring=None, check=True):
"\n Contstruct a multi-filtered vector space.\n\n INPUT:\n\n - ``arg`` -- either a non-empty dictionary of filtrations or an\n integer. The latter is interpreted as the vector space\n dimension, and the indexing set of the filtratio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.