lalitkumarj / OMSCategory

Sage Category implementation of OMS
1 stars 1 forks source link

Bug in random families? #37

Closed rpollack9974 closed 11 years ago

rpollack9974 commented 11 years ago

Just started peeking at the families code -- not sure of the syntax yet, but this was copied from Examples.sage and failed.

sage: from sage.modular.pollack_stevens.modsym_OMS_families_space import FamiliesOfOMS sage: from sage.modular.pollack_stevens.coeffmod_OMS_families_space import FamiliesOfOverconvergentDistributions sage: p = 11 sage: DD = FamiliesOfOverconvergentDistributions(0, base_coeffs=ZpCA(p, 6), prec_cap=[6,4]) sage: MM = FamiliesOfOMS(11, 0, coefficients=DD) sage: MMR = MM.source()

sage: Phis = MM.random_element()

TypeError Traceback (most recent call last)

in () ----> 1 Phis = MM.random_element() /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym_OMS_families_space.pyc in random_element(self, M) 146 147 verbose("Solve difference equation.") --> 148 mu = t.solve_diff_eqn() 149 mu_pr = mu.precision_relative() 150 if mu_pr[0] < M[0] or mu_pr[1] < M[1]: /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/modular/pollack_stevens/coeffmod_OMS_families_element.pyc in solve_diff_eqn(self) 496 DD = self.parent() 497 D = OverconvergentDistributions(0, base=R, prec_cap=M, character=DD._character, adjuster=DD._adjuster, act_on_left=DD.action().is_left(), dettwist=DD._dettwist) --> 498 V = D.approx_module(M, self._var_prec) 499 Elem = D.Element 500 v = V([R.zero(), R.one()] + [R.zero()]*(M-2)) /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/misc/cachefunc.so in sage.misc.cachefunc.CachedMethodCaller.**call** (sage/misc/cachefunc.c:7255)() /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/misc/cachefunc.so in sage.misc.cachefunc.CachedMethod._instance_call (sage/misc/cachefunc.c:9736)() TypeError: approx_module() takes at most 2 arguments (3 given)
rharron commented 11 years ago

Yeah, I'm in the middle of updating the families code with the recent changes we've made to the non-families code, so I would expect it to fail most of the time.

rpollack9974 commented 11 years ago

Still crashing on my computer:

sage: sage: from sage.modular.pollack_stevens.modsym_OMS_families_space import FamiliesOfOMS sage: sage: from sage.modular.pollack_stevens.coeffmod_OMS_families_space import FamiliesOfOverconvergentDistributions sage: sage: p = 11 sage: sage: DD = FamiliesOfOverconvergentDistributions(0, base_coeffs=ZpCA(p, 6), prec_cap=[6,4]) sage: sage: MM = FamiliesOfOMS(11, 0, coefficients=DD) sage: sage: MMR = MM.source() sage:

sage: sage: Phis = MM.random_element()

TypeError Traceback (most recent call last)

in () ----> 1 Phis = MM.random_element() /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym_OMS_families_space.pyc in random_element(self, M) 146 147 verbose("Solve difference equation.") --> 148 mu = t.solve_diff_eqn() 149 mu_pr = mu.precision_relative() 150 if mu_pr[0] < M[0] or mu_pr[1] < M[1]: /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/modular/pollack_stevens/coeffmod_OMS_families_element.pyc in solve_diff_eqn(self) 478 def solve_diff_eqn(self): 479 #Do something about ordp --> 480 if self.is_zero(): 481 M, var_prec = self.precision_absolute() 482 V = self.parent().approx_module(0, var_prec) /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/modular/pollack_stevens/coeffmod_OMS_families_element.pyc in is_zero(self, prec) 278 elif prec[0] > aprec or prec[1] > v_aprec: 279 return False #Should this raise a PrecisionError instead --> 280 p_precs = self.parent().filtration_precisions(prec) 281 for a in xrange(prec): 282 if not self._unscaled_moment(a)._is_zero_padic_power_series([p_precs[a], prec[1]]): /Applications/sage-5.7/local/lib/python2.7/site-packages/sage/misc/cachefunc.so in sage.misc.cachefunc.CachedMethodCaller.**call** (sage/misc/cachefunc.c:7197)() TypeError: unhashable type: 'list'
rharron commented 11 years ago

Well, I just fixed that bug, but there are probably others since I haven't yet made it to fixing up the random families code. One thing that needs to be figured out before I can rewrite this function is the valuation (or an upper bound on it) of K[0] - 1 or K[1] as the case may be. Can you look into this Rob?

rpollack9974 commented 11 years ago

will do.

rpollack9974 commented 11 years ago

see issue #39

rharron commented 11 years ago

The bugs here have been fixed, so closing.