diff --git a/M2/Macaulay2/m2/quotring.m2 b/M2/Macaulay2/m2/quotring.m2 index ec946cd15e..793b78b18d 100644 --- a/M2/Macaulay2/m2/quotring.m2 +++ b/M2/Macaulay2/m2/quotring.m2 @@ -281,7 +281,7 @@ char QuotientRing := (stashValue symbol char) ((S) -> ( g := generators gb relns; if g == 0 then return char ring g; m := g_(0,0); - if liftable(m,ZZ) then lift(m,ZZ) else 0)) + lift(m,ZZ,Verify=>false) ?? 0)) singularLocus = method() singularLocus(Ring) := QuotientRing => (R) -> ( diff --git a/M2/Macaulay2/m2/rationals.m2 b/M2/Macaulay2/m2/rationals.m2 index 50b35d00b2..849b048e8a 100644 --- a/M2/Macaulay2/m2/rationals.m2 +++ b/M2/Macaulay2/m2/rationals.m2 @@ -50,7 +50,6 @@ assert (hash ZZ < hash QQ) lift(QQ,ZZ) := opts -> (r,o) -> if denominator r === 1 then numerator r else if opts.Verify then error "rational number is not an integer" liftable(QQ,ZZ) := (r,o) -> denominator r === 1 lift(QQ,QQ) := opts -> (r,QQ) -> r -liftable(QQ,QQ) := (QQ,QQ) -> true QQ.degreeLength = 0 isUnit Number := x -> x != 0 diff --git a/M2/Macaulay2/m2/rings.m2 b/M2/Macaulay2/m2/rings.m2 index 5c79e2d681..48f77242c2 100644 --- a/M2/Macaulay2/m2/rings.m2 +++ b/M2/Macaulay2/m2/rings.m2 @@ -90,12 +90,13 @@ toExternalString Ring := toString @@ describe -- promote, lift, liftable, and isConstant ----------------------------------------------------------------------------- +-- TODO rename isLiftable; currently impossible due to conflict with Varieties::isLiftable -- some remnants from lift and promote, version 2 liftable = method(TypicalValue => Boolean, Dispatch => {Thing, Type, Type}) liftable(Number, Number) := liftable(Number, RingElement) := liftable(RingElement, Number) := -liftable(RingElement, RingElement) := (f, R) -> null =!= lift(f, R, Verify => false) +liftable(RingElement, RingElement) := (f, R) -> lookup(lift,class f,R) =!= null and null =!= lift(f, R, Verify => false) isConstant = method(TypicalValue => Boolean) isConstant RingElement := r -> liftable(r, coefficientRing ring r) diff --git a/M2/Macaulay2/packages/Macaulay2Doc/functions/liftable-doc.m2 b/M2/Macaulay2/packages/Macaulay2Doc/functions/liftable-doc.m2 index 377db380fd..1e8130d689 100644 --- a/M2/Macaulay2/packages/Macaulay2Doc/functions/liftable-doc.m2 +++ b/M2/Macaulay2/packages/Macaulay2Doc/functions/liftable-doc.m2 @@ -6,7 +6,7 @@ undocumented {(liftable, Number, Number), (liftable, Number, RingElement), (liftable, RingElement, Number), (liftable, RingElement, RingElement), - (liftable, QQ, QQ), (liftable, QQ, ZZ), + (liftable, QQ, ZZ), (lift, Matrix, InexactNumber), (lift,Matrix,InexactNumber'),(lift, Number, InexactNumber), (liftable, Number, InexactNumber),