Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

cdef extern from 'symmetrica/def.h': 

INT chartafel(OP degree, OP result) 

INT charvalue(OP irred, OP cls, OP result, OP table) 

INT kranztafel(OP a, OP b, OP res, OP co, OP cl) 

INT c_ijk_sn(OP i, OP j, OP k, OP res) 

  

def chartafel_symmetrica(n): 

""" 

you enter the degree of the symmetric group, as INTEGER 

object and the result is a MATRIX object: the charactertable 

of the symmetric group of the given degree. 

  

EXAMPLES:: 

  

sage: symmetrica.chartafel(3) 

[ 1 1 1] 

[-1 0 2] 

[ 1 -1 1] 

sage: symmetrica.chartafel(4) 

[ 1 1 1 1 1] 

[-1 0 -1 1 3] 

[ 0 -1 2 0 2] 

[ 1 0 -1 -1 3] 

[-1 1 1 -1 1] 

""" 

  

cdef OP cn, cres 

  

cn = callocobject() 

cres = callocobject() 

  

_op_integer(n, cn) 

  

chartafel(cn, cres) 

  

res = _py(cres) 

  

freeall(cn) 

freeall(cres) 

  

return res 

  

  

  

def charvalue_symmetrica(irred, cls, table=None): 

""" 

you enter a PARTITION object part, labelling the irreducible 

character, you enter a PARTITION object class, labeling the class 

or class may be a PERMUTATION object, then result becomes the value 

of that character on that class or permutation. Note that the 

table may be NULL, in which case the value is computed, or it may be 

taken from a precalculated charactertable. 

  

FIXME: add table parameter 

  

EXAMPLES:: 

  

sage: n = 3 

sage: m = matrix([[symmetrica.charvalue(irred, cls) for cls in Partitions(n)] for irred in Partitions(n)]); m 

[ 1 1 1] 

[-1 0 2] 

[ 1 -1 1] 

sage: m == symmetrica.chartafel(n) 

True 

sage: n = 4 

sage: m = matrix([[symmetrica.charvalue(irred, cls) for cls in Partitions(n)] for irred in Partitions(n)]) 

sage: m == symmetrica.chartafel(n) 

True 

""" 

  

cdef OP cirred, cclass, ctable, cresult 

  

  

cirred = callocobject() 

cclass = callocobject() 

cresult = callocobject() 

  

if table is None: 

ctable = NULL 

else: 

ctable = callocobject() 

_op_matrix(table, ctable) 

  

  

  

#FIXME: assume that class is a partition 

_op_partition(cls, cclass) 

  

_op_partition(irred, cirred) 

  

charvalue(cirred, cclass, cresult, ctable) 

  

res = _py(cresult) 

  

freeall(cirred) 

freeall(cclass) 

freeall(cresult) 

if ctable != NULL: 

freeall(ctable) 

  

return res 

  

  

  

def kranztafel_symmetrica(a, b): 

""" 

you enter the INTEGER objects, say a and b, and res becomes a 

MATRIX object, the charactertable of S_b \wr S_a, co becomes a 

VECTOR object of classorders and cl becomes a VECTOR object of 

the classlabels. 

  

EXAMPLES:: 

  

sage: (a,b,c) = symmetrica.kranztafel(2,2) 

sage: a 

[ 1 -1 1 -1 1] 

[ 1 1 1 1 1] 

[-1 1 1 -1 1] 

[ 0 0 2 0 -2] 

[-1 -1 1 1 1] 

sage: b 

[2, 2, 1, 2, 1] 

sage: for m in c: print(m) 

... 

[0 0] 

[0 1] 

[0 0] 

[1 0] 

[0 2] 

[0 0] 

[1 1] 

[0 0] 

[2 0] 

[0 0] 

  

""" 

  

cdef OP ca, cb, cres, cco, ccl 

  

  

ca = callocobject() 

cb = callocobject() 

cres = callocobject() 

cco = callocobject() 

ccl = callocobject() 

  

_op_integer(a, ca) 

_op_integer(b, cb) 

  

kranztafel(ca,cb,cres,cco,ccl) 

  

res = _py(cres) 

co = _py(cco) 

cl = _py(ccl) 

  

freeall(ca) 

freeall(cb) 

freeall(cres) 

freeall(cco) 

freeall(ccl) 

  

return (res, co, cl) 

  

  

## def c_ijk_sn_symmetrica(i, j, k): 

## """ 

## computes the coefficients of the class multiplication in the 

## group algebra of the S_n. It uses the method described in 

## Curtis/Reiner: Methods of representation theory I p. 216 

  

## EXAMPLES: 

  

## """ 

  

## cdef OP ci, cj, ck, cresult 

  

  

## ci = callocobject() 

## cj = callocobject() 

## cresult = callocobject() 

## ck = callocobject() 

  

  

## _op_partition(i, ci) 

## _op_partition(j, cj) 

## _op_partition(k, ck) 

  

## c_ijk_sn(ci, cj, ck, cresult) 

  

## res = _py(cresult) 

  

## freeall(ci) 

## freeall(cj) 

## freeall(cresult) 

## freeall(ck) 

  

## return res