-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathamelia.m2
109 lines (91 loc) · 2.33 KB
/
amelia.m2
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
elemsize = (k,Li) -> for m in Li do (if member(k,m) then return #m)
dims = (L) -> (
K := flatten L#0; -- keys of the hash table
P := for k in K list (
k => for Li in L list elemsize(k,Li)
);
new HashTable from P
)
prods = T -> (
K := keys T;
P := for k in K list (
k => f T#k
);
new HashTable from P
)
varProdPairs = H -> (
apply(keys H, i -> apply(H#i, j -> {x_(toSequence j), product apply(#j, k ->
(vars k)_(i, j#k))})))
matrixFun = T -> (
n := #(T#1);
bigList = for j in keys T list (
for k to n-1 list (
for i to T#j#k-1 list (vars k)_(j,i)));
-- R := QQ[flatten flatten bigList];
-- bigList = apply(bigList, j -> applyTable(j, i -> value i))
)
--listSize = L -> (
-- if #L === 1 then return (#L_0)
-- else (
-- p = (#L_0)*listSize(drop(L, 1))
-- ))
f = (L) -> (
if #L === 0 then return {{}};
a := L#0;
L = drop(L,1);
flatten for i from 0 to a-1 list (
M := f L;
M/(m -> prepend(i,m))
)
)
makeDets = (str,mu) -> (
-- mu is a list of a filled tableau
Ind := apply(mu, m -> apply(#m, i-> apply(#m,j -> (m_i, j))) );
R := QQ[(flatten flatten Ind)/(v -> str_v)];
Ma := apply(Ind, k -> applyTable(k, j -> value str_j));
product apply(Ma, ma ->( det matrix ma ))
)
makeUnsymmetric = L -> (
Dets := apply(#L, i x -> makeDets(vars i, L_i));
rings := apply(Dets, i -> ring i);
uberring := QQ[flatten apply(rings, r->gens r)];
maps :=apply(rings, r -> map(uberring,r));
--product apply(#Dets, i -> maps_i(Dets_i));
-- T := dims L;
-- H := prods T;
-- apply(keys H, i -> apply(H#i, j -> {x_(toSequence j), product apply(#j, k ->
-- (vars k)_(i, j#k))}))
)
end
matList = apply(bigList, l -> l/(v -> matrix{v}));
m = 1;
endList = {};
for L in matList do(
for i in L do m = m**i;
endList = append(endList, m);
m = 1;
);
endList
for k to #(o10_2)-1 list for j to #(o10_1)-1 list for i to #(o10_0)-1 list
{(o10_0_i)*(o10_1_j)*(o10_2_k), u_(i,j,k)}
u
restart
load "amelia.m2"
L1 = {{1,2,3},{4,5},{6}}
L2 = {{1,2},{3,5},{4,6}}
L3 = {{1},{2},{3},{5},{6,4}}
L = {L1,L2,L3}
T = dims L
U = makeUnsymmetric {L1};
R = ring U;
matrixFun T
listSize L
helper(T#1)
end
restart
load "amelia-list.m2"
L = {2,3,1}
f {}
f{3}
f{3,2}
f L