Core API: pysymmetry¶
This module contains the central classes and functions for group theory and representations.
pysymmetry.FiniteGroup
¶
Bases: PermutationGroup_generic
regular_representation()
¶
Return the regular representation defined over the group.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.
OUTPUT: The regular representation defined over the FiniteGroup given by self.
EXAMPLES:
We define the regular representation over the cyclic group of 4 elements ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: reg = G.regular_representation()
sage: [reg(g) for g in G]
[Linear transformation associated with element g=(), represented by the non-singular matrix:
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
Representation space: Vector space of dimension 4 over Algebraic Field
,
Linear transformation associated with element g=(1,2,3,4), represented by the non-singular matrix:
[0 0 0 1]
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
Representation space: Vector space of dimension 4 over Algebraic Field
,
Linear transformation associated with element g=(1,3)(2,4), represented by the non-singular matrix:
[0 0 1 0]
[0 0 0 1]
[1 0 0 0]
[0 1 0 0]
Representation space: Vector space of dimension 4 over Algebraic Field
,
Linear transformation associated with element g=(1,4,3,2), represented by the non-singular matrix:
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
[1 0 0 0]
Representation space: Vector space of dimension 4 over Algebraic Field
]
We define the group of symmetries of regular hexagon and the regular representation over this group ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: G = FiniteGroup(generators)
sage: reg = G.regular_representation()
sage: g = G.an_element()
sage: reg(g)
Linear transformation associated with element g=(1,3)(4,6), represented by the non-singular matrix:
[0 0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 1]
[0 0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 0 0 0 1 0]
[0 1 0 0 0 0 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0 0]
[1 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0 0]
Representation space: Vector space of dimension 12 over Algebraic Field
We define the regular representation over the symmetric group of 4 simbols ::
sage: H = SymmetricGroup(4)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: g = G.an_element()
sage: reg(g)
Linear transformation associated with element g=(1,3,4), represented by the non-singular matrix:
24 x 24 dense matrix over Algebraic Field
Representation space: Vector space of dimension 24 over Algebraic Field
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
irreducible_representations(show_table=True)
¶
Return the number n of irreducible representations of self and the irreducibles representations.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.show_table
-- a boolean (default:True
) ; shows a table of each irreducible representation applied at the generators of self.
If show_table=True; return number of irreducible representions and irreducible representions themselves.
If show_table=False; return the irreducible representions themselves.
EXAMPLES:
We define the symmetric group of 4 simbols and calculate its irreducible representations ::
sage: G = FiniteGroup(SymmetricGroup(4));
sage: n, irr = G.irreducible_representations(False) #Irreducible representations
sage: n
5
sage: irr(0)
Map:
From: Permutation FiniteGroup with generators [(1,2), (1,2,3,4)]
To: Matrix group over Integer Ring with 2 generators ([1], [1]).
sage: irr(4)
Map:
From: Permutation FiniteGroup with generators [(1,2), (1,2,3,4)]
To: Matrix group over Integer Ring with 2 generators (
[ 0 1 0] [ 0 0 -1]
[ 1 0 0] [ 0 1 0]
[ 0 0 -1], [ 1 0 0]
).
We define the representation by permutation on the cyclic group calculate its irreducible representations ::
sage: G = FiniteGroup(CyclicPermutationGroup(6))
sage: irr = G.irreducible_representations(True) #Irreducible representations
||||||SAIDA A SER PENSADA|||||||
We calculate the irreducible representations of the group of symmetries of a regular tetrahedron ::
sage: G = FiniteGroup(AlternatingGroup(4));
sage: irr = G.irreducible_representations(True) #Irreducible representations
sage: for j in range(n):
||||||SAIDA A SER PENSADA|||||||
We define the group of symmetries of regular hexagon and calculate its irreducible representations ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: G = FiniteGroup(PermutationGroup(generators))
sage: n,irr = G.irreducible_representations(False) #Irreducible representations
sage: for j in range(n):
print(irr(j))
Map:
From: Permutation FiniteGroup with generators [(1,2,3,4,5,6), (1,4)(2,3)(5,6)]
To: Matrix group over Integer Ring with 2 generators ([1], [1]).
Map:
From: Permutation FiniteGroup with generators [(1,2,3,4,5,6), (1,4)(2,3)(5,6)]
To: Matrix group over Integer Ring with 2 generators ([1], [-1]).
Map:
From: Permutation FiniteGroup with generators [(1,2,3,4,5,6), (1,4)(2,3)(5,6)]
To: Matrix group over Integer Ring with 2 generators ([-1], [-1]).
Map:
From: Permutation FiniteGroup with generators [(1,2,3,4,5,6), (1,4)(2,3)(5,6)]
To: Matrix group over Integer Ring with 2 generators ([-1], [1]).
Map:
From: Permutation FiniteGroup with generators [(1,2,3,4,5,6), (1,4)(2,3)(5,6)]
To: Matrix group over Universal Cyclotomic Field with 2 generators (
[E(3)^2 0] [0 1]
[ 0 E(3)], [1 0]
).
Map:
From: Permutation FiniteGroup with generators [(1,2,3,4,5,6), (1,4)(2,3)(5,6)]
To: Matrix group over Universal Cyclotomic Field with 2 generators (
[-E(3)^2 0] [ 0 -1]
[ 0 -E(3)], [-1 0]
).
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
natural_representation(field=QQbar)
¶
Return the natural representation of the group.
The natural representation is defined by the permutation matrices associated with each element of the group.
INPUT:
field
-- (default:QQbar
); The field over which the representation is defined.
OUTPUT: A representation of the group.
EXAMPLES:
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: nat_rep = G.natural_representation()
sage: g = G.an_element()
sage: nat_rep(g).matrix()
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
[1 0 0 0]
isotypic_projection(right)
¶
Return a list containing the matrices associated to projections operators over the isotypic components(or conglomerates) of right.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.right
-- representation ; a representation defined over the same group as self.
OUTPUT: A list of matrices representing the projections operators over the isotypics subespaces of right.
EXAMPLES:
We define the symmetric group of 3 simbols and the isotypic projections associated to the regular representation of this group ::
sage: G = FiniteGroup(SymmetricGroup(3));
sage: reg = G.regular_representation();
sage: G.isotypic_projection(reg)
[
[1 1 1 1 1 1] [ 1 1 1 -1 -1 -1] [ 2 -1 -1 0 0 0]
[1 1 1 1 1 1] [ 1 1 1 -1 -1 -1] [-1 2 -1 0 0 0]
[1 1 1 1 1 1] [ 1 1 1 -1 -1 -1] [-1 -1 2 0 0 0]
[1 1 1 1 1 1] [-1 -1 -1 1 1 1] [ 0 0 0 2 -1 -1]
[1 1 1 1 1 1] [-1 -1 -1 1 1 1] [ 0 0 0 -1 2 -1]
[1 1 1 1 1 1], [-1 -1 -1 1 1 1], [ 0 0 0 -1 -1 2]
]
We calculate an irreducible representation of G, and the isotypic projection associated ::
sage: n,irr = G.irreducible_representations(False) #Irreducible representations
sage: G.isotypic_projection(irr(2))
[
[3 0]
[0 3]
]
We define the representation by permutation on the cyclic group and calculate the isotypic projectors ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: G.isotypic_projection(rep)
[
[1 1 1 1] [ 1 -1 1 -1] [ 1 -1*I -1 1*I] [ 1 1*I -1 -1*I]
[1 1 1 1] [-1 1 -1 1] [ 1*I 1 -1*I -1] [-1*I 1 1*I -1]
[1 1 1 1] [ 1 -1 1 -1] [ -1 1*I 1 -1*I] [ -1 -1*I 1 1*I]
[1 1 1 1], [-1 1 -1 1], [-1*I -1 1*I 1], [ 1*I -1 -1*I 1]
]
We define a representation the group of symmetries of regular hexagon and calculate their isotypic projectors ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: rotation_pi_over_3, reflexion_about_x = matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])
sage: matrices = [block_diagonal_matrix(rotation_pi_over_3, rotation_pi_over_3),block_diagonal_matrix(reflexion_about_x, reflexion_about_x)];
sage: rep = representation(generators, matrices, field=SR)
sage: G = rep.domain()
sage: G.isotypic_projection(rep)
[
[6 0 0 0]
[0 6 0 0]
[0 0 6 0]
[0 0 0 6]
]
TO ADD MORE EXAMPLES TO ADD MORE EXAMPLES TO ADD MORE EXAMPLES
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
isotypic_base(rep, isotypic_components=False)
¶
Return a list with the basis for each isotypic components of rep or the basis change matrix associated to the isotypic decomposition.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.rep
-- representation ; a representation defined over the same group as self.isotypic_components
-- a boolean (default:False
) ; if False returns the change base matrix, if True returns a list with a base for each isotypic component ::
OUTPUT: A list with a basis for each isotypic subspace of rep or the change basis matrix to a form in blocks associated to isotypic components of rep.
EXAMPLES:
We define the symmetric group of 3 simbols change basis matrix associated to the isotypic decomposition ::
sage: G = FiniteGroup(SymmetricGroup(3));
sage: reg = G.regular_representation();
sage: G.isotypic_base(reg, isotypic_components=False)
[ 1| 1| 2 -1 0 0]
[ 1| 1|-1 2 0 0]
[ 1| 1|-1 -1 0 0]
[ 1|-1| 0 0 2 -1]
[ 1|-1| 0 0 -1 2]
[ 1|-1| 0 0 -1 -1]
The isotypic basis for each irreducible subspace associated to the regular representation of this group ::
sage: G.isotypic_base(reg, isotypic_components=True)
[
[1] [ 1] [ 2 -1 0 0]
[1] [ 1] [-1 2 0 0]
[1] [ 1] [-1 -1 0 0]
[1] [-1] [ 0 0 2 -1]
[1] [-1] [ 0 0 -1 2]
[1], [-1], [ 0 0 -1 -1]
]
We define the representation by permutation on the cyclic group and calculate its isotypic decompositions ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: G.isotypic_base(rep, isotypic_components=True)
[
[1] [ 1] [ 1] [ 1]
[1] [-1] [ 1*I] [-1*I]
[1] [ 1] [ -1] [ -1]
[1], [-1], [-1*I], [ 1*I]
]
sage: change_basis = G.isotypic_base(rep, isotypic_components=False); change_basis
[ 1| 1| 1| 1]
[ 1| -1| 1*I|-1*I]
[ 1| 1| -1| -1]
[ 1| -1|-1*I| 1*I]
sage: [rep(g).matrix() for g in G]
[
[1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1]
[0 1 0 0] [0 0 1 0] [0 0 0 1] [1 0 0 0]
[0 0 1 0] [0 0 0 1] [1 0 0 0] [0 1 0 0]
[0 0 0 1], [1 0 0 0], [0 1 0 0], [0 0 1 0]
]
sage: [change_basis.inverse()*rep(g).matrix()*change_basis for g in G]
[
[1 0 0 0] [ 1 0 0 0] [ 1 0 0 0] [ 1 0 0 0]
[0 1 0 0] [ 0 -1 0 0] [ 0 1 0 0] [ 0 -1 0 0]
[0 0 1 0] [ 0 0 1*I 0] [ 0 0 -1 0] [ 0 0 -1*I 0]
[0 0 0 1], [ 0 0 0 -1*I], [ 0 0 0 -1], [ 0 0 0 1*I]
]
We define a representation the group of symmetries of regular hexagon and calculate their matrix change basis(this representation is irreducible) ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: rep = representation(generators, matrices)
sage: G = rep.domain()
sage: G.isotypic_base(rep, isotypic_components=True)
[
[6 0]
[0 6]
]
TO ADD MORE EXAMPLES TO ADD MORE EXAMPLES TO ADD MORE EXAMPLES
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
projection(i, j, k, right, left=None)
¶
Return the projection(or transfers operators) associated to irreducible subrepresentations of right.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.right
-- representation ; a representation defined over the same group as self.i,j,k
-- integers ; integers numbers representing the projection(or transfer) chosen; i- will choose the irreducible representation, and its range is from 0 until the number of irreducibles. ::j- choose a row of the matrix presentation of the irreducible, its range is the degree of chosen irreducible according i. :: k- choose a column of the matrix presentation of the irreducible, its range is the degree of chosen irreducible according i. ::
A matrix associated to the operator that projects over an irreducible subrepresentation of right(if j=k), or is a isomorphism between two equivalent subrepresentations of right.
Whenever the irreducible, chosen by index i, it is not a subrepresentation of right this matrix will be null.
EXAMPLES:
We define the representation by permutation on the cyclic group of four elements and calculate its projectors ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: G.projection(0,0,0, rep)
[1 1 1 1]
[1 1 1 1]
[1 1 1 1]
[1 1 1 1]
sage: n, irr = G.irreducible_representations(False)
sage: list_of_projectors=[];
for i in range(n): # Choosing the irreducible
degree= irr(i).degree() # Calculation the degree of the irreducible
j=0;# we will use the first row
for k in range(degree):
projector = G.projection(i,j,k, rep);
list_of_projectors.append(projector)
sage: list_of_projectors
[
[1 1 1 1] [ 1 -1 1 -1] [ 1 -I -1 I] [ 1 I -1 -I]
[1 1 1 1] [-1 1 -1 1] [ I 1 -I -1] [-I 1 I -1]
[1 1 1 1] [ 1 -1 1 -1] [-1 I 1 -I] [-1 -I 1 I]
[1 1 1 1], [-1 1 -1 1], [-I -1 I 1], [ I -1 -I 1]
]
We define a representation on the group of symmetries of regular hexagon and calculate its projectors ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1,0,0],[0,1/2,-sqrt(3)/2],[0,sqrt(3)/2,1/2]]),matrix([[1,0,0],[0,-1,0],[0,0,1]])];
sage: rep = representation(generators, matrices)
sage: G = rep.domain()
sage: G.projection(0,0,0, rep)
[ 12 0 0]
[ 0 0 0.?e-18]
[ 0 0.?e-18 0]
sage: n, irr = G.irreducible_representations(False)
sage: list_of_projectors=[];
for i in range(n): # Choosing the irreducible
degree= irr(i).degree() # Calculation the degree of the irreducible
j=0;# we will use the first row
for k in range(degree):
projector = G.projection(i,j,k, rep);
list_of_projectors.append(view(projector, latex=False)) # view creates a better visualization
sage: list_of_projectors
[
[12 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0]
[ 0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0]
[ 0 0 0], [0 0 0], [0 0 0], [0 0 0], [0 0 0], [0 0 0],
[ 0 0 0] [ 0 0 0]
[ 0 3 3*I] [ 0 3 3*I]
[ 0 -3*I 3], [ 0 3*I -3]
]
We define the regular representation over the symmetric group of 3 simbols and we calculate one of its projectors ::
sage: G = FiniteGroup(SymmetricGroup(3))
sage: reg = G.regular_representation();
sage: view(G.projection(2,1,1, reg),latex=False) # The function view creates a better visualization
[ 1 1/2*I*sqrt(3) - 1/2 -1/2*I*sqrt(3) - 1/2 0 0 0]
[-1/2*I*sqrt(3) - 1/2 1 1/2*I*sqrt(3) - 1/2 0 0 0]
[ 1/2*I*sqrt(3) - 1/2 -1/2*I*sqrt(3) - 1/2 1 0 0 0]
[ 0 0 0 1 -1/2*I*sqrt(3) - 1/2 1/2*I*sqrt(3) - 1/2]
[ 0 0 0 1/2*I*sqrt(3) - 1/2 1 -1/2*I*sqrt(3) - 1/2]
[ 0 0 0 -1/2*I*sqrt(3) - 1/2 1/2*I*sqrt(3) - 1/2 1]
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
base_to_irreducibles(right)
¶
Return the basis change matrix associated to a decomposition of right into irreducibles representations.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.right
-- representation ; a representation defined over the same group as self.
OUTPUT: A change basis matrix that decomposes right in its irreducible components.
EXAMPLES:
We define the representation by permutation on the cyclic group of four elements and calculate its decomposition into irreducibles(Note that in this case because multiplicity we get the same result with the isotypic base) ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: A = G.base_to_irreducibles(rep); A
[ 1 1 1 1]
[ 1 -1 I -I]
[ 1 1 -1 -1]
[ 1 -1 -I I]
sage: [rep(g).matrix() for g in G]
[
[1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1]
[0 1 0 0] [0 0 1 0] [0 0 0 1] [1 0 0 0]
[0 0 1 0] [0 0 0 1] [1 0 0 0] [0 1 0 0]
[0 0 0 1], [1 0 0 0], [0 1 0 0], [0 0 1 0]
]
sage: [A.inverse()*rep(g).matrix()*A for g in G]
[
[1 0 0 0] [ 1 0 0 0] [ 1 0 0 0] [ 1 0 0 0]
[0 1 0 0] [ 0 -1 0 0] [ 0 1 0 0] [ 0 -1 0 0]
[0 0 1 0] [ 0 0 I 0] [ 0 0 -1 0] [ 0 0 -I 0]
[0 0 0 1], [ 0 0 0 -I], [ 0 0 0 -1], [ 0 0 0 I]
]
We define a representation on the group of symmetries of regular hexagon and calculate its matrix change basis to decomposing into irreducible blocks ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: P = matrix([[5,3,4],[0,3,4],[0,0,4]]);P
sage: matrices = [P.inverse()*matrix([[1,0,0],[0,1/2,-sqrt(3)/2],[0,sqrt(3)/2,1/2]])*P,P.inverse()*matrix([[1,0,0],[0,-1,0],[0,0,1]])*P];
sage: rep = representation(generators, matrices, field=QQbar)
sage: G = rep.domain()
sage: B = G.base_to_irreducibles(rep);
sage: view(B,latex=False) # This function creates a better visualization of the matrix
[ 12 -9/5 -54/5]
[ 0 3*I + 3 -18*I + 18]
[ 0 -9/4*I 27/2*I]
sage: [view(rep(g).matrix(), latex=False) for g in G]
[
[1 0 0] [ 1 9/10 -2/5*sqrt(3) + 6/5]
[0 1 0] [ 0 1/2*sqrt(3) - 1/2 4*sqrt(1/3)]
[0 0 1], [ 0 -3/8*sqrt(3) -1/2*sqrt(3) - 1/2],
[ 1 9/10 2/5*sqrt(3) + 6/5]
[ 0 -1/2*sqrt(3) - 1/2 -4*sqrt(1/3)]
[ 0 3/8*sqrt(3) 1/2*sqrt(3) - 1/2],
[ 1 3/10 -2/5*sqrt(3) + 2/5]
[ 0 1/2*sqrt(3) + 1/2 4*sqrt(1/3)]
[ 0 -3/8*sqrt(3) -1/2*sqrt(3) + 1/2],
[ 1 6/5 8/5]
[ 0 -1 0]
[ 0 0 -1],
[ 1 3/10 2/5*sqrt(3) + 2/5]
[ 0 -1/2*sqrt(3) + 1/2 -4*sqrt(1/3)]
[ 0 3/8*sqrt(3) 1/2*sqrt(3) + 1/2],
[ 1 0 0]
[ 0 1 8/3]
[ 0 0 -1],
[ 1 9/10 -2/5*sqrt(3) + 6/5]
[ 0 -1/2*sqrt(3) - 1/2 -4/3]
[ 0 3/8*sqrt(3) 1/2*sqrt(3) + 1/2],
[ 1 9/10 2/5*sqrt(3) + 6/5]
[ 0 1/2*sqrt(3) - 1/2 -4/3]
[ 0 -3/8*sqrt(3) -1/2*sqrt(3) + 1/2],
[ 1 3/10 -2/5*sqrt(3) + 2/5]
[ 0 -1/2*sqrt(3) + 1/2 4/3]
[ 0 3/8*sqrt(3) 1/2*sqrt(3) - 1/2],
[ 1 6/5 8/5]
[ 0 -1 -8/3]
[ 0 0 1],
[ 1 3/10 2/5*sqrt(3) + 2/5]
[ 0 1/2*sqrt(3) + 1/2 4/3]
[ 0 -3/8*sqrt(3) -1/2*sqrt(3) - 1/2]
]
sage: [view(B.inverse()*rep(g).matrix()*B, latex=False) for g in G]
[
[1 0 0]
[0 1 0]
[0 0 1],
[ 1 0 0]
[ 0 -1/2*I*sqrt(3) - 1/2 0]
[ 0 0 1/2*I*sqrt(3) - 1/2],
[ 1 0 0]
[ 0 1/2*I*sqrt(3) - 1/2 0]
[ 0 0 -1/2*I*sqrt(3) - 1/2],
[ 1 0 0]
[ 0 -1/2*I*sqrt(3) + 1/2 0]
[ 0 0 1/2*I*sqrt(3) + 1/2],
[ 1 0 0]
[ 0 -1 0]
[ 0 0 -1],
[ 1 0 0]
[ 0 1/2*I*sqrt(3) + 1/2 0]
[ 0 0 -1/2*I*sqrt(3) + 1/2],
[ 1 0 0] [ 1 0 0]
[ 0 0 6] [ 0 0 3*I*sqrt(3) - 3]
[ 0 1/6 0], [ 0 -1/4*I*sqrt(1/3) - 1/12 0],
[ 1 0 0] [ 1 0 0]
[ 0 0 -3*I*sqrt(3) - 3] [ 0 0 3*I*sqrt(3) + 3]
[ 0 1/4*I*sqrt(1/3) - 1/12 0], [ 0 -1/4*I*sqrt(1/3) + 1/12 0],
[ 1 0 0]
[ 0 0 -6]
[ 0 -1/6 0],
[ 1 0 0]
[ 0 0 -3*I*sqrt(3) + 3]
[ 0 1/4*I*sqrt(1/3) + 1/12 0]
]
We define the regular representation over the symmetric group of 3 simbols and we decompose into irreducible components ::
sage: G = FiniteGroup(SymmetricGroup(3))
sage: reg = G.regular_representation();
sage: C = G.base_to_irreducibles(reg);
sage: view(C, latex=False) # This Function creates a better visualization of the matrix
[ 1 1 1 0 0 3]
[ 1 1 1/2*I*sqrt(3) - 1/2 0 0 -3/2*I*sqrt(3) - 3/2]
[ 1 1 -1/2*I*sqrt(3) - 1/2 0 0 3/2*I*sqrt(3) - 3/2]
[ 1 -1 0 3 1 0]
[ 1 -1 0 3/2*I*sqrt(3) - 3/2 -1/2*I*sqrt(3) - 1/2 0]
[ 1 -1 0 -3/2*I*sqrt(3) - 3/2 1/2*I*sqrt(3) - 1/2 0]
sage: g = G.an_element();
sage: reg(g).matrix()
[0 0 0 0 0 1]
[0 0 0 1 0 0]
[0 0 0 0 1 0]
[0 1 0 0 0 0]
[0 0 1 0 0 0]
[1 0 0 0 0 0]
sage: A = C.inverse()*reg(g).matrix()*C;
sage: view(A, latex=False)
[ 1 0 0 0 0 0]
[ 0 -1 0 0 0 0]
[ 0 0 0 -3/2*I*sqrt(3) - 3/2 0 0]
[ 0 0 1/2*I*sqrt(1/3) - 1/6 0 0 0]
[ 0 0 0 0 0 -3/2*I*sqrt(3) - 3/2]
[ 0 0 0 0 1/2*I*sqrt(1/3) - 1/6 0]
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
base_equivariant_to_blocks(right, row=0)
¶
Return the basis change matrix associated to a symmetry adapted basis to an equivariant operator of right.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.right
-- representation ; a representation defined over the same group as self.row
-- an integer (default: 0) ; an integer in the range of the degree of right, this number will choose the set o projectors to be chosen in the contruction of the base ::
OUTPUT: A change basis matrix that decomposes the equivariant operator.
EXAMPLES:
We define the representation by permutation on the cyclic group of four elements and decompose an equivariant operator under this representation ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: A = matrix.circulant([1,2,3,4])
sage: rep.is_equivariant_to(A)
True
sage: P = G.base_equivariant_to_blocks(rep); P
[ 1 1 1 1]
[ 1 -1 I -I]
[ 1 1 -1 -1]
[ 1 -1 -I I]
sage: A, P.inverse()*A*P
(
[1 2 3 4] [ 10 0 0 0]
[4 1 2 3] [ 0 -2 0 0]
[3 4 1 2] [ 0 0 -2*I - 2 0]
[2 3 4 1], [ 0 0 0 2*I - 2]
)
We define a representation on the permutation group, and decompose an equivariant operator ::
sage: G = FiniteGroup(['(2,4)(3,7)(6,8)', '(1,3)(4,6)(7,9)'])
sage: gens = G.gens()
sage: matrices = [g.matrix() for g in gens]
sage: rep = representation(gens, matrices)
sage: operator = matrix([[ 4, -1, -0, -1, -0, -0, -0, -0, -0],
[-1, 4, -1, -0, -1, -0, -0, -0, -0],
[-0, -1, 4, -0, -0, -1, -0, -0, -0],
[-1, -0, -0, 4, -1, -0, -1, -0, -0],
[-0, -1, -0, -1, 4, -1, -0, -1, -0],
[-0, -0, -1, -0, -1, 4, -0, -0, -1],
[-0, -0, -0, -1, -0, -0, 4, -1, -0],
[-0, -0, -0, -0, -1, -0, -1, 4, -1],
[-0, -0, -0, -0, -0, -1, -0, -1, 4]])
sage: rep.is_equivariant_to(operator)
True
sage: P = G.base_equivariant_to_blocks(rep); P
[ 2 0 0 2 0 2 0 0 0]
[ 0 2 0 0 2 0 1 0 4]
[ 2 0 0 -2 0 0 0 8 0]
[ 0 2 0 0 -2 0 1 0 -4]
[ 0 0 8 0 0 0 0 0 0]
[ 0 2 0 0 -2 0 -1 0 4]
[ 2 0 0 -2 0 0 0 -8 0]
[ 0 2 0 0 2 0 -1 0 -4]
[ 2 0 0 2 0 -2 0 0 0]
sage: operator, P.inverse()*operator*P
(
[ 4 -1 0 -1 0 0 0 0 0] [ 4 -2 0 0 0 0 0 0 0]
[-1 4 -1 0 -1 0 0 0 0] [-2 4 -4 0 0 0 0 0 0]
[ 0 -1 4 0 0 -1 0 0 0] [ 0 -1 4 0 0 0 0 0 0]
[-1 0 0 4 -1 0 -1 0 0] [ 0 0 0 4 0 0 0 0 0]
[ 0 -1 0 -1 4 -1 0 -1 0] [ 0 0 0 0 4 0 0 0 0]
[ 0 0 -1 0 -1 4 0 0 -1] [ 0 0 0 0 0 4 -1 0 0]
[ 0 0 0 -1 0 0 4 -1 0] [ 0 0 0 0 0 -2 4 0 0]
[ 0 0 0 0 -1 0 -1 4 -1] [ 0 0 0 0 0 0 0 4 -1]
[ 0 0 0 0 0 -1 0 -1 4], [ 0 0 0 0 0 0 0 -2 4]
)
TO ADD MORE EXAMPLES TO ADD MORE EXAMPLES TO ADD MORE EXAMPLES
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
quick_block_prevision(right, block_prevision=False)
¶
Return a list with order and multiplicities of blocks to an equivariant operator under right defined on self.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.right
-- representation ; a representation defined over an arbitrary group given by self.block_prevision
-- a boolean (default:False
) ; if set to True then prints a string describing the number and orders of blocks to an equivariant operator under right.
OUTPUT: A list indicating the degree and multiplicity of the representation defined by right.
EXAMPLES:
We define the regular representation(reg) over the symmetric group of 4 simbols and calculate the structure of an equivariant operator under reg ::
sage: H = SymmetricGroup(4)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: G.quick_block_prevision(reg)
[['degree', 'multiplicity'], [1, 1], [1, 1], [2, 2], [3, 3], [3, 3]]
sage: G.quick_block_prevision(reg, block_prevision=True)
1 block size 1x1
1 block size 1x1
2 block size 2x2
3 block size 3x3
3 block size 3x3
[['degree', 'multiplicity'], [1, 1], [1, 1], [2, 2], [3, 3], [3, 3]]
We define the representation by permutation on the cyclic group and calculate the structure of an equivariant operator ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: G.quick_block_prevision(rep, block_prevision=True)
1 block size 1x1
1 block size 1x1
1 block size 1x1
1 block size 1x1
[['degree', 'multiplicity'], [1, 1], [1, 1], [1, 1], [1, 1]]
We calculate the irreducible representations of the group of symmetries of tetrahedron and calculate the structure of an equivariant operator inder its irreducibles ::
sage: G = FiniteGroup(AlternatingGroup(4));
sage: n,irr = G.irreducible_representations(False) ##Irreducible representations
sage: for j in range(n):
print(G.quick_block_prevision(irr(j),block_prevision=True))
1 block size 1x1
[['degree', 'multiplicity'], [1, 1]]
1 block size 1x1
[['degree', 'multiplicity'], [1, 1]]
1 block size 1x1
[['degree', 'multiplicity'], [1, 1]]
3 block size 1x1
[['degree', 'multiplicity'], [3, 1]]
We define two representation rep and rep1 on the group of symmetries of regular hexagon and calculate the structure of an equivariant operator under each one ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: rep = representation(generators, matrices)
sage: G = rep.domain()
sage: G.quick_block_prevision(rep,block_prevision=True)
2 block size 1x1
[['degree', 'multiplicity'], [2, 1]]
sage: P = matrix([[2,1],[15,2]]); #A change of basis
sage: matrices1 = [ block_diagonal_matrix((P.inverse())*A*P, (P.inverse())*A*P) for A in matrices];
sage: rep1 = representation(generators, matrices1)
sage: G.quick_block_prevision(rep1,block_prevision=True)
2 block size 2x2
[['degree', 'multiplicity'], [2, 2]]
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
base_change_eigenvalue_reduction_new(right, block_prevision=False)
¶
Return part of basis change matrix associated to a symmetry adapted basis to an equivariant operator of right.
INPUT:
self
-- FiniteGroup ; a Sage permutation group or a group of the class FiniteGroup.right
-- representation ; a representation defined over the same group as self.block_prevision
-- a boolean (default:False
) ; if set to True then prints a string describing the number and orders of blocks to an equivariant operator under right.
OUTPUT: A list of basis subespaces, along with degree and multiplicitie(number of equivalent copies). The restriction of an equivariant operator to each subespace gives a different block matrix of the equivariant operator relative to the symmetry adapted basis. In short, these are parts of the symmetry adapted basis that no generates block repetitions.
EXAMPLES:
We define the representation by permutation on the cyclic group of four elements and calculates the subspaces that gives one copy of each block of the equivariant operator under this representation ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: G.base_change_eigenvalue_reduction_new(rep)
([[
[1]
[1]
[1]
[1], [1, 1]
],
[
[ 1]
[-1]
[ 1]
[-1], [1, 1]
],
[
[ 1]
[ I]
[-1]
[-I], [1, 1]
],
[
[ 1]
[-I]
[-1]
[ I], [1, 1]
]],
[['degree', 'multiplicity'], [1, 1], [1, 1], [1, 1], [1, 1]])
sage: G.base_change_eigenvalue_reduction_new(rep, block_prevision=True)
1 block size 1x1
1 block size 1x1
1 block size 1x1
1 block size 1x1
([[
[1]
[1]
[1]
[1], [1, 1]
],
[
[ 1]
[-1]
[ 1]
[-1], [1, 1]
],
[
[ 1]
[ I]
[-1]
[-I], [1, 1]
],
[
[ 1]
[-I]
[-1]
[ I], [1, 1]
]],
[['degree', 'multiplicity'], [1, 1], [1, 1], [1, 1], [1, 1]])
We define a representation on the permutation group, and calculates parts of the symmetry adapted basis that generates no repetition in the blocks of an equivariant operator ::
sage: G = FiniteGroup(['(2,4)(3,7)(6,8)', '(1,3)(4,6)(7,9)'])
sage: gens = G.gens()
sage: matrices = [g.matrix() for g in gens]
sage: rep = representation(gens, matrices)
sage: G.base_change_eigenvalue_reduction_new(rep)
([[
[2 0 0]
[0 2 0]
[2 0 0]
[0 2 0]
[0 0 8]
[0 2 0]
[2 0 0]
[0 2 0]
[2 0 0], [1, 3]
],
[
[ 2]
[ 0]
[-2]
[ 0]
[ 0]
[ 0]
[-2]
[ 0]
[ 2], [1, 1]
],
[
[ 0]
[ 2]
[ 0]
[-2]
[ 0]
[-2]
[ 0]
[ 2]
[ 0], [1, 1]
],
[
[ 2 0]
[ 0 1]
[ 0 0]
[ 0 1]
[ 0 0]
[ 0 -1]
[ 0 0]
[ 0 -1]
[-2 0], [2, 2]
]],
[['degree', 'multiplicity'], [1, 3], [1, 1], [1, 1], [2, 2]])
We define the regular representation(reg) over the symmetric group of 3 simbols and calculate the subspaces that gives all the blocks of an equivariant operator without repetition ::
sage: H = SymmetricGroup(3)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: G.base_change_eigenvalue_reduction_new(reg,block_prevision=True)
1 block size 1x1
1 block size 1x1
2 block size 2x2
([[
[1]
[1]
[1]
[1]
[1]
[1], [1, 1]
],
[
[ 1]
[ 1]
[ 1]
[-1]
[-1]
[-1], [1, 1]
],
[
[ 1 0]
[-0.500000000000000? + 0.866025403784439?*I 0]
[-0.500000000000000? - 0.866025403784439?*I 0]
[ 0 1]
[ 0 -0.500000000000000? - 0.866025403784439?*I]
[ 0 -0.500000000000000? + 0.866025403784439?*I],
[2, 2]
]],
[['degree', 'multiplicity'], [1, 1], [1, 1], [2, 2]])
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
pysymmetry.MapRepresentation
¶
Bases: SetMorphism
inner_product(right)
¶
Return the inner product between self and right.
INPUT:
self
-- representation ; a representation defined over an arbitrary group G.right
-- representation ; a representation defined over the same group as self.
OUTPUT: The inner product between the two representations defined on the group G.
EXAMPLES:
We define the representation by permutation on the cyclic group of 4 elements and calculate its inner products with the trivial representation ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: n,irr = G.irreducible_representations(False) #Irreducible representations
sage: rep.inner_product(irr(0))
1
We define one representation on the group of symmetries of regular hexagon and calculate the inner product with itself ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: rep = representation(generators, matrices)
sage: rep.inner_product(rep)
1
We define the regular representation over the symmetric group of 4 simbols and calculate the inner products between the regular representation and the irreducible representations ::
sage: H = SymmetricGroup(4)
sage: G = FiniteGroup(H);
sage: n,irr = G.irreducible_representations(False) #Irreducible representations
sage: reg = G.regular_representation();
sage: [reg.inner_product(irr(j)) for j in range(n)] # The inner product between the regular and irreducibles
[1, 1, 2, 3, 3]
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
direct_sum(*reps)
¶
INPUT: A list of representations. OUTPUT: Their direct sum
an_element()
¶
Return an image of an element of the group under self.
INPUT:
self
-- representation ; a representation defined over an arbitrary group G.
OUTPUT: A linear transformation corresponding to the image under self of a random element of the group G.
EXAMPLES:
We define the cyclic group of 4 elements and choose an element to show its image under self ::
sage: G = CyclicPermutationGroup(4)
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: rep.an_element()
Linear transformation associated with element g=(1,2,3,4), represented by the non-singular matrix:
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
[1 0 0 0]
Representation space: Vector space of dimension 4 over Algebraic Field
We define one representation on the group of symmetries of regular hexagon and show the image of an element of the group ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: rep = representation(generators, matrices)
sage: rep.an_element()
Linear transformation associated with element g=(1,3)(4,6), represented by the non-singular matrix:
[ -1/2 -0.866025403784439?]
[-0.866025403784439? 1/2]
Representation space: Vector space of dimension 2 over Algebraic Field
We define the regular representation over the symmetric group of 4 simbols and calculate the image of a random element ::
sage: H = SymmetricGroup(4)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: reg.an_element()
Linear transformation associated with element g=(1,3,4), represented by the non-singular matrix:
24 x 24 dense matrix over Algebraic Field
Representation space: Vector space of dimension 24 over Algebraic Field
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
degree()
¶
Return the degree of a representation defined over an arbitrary group G.
INPUT:
self
-- representation; a representation defined over an arbitrary group G.
OUTPUT: The degree of self, i.e. , the dimension of the subjacent vector space of self.
EXAMPLES:
We define the representation by permutation on the cyclic group of 4 elements ::
sage: G = CyclicPermutationGroup(4)
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: rep.degree()
4
We define one representation on the group of symmetries of regular hexagon ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices1 = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: rep = representation(generators, matrices1)
sage: rep.degree()
2
We define the regular representation over the symmetric group of 4 simbols and calculate its degree ::
sage: H = SymmetricGroup(4)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: reg.degree()
24
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
is_equivariant_to(M)
¶
Tests if an operator is equivariant to a representation defined over a an arbitrary group G.
INPUT:
-
M
-- matrix ; a square matrix associated to an operator over a representation vector space. -
self
-- representation; a representation defined over an arbitrary group G.
OUTPUT: True if the operator is equivariant or False if is not equivariant.
EXAMPLES:
Define the representation by permutation on the cyclic group of 4 elements ::
sage: G = CyclicPermutationGroup(4)
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: v = [1,2,3,4]
sage: A = matrix.circulant(v);
sage: rep.is_equivariant_to(A)
True
sage: B = matrix.circulant(SR.var('a b c d'))
sage: rep.is_equivariant_to(B)
True
We define a representation over the symmetric group and test if the identity is equivariant ::
sage: G = SymmetricGroup(5)
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices, field=AA)
sage: rep.is_equivariant_to(identity_matrix(AA, 5))
True
sage: C = matrix.hilbert(5).change_ring(AA);
sage: rep.is_equivariant_to(C);
False
ENRIQUECER QUANDO DEFINIR PRODUTO TENSORIAL OU SOMA DIRETA.
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
is_unitary()
¶
Tests if a representation defined over an arbitrary group G is unitary.
INPUT:
self
-- representation; a representation defined over an arbitrary group G.
OUTPUT: True if the representation is unitary or False if is not unitary.
EXAMPLES:
Define the representation by permutation on the cyclic group of 4 elements ::
sage: G = CyclicPermutationGroup(4)
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: rep.is_unitary()
True
Define two representations on the group of symmetries of regular hexagon ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: P = matrix([[2,1],[15,2]]); ## A non-unitary base change
sage: matrices1 = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: matrices2 = [P.inverse()*A*P for A in matrices1]
sage: rep1 = representation(generators, matrices1)
sage: rep2 = representation(generators, matrices2)
sage: rep1.is_unitary(), rep2.is_unitary()
(True, False)
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
is_irreducible()
¶
Tests if a representation defined over an arbitrary group G is irreducible.
INPUT:
self
-- representation; a representation defined over an arbitrary group G.
OUTPUT: True if the representation is irreducible or False if is reducible.
EXAMPLES:
Define the representation by permutation on the cyclic group of 6 elements ::
sage: G = CyclicPermutationGroup(6)
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: rep.is_irreducible()
False
Define one representation on the group of symmetries of regular hexagon ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: rep = representation(generators, matrices)
sage: rep.is_irreducible()
True
We define the regular representation over the symmetric group of 4 simbols and ask if is irreducible ::
sage: H = SymmetricGroup(4)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: reg.is_irreducible()
False
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
is_representation()
¶
Test whether self is a group representation (homomorphism) on its domain.
A map ρ: G → GL(V) is a representation if ρ(gh) = ρ(g) ρ(h) for all g, h in G. This method verifies the homomorphism property by checking all pairs in the finite domain group. For large groups this can be slow.
INPUT:
self
-- representation; a mapping from a finite group G to a matrix group.
True
if the map preserves the group operation (homomorphism);
otherwise False
.
EXAMPLES:
We define the permutation representation of the cyclic group of order 4 and test the homomorphism property ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: gens = G.gens()
sage: mats = [g.matrix() for g in gens]
sage: rep = representation(gens, mats)
sage: rep.is_representation()
True
We also check a representation over the dihedral group of order 12 ::
sage: generators = ["(1,2,3,4,5,6)", "(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2, -sqrt(3)/2],[sqrt(3)/2, 1/2]]), matrix([[-1,0],[0,1]])]
sage: rep = representation(generators, matrices)
sage: rep.is_representation()
True
REFERENCES:
- [Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. Springer, 1977.
- [Sti2012]_Stiefel, E., and A. Fässler. Group theoretical methods and their applications. Springer, 2012.
is_stable(subspace)
¶
Test whether a given subspace is stable (invariant) under the representation.
A subspace W ⊆ V is stable under the representation ρ if ρ(g)·w ∈ W for every generator g of G and every w in a basis of W. This method verifies invariance using the group generators.
INPUT:
self
-- representation; a representation of a finite group G on V.subspace
-- vector subspace; a Sage vector subspace of V.
True
if subspace
is invariant under the action of the generators
of the group; otherwise False
. A TypeError
is raised if subspace
is not a subspace of the representation space V.
EXAMPLES:
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: gens = G.gens()
sage: mats = [g.matrix() for g in gens]
sage: rep = representation(gens, mats)
sage: V = (rep.an_element()).domain() # representation space V
sage: e1 = V.basis()[0]
sage: W = V.subspace([e1]) # span{e1}
sage: rep.is_stable(W) in [True, False] # doctest: +ELLIPSIS
True
REFERENCES:
- [Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. Springer, 1977.
- [Sti2012]_Stiefel, E., and A. Fässler. Group theoretical methods and their applications. Springer, 2012.
pysymmetry.Dg_Linear_Transformation
¶
Bases: VectorSpaceMorphism
character()
¶
Return the character of a representation defined over an arbitrary group G.
INPUT:
self
-- representation; a representation defined over an arbitrary group G.
OUTPUT: The character of self.
EXAMPLES:
We define the representation by permutation on the cyclic group of 4 elements and calculate its characters ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices); rep
sage: g = G.an_element()
sage: rep(g).character()
0
sage: [rep(g).character() for g in G]
[4, 0, 0, 0]
We define one representation on the group of symmetries of regular hexagon and calculate the character of each element in the group ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])];
sage: rep = representation(generators, matrices)
sage: G = rep.domain()
sage: [ [g,rep(g).character()] for g in G]
[[(), 2],
[(1,5,3)(2,6,4), -1],
[(1,3,5)(2,4,6), -1],
[(1,6,5,4,3,2), 1],
[(1,4)(2,5)(3,6), -2],
[(1,2,3,4,5,6), 1],
[(2,6)(3,5), 0],
[(1,5)(2,4), 0],
[(1,3)(4,6), 0],
[(1,6)(2,5)(3,4), 0],
[(1,4)(2,3)(5,6), 0],
[(1,2)(3,6)(4,5), 0]]
We define the regular representation over the symmetric group of 4 simbols and calculate its characters ::
sage: H = SymmetricGroup(4)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: [ [g,reg(g).character()] for g in G]
[[(), 24],
[(1,4)(2,3), 0],
[(1,2)(3,4), 0],
[(1,3)(2,4), 0],
[(2,4,3), 0],
[(1,4,2), 0],
[(1,2,3), 0],
[(1,3,4), 0],
[(2,3,4), 0],
[(1,4,3), 0],
[(1,2,4), 0],
[(1,3,2), 0],
[(3,4), 0],
[(1,4,2,3), 0],
[(1,2), 0],
[(1,3,2,4), 0],
[(2,4), 0],
[(1,4,3,2), 0],
[(1,2,3,4), 0],
[(1,3), 0],
[(2,3), 0],
[(1,4), 0],
[(1,2,4,3), 0],
[(1,3,4,2), 0]]
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
Core Module Functions¶
pysymmetry.representation(generators, matrices, field=QQbar)
¶
Create a representation of an arbitrary group G.
INPUT:
-
generators
-- list; generators of the group G. -
matrices
-- list; generators images in the same sequence of generators. -
field
-- Sage ring (default:QQbar
); Field of the subjacent representation vector space. Faster computations using the fieldsQQbar
orAA
.
OUTPUT: Mapping of the group generated by generators
to the group of matrices generated by matrices
.
EXAMPLES:
This example illustrates the representation by permutation defined on the group of symmetries of the equilateral triangle ::
sage: G = DihedralGroup(3)
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: rep
Map:
From: Permutation FiniteGroup with generators [(1,2,3), (1,3)]
To: Matrix group over Algebraic Field with 2 generators (
[0 1 0] [0 0 1]
[0 0 1] [0 1 0]
[1 0 0], [1 0 0]
).
Matrix associated to an element g of G ::
sage: g = G.an_element()
sage: rep(g).matrix()
[0 1 0]
[1 0 0]
[0 0 1]
We define the generators of the group of symmetries of an regular hexagon, and the correspondent matrices of symmetry (a rotation through an angle \(\pi/3\), and a reflexion across the \(x\) axis in the cartesian plane) ::
sage: generators = ["(1,2,3,4,5,6)","(1,4)(2,3)(5,6)"]
sage: matrices = [matrix([[1/2,-sqrt(3)/2],[sqrt(3)/2,1/2]]),matrix([[-1,0],[0,1]])]
sage: rep = representation(generators, matrices)
sage: rep("(1,2,3,4,5,6)")
Linear transformation associated with element g=(1,2,3,4,5,6), represented by the non-singular matrix:
[ 1/2 -0.866025403784439?]
[ 0.866025403784439? 1/2]
Representation space: Vector space of dimension 2 over Algebraic Field
sage: rep("(1,4)(2,3)(5,6)")
Linear transformation associated with element g=(1,4)(2,3)(5,6), represented by the non-singular matrix:
[-1 0]
[ 0 1]
Representation space: Vector space of dimension 2 over Algebraic Field
sage: (rep.domain()).is_isomorphic(DihedralGroup(6))
True
Next we define the same representation where the field is choosed to be SR ::
sage: rep = representation(generators, matrices, field=SR)
sage: rep("(1,2,3,4,5,6)")
Linear transformation associated with element g=(1,2,3,4,5,6), represented by the non-singular matrix:
[ 1/2 -1/2*sqrt(3)]
[ 1/2*sqrt(3) 1/2]
Representation space: Vector space of dimension 2 over Symbolic Ring
We choose a random element of the group and show its matrix ::
sage: G = FiniteGroup(generators)
sage: g = G.an_element()
sage: rep(g)
Linear transformation associated with element g=(1,3)(4,6), represented by the non-singular matrix:
[ -1/2 -1/2*sqrt(3)]
[-1/2*sqrt(3) 1/2]
Representation space: Vector space of dimension 2 over Symbolic Ring
The identity and inverse properties of the representation are illustred ::
sage: e = G.identity()
sage: rep(e)
Linear transformation associated with element g=(), represented by the non-singular matrix:
[1 0]
[0 1]
Representation space: Vector space of dimension 2 over Symbolic Ring
sage: [rep(g.inverse())==rep(g).inverse() for g in G]
[True, True, True, True, True, True, True, True, True, True, True, True]
It is an error to choose the group element as a tuple ::
sage: rep((1,4)(2,3)(5,6))
TypeError: Traceback (most recent call last):
...
TypeError: 'tuple' object is not callable
sage: rep((1,2,3,4,5,6))
TypeError: Traceback (most recent call last):
...
TypeError: 'tuple' object is not callable
The argument can be a string or a list. Be aware that '(1,2,3,4,5,6)' is the usual notation of cycle, while [1,2,3,4,5,6] lists the images of the permutation ::
sage: rep("(1,2,3,4,5,6)")
Linear transformation associated with element g=(1,2,3,4,5,6), represented by the non-singular matrix:
[ 1/2 -1/2*sqrt(3)]
[ 1/2*sqrt(3) 1/2]
Representation space: Vector space of dimension 2 over Symbolic Ring
sage: rep([1,2,3,4,5,6])
Linear transformation associated with element g=(), represented by the non-singular matrix:
[1 0]
[0 1]
Representation space: Vector space of dimension 2 over Symbolic Ring
sage: rep([2,3,4,5,6,1])
Linear transformation associated with element g=(1,2,3,4,5,6), represented by the non-singular matrix:
[ 1/2 -1/2*sqrt(3)]
[ 1/2*sqrt(3) 1/2]
Representation space: Vector space of dimension 2 over Symbolic Ring
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.
pysymmetry.get_block(columm_base, matrix_equiv)
¶
Return the matricial representation of matrix_equiv when restricted to the subspace whose basis is columm_base.
INPUT:
columm_base
-- matrix ; a matrix(with full rank) whose columns are part of symmetry adapted basis.matrix_equiv
-- matrix ; a matrix an equivariant operator.
OUTPUT: A matrix representing the restriction of matrix_equiv to the subespaces given by column_base.
EXAMPLES:
We define the representation by permutation on the cyclic group of four elements and calculates the blocks of an equivariant operator under this representation ::
sage: G = FiniteGroup(CyclicPermutationGroup(4))
sage: generators = G.gens()
sage: matrices = [g.matrix() for g in generators]
sage: rep = representation(generators, matrices)
sage: subspaces = G.base_change_eigenvalue_reduction_new(rep) #The Invariant Subspaces
sage: A = matrix.circulant([1,2,3,4]); #An equivariant Operator
sage: rep.is_equivariant_to(A)
True
sage: [get_block(k[0],A) for k in subspaces[0]] # The block decomposition of the equivariant operator
[[10], [-2], [-2 - 2*I], [-2 + 2*I]]
We define a representation on a permutation group, and calculates the blocks(no repetition) of an equivariant operator ::
sage: G = FiniteGroup(['(2,4)(3,7)(6,8)', '(1,3)(4,6)(7,9)'])
sage: gens = G.gens()
sage: matrices = [g.matrix() for g in gens]
sage: rep = representation(gens, matrices)
sage: operator = matrix([[ 4, -1, -0, -1, -0, -0, -0, -0, -0],
[-1, 4, -1, -0, -1, -0, -0, -0, -0],
[-0, -1, 4, -0, -0, -1, -0, -0, -0],
[-1, -0, -0, 4, -1, -0, -1, -0, -0],
[-0, -1, -0, -1, 4, -1, -0, -1, -0],
[-0, -0, -1, -0, -1, 4, -0, -0, -1],
[-0, -0, -0, -1, -0, -0, 4, -1, -0],
[-0, -0, -0, -0, -1, -0, -1, 4, -1],
[-0, -0, -0, -0, -0, -1, -0, -1, 4]]) #An equivariant Operator
sage: rep.is_equivariant_to(operator)
True
sage: subspaces = G.base_change_eigenvalue_reduction_new(rep) #The Invariant Subspaces
sage: [get_block(k[0],operator) for k in subspaces[0]] # The block decomposition of the equivariant operator
[
[ 4 -2 0]
[-2 4 -4] [ 4 -1]
[ 0 -1 4], [4], [4], [-2 4]
]
#NOTE: It is worth to note, in this case, that the two equal blocks [4], comes from inequivalent subrepresentations.
In this case, the theory has not way to foresee that.
We define the regular representation(reg) over the symmetric group of 3 simbols and calculate the blocks of an equivariant operator without repetition ::
sage: H = SymmetricGroup(3)
sage: G = FiniteGroup(H);
sage: reg = G.regular_representation();
sage: Id = matrix.identity(reg.degree()); # Identity matrix
sage: reg.is_equivariant_to(Id)
True
sage: subspaces = G.base_change_eigenvalue_reduction_new(reg) #The Invariant Subspaces
sage: [get_block(k[0],Id) for k in subspaces[0]] # The block decomposition of the equivariant operator
[
[1], [1],
[1.000000000000000? + 0.?e-18*I 0]
[ 0 1.000000000000000? + 0.?e-18*I]
]
REFERENCES:
For more information, see the following references:
-
[Ser1977]_Serre, Jean-Pierre. Linear representations of finite groups. Vol. 42. New York: springer, 1977.
-
[Sti2012]_Stiefel, E., and A. Fässler. FiniteGroup theoretical methods and their applications. Springer Science & Business Media, 2012.