liftable for matrices

3 views
Skip to first unread message

René Birkner

unread,
Nov 11, 2009, 11:33:07 AM11/11/09
to Macaulay2
Hi,

I would really like to have the following method for liftable:

liftable(Matrix,ZZ) to check if a matrix is in fact a matrix over ZZ

Right now I use my own silly code:

liftable (Matrix,ZZ) := (M,R) -> all(flatten entries M, e -> liftable
(e,R))


Thanks
René

Daniel R. Grayson

unread,
Nov 11, 2009, 2:12:16 PM11/11/09
to maca...@googlegroups.com
You could do it this way, until we add code to do it the right way:

i1 : R = ZZ[x]

o1 = R

o1 : PolynomialRing

i2 : f = vars R

o2 = | x |

i7 : liftable(Matrix,Number) := (f,k) -> try (lift(f,k); true) else
false;

i8 : liftable(f,ZZ)

o8 = false

i9 : liftable(f-f,ZZ)

o9 = true
Reply all
Reply to author
Forward
0 new messages