Ask Your Question
1

Lifting a matrix from $\mathbb{Q}[Y]/(Y-1)$

asked 2016-11-13 06:47:52 +0100

Clemens Heuberger gravatar image

updated 2023-01-09 23:59:41 +0100

tmonteil gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-11-13 14:10:35 +0100

slelievre gravatar image

This bug boils down to the following more elementary problem.

sage: D.<Y> = QQ[]
sage: Dbar = D.quotient(Y-1)
sage: one = Dbar.one()
sage: one
1
sage: D(one)
Traceback (most recent call last)
...
TypeError: unable to convert 1 to a rational

A workaround for your use case is as follows.

Instead of

sage: Bbar.lift()

use the following

sage: Bbar.apply_map(Dbar.lift)
[1 0]

You can check that it lives in the correct matrix space:

sage: _.parent()
Full MatrixSpace of 1 by 2 dense matrices over Univariate Polynomial Ring in Y over Rational Field
edit flag offensive delete link more

Comments

Thank you, the work-around works for me. Is the underlying problem a known bug or shall I create a ticket?

Clemens Heuberger gravatar imageClemens Heuberger ( 2017-01-04 14:40:30 +0100 )edit

@Clemens Heuberger: not sure, I have searched neither Sage trac nor Sage lists for it.

slelievre gravatar imageslelievre ( 2017-01-04 19:17:25 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-11-13 06:47:52 +0100

Seen: 485 times

Last updated: Nov 13 '16