Skip to content

Commit

Permalink
Merge branch 'GLInvariants' of https://github.com/Macaulay2/Workshop-…
Browse files Browse the repository at this point in the history
…2024-Utah into GLInvariants
  • Loading branch information
huntersimper committed Jun 2, 2024
2 parents 6601ac9 + d5d0c10 commit b536b00
Showing 1 changed file with 12 additions and 42 deletions.
54 changes: 12 additions & 42 deletions GLIdeals.m2
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ newPackage(
Reload=>true
)

export{"generateIlambda,idealILambda"}
export{"generateIlambda"}


generateIlambda = method()----This is old function do not use.
generateIlambda = method()
generateIlambda(ZZ,ZZ,List,PolynomialRing) := (n,m,lam,S) -> (
r := local r;
s := local s;
Expand All @@ -36,8 +36,8 @@ generateIlambda(ZZ,ZZ,List,PolynomialRing) := (n,m,lam,S) -> (
ideal mingens J
)

mingensILambda = method()
mingensILambda(Matrix, List) := (X, lam) - (
numgensILambda = method() -- TODO: Make it accept Partitions as well
numgensILambda(Matrix, List) := (X, lam) -> (
myHookLength := P -> (
-- compute prod (P_i - P_j + j - i) / (j - i) for all i < j
num := 1;
Expand All @@ -51,52 +51,22 @@ mingensILambda(Matrix, List) := (X, lam) - (
return num / den;
);

lam := local lam;
size := #lam;

r := numRows X;
c := numColumns X;
min_size := min(r, c);
max_size := max(r, c);
minSize := min(r, c);
maxSize := max(r, c);

if min_size < size then(
if minSize < size then(
error "Partition is too large for the matrix";
);

lam = lam | apply(min_size - size, i -> 0); -- make it size min_size
dimension := myHookLength(lam);
lam = lam | apply(max_size - min_size, i -> 0); -- make it size max_size
return dimension * myHookLength(lam);
)


----

idealILambda = method()
idealILambda(Matrix,List) := (X,lam) -> (
n:=rank target X;
m:=rank source X;
kk:=baseRing ring X;
if char kk !=0 then(
error "Base ring is not characteristic 0";
);
conjlam := toList conjugate( new Partition from lam);
d:=numgensILambda(X,lam);
lis := for i from 0 to d-1 list
(
A := random(kk^m,kk^m);
B := random(kk^n,kk^n);
N := A * X * B;
product for j from 0 to #conjlam-1 list det(N_{0..conjlam_j-1}^{0..conjlam_j-1}));
J := ideal lis;
minJ:=mingens J;
if rank source minJ != d then(
error "Did not compute full ideal";
);
ideal mingens J
)


P := lam | apply(minSize - size, i -> 0); -- make it size minSize
dimension := myHookLength(P);
P = P | apply(maxSize - minSize, i -> 0); -- make it size maxSize
return dimension * myHookLength(P);
);
-----

beginDocumentation()
Expand Down

0 comments on commit b536b00

Please sign in to comment.