ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 12 Nov 2016 23:47:52 -0600Lifting a matrix from $\mathbb{Q}[Y]/(Y-1)$https://ask.sagemath.org/question/35555/lifting-a-matrix-from-mathbbqyy-1/I have a matrix in $\mathbb{Q}[Y]/(Y-1)$ and want to lift it to $\mathbb{Q}[Y]$, however, I get an error:
sage: D.<Y> = QQ[]
sage: B = matrix(D, [[Y, 0]])
sage: Dbar = D.quotient(Y-1)
sage: Bbar = B.change_ring(Dbar)
sage: Bbar.lift()
Traceback (most recent call last):
...
TypeError: unable to convert 1 to a rational
Lifting single elements instead of a matrix works:
sage: Dbar(Y^2).lift()
1
Lifting a matrix from the integers modulo a prime works also:
sage: B = matrix(ZZ, [[7, 0]])
sage: Dbar = ZZ.quotient(5)
sage: Bbar = B.change_ring(Dbar)
sage: Bbar.lift()
[2 0]
So how do I lift the matrix? Building a new matrix by hand und lifting componentwise seems to be an option; however, I think that it is somewhat ugly.Clemens HeubergerSat, 12 Nov 2016 23:47:52 -0600https://ask.sagemath.org/question/35555/