Skip to content

Commit

Permalink
git grep -l '#indirec' src/sage/rings/padics | xargs sed -E -i.bak 's…
Browse files Browse the repository at this point in the history
…/#indirect doctest ?/# indirect doctest/'; git grep -l '# indirec' src/sage/rings/padics | xargs sed -E -i.bak 's/([^ ]) # indirect doctest ?/\1 # indirect doctest/'
  • Loading branch information
Matthias Koeppe committed Nov 4, 2023
1 parent a1f134f commit b28f626
Show file tree
Hide file tree
Showing 27 changed files with 174 additions and 174 deletions.
48 changes: 24 additions & 24 deletions src/sage/rings/padics/CA_template.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ cdef class CAElement(pAdicTemplateElement):
TESTS::
sage: R = ZpCA(5)
sage: a = R(17,5); a #indirect doctest
sage: a = R(17,5); a # indirect doctest
2 + 3*5 + O(5^5)
sage: a = R(75, absprec = 5, relprec = 4); a #indirect doctest
sage: a = R(75, absprec = 5, relprec = 4); a # indirect doctest
3*5^2 + O(5^5)
sage: a = R(25/9, absprec = 5); a #indirect doctest
sage: a = R(25/9, absprec = 5); a # indirect doctest
4*5^2 + 2*5^3 + O(5^5)
sage: a = R(25/9, absprec = 5, relprec = 4); a #indirect doctest
sage: a = R(25/9, absprec = 5, relprec = 4); a # indirect doctest
4*5^2 + 2*5^3 + O(5^5)
"""
IF CELEMENT_IS_PY_OBJECT:
Expand Down Expand Up @@ -145,7 +145,7 @@ cdef class CAElement(pAdicTemplateElement):
TESTS::
sage: ZpCA(5)(1).lift_to_precision(30) # indirect doctest
sage: ZpCA(5)(1).lift_to_precision(30) # indirect doctest
Traceback (most recent call last):
...
PrecisionError: precision higher than allowed by the precision cap
Expand Down Expand Up @@ -205,7 +205,7 @@ cdef class CAElement(pAdicTemplateElement):
sage: R = Zp(5, prec=10, type='capped-abs')
sage: a = R(1)
sage: -a #indirect doctest
sage: -a # indirect doctest
4 + 4*5 + 4*5^2 + 4*5^3 + 4*5^4 + 4*5^5 + 4*5^6 + 4*5^7 + 4*5^8 + 4*5^9 + O(5^10)
"""
cdef CAElement ans = self._new_c()
Expand All @@ -221,7 +221,7 @@ cdef class CAElement(pAdicTemplateElement):
EXAMPLES::
sage: R = ZpCA(13, 4)
sage: R(2) + R(3) #indirect doctest
sage: R(2) + R(3) # indirect doctest
5 + O(13^4)
sage: R(12) + R(1)
13 + O(13^4)
Expand All @@ -245,7 +245,7 @@ cdef class CAElement(pAdicTemplateElement):
EXAMPLES::
sage: R = ZpCA(13, 4)
sage: R(10) - R(10) #indirect doctest
sage: R(10) - R(10) # indirect doctest
O(13^4)
sage: R(10) - R(11)
12 + 12*13 + 12*13^2 + 12*13^3 + O(13^4)
Expand Down Expand Up @@ -277,7 +277,7 @@ cdef class CAElement(pAdicTemplateElement):
7 + 3*17 + 10*17^2 + 13*17^3 + 6*17^4 + 3*17^5 + 10*17^6 + 13*17^7
+ 6*17^8 + 3*17^9 + 10*17^10 + 13*17^11 + 6*17^12 + 3*17^13
+ 10*17^14 + 13*17^15 + 6*17^16 + 3*17^17 + 10*17^18 + 13*17^19 + O(17^20)
sage: ~R(-1) == R(-1) #indirect doctest
sage: ~R(-1) == R(-1) # indirect doctest
True
"""
return ~self.parent().fraction_field()(self)
Expand All @@ -289,7 +289,7 @@ cdef class CAElement(pAdicTemplateElement):
EXAMPLES::
sage: R = ZpCA(5)
sage: a = R(20,5); b = R(75, 4); a * b #indirect doctest
sage: a = R(20,5); b = R(75, 4); a * b # indirect doctest
2*5^3 + 2*5^4 + O(5^5)
"""
cdef CAElement right = _right
Expand Down Expand Up @@ -317,7 +317,7 @@ cdef class CAElement(pAdicTemplateElement):
EXAMPLES::
sage: R = ZpCA(13, 4)
sage: R(2) / R(3) # indirect doctest
sage: R(2) / R(3) # indirect doctest
5 + 4*13 + 4*13^2 + 4*13^3 + O(13^4)
sage: a = R(169 * 2) / R(13); a
2*13 + O(13^3)
Expand All @@ -338,9 +338,9 @@ cdef class CAElement(pAdicTemplateElement):
EXAMPLES::
sage: R = ZpCA(3, 5)
sage: R(12).quo_rem(R(2)) # indirect doctest
sage: R(12).quo_rem(R(2)) # indirect doctest
(2*3 + O(3^5), O(3^5))
sage: R(2).quo_rem(R(12)) # indirect doctest
sage: R(2).quo_rem(R(12)) # indirect doctest
(O(3^4), 2 + O(3^5))
sage: q, r = R(4).quo_rem(R(12)); q, r
(1 + 2*3 + 2*3^3 + O(3^4), 1 + O(3^5))
Expand Down Expand Up @@ -806,7 +806,7 @@ cdef class CAElement(pAdicTemplateElement):
EXAMPLES::
sage: R = ZpCA(37)
sage: R(17) == R(17+37^6) # indirect doctest
sage: R(17) == R(17+37^6) # indirect doctest
False
"""
cdef CAElement right = _right
Expand All @@ -832,7 +832,7 @@ cdef class CAElement(pAdicTemplateElement):
sage: R = ZpCA(19)
sage: a = R(19, 7); a
19 + O(19^7)
sage: a.lift_to_precision(12) # indirect doctest
sage: a.lift_to_precision(12) # indirect doctest
19 + O(19^12)
sage: a.lift_to_precision(4) is a
True
Expand Down Expand Up @@ -1125,7 +1125,7 @@ cdef class pAdicCoercion_ZZ_CA(RingHomomorphism):
EXAMPLES::
sage: f = ZpCA(5).coerce_map_from(ZZ)
sage: g = copy(f) # indirect doctest
sage: g = copy(f) # indirect doctest
sage: g == f
True
sage: g(6)
Expand All @@ -1145,7 +1145,7 @@ cdef class pAdicCoercion_ZZ_CA(RingHomomorphism):
EXAMPLES::
sage: f = ZpCA(5).coerce_map_from(ZZ)
sage: g = copy(f) # indirect doctest
sage: g = copy(f) # indirect doctest
sage: g == f
True
sage: g(6)
Expand Down Expand Up @@ -1189,7 +1189,7 @@ cdef class pAdicCoercion_ZZ_CA(RingHomomorphism):
sage: R = ZpCA(5,4)
sage: type(R(10,2))
<class 'sage.rings.padics.padic_capped_absolute_element.pAdicCappedAbsoluteElement'>
sage: R(10,2) # indirect doctest
sage: R(10,2) # indirect doctest
2*5 + O(5^2)
sage: R(10,3,1)
2*5 + O(5^2)
Expand Down Expand Up @@ -1319,7 +1319,7 @@ cdef class pAdicConvert_QQ_CA(Morphism):
EXAMPLES::
sage: f = ZpCA(5).convert_map_from(QQ)
sage: g = copy(f) # indirect doctest
sage: g = copy(f) # indirect doctest
sage: g == f # todo: comparison not implemented
True
sage: g(1/6)
Expand All @@ -1338,7 +1338,7 @@ cdef class pAdicConvert_QQ_CA(Morphism):
EXAMPLES::
sage: f = ZpCA(5).convert_map_from(QQ)
sage: g = copy(f) # indirect doctest
sage: g = copy(f) # indirect doctest
sage: g == f # todo: comparison not implemented
True
sage: g(1/6)
Expand Down Expand Up @@ -1379,7 +1379,7 @@ cdef class pAdicConvert_QQ_CA(Morphism):
sage: R = ZpCA(5,4)
sage: type(R(10/3,2))
<class 'sage.rings.padics.padic_capped_absolute_element.pAdicCappedAbsoluteElement'>
sage: R(10/3,2) # indirect doctest
sage: R(10/3,2) # indirect doctest
4*5 + O(5^2)
sage: R(10/3,3,1)
4*5 + O(5^2)
Expand Down Expand Up @@ -1490,7 +1490,7 @@ cdef class pAdicCoercion_CA_frac_field(RingHomomorphism):
sage: R.<a> = ZqCA(27, implementation='FLINT')
sage: K = R.fraction_field()
sage: f = K.coerce_map_from(R)
sage: f(a, 3) # indirect doctest
sage: f(a, 3) # indirect doctest
a + O(3^3)
sage: b = 9*a
sage: f(b, 3)
Expand Down Expand Up @@ -1685,7 +1685,7 @@ cdef class pAdicConvert_CA_frac_field(Morphism):
sage: R.<a> = ZqCA(27, implementation='FLINT')
sage: K = R.fraction_field()
sage: f = R.convert_map_from(K)
sage: f(K.gen()) # indirect doctest
sage: f(K.gen()) # indirect doctest
a + O(3^20)
"""
cdef CRElement x = _x
Expand Down Expand Up @@ -1721,7 +1721,7 @@ cdef class pAdicConvert_CA_frac_field(Morphism):
sage: R.<a> = ZqCA(27, implementation='FLINT')
sage: K = R.fraction_field()
sage: f = R.convert_map_from(K); a = K(a)
sage: f(a, 3) # indirect doctest
sage: f(a, 3) # indirect doctest
a + O(3^3)
sage: b = 9*a
sage: f(b, 3)
Expand Down
Loading

0 comments on commit b28f626

Please sign in to comment.