1 | from sage.misc.randstate import set_random_seed |
---|

2 | from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space |
---|

3 | |
---|

4 | def test(seed): |
---|

5 | r""" |
---|

6 | Doctest in ``modular/pollack_stevens/modsym.py`` lines 719-730 |
---|

7 | |
---|

8 | With ``seed=0`` we obtain ``True`` followed by ``False`` and for ``seed=1`` |
---|

9 | we obtain ``False`` followed by ``True`` |
---|

10 | """ |
---|

11 | set_random_seed(seed) |
---|

12 | f = Newforms(32, 8, names='a')[1] |
---|

13 | print("f = {}".format(f)) |
---|

14 | K = f.hecke_eigenvalue_field() |
---|

15 | print("K = {}".format(K)) |
---|

16 | a = f[3] |
---|

17 | print("a = {}".format(a)) |
---|

18 | phi = ps_modsym_from_simple_modsym_space(f.modular_symbols(1)) |
---|

19 | print phi.is_ordinary(K.ideal(3, 1/16*a + 3/2)) |
---|

20 | print phi.is_ordinary(K.ideal(3, 1/16*a + 5/2)) |
---|