def __init__(self, G, V, check=True): r""" Initialization. EXAMPLES:: sage: F.<a> = GF(4) sage: s = SemimonomialTransformationGroup(F, 3).an_element() sage: v = (F**3).1 sage: s*v # indirect doctest (0, 0, 1) """ if check: from sage.modules.free_module import FreeModule_generic if not isinstance(G, SemimonomialTransformationGroup): raise ValueError('%s is not a semimonomial group' % G) if not isinstance(V, FreeModule_generic): raise ValueError('%s is not a free module' % V) if V.ambient_module() != V: raise ValueError('%s is not equal to its ambient module' % V) if V.dimension() != G.degree(): raise ValueError('%s has a dimension different to the degree of %s' % (V, G)) if V.base_ring() != G.base_ring(): raise ValueError('%s and %s have different base rings' % (V, G)) Action.__init__(self, G, V.dense_module())
def __init__(self, G, M, check=True): r""" Initialization. EXAMPLES:: sage: F.<a> = GF(4) sage: s = SemimonomialTransformationGroup(F, 3).an_element() sage: M = MatrixSpace(F, 3).one() sage: s*M # indirect doctest [ 0 1 0] [ 0 0 1] [a + 1 0 0] """ if check: from sage.matrix.matrix_space import MatrixSpace if not isinstance(G, SemimonomialTransformationGroup): raise ValueError('%s is not a semimonomial group' % G) if not isinstance(M, MatrixSpace): raise ValueError('%s is not a matrix space' % M) if M.ncols() != G.degree(): raise ValueError('the number of columns of %s' % M + ' and the degree of %s are different' % G) if M.base_ring() != G.base_ring(): raise ValueError('%s and %s have different base rings' % (M, G)) Action.__init__(self, G, M)
def __init__(self, G, V, check=True): r""" Initialization. EXAMPLES:: sage: F.<a> = GF(4) sage: s = SemimonomialTransformationGroup(F, 3).an_element() sage: v = (F**3).1 sage: s*v # indirect doctest (0, 0, 1) """ if check: from sage.modules.free_module import FreeModule_generic if not isinstance(G, SemimonomialTransformationGroup): raise ValueError('%s is not a semimonomial group' % G) if not isinstance(V, FreeModule_generic): raise ValueError('%s is not a free module' % V) if V.ambient_module() != V: raise ValueError('%s is not equal to its ambient module' % V) if V.dimension() != G.degree(): raise ValueError( '%s has a dimension different to the degree of %s' % (V, G)) if V.base_ring() != G.base_ring(): raise ValueError('%s and %s have different base rings' % (V, G)) Action.__init__(self, G, V.dense_module())
def __init__(self,Sigma0Squared,D,act_on_left=False): r""" Input: - D : module of Bianchi distributions (BianchiDistributions object) - Sigma0Squared : monoid Sigma_0(p)^2 (Sigma0Squared parent object) - act_on_left : indicator for right or left action (default False, so right action) """ Action.__init__(self,Sigma0Squared,D, is_left=act_on_left, op=operator.mul)
def __init__(self, Dk, character, adjuster, on_left, dettwist, padic=True): #ensures there's a p in the level. #self._Np = self._Np.lcm(self._p) self._autfactors = {} WeightKAction_generic.__init__(self, Dk, character, adjuster, on_left, dettwist) self._Np = self._Np.lcm(Dk._p) Action.__init__(self, Sigma0(Dk._p ** self._Np.valuation(Dk._p), base_ring=Dk.base_ring().base_ring(), \ adjuster=self._adjuster), Dk, on_left, operator.mul)
def __init__(self, objects): import operator o = objects.origami() # Action.__init__(G,S,is_left,op) Action.__init__( self, o.automorphism_group(), objects, True, operator.mul)
def __init__(self, G, M, is_left=0): """ TESTS:: sage: B = BraidGroup(3) sage: G = FreeGroup('a, b, c') sage: B.mapping_class_action(G) # indirect doctest Right action by Braid group on 3 strands on Free Group on generators {a, b, c} """ import operator Action.__init__(self, G, M, is_left, operator.mul)
def __init__(self, MatrixGroup, quotient_module, is_left=False): r""" Initialize the action TESTS:: sage: from sage.groups.matrix_gps.isometries import GroupOfIsometries sage: S = span(ZZ,[[0,1]]) sage: Q = S/(6*S) sage: g = Matrix(QQ,2,[1,0,0,-1]) sage: G = GroupOfIsometries(2, ZZ, [g], invariant_bilinear_form=matrix.identity(2), invariant_quotient_module=Q) sage: g = G.an_element() sage: x = Q.an_element() sage: x, x*g ((1), (5)) """ import operator Action.__init__(self, MatrixGroup, quotient_module, is_left, operator.mul)
def __init__(self, Dk, character, adjuster, on_left, dettwist, padic=False): self._k = Dk._k self._adjuster = adjuster self._character = character self._dettwist = dettwist self._p = Dk._p self._actmat = {} self._maxprecs = {} if character is None: self._Np = ZZ(1) # all of M2Z acts else: self._Np = character.modulus() #Do something about this in a derived class #if not self._symk: # self._Np = self._Np.lcm(self._p) if padic: self._Np = self._Np.lcm(self._p) Action.__init__(self, Sigma0(self._Np, base_ring=Dk.base_ring(), adjuster=self._adjuster), Dk, on_left, operator.mul) else: Action.__init__(self, Sigma0(self._Np, base_ring=ZZ, adjuster=self._adjuster), Dk, on_left, operator.mul)
def __init__(self, orthogonal_grp, fqf, on_subquotient=False, is_left=False): r""" Initialize the action TESTS:: sage: from sage.groups.fqf_orthogonal import ActionOnFqf sage: q = matrix.diagonal([2/3, 4/3]) sage: q = TorsionQuadraticForm(q) sage: G = q.orthogonal_group() sage: A = ActionOnFqf(G, q, is_left=True) Traceback (most recent call last): ... ValueError: the action is from the right """ import operator self._on_subquotient = on_subquotient if is_left: raise ValueError("the action is from the right") Action.__init__(self, orthogonal_grp, fqf, is_left, operator.mul)
def __init__(self, MatrixGroup,submodule, is_left=False): r""" Initialize the action TESTS:: sage: from sage.groups.matrix_gps.isometries import GroupOfIsometries, GroupActionOnSubmodule sage: S = span(ZZ,[[0,1]]) sage: g = Matrix(QQ,2,[1,0,0,-1]) sage: e = Matrix.identity(2) sage: G = GroupOfIsometries(2, ZZ, [g], e) sage: GroupActionOnSubmodule(G,S) Right action by Group of isometries with 1 generator ( [ 1 0] [ 0 -1] ) on Free module of degree 2 and rank 1 over Integer Ring Echelon basis matrix: [0 1] """ import operator Action.__init__(self, MatrixGroup, submodule, is_left, operator.mul)
def __init__(self, G, S): """ EXAMPLES:: sage: from sage.rings.function_field.differential import DifferentialMultiplicationAction sage: K.<x>=FunctionField(GF(4)); _.<Y>=K[] sage: L.<y>=K.extension(Y^3+x+x^3*Y) sage: R.<x>=FunctionField(QQ); sage: DifferentialMultiplicationAction(K, L) Traceback (most recent call last): ... TypeError: (Function field in y defined by y^3 + x^3*y + x) must be a DifferentialsSpace sage: DifferentialMultiplicationAction(K.space_of_differentials(), L.space_of_differentials()) Traceback (most recent call last): ... TypeError: (Space of differentials of Rational function field in x over Finite Field in z2 of size 2^2) must be a FunctionField sage: DifferentialMultiplicationAction(R, L.space_of_differentials()) Traceback (most recent call last): ... TypeError: 'Rational function field in x over Rational Field' and 'Space of differentials of Function field in y defined by y^3 + x^3*y + x' are not compatible sage: DifferentialMultiplicationAction(K, L.space_of_differentials()) Left action by Rational function field in x over Finite Field in z2 of size 2^2 on Space of differentials of Function field in y defined by y^3 + x^3*y + x """ if not isinstance(G, FunctionField): raise TypeError("(%s) must be a FunctionField" % repr(G)) if not isinstance(S, DifferentialsSpace): raise TypeError("(%s) must be a DifferentialsSpace" % repr(S)) if not G.space_of_differentials().has_coerce_map_from(S) \ and not S.has_coerce_map_from(G.space_of_differentials()): raise TypeError("'%s' and '%s' are not compatible" % (repr(G), repr(S))) Action.__init__(self, G, S, True, operator.pow)
def __init__(self, objects): import operator o = objects.origami() # Action.__init__(G,S,is_left,op) Action.__init__(self, o.automorphism_group(), objects, True, operator.mul)
def __init__(self, actor, MSspace): Action.__init__(self, actor, MSspace, False, operator.mul)
def __init__(self,G,M): Action.__init__(self,G,M,is_left = True,op = operator.mul)
def __init__(self, algebra , V, G, trivial_action = False): self._G = G self.V = V self._trivial_action = trivial_action Action.__init__(self,algebra,V,is_left = True,op = operator.mul)
def __init__(self, polygons): from sage.matrix.matrix_space import MatrixSpace K = polygons.field() Action.__init__(self, MatrixSpace(K,2), polygons, True, operator.mul)
def __init__(self, algebra, V, G, trivial_action=False): self._G = G self.V = V self._trivial_action = trivial_action Action.__init__(self, algebra, V, is_left=True, op=operator.mul)
def __init__(self, G, M): Action.__init__(self, G, M, is_left=True, op=operator.mul)