Open rpollack9974 opened 11 years ago
OK. I think I fixed this. I changed the line where t's precision is decreased by k_val + gam_shift to simply decreasing t's precision to _prec_for_solve_diff_eqn(M, p).
The above code works. Does this change seem okay?
The below code crashes. The problem appears to be that when the distribution err is created and coerced into CM the accuracy of the 1-st moment is lower than expected and so this coercion creates a distribution with too little accuracy.
sage: set_verbose(1) sage: D = OverconvergentDistributions(6,3,5) sage: MS = OverconvergentModularSymbols(11,coefficients=D) sage: Phi = MS.random_element() verbose 1 (134: modsym_OMS_space.py, random_element) There is a non-torsion generator verbose 1 (134: modsym_OMS_space.py, random_element) Working with precision 9 (M, p, k, gam_shift) = (5, 3, 6, 1) verbose 1 (134: modsym_OMS_space.py, random_element) M_in, new base ring R = 9, 3-adic Ring with capped absolute precision 9 verbose 1 (134: modsym_OMS_space.py, random_element) t after first random choices: (3^2 + 2_3^5 + 3^7 + 2_3^8 + O(3^9), 2 + 2_3 + 3^2 + 3^5 + 2_3^6 + 3^7 + O(3^8), 2 + 2_3 + 2_3^2 + 3^4 + 3^5 + O(3^7), 2 + 3 + 3^2 + 2_3^3 + 2_3^4 + 2_3^5 + O(3^6), 3 + 2_3^2 + 3^3 + 2_3^4 + O(3^5), 1 + 2_3 + 2_3^2 + 3^3 + O(3^4), 1 + 3^2 + O(3^3), 1 + O(3^2), 1 + O(3)) verbose 1 (134: modsym_OMS_space.py, random_element) err is: (O(3^8), 2 + 2_3^2 + 3^3 + 2_3^4 + 3^5 + O(3^7), O(3^6), O(3^5), O(3^4), O(3^3), O(3^2), O(3)) verbose 1 (134: modsym_OMS_space.py, random_element) The parent of this dist is Space of 3-adic distributions with k=6 action and precision cap 9 verbose 1 (134: modsym_OMS_space.py, random_element) Before adjusting: 0, (O(3^8), 2 + 2_3^3 + 3^4 + 2_3^5 + 3^6 + O(3^7), 1 + 2_3 + 3^4 + 2_3^5 + O(3^6), 2 + 3^2 + 3^3 + O(3^5), 1 + 3^3 + O(3^4), 2 + 3 + O(3^3), 1 + 2_3 + O(3^2), O(3)) verbose 1 (134: modsym_OMS_space.py, random_element) Shift before mu = 0 verbose 1 (134: modsym_OMS_space.py, random_element) About to solve diff_eqn with 0, (O(3^8), 2 + 2_3^3 + 3^4 + 2_3^5 + 3^6 + O(3^7), 1 + 2_3 + 3^4 + 2_3^5 + O(3^6), 2 + 3^2 + 3^3 + O(3^5), 1 + 3^3 + O(3^4), 2 + 3 + O(3^3)) verbose 1 (134: modsym_OMS_space.py, random_element) After normalize: About to solve diff_eqn with 0, (O(3^6), 2 + 2_3^3 + 3^4 + O(3^5), 1 + 2_3 + O(3^4), 2 + 3^2 + O(3^3), 1 + O(3^2), 2 + O(3)) verbose 1 (134: modsym_OMS_space.py, random_element) Check difference equation (right after): 3^4 * () verbose 1 (134: modsym_OMS_space.py, random_element) mu_val, mu_ordp, mu_moments and mu: 0, 0, (2 + 2_3^3 + O(3^4), 1 + 2_3 + 3^2 + O(3^3), 2 + 3 + O(3^2), 1 + O(3)), (2 + 2_3^3 + O(3^4), 1 + 2_3 + 3^2 + O(3^3), 2 + 3 + O(3^2), 1 + O(3)) verbose 1 (134: modsym_OMS_space.py, random_element) Desired M, mu's M: 5, 4
verbose 1 (134: modsym_OMS_space.py, random_element) mu.ordp, mu._moments and mu: 0, (2 + 2_3^3 + O(3^4), 1 + 2_3 + 3^2 + O(3^3), 2 + 3 + O(3^2), 1 + O(3)), (2 + 2_3^3 + O(3^4), 1 + 2_3 + 3^2 + O(3^3), 2 + 3 + O(3^2), 1 + O(3))
ValueError Traceback (most recent call last)