code stringlengths 17 6.64M |
|---|
class GaloisGroup_ab(_GaloisMixin, AbelianGroup_class):
'\n Abelian Galois groups\n '
def __init__(self, field, generator_orders, algorithm=None, gen_names='sigma'):
'\n Initialize this Galois group.\n\n TESTS::\n\n sage: TestSuite(GF(9).galois_group()).run() ... |
class GaloisGroup_cyc(GaloisGroup_ab):
'\n Cyclic Galois groups\n '
def transitive_number(self, algorithm=None, recompute=False):
'\n Return the transitive number for the action on the roots of the defining polynomial.\n\n EXAMPLES::\n\n sage: GF(2^8).galois_group().tra... |
class GaloisSubgroup_ab(AbelianGroup_subgroup, _SubGaloisMixin):
'\n Subgroups of abelian Galois groups.\n '
pass
|
class GaloisGroup_perm(_GaloisMixin, PermutationGroup_generic):
'\n The group of automorphisms of a Galois closure of a given field.\n\n INPUT:\n\n - ``field`` -- a field, separable over its base\n\n - ``names`` -- a string or tuple of length 1, giving a variable name for the splitting field\n\n - ... |
class GaloisSubgroup_perm(PermutationGroup_subgroup, _SubGaloisMixin):
'\n Subgroups of Galois groups (implemented as permutation groups), specified\n by giving a list of generators.\n\n Unlike ambient Galois groups, where we use a lazy ``_gens`` attribute in order\n to enable creation without determi... |
def multiple(a, n, operation='*', identity=None, inverse=None, op=None):
"\n Return either `na` or `a^n`, where `n` is any integer and `a` is\n a Python object on which a group operation such as addition or\n multiplication is defined. Uses the standard binary algorithm.\n\n INPUT: See the documentat... |
class multiples():
'\n Return an iterator which runs through ``P0+i*P`` for ``i`` in ``range(n)``.\n\n ``P`` and ``P0`` must be Sage objects in some group; if the operation is\n multiplication then the returned values are instead ``P0*P**i``.\n\n EXAMPLES::\n\n sage: list(multiples(1, 10))\n ... |
def bsgs(a, b, bounds, operation='*', identity=None, inverse=None, op=None):
"\n Totally generic discrete baby-step giant-step function.\n\n Solves `na=b` (or `a^n=b`) with `lb\\le n\\le ub` where ``bounds==(lb,ub)``,\n raising an error if no such `n` exists.\n\n `a` and `b` must be elements of some g... |
def discrete_log_rho(a, base, ord=None, operation='*', identity=None, inverse=None, op=None, hash_function=hash):
'\n Pollard Rho algorithm for computing discrete logarithm in cyclic\n group of prime order.\n If the group order is very small it falls back to the baby step giant step\n algorithm.\n\n ... |
def discrete_log(a, base, ord=None, bounds=None, operation='*', identity=None, inverse=None, op=None, algorithm='bsgs'):
"\n Totally generic discrete log function.\n\n INPUT:\n\n - ``a`` -- group element\n - ``base`` -- group element (the base)\n - ``ord`` -- integer (multiple of order of base, or ... |
def discrete_log_generic(a, base, ord=None, bounds=None, operation='*', identity=None, inverse=None, op=None, algorithm='bsgs'):
'\n Alias for ``discrete_log``.\n '
return discrete_log(a, base, ord=ord, bounds=bounds, operation=operation, identity=identity, inverse=inverse, op=op, algorithm=algorithm)
|
def discrete_log_lambda(a, base, bounds, operation='*', identity=None, inverse=None, op=None, hash_function=hash):
"\n Pollard Lambda algorithm for computing discrete logarithms. It uses\n only a logarithmic amount of memory. It's useful if you have\n bounds on the logarithm. If you are computing logarit... |
def linear_relation(P, Q, operation='+', identity=None, inverse=None, op=None):
"\n Function which solves the equation ``a*P=m*Q`` or ``P^a=Q^m``.\n\n Additive version: returns `(a,m)` with minimal `m>0` such that\n `aP=mQ`. Special case: if `\\left<P\\right>` and `\\left<Q\\right>`\n intersect only ... |
def order_from_multiple(P, m, plist=None, factorization=None, check=True, operation='+'):
"\n Generic function to find order of a group element given a multiple\n of its order.\n\n INPUT:\n\n - ``P`` -- a Sage object which is a group element;\n - ``m`` -- a Sage integer which is a multiple of the o... |
def order_from_bounds(P, bounds, d=None, operation='+', identity=None, inverse=None, op=None):
"\n Generic function to find order of a group element, given only\n upper and lower bounds for a multiple of the order (e.g. bounds on\n the order of the group of which it is an element)\n\n INPUT:\n\n - ... |
def merge_points(P1, P2, operation='+', identity=None, inverse=None, op=None, check=True):
"\n Return a group element whose order is the lcm of the given elements.\n\n INPUT:\n\n - ``P1`` -- a pair `(g_1,n_1)` where `g_1` is a group element of order `n_1`\n - ``P2`` -- a pair `(g_2,n_2)` where `g_2` i... |
def structure_description(G, latex=False):
"\n Return a string that tries to describe the structure of ``G``.\n\n This methods wraps GAP's ``StructureDescription`` method.\n\n For full details, including the form of the returned string and the\n algorithm to build it, see `GAP's documentation\n <ht... |
class GroupExp(Functor):
'\n A functor that converts a commutative additive group into an isomorphic\n multiplicative group.\n\n More precisely, given a commutative additive group `G`, define the exponential\n of `G` to be the isomorphic group with elements denoted\n `e^g` for every `g \\in G` and ... |
class GroupExpElement(ElementWrapper, MultiplicativeGroupElement):
'\n An element in the exponential of a commutative additive group.\n\n INPUT:\n\n - ``self`` -- the exponentiated group element being created\n - ``parent`` -- the exponential group (parent of ``self``)\n - ``x`` -- the commutative ... |
class GroupExp_Class(UniqueRepresentation, Parent):
'\n The multiplicative form of a commutative additive group.\n\n INPUT:\n\n - `G`: a commutative additive group\n\n OUTPUT:\n\n - The multiplicative form of `G`.\n\n EXAMPLES::\n\n sage: GroupExp()(QQ)\n Multiplicative form of Rat... |
class GroupSemidirectProductElement(CartesianProduct.Element):
'\n Element class for :class:`GroupSemidirectProduct`.\n '
def _repr_(self):
'\n A string representing the semidirect product group.\n\n EXAMPLES::\n\n sage: def twist(x,y):\n ....: return y\n... |
class GroupSemidirectProduct(CartesianProduct):
'\n Return the semidirect product of the groups ``G`` and ``H`` using the homomorphism ``twist``.\n\n INPUT:\n\n - ``G`` and ``H`` -- multiplicative groups\n - ``twist`` -- (default: ``None``) a function defining\n a homomorphism (see below)\n - ... |
class IndexedGroup(IndexedMonoid):
"\n Base class for free (abelian) groups whose generators are indexed\n by a set.\n\n TESTS:\n\n We check finite properties::\n\n sage: G = Groups().free(index_set=ZZ)\n sage: G.is_finite()\n False\n sage: G = Groups().free(index_set='abc'... |
class IndexedFreeGroup(IndexedGroup, Group):
"\n An indexed free group.\n\n EXAMPLES::\n\n sage: G = Groups().free(index_set=ZZ)\n sage: G\n Free group indexed by Integer Ring\n sage: G = Groups().free(index_set='abcde')\n sage: G\n Free group indexed by {'a', 'b', ... |
class IndexedFreeAbelianGroup(IndexedGroup, AbelianGroup):
"\n An indexed free abelian group.\n\n EXAMPLES::\n\n sage: G = Groups().Commutative().free(index_set=ZZ)\n sage: G\n Free abelian group indexed by Integer Ring\n sage: G = Groups().Commutative().free(index_set='abcde')\n... |
class KernelSubgroup(UniqueRepresentation, Parent):
'\n The kernel (normal) subgroup.\n\n Let `\\phi : G \\to H` be a group homomorphism. The kernel\n `K = \\{\\phi(g) = 1 | g \\in G\\}` is a normal subgroup of `G`.\n '
def __init__(self, morphism):
'\n Initialize ``self``.\n\n ... |
class GroupLibGAP(GroupMixinLibGAP, Group, ParentLibGAP):
Element = ElementLibGAP
def __init__(self, *args, **kwds):
"\n Group interface for LibGAP-based groups.\n\n INPUT:\n\n Same as :class:`~sage.groups.libgap_wrapper.ParentLibGAP`.\n\n TESTS::\n\n sage: F.<a... |
class GroupMixinLibGAP():
def __contains__(self, elt):
'\n TESTS::\n\n sage: from sage.groups.libgap_group import GroupLibGAP\n sage: G = GroupLibGAP(libgap.SL(2,3))\n sage: libgap([[1,0],[0,1]]) in G\n False\n sage: o = Mod(1, 3)\n ... |
class GroupMorphism_libgap(Morphism):
"\n This wraps GAP group homomorphisms.\n\n Checking if the input defines a group homomorphism can be expensive\n if the group is large.\n\n INPUT:\n\n - ``homset`` -- the parent\n - ``gap_hom`` -- a :class:`sage.libs.gap.element.GapElement` consisting of a ... |
class GroupHomset_libgap(HomsetWithBase):
'\n Homsets of groups with a libgap backend.\n\n Do not call this directly instead use :func:`Hom`.\n\n INPUT:\n\n - ``G`` -- a libgap group\n - ``H`` -- a libgap group\n - ``category`` -- a category\n\n OUTPUT:\n\n The homset of two libgap groups.... |
class BinaryDihedralGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_gap):
'\n The binary dihedral group `BD_n` of order `4n`.\n\n Let `n` be a positive integer. The binary dihedral group `BD_n`\n is a finite group of order `4n`, and can be considered as the\n matrix group generated by\n\n ... |
class CoxeterMatrixGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_generic):
'\n A Coxeter group represented as a matrix group.\n\n Let `(W, S)` be a Coxeter system. We construct a vector space `V`\n over `\\RR` with a basis of `\\{ \\alpha_s \\}_{s \\in S}` and inner product\n\n .. MATH::\n\... |
def _matrix_test_right_descent(M, i, n, zero):
'\n Test if the matrix ``M`` has a right ``i``-descent.\n\n INPUT:\n\n - ``M`` -- the matrix\n - ``i`` -- the index\n - ``n`` -- the size of the matrix\n - ``zero`` -- the zero element in the base ring of ``M``\n\n .. NOTE::\n\n This is a ... |
def normalize_square_matrices(matrices):
'\n Find a common space for all matrices.\n\n OUTPUT:\n\n A list of matrices, all elements of the same matrix space.\n\n EXAMPLES::\n\n sage: from sage.groups.matrix_gps.finitely_generated import normalize_square_matrices\n sage: m1 = [[1,2], [3,4... |
def QuaternionMatrixGroupGF3():
'\n The quaternion group as a set of `2\\times 2` matrices over `\\GF{3}`.\n\n OUTPUT:\n\n A matrix group consisting of `2\\times 2` matrices with\n elements from the finite field of order 3. The group is\n the quaternion group, the nonabelian group of order 8 that\... |
def MatrixGroup(*gens, **kwds):
"\n Return the matrix group with given generators.\n\n INPUT:\n\n - ``*gens`` -- matrices, or a single list/tuple/iterable of\n matrices, or a matrix group.\n\n - ``check`` -- boolean keyword argument (optional, default:\n ``True``). Whether to check that each... |
class FinitelyGeneratedMatrixGroup_generic(MatrixGroup_generic):
'\n TESTS::\n\n sage: # needs sage.symbolic\n sage: m1 = matrix(SR, [[1,2], [3,4]])\n sage: m2 = matrix(SR, [[1,3], [-1,0]])\n sage: MatrixGroup(m1) == MatrixGroup(m1)\n True\n sage: MatrixGroup(m1) == Ma... |
class FinitelyGeneratedMatrixGroup_gap(MatrixGroup_gap):
"\n Matrix group generated by a finite number of matrices.\n\n EXAMPLES::\n\n sage: m1 = matrix(GF(11), [[1,2],[3,4]])\n sage: m2 = matrix(GF(11), [[1,3],[10,0]])\n sage: G = MatrixGroup(m1, m2); G\n Matrix group over Fini... |
def _new_invariant_is_linearly_independent(F, invariants):
'\n EXAMPLES::\n\n sage: gens = [matrix(QQ, [[-1,1],[-1,0]]), matrix(QQ, [[0,1],[1,0]])]\n sage: G = MatrixGroup(gens)\n sage: s = Sequence(G.invariants_of_degree(14)) # needs sage.rings.number_fiel... |
class HeisenbergGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_gap):
'\n The Heisenberg group of degree `n`.\n\n Let `R` be a ring, and let `n` be a positive integer.\n The Heisenberg group of degree `n` over `R` is a multiplicative\n group whose elements are matrices with the following form... |
def is_MatrixGroupHomset(x):
'\n Test whether ``x`` is a matrix group homset.\n\n EXAMPLES::\n\n sage: from sage.groups.matrix_gps.homset import is_MatrixGroupHomset\n sage: is_MatrixGroupHomset(4)\n doctest:...: DeprecationWarning:\n Importing MatrixGroupHomset from here is depr... |
class GroupOfIsometries(FinitelyGeneratedMatrixGroup_gap):
'\n A base class for Orthogonal matrix groups with a gap backend.\n\n Main difference to :class:`~sage.groups.matrix_gps.orthogonal.OrthogonalMatrixGroup_gap` is that we can\n specify generators and a bilinear form. Following gap the group action... |
class GroupActionOnSubmodule(Action):
'\n Matrix group action on a submodule from the right.\n\n INPUT:\n\n - ``MatrixGroup`` -- an instance of :class:`GroupOfIsometries`\n - ``submodule`` -- an invariant submodule\n - ``is_left`` -- bool (default: ``False``)\n\n EXAMPLES::\n\n sage: fro... |
class GroupActionOnQuotientModule(Action):
'\n Matrix group action on a quotient module from the right.\n\n INPUT:\n\n - ``MatrixGroup`` -- the group acting\n :class:`GroupOfIsometries`\n - ``submodule`` -- an invariant quotient module\n - ``is_left`` -- bool (default: ``False``)\n\n EXAMP... |
def GL(n, R, var='a'):
'\n Return the general linear group.\n\n The general linear group `GL( d, R )` consists of all `d \\times d`\n matrices that are invertible over the ring `R`.\n\n .. NOTE::\n\n This group is also available via ``groups.matrix.GL()``.\n\n INPUT:\n\n - ``n`` -- a posi... |
def SL(n, R, var='a'):
'\n Return the special linear group.\n\n The special linear group `SL( d, R )` consists of all `d \\times d`\n matrices that are invertible over the ring `R` with determinant\n one.\n\n .. note::\n\n This group is also available via ``groups.matrix.SL()``.\n\n INPUT... |
class LinearMatrixGroup_generic(NamedMatrixGroup_generic):
def _check_matrix(self, x, *args):
'\n Check whether the matrix ``x`` is special linear.\n\n See :meth:`~sage.groups.matrix_gps.matrix_group._check_matrix`\n for details.\n\n EXAMPLES::\n\n sage: G = SL(2, G... |
class LinearMatrixGroup_gap(NamedMatrixGroup_gap, LinearMatrixGroup_generic, FinitelyGeneratedMatrixGroup_gap):
'\n The general or special linear group in GAP.\n\n TESTS:\n\n Check that :trac:`20867` is fixed::\n\n sage: from sage.groups.matrix_gps.finitely_generated_gap import FinitelyGeneratedMa... |
def is_MatrixGroup(x):
'\n Test whether ``x`` is a matrix group.\n\n EXAMPLES::\n\n sage: from sage.groups.matrix_gps.matrix_group import is_MatrixGroup\n sage: is_MatrixGroup(MatrixSpace(QQ, 3))\n False\n sage: is_MatrixGroup(Mat(QQ, 3))\n False\n sage: is_MatrixGr... |
class MatrixGroup_base(Group):
'\n Base class for all matrix groups.\n\n This base class just holds the base ring, but not the degree. So\n it can be a base for affine groups where the natural matrix is\n larger than the degree of the affine group. Makes no assumption\n about the group except that ... |
@richcmp_method
class MatrixGroup_generic(MatrixGroup_base):
Element = MatrixGroupElement_generic
def __init__(self, degree, base_ring, category=None):
'\n Base class for matrix groups over generic base rings\n\n You should not use this class directly. Instead, use one of\n the m... |
class MatrixGroup_gap(GroupMixinLibGAP, MatrixGroup_generic, ParentLibGAP):
Element = MatrixGroupElement_gap
def __init__(self, degree, base_ring, libgap_group, ambient=None, category=None):
"\n Base class for matrix groups that implements GAP interface.\n\n INPUT:\n\n - ``degree... |
def to_libgap(x):
'\n Helper to convert ``x`` to a LibGAP matrix or matrix group\n element.\n\n Deprecated; use the ``x.gap()`` method or ``libgap(x)`` instead.\n\n EXAMPLES::\n\n sage: from sage.groups.matrix_gps.morphism import to_libgap\n sage: to_libgap(GL(2,3).gen(0))\n docte... |
def normalize_args_vectorspace(*args, **kwds):
"\n Normalize the arguments that relate to a vector space.\n\n INPUT:\n\n Something that defines an affine space. For example\n\n * An affine space itself:\n\n - ``A`` -- affine space\n\n * A vector space:\n\n - ``V`` -- a vector space\n\n ... |
def normalize_args_invariant_form(R, d, invariant_form):
'\n Normalize the input of a user defined invariant bilinear form\n for orthogonal, unitary and symplectic groups.\n\n Further informations and examples can be found in the defining\n functions (:func:`GU`, :func:`SU`, :func:`Sp`, etc.) for unit... |
class NamedMatrixGroup_generic(CachedRepresentation, MatrixGroup_generic):
def __init__(self, degree, base_ring, special, sage_name, latex_string, category=None, invariant_form=None):
'\n Base class for "named" matrix groups\n\n INPUT:\n\n - ``degree`` -- integer; the degree (number ... |
class NamedMatrixGroup_gap(NamedMatrixGroup_generic, MatrixGroup_gap):
def __init__(self, degree, base_ring, special, sage_name, latex_string, gap_command_string, category=None):
'\n Base class for "named" matrix groups using LibGAP\n\n INPUT:\n\n - ``degree`` -- integer. The degree ... |
def normalize_args_e(degree, ring, e):
'\n Normalize the arguments that relate the choice of quadratic form\n for special orthogonal groups over finite fields.\n\n INPUT:\n\n - ``degree`` -- integer. The degree of the affine group, that is,\n the dimension of the affine space the group is acting ... |
def _OG(n, R, special, e=0, var='a', invariant_form=None):
'\n This function is commonly used by the functions GO and SO to avoid\n unnecessarily duplicated code. For documentation and examples see\n the individual functions.\n\n TESTS:\n\n Check that :trac:`26028` is fixed::\n\n sage: GO(3,... |
def GO(n, R, e=0, var='a', invariant_form=None):
"\n Return the general orthogonal group.\n\n The general orthogonal group `GO(n,R)` consists of all `n \\times n`\n matrices over the ring `R` preserving an `n`-ary positive definite\n quadratic form. In cases where there are multiple non-isomorphic\n ... |
def SO(n, R, e=None, var='a', invariant_form=None):
"\n Return the special orthogonal group.\n\n The special orthogonal group `GO(n,R)` consists of all `n \\times n`\n matrices with determinant one over the ring `R` preserving an\n `n`-ary positive definite quadratic form. In cases where there are\n ... |
class OrthogonalMatrixGroup_generic(NamedMatrixGroup_generic):
'\n General Orthogonal Group over arbitrary rings.\n\n EXAMPLES::\n\n sage: G = GO(3, GF(7)); G\n General Orthogonal Group of degree 3 over Finite Field of size 7\n sage: latex(G)\n \\text{GO}_{3}(\\Bold{F}_{7})\n\n ... |
class OrthogonalMatrixGroup_gap(OrthogonalMatrixGroup_generic, NamedMatrixGroup_gap, FinitelyGeneratedMatrixGroup_gap):
'\n The general or special orthogonal group in GAP.\n\n TESTS:\n\n Check that :trac:`20867` is fixed::\n\n sage: from sage.groups.matrix_gps.finitely_generated_gap import Finitel... |
class LegacyMatrixGroup(FinitelyGeneratedMatrixGroup_gap):
def __setstate__(self, state):
"\n Restore from old pickle.\n\n EXAMPLES::\n\n sage: from sage.groups.matrix_gps.pickling_overrides import LegacyMatrixGroup\n sage: state = dict()\n sage: state['_Mat... |
class LegacyMatrixGroupElement(MatrixGroupElement_gap):
def __setstate__(self, state):
"\n Restore from old pickle.\n\n EXAMPLES::\n\n sage: from sage.groups.matrix_gps.pickling_overrides import LegacyMatrixGroup, LegacyMatrixGroupElement\n sage: state = dict()\n ... |
class LegacyGeneralLinearGroup(LinearMatrixGroup_generic):
def __setstate__(self, state):
"\n Restore from old pickle.\n\n EXAMPLES::\n\n sage: from sage.groups.group import Group\n sage: from sage.groups.matrix_gps.pickling_overrides import LegacyGeneralLinearGroup\n ... |
def Sp(n, R, var='a', invariant_form=None):
"\n Return the symplectic group.\n\n The special linear group `GL( d, R )` consists of all `d \\times d`\n matrices that are invertible over the ring `R` with determinant one.\n\n .. NOTE::\n\n This group is also available via ``groups.matrix.Sp()``.\... |
class SymplecticMatrixGroup_generic(NamedMatrixGroup_generic):
'\n Symplectic Group over arbitrary rings.\n\n EXAMPLES::\n\n sage: Sp43 = Sp(4,3); Sp43\n Symplectic Group of degree 4 over Finite Field of size 3\n sage: latex(Sp43)\n \\text{Sp}_{4}(\\Bold{F}_{3})\n\n sage: ... |
class SymplecticMatrixGroup_gap(SymplecticMatrixGroup_generic, NamedMatrixGroup_gap, FinitelyGeneratedMatrixGroup_gap):
'\n Symplectic group in GAP.\n\n EXAMPLES::\n\n sage: Sp(2,4) # needs sage.rings.finite_rings\n Symplectic G... |
def finite_field_sqrt(ring):
"\n Helper function.\n\n INPUT: A ring.\n\n OUTPUT:\n\n Integer `q` such that ``ring`` is the finite field with `q^2` elements.\n\n EXAMPLES::\n\n sage: from sage.groups.matrix_gps.unitary import finite_field_sqrt\n sage: finite_field_sqrt(GF(4, 'a')) ... |
def _UG(n, R, special, var='a', invariant_form=None):
'\n This function is commonly used by the functions :func:`GU` and :func:`SU`\n to avoid duplicated code. For documentation and examples\n see the individual functions.\n\n TESTS::\n\n sage: GU(3,25).order() # indirect doctest ... |
def GU(n, R, var='a', invariant_form=None):
"\n Return the general unitary group.\n\n The general unitary group `GU( d, R )` consists of all `d \\times d`\n matrices that preserve a nondegenerate sesquilinear form over the\n ring `R`.\n\n .. NOTE::\n\n For a finite field, the matrices that p... |
def SU(n, R, var='a', invariant_form=None):
"\n The special unitary group `SU( d, R )` consists of all `d \\times d`\n matrices that preserve a nondegenerate sesquilinear form over the\n ring `R` and have determinant `1`.\n\n .. NOTE::\n\n For a finite field the matrices that preserve a sesquil... |
class UnitaryMatrixGroup_generic(NamedMatrixGroup_generic):
'\n General Unitary Group over arbitrary rings.\n\n EXAMPLES::\n\n sage: G = GU(3, GF(7)); G # needs sage.rings.finite_rings\n General Unitary Group of degree 3 over Finite Field i... |
class UnitaryMatrixGroup_gap(UnitaryMatrixGroup_generic, NamedMatrixGroup_gap, FinitelyGeneratedMatrixGroup_gap):
'\n The general or special unitary group in GAP.\n\n TESTS:\n\n Check that :trac:`20867` is fixed::\n\n sage: from sage.groups.matrix_gps.finitely_generated_gap import FinitelyGenerate... |
class AbstractArgument(MultiplicativeGroupElement):
"\n An element of :class:`AbstractArgumentGroup`. This abstract class\n encapsulates an element of the parent's base, i.e. it can be seen\n as a wrapper class.\n\n INPUT:\n\n - ``parent`` -- a SageMath parent\n\n - ``element`` -- an element of ... |
class AbstractArgumentGroup(UniqueRepresentation, Parent):
'\n A group whose elements represent (complex) arguments.\n\n INPUT:\n\n - ``base`` -- a SageMath parent\n\n - ``category`` -- a category\n '
Element = AbstractArgument
@staticmethod
def __classcall__(cls, base, category=None):... |
class UnitCirclePoint(AbstractArgument):
'\n An element of :class:`UnitCircleGroup`\n which is `e^{2\\pi\\cdot\\mathit{exponent}}`.\n\n INPUT:\n\n - ``parent`` -- a SageMath parent\n\n - ``exponent`` -- a number (of a subset of the reals)\n\n - ``normalize`` -- a boolean (default: ``True``)\n ... |
class UnitCircleGroup(AbstractArgumentGroup):
'\n A group of points on the unit circle. These points are\n represented by `e^{2\\pi\\cdot\\mathit{exponent}}`.\n\n INPUT:\n\n - ``base`` -- a SageMath parent representing a subset of the reals\n\n - ``category`` -- a category\n\n EXAMPLES::\n\n ... |
class RootOfUnity(UnitCirclePoint):
'\n A root of unity (i.e. an element of :class:`RootsOfUnityGroup`)\n which is `e^{2\\pi\\cdot\\mathit{exponent}}` for a rational ``exponent``.\n '
def exponent_numerator(self):
'\n Return the numerator of the rational quotient in `[0,1)`\n r... |
class RootsOfUnityGroup(UnitCircleGroup):
'\n The group of all roots of unity.\n\n INPUT:\n\n - ``category`` -- a category\n\n This is a specialized :class:`UnitCircleGroup` with base `\\QQ`.\n\n EXAMPLES::\n\n sage: from sage.groups.misc_gps.argument_groups import RootsOfUnityGroup\n ... |
class ArgumentByElement(AbstractArgument):
"\n An element of :class:`ArgumentByElementGroup`.\n\n INPUT:\n\n - ``parent`` -- a SageMath parent\n\n - ``element`` -- a nonzero element of the parent's base\n\n - ``normalize`` -- a boolean (default: ``True``)\n "
def __init__(self, parent, elem... |
class ArgumentByElementGroup(AbstractArgumentGroup):
'\n A group of (complex) arguments. The arguments are represented\n by a the formal argument of an element, i.e.,\n by `\\mathrm{arg}(\\mathit{element})`.\n\n INPUT:\n\n - ``base`` -- a SageMath parent representing a subset of the complex plane\n... |
class Sign(AbstractArgument):
"\n An element of :class:`SignGroup`.\n\n INPUT:\n\n - ``parent`` -- a SageMath parent\n\n - ``element`` -- a nonzero element of the parent's base\n\n - ``normalize`` -- a boolean (default: ``True``)\n "
def __init__(self, parent, element, normalize=True):
... |
class SignGroup(AbstractArgumentGroup):
'\n A group of the signs `-1` and `1`.\n\n INPUT:\n\n - ``category`` -- a category\n\n EXAMPLES::\n\n sage: from sage.groups.misc_gps.argument_groups import SignGroup\n sage: S = SignGroup(); S\n Sign Group\n sage: S(-1)\n -1\n... |
class ArgumentGroupFactory(UniqueFactory):
"\n A factory for creating argument groups.\n\n INPUT:\n\n - ``data`` -- an object\n\n The factory will analyze ``data`` and interpret it as\n ``specification`` or ``domain``.\n\n - ``specification`` -- a string\n\n The following is possible:\n... |
class ImaginaryElement(AdditiveGroupElement):
"\n An element of :class:`ImaginaryGroup`.\n\n INPUT:\n\n - ``parent`` -- a SageMath parent\n\n - ``imag`` -- an element of parent's base\n "
def __init__(self, parent, imag):
'\n See :class:`ImaginaryGroup` for more information.\n\n... |
class ImaginaryGroup(UniqueRepresentation, Parent):
'\n A group whose elements are purely imaginary.\n\n INPUT:\n\n - ``base`` -- a SageMath parent\n\n - ``category`` -- a category\n\n EXAMPLES::\n\n sage: from sage.groups.misc_gps.imaginary_groups import ImaginaryGroup\n sage: J = Im... |
class PariGroup():
def __init__(self, x, degree):
'\n EXAMPLES::\n\n sage: PariGroup([6, -1, 2, "S3"], 3)\n PARI group [6, -1, 2, S3] of degree 3\n sage: R.<x> = PolynomialRing(QQ)\n sage: f = x^4 - 17*x^3 - 2*x + 1\n sage: G = f.galois_group(... |
def PermutationGroupElement(g, parent=None, check=True):
'\n Builds a permutation from ``g``.\n\n INPUT:\n\n - ``g`` -- either\n\n - a list of images\n\n - a tuple describing a single cycle\n\n - a list of tuples describing the cycle decomposition\n\n - a string describing the cycle d... |
def string_to_tuples(g):
"\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.constructor import string_to_tuples\n sage: string_to_tuples('(1,2,3)')\n [(1, 2, 3)]\n sage: string_to_tuples('(1,2,3)(4,5)')\n [(1, 2, 3), (4, 5)]\n sage: string_to_tuples(' (1,2, 3) (4,5)')\... |
def standardize_generator(g, convert_dict=None, as_cycles=False):
"\n Standardize the input for permutation group elements to a list\n or a list of tuples.\n\n This was factored out of the\n ``PermutationGroupElement.__init__`` since\n ``PermutationGroup_generic.__init__`` needs to do the same comp... |
def xproj(x, y, z, r):
'\n Return the `x`-projection of `(x,y,z)` rotated by `r`.\n\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.cubegroup import rotation_list, xproj\n sage: rot = rotation_list(30, 45)\n sage: xproj(1,2,3,rot)\n 0.6123724356957945\n '
return (((y * r[... |
def yproj(x, y, z, r):
'\n Return the `y`-projection of `(x,y,z)` rotated by `r`.\n\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.cubegroup import rotation_list, yproj\n sage: rot = rotation_list(30, 45)\n sage: yproj(1,2,3,rot)\n 1.378497416975604\n '
return ((z * r[2]... |
def rotation_list(tilt, turn):
'\n Return a list `[\\sin(\\theta), \\sin(\\phi), \\cos(\\theta), \\cos(\\phi)]` of\n rotations where `\\theta` is ``tilt`` and `\\phi` is ``turn``.\n\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.cubegroup import rotation_list\n sage: rotation_list(30, 45)... |
def polygon_plot3d(points, tilt=30, turn=30, **kwargs):
'\n Plot a polygon viewed from an angle determined by ``tilt``, ``turn``, and\n vertices ``points``.\n\n .. WARNING::\n\n The ordering of the points is important to get "correct"\n and if you add several of these plots together, the one ... |
def inv_list(lst):
'\n Input a list of ints `1, \\ldots, m` (in any order), outputs inverse\n perm.\n\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.cubegroup import inv_list\n sage: L = [2,3,1]\n sage: inv_list(L)\n [3, 1, 2]\n '
return [(lst.index(i) + 1) for i in r... |
def create_poly(face, color):
"\n Create the polygon given by ``face`` with color ``color``.\n\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.cubegroup import create_poly, red\n sage: create_poly('ur', red) # needs sage.plot\n Graphic... |
def index2singmaster(facet):
"\n Translate index used (eg, 43) to Singmaster facet notation (eg,\n fdr).\n\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.cubegroup import index2singmaster\n sage: index2singmaster(41)\n 'dlf'\n "
return singmaster_indices[facet]
|
def color_of_square(facet, colors=['lpurple', 'yellow', 'red', 'green', 'orange', 'blue']):
"\n Return the color the facet has in the solved state.\n\n EXAMPLES::\n\n sage: from sage.groups.perm_gps.cubegroup import color_of_square\n sage: color_of_square(41)\n 'blue'\n "
return ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.