Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sage/calculus/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ def integral(f, *args, **kwds):
`(1,1)`::

sage: t = var('t')
sage: (x,y) = (t^4,t)
sage: (dx,dy) = (diff(x,t), diff(y,t))
sage: x, y = t^4, t
sage: dx, dy = diff(x,t), diff(y,t)
sage: integral(sin(x)*dx, t,-1, 1)
0
sage: restore('x,y') # restore the symbolic variables x and y
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/algebra_functor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
product of the corresponding elements of the group, and the unit of
the group algebra is indexed by the unit of the group::

sage: (s, t) = A.algebra_generators()
sage: s, t = A.algebra_generators()
sage: s*t
(1,2)
sage: A.one_basis()
Expand Down
4 changes: 2 additions & 2 deletions src/sage/categories/coalgebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def coproduct_on_basis(self, i):
An example of Hopf algebra with basis:
the group algebra of the Dihedral group of order 6
as a permutation group over Rational Field
sage: (a, b) = A._group.gens() # needs sage.groups sage.modules
sage: a, b = A._group.gens() # needs sage.groups sage.modules
sage: A.coproduct_on_basis(a) # needs sage.groups sage.modules
B[(1,2,3)] # B[(1,2,3)]
"""
Expand Down Expand Up @@ -120,7 +120,7 @@ def counit_on_basis(self, i):
An example of Hopf algebra with basis:
the group algebra of the Dihedral group of order 6
as a permutation group over Rational Field
sage: (a, b) = A._group.gens() # needs sage.groups sage.modules
sage: a, b = A._group.gens() # needs sage.groups sage.modules
sage: A.counit_on_basis(a) # needs sage.groups sage.modules
1
"""
Expand Down
8 changes: 4 additions & 4 deletions src/sage/categories/examples/hopf_algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def product_on_basis(self, g1, g2):
EXAMPLES::

sage: A = HopfAlgebrasWithBasis(QQ).example()
sage: (a, b) = A._group.gens()
sage: a, b = A._group.gens()
sage: a*b
(1,2)
sage: A.product_on_basis(a, b)
Expand Down Expand Up @@ -107,7 +107,7 @@ def coproduct_on_basis(self, g):
EXAMPLES::

sage: A = HopfAlgebrasWithBasis(QQ).example()
sage: (a, b) = A._group.gens()
sage: a, b = A._group.gens()
sage: A.coproduct_on_basis(a)
B[(1,2,3)] # B[(1,2,3)]
"""
Expand All @@ -123,7 +123,7 @@ def counit_on_basis(self, g):
EXAMPLES::

sage: A = HopfAlgebrasWithBasis(QQ).example()
sage: (a, b) = A._group.gens()
sage: a, b = A._group.gens()
sage: A.counit_on_basis(a)
1
"""
Expand All @@ -138,7 +138,7 @@ def antipode_on_basis(self, g):
EXAMPLES::

sage: A = HopfAlgebrasWithBasis(QQ).example()
sage: (a, b) = A._group.gens()
sage: a, b = A._group.gens()
sage: A.antipode_on_basis(a)
B[(1,3,2)]
"""
Expand Down
6 changes: 3 additions & 3 deletions src/sage/categories/filtered_modules_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def is_homogeneous(self):

sage: # needs sage.combinat sage.modules
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: (x, y) = (S[2], S[3])
sage: x, y = S[2], S[3]
sage: (3*x).is_homogeneous()
True
sage: (x^3 - y^2).is_homogeneous()
Expand Down Expand Up @@ -815,7 +815,7 @@ def homogeneous_degree(self):

sage: # needs sage.combinat sage.modules
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: (x, y) = (S[2], S[3])
sage: x, y = S[2], S[3]
sage: x.homogeneous_degree()
2
sage: (x^3 + 4*y^2).homogeneous_degree()
Expand Down Expand Up @@ -888,7 +888,7 @@ def maximal_degree(self):

sage: # needs sage.combinat sage.modules
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: (x, y) = (S[2], S[3])
sage: x, y = S[2], S[3]
sage: x.maximal_degree()
2
sage: (x^3 + 4*y^2).maximal_degree()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/simplicial_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def cover(self, character):
sage: S1_.n_cells(1)[0].rename("sigma_1'")
sage: W = S1.wedge(S1_)
sage: G = CyclicPermutationGroup(3)
sage: (a, b) = W.n_cells(1)
sage: a, b = W.n_cells(1)
sage: C = W.cover({a : G.gen(0), b : G.gen(0)^2})
sage: C.face_data()
{(*, ()): None,
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/dyck_word.py
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,7 @@ def characteristic_symmetric_function(self, q=None,
EXAMPLES::

sage: R = QQ['q','t'].fraction_field()
sage: (q,t) = R.gens()
sage: q, t = R.gens()
sage: f = sum(t**D.area() * D.characteristic_symmetric_function() # needs sage.modules
....: for D in DyckWords(3)); f
(q^3+q^2*t+q*t^2+t^3+q*t)*s[1, 1, 1] + (q^2+q*t+t^2+q+t)*s[2, 1] + s[3]
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/ncsf_qsym/generic_basis_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ def degree(self):
EXAMPLES::

sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: (x, y) = (S[2], S[3])
sage: x, y = S[2], S[3]
sage: x.degree()
2
sage: (x^3 + 4*y^2).degree()
Expand All @@ -960,7 +960,7 @@ def degree(self):
::

sage: F = QuasiSymmetricFunctions(QQ).F()
sage: (x, y) = (F[2], F[3])
sage: x, y = F[2], F[3]
sage: x.degree()
2
sage: (x^3 + 4*y^2).degree()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/parking_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ def characteristic_quasisymmetric_function(self, q=None,

sage: # needs sage.modules
sage: R = QQ['q','t'].fraction_field()
sage: (q,t) = R.gens()
sage: q, t = R.gens()
sage: cqf = sum(t**PF.area() * PF.characteristic_quasisymmetric_function()
....: for PF in ParkingFunctions(3)); cqf
(q^3+q^2*t+q*t^2+t^3+q*t)*F[1, 1, 1] + (q^2+q*t+t^2+q+t)*F[1, 2]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/sf/hall_littlewood.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def P(self):
Transitions between bases with the parameter `t` specialized::

sage: Sym = SymmetricFunctions(FractionField(QQ['y','z']))
sage: (y,z) = Sym.base_ring().gens()
sage: y, z = Sym.base_ring().gens()
sage: HLy = Sym.hall_littlewood(t=y)
sage: HLz = Sym.hall_littlewood(t=z)
sage: Qpy = HLy.Qp()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/sf/jack.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def P(self):
::

sage: Sym = SymmetricFunctions(QQ['a','b'].fraction_field())
sage: (a,b) = Sym.base_ring().gens()
sage: a, b = Sym.base_ring().gens()
sage: Jacka = Sym.jack(t=a)
sage: Jackb = Sym.jack(t=b)
sage: m = Sym.monomial()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/sf/llt.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class LLT_class(UniqueRepresentation):
We require that the parameter `t` must be in the base ring::

sage: Symxt = SymmetricFunctions(QQ['x','t'].fraction_field())
sage: (x,t) = Symxt.base_ring().gens()
sage: x, t = Symxt.base_ring().gens()
sage: LLT3x = Symxt.llt(3,t=x)
sage: LLT3 = Symxt.llt(3)
sage: HS3x = LLT3x.hspin()
Expand Down
8 changes: 4 additions & 4 deletions src/sage/combinat/sf/macdonald.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ def _s_to_self(self, x):
sage: s = Sym.s()
sage: H(s[1,1])
-(1/(q*t-1))*McdH[1, 1] + (t/(q*t-1))*McdH[2]
sage: (q,t) = Sym.base_ring().gens()
sage: q, t = Sym.base_ring().gens()
sage: H(q*s[1, 1, 1] + (q*t+1)*s[2, 1] + t*s[3])
McdH[2, 1]
sage: H2 = Sym.macdonald(t=0).H()
Expand Down Expand Up @@ -1379,7 +1379,7 @@ def _m_to_self( self, f ):
sage: m = Sym.m()
sage: H(m[1,1])
-(1/(q*t-1))*McdH[1, 1] + (t/(q*t-1))*McdH[2]
sage: (q,t) = Sym.base_ring().gens()
sage: q, t = Sym.base_ring().gens()
sage: H((2*q*t+q+t+2)*m[1, 1, 1] + (q*t+t+1)*m[2, 1] + t*m[3])
McdH[2, 1]

Expand Down Expand Up @@ -1601,7 +1601,7 @@ def _m_to_self( self, f ):
sage: m = Sym.m()
sage: Ht(m[1,1])
(1/(-q+t))*McdHt[1, 1] - (1/(-q+t))*McdHt[2]
sage: (q,t) = Sym.base_ring().gens()
sage: q, t = Sym.base_ring().gens()
sage: Ht((q*t+2*q+2*t+1)*m[1, 1, 1] + (q+t+1)*m[2, 1] + m[3])
McdHt[2, 1]

Expand Down Expand Up @@ -1834,7 +1834,7 @@ def _creation_by_determinant_helper(self, k, part):
sage: a._creation_by_determinant_helper(2,[1])
(q^3*t-q^2*t-q+1)*McdS[2, 1] + (q^3-q^2*t-q+t)*McdS[3]
"""
(q,t) = QQqt.gens()
q, t = QQqt.gens()
from sage.combinat.sf.sf import SymmetricFunctions
S = SymmetricFunctions(QQqt).macdonald().S()

Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/sf/sf.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ class function on the symmetric group where the elements
Here is an example of its use::

sage: QQqt = QQ['q','t'].fraction_field()
sage: (q,t) = QQqt.gens()
sage: q, t = QQqt.gens()
sage: st = SFA_st(SymmetricFunctions(QQqt),t)
sage: st
Symmetric Functions over Fraction Field of Multivariate Polynomial
Expand Down Expand Up @@ -1253,7 +1253,7 @@ def macdonald(self, q='q', t='t'):
q^2*s[1, 1, 1, 1] + (q^2*t+q*t+q)*s[2, 1, 1] + (q^2*t^2+1)*s[2, 2] + (q*t^2+q*t+t)*s[3, 1] + t^2*s[4]

sage: Sym = SymmetricFunctions(QQ['z','q'].fraction_field())
sage: (z,q) = Sym.base_ring().gens()
sage: z, q = Sym.base_ring().gens()
sage: Hzq = Sym.macdonald(q=z,t=q).H()
sage: H1z = Sym.macdonald(q=1,t=z).H()
sage: s = Sym.schur()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/sf/sfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -5158,7 +5158,7 @@ def scalar_qt(self, x, q=None, t=None):
-q^3 + 2*q^2 - 2*q + 1
sage: a.scalar_qt(a,5,7) # q=5 and t=7
490/1539
sage: (x,y) = var('x,y') # needs sage.symbolic
sage: x, y = var('x,y') # needs sage.symbolic
sage: a.scalar_qt(a, q=x, t=y) # needs sage.symbolic
1/3*(x^3 - 1)/(y^3 - 1) + 2/3*(x - 1)^3/(y - 1)^3
sage: Rn = QQ['q','t','y','z'].fraction_field()
Expand Down
8 changes: 4 additions & 4 deletions src/sage/graphs/strongly_regular_db.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1425,16 +1425,16 @@ def is_GQqmqp(int v, int k, int l, int mu):
TESTS::

sage: # needs sage.libs.pari
sage: (S,T) = (127,129)
sage: S, T = 127, 129
sage: t = is_GQqmqp((S+1)*(S*T+1), S*(T+1), S-1, T+1); t
(<function T2starGeneralizedQuadrangleGraph at ...>, 128, False)
sage: (S,T) = (129,127)
sage: S, T = 129, 127
sage: t = is_GQqmqp((S+1)*(S*T+1), S*(T+1), S-1, T+1); t
(<function T2starGeneralizedQuadrangleGraph at ...>, 128, True)
sage: (S,T) = (124,126)
sage: S, T = 124, 126
sage: t = is_GQqmqp((S+1)*(S*T+1), S*(T+1), S-1, T+1); t
(<function AhrensSzekeresGeneralizedQuadrangleGraph at ...>, 125, False)
sage: (S,T) = (126,124)
sage: S, T = 126, 124
sage: t = is_GQqmqp((S+1)*(S*T+1), S*(T+1), S-1, T+1); t
(<function AhrensSzekeresGeneralizedQuadrangleGraph at ...>, 125, True)
sage: t = is_GQqmqp(5,5,5,5); t
Expand Down
11 changes: 6 additions & 5 deletions src/sage/libs/mpmath/ext_main.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -973,23 +973,24 @@ cdef class Context:
def _convert_param(ctx, x):
"""
Internal function for parsing a hypergeometric function parameter.
Retrurns (T, x) where T = 'Z', 'Q', 'R', 'C' depending on the

This returns (T, x) where T = 'Z', 'Q', 'R', 'C' depending on the
type of the parameter, and with x converted to the canonical
mpmath type.

TESTS::

sage: from mpmath import mp
sage: (x, T) = mp._convert_param(3)
sage: x, T = mp._convert_param(3)
sage: (x, type(x).__name__, T)
(3, 'int', 'Z')
sage: (x, T) = mp._convert_param(2.5)
sage: x, T = mp._convert_param(2.5)
sage: (x, type(x).__name__, T)
(mpq(5,2), 'mpq', 'Q')
sage: (x, T) = mp._convert_param(2.3)
sage: x, T = mp._convert_param(2.3)
sage: (str(x), type(x).__name__, T)
('2.3', 'mpf', 'R')
sage: (x, T) = mp._convert_param(2+3j)
sage: x, T = mp._convert_param(2+3j)
sage: (x, type(x).__name__, T)
(mpc(real='2.0', imag='3.0'), 'mpc', 'C')
sage: mp.pretty = False
Expand Down
2 changes: 1 addition & 1 deletion src/sage/manifolds/continuous_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ def __invert__(self):
Checking that applying successively the homeomorphism and its
inverse results in the identity::

sage: (a, b) = var('a b')
sage: a, b = var('a b')
sage: p = M.point((a,b)) # a generic point on M
sage: q = rot(p)
sage: p1 = rot.inverse()(q)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/manifolds/manifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ def chart(

They can be recovered by the operator ``[:]`` applied to the chart::

sage: (x, y) = X[:]
sage: x, y = X[:]
sage: y
y
sage: type(y)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/manifolds/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ManifoldPoint(Element):

sage: M = Manifold(2, 'M', structure='topological')
sage: c_xy.<x,y> = M.chart()
sage: (a, b) = var('a b') # generic coordinates for the point
sage: a, b = var('a b') # generic coordinates for the point
sage: p = M.point((a, b), name='P'); p
Point P on the 2-dimensional topological manifold M
sage: p.coordinates() # coordinates of P in the subset's default chart
Expand Down Expand Up @@ -329,7 +329,7 @@ def coordinates(self, chart=None, old_chart=None):

sage: M = Manifold(2, 'M', structure='topological')
sage: c_xy.<x,y> = M.chart()
sage: (a, b) = var('a b') # generic coordinates for the point
sage: a, b = var('a b') # generic coordinates for the point
sage: P = M.point((a, b), name='P')

Coordinates of ``P`` in the manifold's default chart::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matrix/matrix_polynomial_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3306,7 +3306,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
sage: A = matrix(pR, 2, 2,
....: [[5*x^3 + 2*x^2 + 4*x + 1, x^3 + 4*x + 4],
....: [2*x^3 + 5*x^2 + 2*x + 4, 2*x^3 + 3*x + 2]])
sage: (Q,R) = A.reduce(B,row_wise=False, return_quotient=True); R
sage: Q, R = A.reduce(B, row_wise=False, return_quotient=True); R
[0 3]
[0 0]
sage: A == B*Q + R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def get_FD(self, z):
sage: from sage.modular.modform_hecketriangle.hecke_triangle_groups import HeckeTriangleGroup
sage: G = HeckeTriangleGroup(8)
sage: z = AlgebraicField()(1+i/2)
sage: (A, w) = G.get_FD(z)
sage: A, w = G.get_FD(z)
sage: A
[-lam 1]
[ -1 0]
Expand All @@ -619,7 +619,7 @@ def get_FD(self, z):

sage: from sage.modular.modform_hecketriangle.space import ModularForms
sage: z = (134.12 + 0.22*i).n()
sage: (A, w) = G.get_FD(z)
sage: A, w = G.get_FD(z)
sage: A
[-73*lam^3 + 74*lam 73*lam^2 - 1]
[ -lam^2 + 1 lam]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/modform_hecketriangle/readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
sage: z = AlgebraicField()(4 + 1/7*i)
sage: G.in_FD(z)
False
sage: (A, w) = G.get_FD(z)
sage: A, w = G.get_FD(z)
sage: A
T^2*S*T^(-1)*S
sage: w
Expand Down
8 changes: 4 additions & 4 deletions src/sage/modular/modsym/p1list.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ cdef class P1List():
EXAMPLES::

sage: L = P1List(120)
sage: (u,v) = (555555555,7777)
sage: u, v = 555555555, 7777
sage: uu,vv = L.normalize(555555555,7777)
sage: (uu,vv)
(15, 13)
Expand Down Expand Up @@ -1149,11 +1149,11 @@ cdef class P1List():
EXAMPLES::

sage: L = P1List(120)
sage: (u,v) = (555555555,7777)
sage: u, v = 555555555, 7777
sage: uu,vv,ss = L.normalize_with_scalar(555555555,7777)
sage: (uu,vv)
sage: uu, vv
(15, 13)
sage: ((ss*uu-u)%L.N(), (ss*vv-v)%L.N())
sage: (ss*uu-u)%L.N(), (ss*vv-v)%L.N()
(0, 0)
sage: (uu*v-vv*u) % L.N() == 0
True
Expand Down
Loading
Loading