Skip to content

Commit

Permalink
Converted mutable matrices to matrices in instances of sub()
Browse files Browse the repository at this point in the history
At some point M2 no longer allowed for mutable matrices to be used in `sub()`. Instances of this was fixed by converting the mutable matrices to a matrix.
  • Loading branch information
Branden Stone authored Jun 27, 2023
1 parent 5572c8a commit d55ea7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions M2/Macaulay2/packages/QuillenSuslin.m2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ newPackage(
Date => "May 10, 2013",
Authors => {
{Name => "Brett Barwick", Email => "[email protected]", HomePage => "http://faculty.uscupstate.edu/bbarwick/"},
{Name => "Branden Stone", Email => "bstone@adelphi.edu", HomePage => "http://math.adelphi.edu/~bstone/"}
{Name => "Branden Stone", Email => "[email protected].edu", HomePage => "http://bstone.github.io/"}
},
Headline => "the Quillen-Suslin algorithm for bases of projective modules",
Keywords => {"Commutative Algebra"},
Expand Down Expand Up @@ -1457,7 +1457,7 @@ monicPolySubs(RingElement,List) := opts -> (f,varList) -> (
print "The element had degree zero in the last variable.";
degZeroSub = mutableMatrix vars R;
degZeroSub = columnSwap(degZeroSub,last usedVarPosition,lastVarPosition);
f = sub(f,degZeroSub); -- Interchange variables so that last varList is involved in f. Now f has positive degree in last varList.
f = sub(f,matrix degZeroSub); -- Interchange variables so that last varList is involved in f. Now f has positive degree in last varList.
);

-- Now we enter the general algorithm.
Expand Down Expand Up @@ -1495,7 +1495,7 @@ monicPolySubs(RingElement,List) := opts -> (f,varList) -> (
if degZeroSub =!= null then (
print("degZeroSub: "|toString(degZeroSub));
tempSub = columnSwap(tempSub,last usedVarPosition,lastVarPosition);
tempInvSub = sub(tempInvSub,degZeroSub);
tempInvSub = sub(matrix tempInvSub,matrix degZeroSub);
);

return (matrix tempSub,matrix tempInvSub);
Expand Down

0 comments on commit d55ea7c

Please sign in to comment.