/usr/share/axiom-20170501/src/algebra/REP1.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | )abbrev package REP1 RepresentationPackage1
++ Authors: Holger Gollan, Johannes Grabmeier, Thorsten Werther
++ Date Created: 12 September 1987
++ Date Last Updated: 24 May 1991
++ References:
++ Jame81 The Representation Theory of the Symmetric Group
++ Grab87 The Evaluation of Irreducible Polynomial Representations
++ Goll90 Algorithms in Representation Theory
++ Description:
++ RepresentationPackage1 provides functions for representation theory
++ for finite groups and algebras.
++ The package creates permutation representations and uses tensor products
++ and its symmetric and antisymmetric components to create new
++ representations of larger degree from given ones.
++ Note that instead of having parameters from \spadtype{Permutation}
++ this package allows list notation of permutations as well:
++ for example \spad{[1,4,3,2]} denotes permutes 2 and 4 and fixes 1 and 3.
RepresentationPackage1(R) : SIG == CODE where
R : Ring
OF ==> OutputForm
NNI ==> NonNegativeInteger
PI ==> PositiveInteger
I ==> Integer
L ==> List
M ==> Matrix
P ==> Polynomial
SM ==> SquareMatrix
V ==> Vector
ICF ==> IntegerCombinatoricFunctions Integer
SGCF ==> SymmetricGroupCombinatoricFunctions
PERM ==> Permutation
SIG ==> with
if R has commutative("*") then
antisymmetricTensors : (M R,PI) -> M R
++ antisymmetricTensors(a,n) applies to the square matrix
++ a the irreducible, polynomial representation of the
++ general linear group GLm, where m is the number of
++ rows of a, which corresponds to the partition
++ (1,1,...,1,0,0,...,0) of n.
++ Error: if n is greater than m.
++ Note that this corresponds to the symmetrization of the
++ representation with the sign representation of the symmetric group
++ Sn. The carrier spaces of the representation are the antisymmetric
++ tensors of the n-fold tensor product.
++
++X t1:=matrix [[a,b,c],[d,e,f]]
++X antisymmetricTensors(t1,2)
if R has commutative("*") then
antisymmetricTensors : (L M R, PI) -> L M R
++ antisymmetricTensors(la,n) applies to each
++ m-by-m square matrix in
++ the list la the irreducible, polynomial representation
++ of the general linear group GLm
++ which corresponds
++ to the partition (1,1,...,1,0,0,...,0) of n.
++ Error: if n is greater than m.
++ Note that this corresponds to the symmetrization of the
++ representation with the sign representation of the symmetric group
++ Sn. The carrier spaces of the representation are the antisymmetric
++ tensors of the n-fold tensor product.
createGenericMatrix : NNI -> M P R
++ createGenericMatrix(m) creates a square matrix of dimension k
++ whose entry at the i-th row and j-th column is the
++ indeterminate x[i,j] (double subscripted).
symmetricTensors : (M R, PI) -> M R
++ symmetricTensors(a,n) applies to the m-by-m
++ square matrix a the
++ irreducible, polynomial representation of the general linear
++ group GLm
++ which corresponds to the partition (n,0,...,0) of n.
++ Error: if a is not a square matrix.
++ Note that this corresponds to the symmetrization of the
++ representation with the trivial representation of the symmetric
++ group Sn.
++ The carrier spaces of the representation are the symmetric
++ tensors of the n-fold tensor product.
symmetricTensors : (L M R, PI) -> L M R
++ symmetricTensors(la,n) applies to each m-by-m square matrix in the
++ list la the irreducible, polynomial representation
++ of the general linear group GLm
++ which corresponds
++ to the partition (n,0,...,0) of n.
++ Error: if the matrices in la are not square matrices.
++ Note that this corresponds to the symmetrization of the
++ representation with the trivial representation of the symmetric
++ group Sn.
++ The carrier spaces of the representation are the symmetric
++ tensors of the n-fold tensor product.
tensorProduct : (M R, M R) -> M R
++ tensorProduct(a,b) calculates the Kronecker product
++ of the matrices a and b.
++ Note that if each matrix corresponds to a group representation
++ (repr. of generators) of one group, then these matrices
++ correspond to the tensor product of the two representations.
tensorProduct : (L M R, L M R) -> L M R
++ tensorProduct([a1,...,ak],[b1,...,bk]) calculates the list of
++ Kronecker products of the matrices ai and bi
++ for {1 <= i <= k}.
++ Note that if each list of matrices corresponds to a group
++ representation (repr. of generators) of one group, then these
++ matrices correspond to the tensor product of the two representations.
tensorProduct : M R -> M R
++ tensorProduct(a) calculates the Kronecker product
++ of the matrix a with itself.
tensorProduct : L M R -> L M R
++ tensorProduct([a1,...ak]) calculates the list of
++ Kronecker products of each matrix ai with itself
++ for {1 <= i <= k}.
++ Note that if the list of matrices corresponds to a group
++ representation (repr. of generators) of one group, then these
++ matrices correspond to the tensor product of the representation
++ with itself.
permutationRepresentation : (PERM I, I) -> M I
++ permutationRepresentation(pi,n) returns the matrix
++ (deltai,pi(i)) (Kronecker delta) for a permutation
++ pi of {1,2,...,n}.
permutationRepresentation : L I -> M I
++ permutationRepresentation(pi,n) returns the matrix
++ (deltai,pi(i)) (Kronecker delta) if the permutation
++ pi is in list notation and permutes {1,2,...,n}.
permutationRepresentation : (L PERM I, I) -> L M I
++ permutationRepresentation([pi1,...,pik],n) returns the list
++ of matrices [(deltai,pi1(i)),...,(deltai,pik(i))]
++ (Kronecker delta) for the permutations pi1,...,pik
++ of {1,2,...,n}.
permutationRepresentation : L L I -> L M I
++ permutationRepresentation([pi1,...,pik],n) returns the list
++ of matrices [(deltai,pi1(i)),...,(deltai,pik(i))]
++ if the permutations pi1,...,pik are in
++ list notation and are permuting {1,2,...,n}.
CODE ==> add
-- import of domains and packages
import OutputForm
-- declaration of local functions:
calcCoef : (L I, M I) -> I
-- calcCoef(beta,C) calculates the term
-- |S(beta) gamma S(alpha)| / |S(beta)|
invContent : L I -> V I
-- invContent(alpha) calculates the weak monoton function f with
-- f : m -> n with invContent alpha. f is stored in the returned
-- vector
-- definition of local functions
calcCoef(beta,C) ==
prod : I := 1
for i in 1..maxIndex beta repeat
prod := prod * multinomial(beta(i), entries row(C,i))$ICF
prod
invContent(alpha) ==
n : NNI := (+/alpha)::NNI
f : V I := new(n,0)
i : NNI := 1
j : I := - 1
for og in alpha repeat
j := j + 1
for k in 1..og repeat
f(i) := j
i := i + 1
f
-- exported functions:
if R has commutative("*") then
antisymmetricTensors ( a : M R , k : PI ) ==
nr : NNI := nrows a
nc : NNI := ncols a
k = 1 => a
k > min(nr,nc) =>
error("second parameter for antisymmetricTensors is too large")
mr : I := binomial(nr,k)$ICF
mc : I := binomial(nc,k)$ICF
ilr : L L I := [subSet(nr,k,i)$SGCF for i in 0..mr-1]
ilc : L L I := [subSet(nc,k,i)$SGCF for i in 0..mc-1]
b : M R := zero(mr::NNI, mc::NNI)
for i in 1..mr repeat
for j in 1..mc repeat
c : M R := zero(k,k)
lr: L I := ilr.i
lt: L I := ilc.j
for r in 1..k repeat
for t in 1..k repeat
rr : I := lr.r
tt : I := lt.t
--c.r.t := a.(1+rr).(1+tt)
setelt(c,r,t,elt(a, 1+rr, 1+tt))
setelt(b, i, j, determinant c)
b
if R has commutative("*") then
antisymmetricTensors(la: L M R, k: PI) ==
[antisymmetricTensors(ma,k) for ma in la]
symmetricTensors (a : M R, n : PI) ==
m : NNI := nrows a
m ^= ncols a =>
error("Input to symmetricTensors is not a square matrix")
n = 1 => a
dim : NNI := (binomial(m+n-1,n)$ICF)::NNI
c : M R := new(dim,dim,0)
f : V I := new(n,0)
g : V I := new(n,0)
nullMatrix : M I := new(1,1,0)
colemanMatrix : M I
for i in 1..dim repeat
-- unrankImproperPartitions1 starts counting from 0
alpha := unrankImproperPartitions1(n,m,i-1)$SGCF
f := invContent(alpha)
for j in 1..dim repeat
-- unrankImproperPartitions1 starts counting from 0
beta := unrankImproperPartitions1(n,m,j-1)$SGCF
g := invContent(beta)
colemanMatrix := nextColeman(alpha,beta,nullMatrix)$SGCF
while colemanMatrix ^= nullMatrix repeat
gamma := inverseColeman(alpha,beta,colemanMatrix)$SGCF
help : R := calcCoef(beta,colemanMatrix)::R
for k in 1..n repeat
help := help * a( (1+f k)::NNI, (1+g(gamma k))::NNI )
c(i,j) := c(i,j) + help
colemanMatrix := nextColeman(alpha,beta,colemanMatrix)$SGCF
-- end of while
-- end of j-loop
-- end of i-loop
c
symmetricTensors(la : L M R, k : PI) ==
[symmetricTensors (ma, k) for ma in la]
tensorProduct(a: M R, b: M R) ==
n : NNI := nrows a
m : NNI := nrows b
nc : NNI := ncols a
mc : NNI := ncols b
c : M R := zero(n * m, nc * mc)
indexr : NNI := 1 -- row index
for i in 1..n repeat
for k in 1..m repeat
indexc : NNI := 1 -- column index
for j in 1..nc repeat
for l in 1..mc repeat
c(indexr,indexc) := a(i,j) * b(k,l)
indexc := indexc + 1
indexr := indexr + 1
c
tensorProduct (la: L M R, lb: L M R) ==
[tensorProduct(la.i, lb.i) for i in 1..maxIndex la]
tensorProduct(a : M R) == tensorProduct(a, a)
tensorProduct(la : L M R) ==
tensorProduct(la :: L M R, la :: L M R)
permutationRepresentation (p : PERM I, n : I) ==
-- permutations are assumed to permute {1,2,...,n}
a : M I := zero(n :: NNI, n :: NNI)
for i in 1..n repeat
a(eval(p,i)$(PERM I),i) := 1
a
permutationRepresentation (p : L I) ==
-- permutations are assumed to permute {1,2,...,n}
n : I := #p
a : M I := zero(n::NNI, n::NNI)
for i in 1..n repeat
a(p.i,i) := 1
a
permutationRepresentation(listperm : L PERM I, n : I) ==
-- permutations are assumed to permute {1,2,...,n}
[permutationRepresentation(perm, n) for perm in listperm]
permutationRepresentation (listperm : L L I) ==
-- permutations are assumed to permute {1,2,...,n}
[permutationRepresentation perm for perm in listperm]
createGenericMatrix(m) ==
res : M P R := new(m,m,0$(P R))
for i in 1..m repeat
for j in 1..m repeat
iof : OF := coerce(i)$Integer
jof : OF := coerce(j)$Integer
le : L OF := cons(iof,list jof)
sy : Symbol := subscript(x::Symbol, le)$Symbol
res(i,j) := (sy :: P R)
res
|