From 536af0abeb5ce7cf68cb42a77e144cdd2e4f224c Mon Sep 17 00:00:00 2001 From: Colin Alstad Date: Thu, 7 Dec 2023 13:41:31 -0500 Subject: [PATCH] Fix bug in handling zeros --- Valuations/Valuations.m2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Valuations/Valuations.m2 b/Valuations/Valuations.m2 index 313ebdfe..e9da2eaf 100644 --- a/Valuations/Valuations.m2 +++ b/Valuations/Valuations.m2 @@ -77,11 +77,12 @@ internalValuation (Function, Thing, Thing) := (v, S, T) -> ( } ) +-- Concerns with subrings and local rings, will need testing. Valuation Thing := (v,t) -> ( if (v#"domain" === null) or (ring t) === v#"domain" then - -- Concerns with comparing things like ZZ and QQ - -- Concerns with subrings and local rings, will need testing. - v#"function" t + v#"function" t + else if (isMember(ring t, v#"domain".baseRings)) then + v#"function" promote(t, v#"domain") ) --------------------------------------------------------------------------------