# source:sage/libs/symmetrica/sab.pxi@6437:bc1532faeb46

Revision 6437:bc1532faeb46, 4.2 KB checked in by Mike Hansen <mhansen@…>, 6 years ago (diff)

Initial import of symmetrica wrappers.

Line
1cdef extern from 'symmetrica/def.h':
2    INT dimension_symmetrization(OP n, OP part, OP a)
3    INT bdg(OP part, OP perm, OP D)
4    INT sdg(OP part, OP perm, OP D)
5    INT odg(OP part, OP perm, OP D)
6    INT ndg(OP part, OP perm, OP D)
7    INT specht_dg(OP part, OP perm, OP D)
8    INT glmndg(OP m, OP n, OP M, INT VAR)
9
10
11def dimension_symmetrization_symmetrica(n, part):
12    """
13    computes the dimension of the degree of a irreducible
14    representation of the GL_n, n is a INTEGER object, labeled
15    by the PARTITION object a.
16    """
17    cdef OP cn, cpart, cres
18
19
20    cn    = callocobject()
21    cpart = callocobject()
22    cres  = callocobject()
23
24    _op_partition(part, cpart)
25    _op_integer(n, cn)
26
27    dimension_symmetrization(cn, cpart, cres)
28    res = _py_integer(cres)
29
30    freeall(cn)
31    freeall(cpart)
32    freeall(cres)
33
34
35    return res
36
37
38def bdg_symmetrica(part, perm):
39    """
40    Calculates the irreduzible matrix representation
41    D^part(perm), whose entries are of integral numbers.
42
43    REFERENCE: H. Boerner:
44               Darstellungen von Gruppen, Springer 1955.
45               pp. 104-107.
46    """
47    cdef OP cpart, cperm, cD
48
49
50    cpart = callocobject()
51    cperm = callocobject()
52    cD    = callocobject()
53
54    _op_partition(part, cpart)
55    _op_permutation(perm, cperm)
56
57    bdg(cpart, cperm, cD)
58    res = _py_matrix(cD)
59
60    freeall(cpart)
61    freeall(cperm)
62    freeall(cD)
63
64
65
66def sdg_symmetrica(part, perm):
67    """
68
69    Calculates the irreduzible matrix representation
70    D^part(perm), which consists of rational numbers.
71
72    REFERENCE: G. James/ A. Kerber:
73               Representation Theory of the Symmetric Group.
75               pp. 124-126.
76    """
77    cdef OP cpart, cperm, cD
78
79
80    cpart = callocobject()
81    cperm = callocobject()
82    cD    = callocobject()
83
84    _op_partition(part, cpart)
85    _op_permutation(perm, cperm)
86
87    sdg(cpart, cperm, cD)
88    res = _py_matrix(cD)
89
90    freeall(cpart)
91    freeall(cperm)
92    freeall(cD)
93
94
95
96    return res
97
98def odg_symmetrica(part, perm):
99    """
100    Calculates the irreduzible matrix representation
101    D^part(perm), which consists of real numbers.
102
103    REFERENCE: G. James/ A. Kerber:
104               Representation Theory of the Symmetric Group.
106               pp. 127-129.
107    """
108    cdef OP cpart, cperm, cD
109
110
111    cpart = callocobject()
112    cperm = callocobject()
113    cD    = callocobject()
114
115    _op_partition(part, cpart)
116    _op_permutation(perm, cperm)
117
118    odg(cpart, cperm, cD)
119    res = _py_matrix(cD)
120
121    freeall(cpart)
122    freeall(cperm)
123    freeall(cD)
124
125
126
127    return res
128
129
130def ndg_symmetrica(part, perm):
131    """
132
133    """
134    cdef OP cpart, cperm, cD
135
136
137    cpart = callocobject()
138    cperm = callocobject()
139    cD    = callocobject()
140
141    _op_partition(part, cpart)
142    _op_permutation(perm, cperm)
143
144    ndg(cpart, cperm, cD)
145    res = _py_matrix(cD)
146
147    freeall(cpart)
148    freeall(cperm)
149    freeall(cD)
150
151
152
153    return res
154
155def specht_dg_symmetrica(part, perm):
156    """
157
158    """
159    cdef OP cpart, cperm, cD
160
161
162    cpart = callocobject()
163    cperm = callocobject()
164    cD    = callocobject()
165
166    _op_partition(part, cpart)
167    _op_permutation(perm, cperm)
168
169    specht_dg(cpart, cperm, cD)
170    res = _py_matrix(cD)
171
172    freeall(cpart)
173    freeall(cperm)
174    freeall(cD)
175
176
177
178    return res
179
180
181## def glmndg_symmetrica(m, n, VAR=0):
182##     """
183##     If VAR is equal to 0 the orthogonal representation
184##     is used for the decomposition, otherwise, if VAR
185##     equals 1, the natural representation is considered.
186
187##     The result is the  VECTOR-Object M, consisting of
188##     components of type MATRIX, representing the several
189##     irreducible matrix representations of GLm(C) with
190##     part_1' <= m, where part is a partition of n.
191
192##     """
193##     cdef OP cm, cn, cM
194
195##
196
197##     cm = callocobject()
198##     _op_integer(m, cm)
199
200##     cn = callocobject()
201##     _op_integer(n, cn)
202
203##     cM = callocobject()
204
205
206
207##     glmndg(cm, cn, cM, VAR)
208##     res = _py(cM)
209
210
211##    freeall(cm)
212##    freeall(cn)
213##    freeall(cM)
214
215##
216
217##    return res
Note: See TracBrowser for help on using the repository browser.