| 172 | | sage: cm_j_invariants(QuadraticField(-1, 'i')) |
| | 172 | sage: cm_j_invariants(QuadraticField(-1, 'i')) |
| | 173 | [0, 54000, -12288000, 1728, 287496, -3375, 16581375, 8000, -32768, -884736, -884736000, -147197952000, -262537412640768000] |
| | 174 | |
| | 175 | Over real quadratic fields there may be more:: |
| | 176 | |
| | 177 | sage: cm_j_invariants(QuadraticField(5, 'a')) |
| | 178 | [0, 54000, -12288000, 1728, 287496, -3375, 16581375, 8000, -32768, -884736, -884736000, -147197952000, -262537412640768000, 282880*a + 632000, -282880*a + 632000, 95178240*a + 212846400, -95178240*a + 212846400, 85995/2*a - 191025/2, -85995/2*a - 191025/2, 16554983445/2*a + 37018076625/2, -16554983445/2*a + 37018076625/2, 26378240*a - 58982400, -26378240*a - 58982400, 95673435586560*a - 213932305612800, -95673435586560*a - 213932305612800, 184068066743177379840*a - 411588709724712960000, -184068066743177379840*a - 411588709724712960000] |
| | 179 | |
| | 180 | Over fields of higher degree this is not yet implemented:: |
| | 181 | |
| | 182 | sage: K.<a> = NumberField(x^3-2) |
| | 183 | sage: cm_j_invariants(K) |
| 204 | | [(-3, 3, -12288000), (-3, 2, 54000), (-3, 1, 0), (-4, 2, 287496), (-4, 1, 1728), (-7, 2, 16581375), (-7, 1, -3375), (-8, 1, 8000), (-11, 1, -32768), (-19, 1, -884736), (-43, 1, -884736000), (-67, 1, -147197952000), (-163, 1, -262537412640768000)] |
| | 215 | [(-3, 1, 0), (-3, 2, 54000), (-3, 3, -12288000), (-4, 1, 1728), (-4, 2, 287496), (-7, 1, -3375), (-7, 2, 16581375), (-8, 1, 8000), (-11, 1, -32768), (-19, 1, -884736), (-43, 1, -884736000), (-67, 1, -147197952000), (-163, 1, -262537412640768000)] |
| 206 | | :: |
| | 217 | Over an imaginary quadratic field there are no more than over `QQ`:: |
| | 218 | |
| | 219 | sage: cm_j_invariants_and_orders(QuadraticField(-1, 'i')) |
| | 220 | [(-3, 1, 0), (-3, 2, 54000), (-3, 3, -12288000), (-4, 1, 1728), (-4, 2, 287496), (-7, 1, -3375), (-7, 2, 16581375), (-8, 1, 8000), (-11, 1, -32768), (-19, 1, -884736), (-43, 1, -884736000), (-67, 1, -147197952000), (-163, 1, -262537412640768000)] |
| | 221 | |
| | 222 | Over real quadratic fields there may be more:: |
| | 223 | |
| | 224 | sage: cm_j_invariants_and_orders(QuadraticField(5,'a')) |
| | 225 | [(-3, 1, 0), (-3, 2, 54000), (-3, 3, -12288000), (-4, 1, 1728), (-4, 2, 287496), (-7, 1, -3375), (-7, 2, 16581375), (-8, 1, 8000), (-11, 1, -32768), (-19, 1, -884736), (-43, 1, -884736000), (-67, 1, -147197952000), (-163, 1, -262537412640768000), (-20, 1, 282880*a + 632000), (-20, 1, -282880*a + 632000), (-40, 1, 95178240*a + 212846400), (-40, 1, -95178240*a + 212846400), (-15, 1, 85995/2*a - 191025/2), (-15, 1, -85995/2*a - 191025/2), (-15, 2, 16554983445/2*a + 37018076625/2), (-15, 2, -16554983445/2*a + 37018076625/2), (-35, 1, 26378240*a - 58982400), (-35, 1, -26378240*a - 58982400), (-115, 1, 95673435586560*a - 213932305612800), (-115, 1, -95673435586560*a - 213932305612800), (-235, 1, 184068066743177379840*a - 411588709724712960000), (-235, 1, -184068066743177379840*a - 411588709724712960000)] |
| | 226 | |
| | 227 | sage: [(D,f) for D,f,j in cm_j_invariants_and_orders(QuadraticField(5,'a')) if j not in QQ] |
| | 228 | [(-20, 1), (-20, 1), (-40, 1), (-40, 1), (-15, 1), (-15, 1), (-15, 2), (-15, 2), (-35, 1), (-35, 1), (-115, 1), (-115, 1), (-235, 1), (-235, 1)] |
| | 229 | |
| | 230 | Over fields of higher degree this is not yet implemented:: |
| 215 | 241 | T = [ (0,-3, 1), (54000,-3,2), (-12288000, -3,3), (1728,-1, 1), \ |
| 216 | 242 | (287496,-1, 2), (-3375,-7,1), (16581375, -7, 2), (8000,-2,1), \ |
| 217 | 243 | (-32768, -11, 1), (-884736, -19,1), (-884736000,-43,1),\ |
| | 250 | if K.degree()==2: |
| | 251 | # Below we use that the imaginary quadratic orders of class number 2 are the |
| | 252 | # maximal orders in Q(sqrt(-d)) for d in |
| | 253 | # [-5,-6,-10,-13,-15,-22,-35,-37,-51,-58,-91,-115,-123,-187,-235,-267,-403,-427] |
| | 254 | # and the order of index 2 in Q(sqrt(-15)). [Reference: many |
| | 255 | # places including J E Cremona, Abelian Varieties with Extra |
| | 256 | # Twist, Cusp Forms, and Elliptic Curves Over Imaginary |
| | 257 | # Quadratic Fields, Journal of the London Mathematical Society |
| | 258 | # 45 (1992) 402-416.] |
| | 259 | |
| | 260 | def data_for_discriminant(d): |
| | 261 | D = d if d%4 == 1 else 4*d |
| | 262 | for j in hilbert_class_polynomial(D).roots(K,multiplicities=False): |
| | 263 | yield (Integer(D), Integer(1), j) |
| | 264 | # the only non-maximal order of class number 2 is for d == -15 |
| | 265 | if d == -15: |
| | 266 | for j in hilbert_class_polynomial(-60).roots(K,multiplicities=False): |
| | 267 | yield (Integer(-15), Integer(2), j) |
| | 268 | |
| | 269 | # list the discriminants of class number 2: |
| | 270 | dlist = [-5,-6,-10,-13,-15,-22,-35,-37,-51,-58,-91,-115,-123,-187,-235,-267,-403,-427] |
| | 271 | return sum((list(data_for_discriminant(d)) for d in dlist), cm_j_invariants_and_orders(QQ)) |
| | 272 | |
| | 273 | raise NotImplementedError, "Enumeration of CM j-invariants over fields of degree %s not yet implemented"%K.degree() |
| | 274 | # If you want to implement this in general, see the remarks at trac 11220. |