Skip to content

Commit

Permalink
changed map(Complex, Complex, ZZ) to allow multiplication maps
Browse files Browse the repository at this point in the history
  • Loading branch information
johndcobb authored and mikestillman committed Oct 16, 2024
1 parent 8eefd51 commit 2caeddf
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions M2/Macaulay2/packages/Complexes/ChainComplexMap.m2
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,9 @@ map(Complex, Complex, ZZ) := ComplexMap => opts -> (D, C, j) -> (
result.cache.isCommutative = true;
return result
);
if j === 1 then (
if C == D and (opts.Degree === null or opts.Degree === 0) then
return id_C;
error "expected source and target to be the same";
);
error "expected integer to be zero or one";
)
if C == D and (opts.Degree === null or opts.Degree === 0) then
return j * id_C;
error "expected 0 or source and target to be the same")

map(Complex, Complex, ComplexMap) := ComplexMap => opts -> (tar, src, f) -> (
deg := if opts.Degree === null then degree f else opts.Degree;
Expand Down

0 comments on commit 2caeddf

Please sign in to comment.