Skip to content

Commit

Permalink
wip: newring and ringmap
Browse files Browse the repository at this point in the history
  • Loading branch information
mahrud committed Aug 11, 2024
1 parent 7b8960f commit 3f547dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions M2/Macaulay2/m2/engine.m2
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ makeMonomialOrdering = (monsize,inverses,nvars,degs,weights,ordering) -> (
RawMonomialOrdering ** RawMonomialOrdering := RawMonomialOrdering => rawProductMonomialOrdering

-- used for debugging mgb interface, moved from ofcm.m2
-- TODO: use this in newring.m2
monomialOrderMatrix = method()
monomialOrderMatrix RawMonomialOrdering := mo -> (
nvars := rawNumberOfVariables mo;
Expand Down
3 changes: 3 additions & 0 deletions M2/Macaulay2/m2/newring.m2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ newRing QuotientRing := opts -> R -> (
-----------------------------
-- tensor product of rings --
-----------------------------
-- TODO: implement for towers of rings
-- TODO: support passing a base ring

-- made a method and documented elsewhere.
Ring ** Ring := Ring => (R,S) -> tensor(R,S)
Expand Down Expand Up @@ -82,6 +84,7 @@ tensor(QuotientRing, QuotientRing) := monoidTensorDefaults >> optns -> (R, S)
-------------------------
-- Graph of a ring map --
-------------------------
-- TODO: should work over ZZ

graphIdeal = method( Options => apply( {MonomialOrder, MonomialSize, VariableBaseName}, o -> o => monoidDefaults#o ))
graphRing = method( Options => options graphIdeal )
Expand Down
2 changes: 2 additions & 0 deletions M2/Macaulay2/m2/ringmap.m2
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ RingMap#AfterNoPrint = f -> (
-----------------------------------------------------------------------------
-- RingMap constructors
-----------------------------------------------------------------------------
-- TODO: support installing default ring map

Ring#id = R -> map(R, R, vars R)

Expand Down Expand Up @@ -229,6 +230,7 @@ RingMap \ List := List => (f,v) -> apply(v,x -> f x)
-----------------------------------------------------------------------------
-- kernel
-----------------------------------------------------------------------------
-- TODO: should work over ZZ

kernel = method(Options => { SubringLimit => infinity })
kernel RingMap := Ideal => opts -> (cacheValue (symbol kernel => opts)) (f -> (
Expand Down

0 comments on commit 3f547dd

Please sign in to comment.