Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Using partial pivoting resulted in many more accurate results for p-a…
Browse files Browse the repository at this point in the history
…dic modular forms

Here I have changed the doctests in padic modular forms to match the more accurate results
In addition, there was a slight bug in the doctest of matrix2.pyx due to indentation issues, which is now fixed.
  • Loading branch information
assaferan committed Apr 4, 2018
1 parent db5591c commit a380cf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/sage/matrix/matrix2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6652,9 +6652,9 @@ cdef class Matrix(Matrix1):
[ 5 * 18 + O(5^5) 398 + O(5^5) 2483 + O(5^5)]
sage: K = R.fraction_field()
sage: A.change_ring(K).augment(identity_matrix(K,3)).echelon_form()
[1 + O(5^5) O(5^5) O(5^5) 5 * 212 + O(5^5) 3031 + O(5^5) 2201 + O(5^5)]
[ O(5^5) 1 + O(5^5) O(5^5) 1348 + O(5^5) 5 * 306 + O(5^5) 2648 + O(5^5)]
[ O(5^5) O(5^5) 1 + O(5^5) 1987 + O(5^5) 5 * 263 + O(5^5) 154 + O(5^5)]
[ 1 + O(5^5) O(5^5) O(5^5) 5 * 212 + O(5^5) 3031 + O(5^5) 2201 + O(5^5)]
[ O(5^5) 1 + O(5^5) O(5^5) 1348 + O(5^5) 5 * 306 + O(5^5) 2648 + O(5^5)]
[ O(5^5) O(5^5) 1 + O(5^5) 1987 + O(5^5) 5 * 263 + O(5^5) 154 + O(5^5)]

Echelon form is not defined over arbitrary rings::

Expand Down
18 changes: 9 additions & 9 deletions src/sage/modular/btquotients/pautomorphicform.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ def _compute_element(self):
sage: X = BruhatTitsQuotient(3,17)
sage: H = X.harmonic_cocycles(2,prec=10)
sage: H.basis()[0]._compute_element()
(1 + O(3^9), O(3^9), 0)
(1 + O(3^10), O(3^10), 0)
sage: H.basis()[1]._compute_element()
(0, 1 + O(3^9), 0)
(0, 1 + O(3^10), 0)
sage: H.basis()[2]._compute_element()
(0, O(3^9), 1 + O(3^10))
(0, O(3^10), 1 + O(3^10))
"""
R = self._R
A = self.parent().basis_matrix().transpose()
Expand Down Expand Up @@ -556,13 +556,13 @@ def modular_form(self, z=None, level=0):
sage: b = H.basis()[0]
sage: R.<a> = Qq(9,prec=10)
sage: x1 = b.modular_form(a,level = 0); x1
a + (2*a + 1)*3 + (a + 1)*3^2 + (a + 1)*3^3 + 3^4 + (a + 2)*3^5 + O(3^7)
a + (2*a + 1)*3 + (a + 1)*3^2 + (a + 1)*3^3 + 3^4 + (a + 2)*3^5 + a*3^7 + O(3^8)
sage: x2 = b.modular_form(a,level = 1); x2
a + (a + 2)*3 + (2*a + 1)*3^3 + (2*a + 1)*3^4 + 3^5 + (a + 2)*3^6 + O(3^7)
a + (a + 2)*3 + (2*a + 1)*3^3 + (2*a + 1)*3^4 + 3^5 + (a + 2)*3^6 + a*3^7 + O(3^8)
sage: x3 = b.modular_form(a,level = 2); x3
a + (a + 2)*3 + (2*a + 2)*3^2 + 2*a*3^4 + (a + 1)*3^5 + 3^6 + O(3^7)
a + (a + 2)*3 + (2*a + 2)*3^2 + 2*a*3^4 + (a + 1)*3^5 + 3^6 + O(3^8)
sage: x4 = b.modular_form(a,level = 3);x4
a + (a + 2)*3 + (2*a + 2)*3^2 + (2*a + 2)*3^3 + 2*a*3^5 + a*3^6 + O(3^7)
a + (a + 2)*3 + (2*a + 2)*3^2 + (2*a + 2)*3^3 + 2*a*3^5 + a*3^6 + (a + 2)*3^7 + O(3^8)
sage: (x4-x3).valuation()
3
Expand Down Expand Up @@ -628,9 +628,9 @@ def derivative(self, z=None, level=0, order=1):
sage: b.modular_form(a,level=0) == b.derivative(a,level=0,order=0)
True
sage: b.derivative(a,level=1,order=1)
(2*a + 2)*3 + (a + 2)*3^2 + 2*a*3^3 + O(3^4)
(2*a + 2)*3 + (a + 2)*3^2 + 2*a*3^3 + 2*3^4 + O(3^5)
sage: b.derivative(a,level=2,order=1)
(2*a + 2)*3 + 2*a*3^2 + 3^3 + O(3^4)
(2*a + 2)*3 + 2*a*3^2 + 3^3 + a*3^4 + O(3^5)
"""
def F(z):
Expand Down

0 comments on commit a380cf9

Please sign in to comment.