Skip to content

Commit

Permalink
create isMatrixOfCorrectFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
aryamanmaithani committed Jun 5, 2024
1 parent 635e503 commit 8b0fd37
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions GLIdeals.m2
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,15 @@ numgensGLIdeal(Matrix, Partition) := opts -> (X, P) -> (
return numgensILambda(X, P);
);

isMatrixOfCorrectFormat = method();
isMatrixOfCorrectFormat(Matrix) := (X) -> (
-- X is a matrix
S := ring X;
if not (class(S) === PolynomialRing) then error "Matrix is not over a polynomial ring";
kk := baseRing S;
if not isField(kk) then error "Matrix is not over a polynomial ring over a field";
);

partitionsLeq = method();
partitionsLeq(Partition, Partition) := (A, B) -> (
-- A and B are partitions
Expand Down

0 comments on commit 8b0fd37

Please sign in to comment.