Skip to content

Commit

Permalink
added MinimalGenerators as option for dual of matrices and complexes
Browse files Browse the repository at this point in the history
TODO: should dual of modules call Hom(M, R^1) and
use the same optional argument as well?
  • Loading branch information
mahrud committed Dec 17, 2023
1 parent dbe2654 commit 7422d32
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions M2/Macaulay2/m2/chaincomplexes.m2
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,7 @@ Hom(Module, ChainComplex) := ChainComplex => opts -> (M, C) -> (
));
D)

dual ChainComplex := ChainComplex => {} >> o -> (C) -> (
R := ring C;
Hom(C,R^1))
dual ChainComplex := ChainComplex => options Hom >> o -> C -> Hom(C, module ring C, o)

Hom(ChainComplexMap, Module) := ChainComplexMap => opts -> (f, N) -> (
complete f;
Expand Down
2 changes: 1 addition & 1 deletion M2/Macaulay2/m2/matrix1.m2
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ Hom(Matrix, Module) := Matrix => o -> (f, N) -> inducedMap(Hom(source f, N, o),
Hom(Module, Matrix) := Matrix => o -> (M, g) -> inducedMap(Hom(M, target g, o), Hom(M, source g, o), dual cover M ** g, Verify => false)
Hom(Matrix, Matrix) := Matrix => o -> (f, g) -> Hom(source f, g, o) * Hom(f, source g, o)

dual Matrix := Matrix => {} >> o -> f -> Hom(f, module ring f)
dual Matrix := Matrix => options Hom >> o -> f -> Hom(f, module ring f, o)

-----------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions M2/Macaulay2/m2/modules2.m2
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ factor Module := opts -> (M) -> (

-----------------------------------------------------------------------------

-- TODO: compare speed with Hom(M, R^1)
dual Module := Module => {} >> o -> F -> if F.cache.?dual then F.cache.dual else F.cache.dual = (
if not isFreeModule F then kernel transpose presentation F
else new Module from (ring F,rawDual raw F))
Expand Down

0 comments on commit 7422d32

Please sign in to comment.