def __init__(self, degree, base_ring, generator_matrices, category=None): """ Matrix group generated by a finite number of matrices. EXAMPLES:: sage: m1 = matrix(SR, [[1,2],[3,4]]) sage: m2 = matrix(SR, [[1,3],[-1,0]]) sage: G = MatrixGroup(m1, m2) sage: TestSuite(G).run() sage: type(G) <class 'sage.groups.matrix_gps.finitely_generated.FinitelyGeneratedMatrixGroup_generic_with_category'> sage: from sage.groups.matrix_gps.finitely_generated import \ ....: FinitelyGeneratedMatrixGroup_generic sage: G = FinitelyGeneratedMatrixGroup_generic(2, QQ, [matrix(QQ,[[1,2],[3,4]])]) sage: G.gens() ( [1 2] [3 4] ) """ self._gens_matrix = generator_matrices MatrixGroup_generic.__init__(self, degree, base_ring, category=category)
def __init__(self, degree, base_ring, special, sage_name, latex_string): """ Base class for "named" matrix groups INPUT: - ``degree`` -- integer. The degree (number of rows/columns of matrices). - ``base_ring`` -- ring. The base ring of the matrices. - ``special`` -- boolean. Whether the matrix group is special, that is, elements have determinant one. - ``latex_string`` -- string. The latex representation. EXAMPLES:: sage: G = GL(2, QQ) sage: from sage.groups.matrix_gps.named_group import NamedMatrixGroup_generic sage: isinstance(G, NamedMatrixGroup_generic) True """ MatrixGroup_generic.__init__(self, degree, base_ring) self._special = special self._name_string = sage_name self._latex_string = latex_string
def __init__(self, degree, base_ring, special, sage_name, latex_string, category=None, invariant_form=None): """ Base class for "named" matrix groups INPUT: - ``degree`` -- integer; the degree (number of rows/columns of matrices) - ``base_ring`` -- ring; the base ring of the matrices - ``special`` -- boolean; whether the matrix group is special, that is, elements have determinant one - ``sage_name`` -- string; the name of the group - ``latex_string`` -- string; the latex representation - ``category`` -- (optional) a subcategory of :class:`sage.categories.groups.Groups` passed to the constructor of :class:`sage.groups.matrix_gps.matrix_group.MatrixGroup_generic` - ``invariant_form`` -- (optional) square-matrix of the given degree over the given base_ring describing a bilinear form to be kept invariant by the group EXAMPLES:: sage: G = GL(2, QQ) sage: from sage.groups.matrix_gps.named_group import NamedMatrixGroup_generic sage: isinstance(G, NamedMatrixGroup_generic) True .. SEEALSO:: See the examples for :func:`GU`, :func:`SU`, :func:`Sp`, etc. as well. """ MatrixGroup_generic.__init__(self, degree, base_ring, category=category) self._special = special self._name_string = sage_name self._latex_string = latex_string self._invariant_form = invariant_form