Skip to content

Commit

Permalink
Very minor changes to several packages to get their examples to work …
Browse files Browse the repository at this point in the history
…with Complexes package (InvolutiveBases, Posets, RandomComplexes, SpectralSequences, one Macaulay2Doc doc node)
  • Loading branch information
mikestillman committed Sep 16, 2024
1 parent 736f5f4 commit 4586c04
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions M2/Macaulay2/packages/InvolutiveBases.m2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ newPackage(
Email => "[email protected]",
HomePage => "http://wwwb.math.rwth-aachen.de/~daniel/"}},
Headline => "Methods for Janet bases and Pommaret bases in Macaulay 2",
PackageImports => { "Complexes" },
PackageExports => { "Complexes" },
Keywords => {"Groebner Basis Algorithms"},
DebuggingMode => false
)
Expand Down Expand Up @@ -846,7 +846,7 @@ document {
EXAMPLE lines ///
R = QQ[x,y,z];
I = ideal(x,y,z);
C = res(I, Strategy => Involutive)
C = freeResolution(I, Strategy => Involutive)
multVar(C, 2)
///,
EXAMPLE lines ///
Expand Down Expand Up @@ -897,7 +897,7 @@ document {
EXAMPLE lines ///
R = QQ[x,y,z];
I = ideal(x,y,z);
C = res(I, Strategy => Involutive)
C = freeResolution(I, Strategy => Involutive)
janetBasis(C, 2)
///,
SeeAlso => {janetMultVar,pommaretMultVar,isPommaretBasis,invReduce,invSyzygies,janetResolution}
Expand Down Expand Up @@ -1200,7 +1200,7 @@ document {
EXAMPLE lines ///
R = QQ[x,y,z];
I = ideal(x,y,z);
res(I, Strategy => Involutive)
freeResolution(I, Strategy => Involutive)
///,
SeeAlso => {janetBasis,multVar,invSyzygies}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ document {
"needsPackage \"SimplicialComplexes\"",
"R = QQ[a..d]",
"D = simplicialComplex {a*b*c,a*b*d,a*c*d,b*c*d}",
"C = chainComplex D",
"C = complex D",
"HH_2 C",
"prune oo"
},
Expand Down
4 changes: 2 additions & 2 deletions M2/Macaulay2/packages/Posets.m2
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ resolutionPoset = method()
resolutionPoset Complex := Poset => C ->
poset flatten flatten apply(sort unique (first \ keys betti C), d -> for r to numrows C.dd_d - 1 list for c to numcols C.dd_d - 1 list if C.dd_d_(r,c) != 0 then {{d-1,r}, {d,c}} else continue)
resolutionPoset MonomialIdeal := Poset => I -> (
P := resolutionPoset res I;
P := resolutionPoset freeResolution I;
cvrs := applyValues(partition(last, coveringRelations P), v -> last \ first \ v);
lbl := {{{0,0} => {0,0}}, apply(#I_*, i -> {1,i} => I_i)};
for r in drop(rankPoset P, 2) do lbl = append(lbl, for v in r list v => lcm (last \ (last lbl)_(cvrs#v)));
Expand Down Expand Up @@ -3850,7 +3850,7 @@ doc ///
component of the resolution.
Example
R = QQ[x,y,z];
C = res ideal(y*z,x*z,x^2*y)
C = freeResolution ideal(y*z,x*z,x^2*y)
resolutionPoset C
(resolutionPoset C).GroundSet
Text
Expand Down
2 changes: 1 addition & 1 deletion M2/Macaulay2/packages/RandomComplexes.m2
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ randomSimplicialComplex(ZZ,ZZ):= (k,n) -> (
N:=#sets-k-2;
I:=monomialIdeal apply(apply(n,i->sets_(random(N)+k+2)),s->product(s,i->x_i));
c:=simplicialComplex I;
CQ:=chainComplex c;
CQ:=chainComplex complex c;
C:=(chainComplex apply(length CQ-1,i->lift(CQ.dd_(i+1),ZZ)))
)

Expand Down
16 changes: 8 additions & 8 deletions M2/Macaulay2/packages/SpectralSequences.m2
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ filteredComplex(List) := FilteredComplex => opts -> L -> (
if all(#L, p -> class L#p === SimplicialComplex) then (
kk := coefficientRing L#0;
if opts.ReducedHomology == true then (
C = chainComplex L#0; -- By default the ambient simplicial complex is the first element of the list
maps = apply(#L-1, p -> map(C, chainComplex L#(p+1),
C = chainComplex complex L#0; -- By default the ambient simplicial complex is the first element of the list
maps = apply(#L-1, p -> map(C, chainComplex complex L#(p+1),
i -> sub(contract(transpose matrix{faces(i,L#0)}, matrix{faces(i,L#(p+1))}), kk))))
else (C = truncate(chainComplex L#0,1); -- By default the ambient simplicial complex is the first element of the list
maps = apply(#L-1, p -> map(C, truncate(chainComplex L#(p+1),1),
else (C = truncate(chainComplex complex L#0,1); -- By default the ambient simplicial complex is the first element of the list
maps = apply(#L-1, p -> map(C, truncate(chainComplex complex L#(p+1),1),
i -> sub(contract(transpose matrix{faces(i,L#0)}, matrix{faces(i,L#(p+1))}), kk))))
)
else (
Expand Down Expand Up @@ -1566,7 +1566,7 @@ doc ///
Text
We can check that the homology of the simplicial complex twoSphere agrees with that of $\mathbb{S}^2$.
Example
C = truncate(chainComplex twoSphere,1)
C = truncate(chainComplex complex twoSphere,1)
prune HH C
Text
We now write down our simplicial complex whose topological realization
Expand All @@ -1578,7 +1578,7 @@ doc ///
Again we can check that we've entered a simplicial complex
whose homology agrees with that of the real projective plane.
Example
B = truncate(chainComplex realProjectivePlane,1)
B = truncate(chainComplex complex realProjectivePlane,1)
prune HH B
Text
We now compute the fibers of the anti-podal quotient map
Expand Down Expand Up @@ -1633,7 +1633,7 @@ doc///
We can check that the homology of this simplicial complex agrees with that
of the Klein Bottle:
Example
C = truncate(chainComplex Delta,1)
C = truncate(chainComplex complex Delta,1)
prune HH C
Text
Let $S$ be the simplicial complex with facets $\{A_0 A_1, A_0 A_2, A_1 A_2\}$. Then $S$ is a triangulation of $S^1$. The simplicial map
Expand Down Expand Up @@ -1684,7 +1684,7 @@ doc ///
$\Delta$ agrees with that of the torus
$\mathbb{S}^1 \times \mathbb{S}^1 $
Example
C = truncate(chainComplex Delta,1)
C = truncate(chainComplex complex Delta,1)
prune HH C
Text
Let $S$ be the simplicial complex with facets $\{A_0 A_1, A_0 A_2, A_1 A_2\}$. Then $S$ is a triangulation of $S^1$. The simplicial map
Expand Down

0 comments on commit 4586c04

Please sign in to comment.