Skip to content

Commit

Permalink
Revert "re-enable PP in the Core"
Browse files Browse the repository at this point in the history
This reverts commit 2de3700.
  • Loading branch information
mahrud committed Oct 11, 2023
1 parent 2de3700 commit 469b7fb
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 58 deletions.
4 changes: 4 additions & 0 deletions M2/Macaulay2/m2/varieties.m2
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Proj Ring := (stashValue symbol Proj) (R ->
}
)

-*
-- TODO: export and document
-- Note: NormalToricVarieties may redefine
PP = new ScriptedFunctor from {
Expand All @@ -82,6 +83,7 @@ PP Sequence := ProjectiveVariety => w -> Proj(ZZ[vars(0..#w-1), Degrees => toLis
PP(Ring, ZZ) :=
PP(Ring, List) := ProjectiveVariety => (K, N) -> PP^N ** K
PP(Ring, Sequence) := ProjectiveVariety => (K, w) -> PP w ** K
*-

-- this is a kludge to make Spec ZZ/101[x,y]/(y^2-x^3) and Proj ZZ/101[x,y]/(x^2-y^2) work as expected
-- TODO: also make Spec kk{x,y} or Spec kk<|x,y|> work when they are supported
Expand Down Expand Up @@ -456,10 +458,12 @@ minimalPresentation CoherentSheaf := prune CoherentSheaf := CoherentSheaf => opt

-- TODO: is this correct?
symmetricAlgebra CoherentSheaf := Ring => opts -> F -> symmetricAlgebra(HH^0 F(>=0), opts)
-*
-- TODO: is the dual right?
-- TODO: add isLocallyFree and make sure F is locally free first?
PP CoherentSheaf := ProjectiveVariety => F -> tryHooks((PP, CoherentSheaf), F,
F -> Proj flattenRing(symmetricAlgebra dual F, Result => Thing))
*-

-----------------------------------------------------------------------------
-- cotangentSheaf, tangentSheaf, and canonicalBundle
Expand Down
20 changes: 10 additions & 10 deletions M2/Macaulay2/packages/AssociativeAlgebras.m2
Original file line number Diff line number Diff line change
Expand Up @@ -1782,8 +1782,8 @@ all(15, i -> #(flatten entries ncBasis(i, S)) == binomial(i + 3,3))
LL = lineSchemeFourDim(S,M)
primaryDecomposition radical LL
netList oo
P = pointScheme(S,y)
primaryDecomposition radical P
PP = pointScheme(S,y)
primaryDecomposition radical PP
netList oo

restart
Expand All @@ -1792,12 +1792,12 @@ R = ZZ/32003 <|x_4,x_1,x_2,x_3|>
I = ideal {x_3^2 - x_1*x_2, x_4^2 - x_2*x_1, x_1*x_3 - x_2*x_4,
x_3*x_1 - x_2*x_3, x_1*x_4 - x_4*x_2, x_4*x_1 - x_3*x_2}
S = R/I
P = pointScheme(S,y)
netList minimalPrimes P
PP = pointScheme(S,y)
netList minimalPrimes PP

PR = ring Mleft
MleftSpecial = sub(Mleft, {PR_0 => 1, PR_1 => 2, PR_2 => 0, PR_3 => 0})
MrightSpecial = sub(Mright, {PR_0 => 1, PR_1 => 2, PR_2 => -1, PR_3 => -2})
PPR = ring Mleft
MleftSpecial = sub(Mleft, {PPR_0 => 1, PPR_1 => 2, PPR_2 => 0, PPR_3 => 0})
MrightSpecial = sub(Mright, {PPR_0 => 1, PPR_1 => 2, PPR_2 => -1, PPR_3 => -2})
C = first minimalPrimes minors(4,Mleft)
Mleft % C
ker (Mleft % C)
Expand All @@ -1824,9 +1824,9 @@ netList minimalPrimes P
minimalPrimes ideal singularLocus P

R = QQ[zz,a_1,a_2,a_3]
P = sub(P,R) + ideal {zz^2 + zz + 1}
minP = minimalPrimes P
minP / degree
PP = sub(P,R) + ideal {zz^2 + zz + 1}
minPP = minimalPrimes PP
minPP / degree

x = baseName x
R = ZZ/32003 <|x_4,x_1,x_2,x_3|>
Expand Down
6 changes: 3 additions & 3 deletions M2/Macaulay2/packages/AssociativeAlgebras/doc.m2
Original file line number Diff line number Diff line change
Expand Up @@ -1457,9 +1457,9 @@ doc ///
three lines (although M2 has trouble detecting this outright):
Example
R = QQ[zz,X_1,X_2,X_3]
P = sub(P,R) + ideal {zz^2 + zz + 1}
minP = minimalPrimes P; netList minP
minP / degree
PP = sub(P,R) + ideal {zz^2 + zz + 1}
minPP = minimalPrimes PP; netList minPP
minPP / degree
Text
Indeed, this Sklyanin algebra is isomorphic to a skew polynomial algebra
in three variables if the base field contains a cube root of unity.
Expand Down
18 changes: 9 additions & 9 deletions M2/Macaulay2/packages/Cremona.m2
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@ toMap (Ideal,ZZ,ZZ) := o -> (I,v,jj) -> (
K := coefficientRing ring I;
d := numgens ring I -1;
x := local x;
PPd := K[x_0..x_d];
C := homComp(v-jj+1,sub(I,vars PPd));
PP := K[x_0..x_d];
C := homComp(v-jj+1,sub(I,vars PP));
n := numgens C -1;
if n == -1 then return toMap(sub(matrix{{}},ring I),Dominant=>o.Dominant);
bs := gens homComp(v,sub(I,vars PPd));
bs := gens homComp(v,sub(I,vars PP));
N := numgens source bs -1;
if N == -1 then return toMap(sub(matrix{{}},ring I),Dominant=>o.Dominant);
a := local a; b := local b;
Expand All @@ -331,8 +331,8 @@ toMap (Ideal,ZZ,ZZ) := o -> (I,v,jj) -> (
sols := sub(ideal selectInSubring(1,gens gb sys),K[a_0..a_N]);
f := map parametrize sols;
if dim target f <= 0 then return toMap(sub(matrix{{}},ring I),Dominant=>o.Dominant);
PPd' := PPd[gens target f];
linSys := transpose sub(sub((coefficients (sub(matrix f,PPd') * transpose sub(bs,PPd'))_(0,0))_1,PPd),vars ring I);
PP' := PP[gens target f];
linSys := transpose sub(sub((coefficients (sub(matrix f,PP') * transpose sub(bs,PP'))_(0,0))_1,PP),vars ring I);
toMap(linSys,Dominant=>o.Dominant)
);

Expand Down Expand Up @@ -1946,8 +1946,8 @@ rationalMap (AbstractRationalMap) := o -> (Phi) -> (
a := local a;
R := K[flatten for i to m list toList(a_(i,0)..a_(i,binomial(n+d,d)-1))];
x := local x;
PPn := R[x_0..x_n];
F := matrix{for i to m list (matrix{toList(a_(i,0)..a_(i,binomial(n+d,d)-1))} * transpose gens (ideal vars PPn)^d)_(0,0)};
PP := R[x_0..x_n];
F := matrix{for i to m list (matrix{toList(a_(i,0)..a_(i,binomial(n+d,d)-1))} * transpose gens (ideal vars PP)^d)_(0,0)};
M := apply(N,i -> sub(F,apply(n+1,j -> x_j => B_(i,j))) || submatrix(V,{i},));
eqs := sum(M,m -> trim minors(2,m));
if Phi#"verbose" then <<"-- obtained "<<numgens eqs<<" linear equations with "<<toString((m+1) * binomial(n+d,d))<<" unknowns over "<<toString(K)<<endl;
Expand All @@ -1960,8 +1960,8 @@ rationalMap (AbstractRationalMap) := o -> (Phi) -> (
if #S == 0 then error "something went wrong while calculating forms";
S0 := first S;
g := gens R;
PPn = K[x_0..x_n];
G := sub(sub(sub(F,apply(#g,i -> g_i => S0_i)),PPn),vars Pn);
PP = K[x_0..x_n];
G := sub(sub(sub(F,apply(#g,i -> g_i => S0_i)),PP),vars Pn);
phi := rationalMap(Pn,Pm,G);
if #S > 1 then maps phi;
Phi#"degForms" = max flatten degrees ideal compress matrix phi;
Expand Down
16 changes: 8 additions & 8 deletions M2/Macaulay2/packages/IntegralClosure.m2
Original file line number Diff line number Diff line change
Expand Up @@ -2446,10 +2446,10 @@ TEST ///
debug IntegralClosure
kk=ZZ/2
S=kk[a,b,c,d]
P = monomialCurveIdeal(S,{1,3,4})
betti res P
for count from 1 to 10 list parametersInIdeal P
for count from 1 to 10 list canonicalIdeal (S/P)
PP = monomialCurveIdeal(S,{1,3,4})
betti res PP
for count from 1 to 10 list parametersInIdeal PP
for count from 1 to 10 list canonicalIdeal (S/PP)
///

-- MES TODO: test canonicalIdeal1 here?
Expand Down Expand Up @@ -2482,10 +2482,10 @@ TEST ///
kk=ZZ/101
S=kk[a,b,c,d]
canonicalIdeal S
P = monomialCurveIdeal(S,{1,3,4})
betti res P
R = S/P
w = canonicalIdeal R
PP = monomialCurveIdeal(S,{1,3,4})
betti res PP
R = S/PP
w=canonicalIdeal R
w1 = canonicalIdeal1 R -- a different, somewhat less pleasing answer...
-- check that these two different canonical ideals are isomorphic.
F = homomorphism (Hom(w,w1))_{0}
Expand Down
4 changes: 2 additions & 2 deletions M2/Macaulay2/packages/K3Carpets.m2
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ schemeInProduct(Ideal, List, Symbol) := (I,Maps,X) ->(
S := ring I;
kkk := coefficientRing S;
dims := apply(Maps, f -> numcols f-1);
P := productOfProjectiveSpaces (dims, symbol X, kkk);
schemeInProduct(I,Maps,P)
PP := productOfProjectiveSpaces (dims, symbol X, kkk);
schemeInProduct(I,Maps,PP)
)
///
restart
Expand Down
4 changes: 2 additions & 2 deletions M2/Macaulay2/packages/Macaulay2Doc/changes.m2
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@ document {
to the value of the ", TO [newPackage, PackageImports], " or ", TO [newPackage, PackageExports], " option, to ensure that needed definitions are visible." },
LI { "the Schubert2 functions ", TT "projectiveSpace", " and ", TT "projectiveSpace'", "have been renamed ", TO "Schubert2::abstractProjectiveSpace", " and ",
TO "Schubert2::abstractProjectiveSpace'", ". The reason is that there were name conflicts with the ", TO "NormalToricVarieties::NormalToricVarieties", " package.
Since ", TT "PP", " is now a method, you may put ", TT "PP ZZ := abstractProjectiveSpace",
" in your init file and then use something like ", TT "X = PP 4", "." },
Since ", TT "PP", " is no longer protected, you may put ", TT "PP = abstractProjectiveSpace",
" in your init file and then use something like ", TT "X = PP 4", ", although ", TT "PP^4", " will no longer work." },
LI { "The deprecated old-style block comment syntax has been disabled. Now one types ", TT "-* COMMENT *-", " instead of ", TT "{* COMMENT *}", "." } } },
LI { "new packages:",
UL {
Expand Down
1 change: 0 additions & 1 deletion M2/Macaulay2/packages/MultiprojectiveVarieties.m2
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ setParametrizationOfWeightedProjectiveSpace = P -> (
P.cache#"rationalParametrization" = g;
P
);
-- TODO: conflicts with PP from Core
PP = new ScriptedFunctor from {
symbol ring => null,
argument => (
Expand Down
4 changes: 2 additions & 2 deletions M2/Macaulay2/packages/NoetherianOperators.m2
Original file line number Diff line number Diff line change
Expand Up @@ -3760,8 +3760,8 @@ viewHelp "NoetherianOperators"
-- We compute the ideal as explained in the introduction.
U= QQ[x_1,x_2,x_3,x_4,u_1,u_2,u_3,u_4,y_1,y_2];
A = matrix {{u_3,u_1,u_2},{u_1,u_2,u_4}};
P = minors(2,A);
JJ=ideal{P,x_1-u_1-y_1,x_2-u_2-y_2,x_3-u_3,x_4-u_4,y_1^3,y_2+x_2*y_1^2};
PP = minors(2,A);
JJ=ideal{PP,x_1-u_1-y_1,x_2-u_2-y_2,x_3-u_3,x_4-u_4,y_1^3,y_2+x_2*y_1^2};
J=ideal{eliminate(JJ,{u_1,u_2,u_3,u_4,y_1,y_2})};
R=QQ[x_1,x_2,x_3,x_4];
F=map(R,U);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ doc ///
projectiveSpace = n -> Proj (QQ[x_0..x_n]);
projectiveSpace 2
Example
PP ZZ := toricProjectiveSpace;
PP = toricProjectiveSpace;
PP 2
SeeAlso
"making normal toric varieties"
Expand Down
4 changes: 2 additions & 2 deletions M2/Macaulay2/packages/Polymake.m2
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ getPropertyNames(List) := (F) -> (
-- F is a list of lines, as from a polymake file
-- returns a list of strings, names of known properties
FF := removeComments(F);
names := select(FF, s -> match("^[[:space:]]*[[:alpha:]]", s));
apply(names, toString)
PP := select(FF, s-> match("^[[:space:]]*[[:alpha:]]", s));
apply(PP, s -> toString s)
)

getProperty = method()
Expand Down
6 changes: 3 additions & 3 deletions M2/Macaulay2/packages/QuaternaryQuartics/Section8Doc.m2
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ doc ///
Example
JJ = randomElementsFromIdeal({3},SS);
IDD=X+JJ;
UU=IDD:SS;
BB= randomElementsFromIdeal({5},UU);
PP=IDD:SS;
BB= randomElementsFromIdeal({5},PP);
BU=BB+X;
BT=BU:UU;
BT=BU:PP;
degree BT
Text
We look for singularities of $BT$. Since the computation of singular locus is too long, we just check the rank of the jacobian matrix in one of the components of $SingSS$ and get that $BT$ is singular in that locus.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ isSmoothCurve (Ideal) := C -> (
dim(projectionCenter+C) != 0 or dim(projectionCenter+C) != 0) do();
x := getSymbol"x";
y := getSymbol"y";
P := kk[x_0..x_3,y_0..y_(n-5)];
f := map(S, P, gens(projectionCenter) | random(S^1,S^{n-4:-1}) );
PP := kk[x_0..x_3,y_0..y_(n-5)];
f := map(S,PP, gens(projectionCenter) | random(S^1,S^{n-4:-1}) );
C' := preimage_f(C);
--C1'=eliminate(C' + ideal(x_0..x_3), toList(x_0..x_3));
--if not dim(projectionCenter+C) == 0 then (use S; <<"bad projection center" <<endl; return false);
-- use S;
C1 := eliminate(C',toList(apply(n-4,i->P_(i+4))));
C1 := eliminate(C',toList(apply(n-4,i->PP_(i+4))));
not (degree C1 == degree C)) do();
S1 := kk[x_0..x_3];
C2 := substitute(C1,S1);
Expand Down
6 changes: 3 additions & 3 deletions M2/Macaulay2/packages/RationalPoints2.m2
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ rationalPoints(Ideal) := opts -> I -> (
-- shuffle and homogenize so that the first non-zero coordinate is 1
result = flatten table(pow_unused ELS, result, homogCoord @@ shuffle_ind);
-- extra points lying in a projective subspace
PPts := findProjPoints(ideal 0_unusedR);
result = result | PPts / (x->homogCoord shuffle(ind, x, ((n-unused):0_k)));
PP := findProjPoints(ideal 0_unusedR);
result = result | PP / (x->homogCoord shuffle(ind, x, ((n-unused):0_k)));
);
);
) else ( -- affine case
Expand Down Expand Up @@ -1211,7 +1211,7 @@ Description
numbers the result will be given as a precise value.
Example
globalHeight {1/1,2/3,5/8}
P2 = Proj(QQ[x,y,z]); pt = P2(1/1,2/3,5/8);
PP = Proj(QQ[x,y,z]); pt = PP(1/1,2/3,5/8);
globalHeight pt
F = toField(QQ[u]/(u^3-5));
globalHeight {u,u^2/5,1_F}
Expand Down
8 changes: 4 additions & 4 deletions M2/Macaulay2/packages/ReesAlgebra.m2
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ intersectInP(Ideal,Ideal) := o->(I,J) ->(
error" ring should be a polynomial ring over a field";
X:=symbol X;
Y:=symbol Y;
P' := kk[X_0..X_(n-1),Y_0..Y_(n-1)];
PP := kk[X_0..X_(n-1),Y_0..Y_(n-1)];
diag := ideal apply(n, i-> X_i-Y_i);
toP := map(P,P'/diag,vars P | vars P);
inX := map(P',P,apply(n,i->X_i));
inY := map(P',P,apply(n,i->Y_i));
toP := map(P,PP/diag,vars P | vars P);
inX := map(PP,P,apply(n,i->X_i));
inY := map(PP,P,apply(n,i->Y_i));
II := inX I + inY J;
L := distinguished(diag,II);
apply(L, l-> {l_0, trim toP l_1})
Expand Down
6 changes: 3 additions & 3 deletions M2/Macaulay2/packages/ResLengthThree.m2
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ resLengthThreeTorAlg(ChainComplex,List) := (F,sym) -> (
P := ambient A;
Q := ring F;
kk := coefficientRing first flattenRing Q;
S := kk monoid P;
I := ideal mingens sub(ideal A, S);
B := S/I;
PP := kk monoid P;
I := ideal mingens sub(ideal A, PP);
B := PP/I;
B.cache#"l" = A.cache#"l";
B.cache#"m" = A.cache#"m";
B.cache#"n" = A.cache#"n";
Expand Down
4 changes: 2 additions & 2 deletions M2/Macaulay2/packages/Schubert2/doc.m2
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ Node
todd P
chi OO_P(3)
Text
The name is quite long. Here is one way to make it shorter, by overwriting the @TO PP@ method:
The name is quite long. Here is one way to make it shorter
Example
PP ZZ := abstractProjectiveSpace
PP = abstractProjectiveSpace
X = PP 4
Text
To compute the Hilbert polynomial of a sheaf on projective space, we work
Expand Down

0 comments on commit 469b7fb

Please sign in to comment.