Ticket #22970: test_file.sage

File test_file.sage, 730 bytes (added by vdelecroix, 3 years ago)
Line 
1from sage.misc.randstate import set_random_seed
2from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space
3
4def 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))