Opened 3 years ago

Closed 2 years ago

#29246 closed enhancement (fixed)

Improve handling of easy cases in lift_to_sl2z()

Reported by: Peter Bruin Owned by:
Priority: minor Milestone: sage-9.3
Component: modular forms Keywords:
Cc: Merged in:
Authors: Peter Bruin Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: bcc2c19 (Commits, GitHub, GitLab) Commit: bcc2c19e52f9c9c4c56e271028cd73feaca48450
Dependencies: Stopgaps:

Status badges

Description

The function lift_to_sl2z(c, d, N) returns larger coefficients than needed in the cases c = 0 or d = 0. Also, the (trivial) case N = 1 is not treated correctly.

Before:

sage: lift_to_sl2z(0, 41, 42)
[-1, -2, 42, 83]
sage: lift_to_sl2z(0, 5, 42)
[17, 19, 42, 47]
sage: lift_to_sl2z(5, 0, 42)
[-2, -101, 5, 252]
sage: lift_to_sl2z(0, 0, 1)
Traceback (most recent call last):
...
AttributeError: Element (0, 0) not in P1.

After:

sage: lift_to_sl2z(0, 41, 42)
[-1, 0, 0, -1]
sage: lift_to_sl2z(0, 5, 42)
[17, 2, 42, 5]
sage: lift_to_sl2z(5, 0, 42)
[-2, -17, 5, 42]
sage: lift_to_sl2z(0, 0, 1)
[1, 0, 0, 1]

Change History (5)

comment:1 Changed 3 years ago by Peter Bruin

Branch: u/pbruin/29246-lift_to_sl2z
Commit: bcc2c19e52f9c9c4c56e271028cd73feaca48450
Status: newneeds_review

comment:2 Changed 3 years ago by Matthias Köppe

Milestone: sage-9.1sage-9.2

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

comment:3 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:4 Changed 2 years ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok, let it be

comment:5 Changed 2 years ago by Volker Braun

Branch: u/pbruin/29246-lift_to_sl2zbcc2c19e52f9c9c4c56e271028cd73feaca48450
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.