GitLab Commit is coming up on August 3-4. Learn how to innovate together using GitLab, the DevOps platform. Register for free: gitlabcommitvirtual2021.com

  1. 29 Feb, 2020 1 commit
  2. 21 Feb, 2020 1 commit
  3. 20 Feb, 2020 10 commits
    • Release Manager's avatar
      Trac #19053: arboricity of a undirected graph · f3633002
      Release Manager authored
      #19027 implements matroid partition. One can use it directly to find the
      arboricity of the graph. https://en.wikipedia.org/wiki/Arboricity
      
      URL: https://trac.sagemath.org/19053
      Reported by: chaoxu
      Ticket author(s): Chao Xu, Vipul Gupta
      Reviewer(s): David Coudert
      f3633002
    • Release Manager's avatar
      Trac #29214: apply_map fails for sparse zero matrix · 142607c4
      Release Manager authored
      If a sparse matrix does not contain any non-zero entries, `apply_map`
      fails to determine the base ring of the result:
      {{{
      sage: matrix(RR, 2, 2, sparse=True).apply_map(abs)
      ...
      TypeError: base_ring (=Category of objects) must be a ring
      }}}
      This causes problems when computing matrix norms, for example:
      {{{
      sage: matrix(CDF, 2, 2, sparse=True).norm(1)
      ...
      TypeError: base_ring (=Category of objects) must be a ring
      }}}
      This is solved by determining the base ring from the image of the zero
      entries.
      
      URL: https://trac.sagemath.org/29214
      Reported by: gh-mwageringel
      Ticket author(s): Markus Wageringel
      Reviewer(s): Travis Scrimshaw
      142607c4
    • Release Manager's avatar
      Trac #29202: character art: avoid repeated additions · 00620ace
      Release Manager authored
      This ticket rewrites some constructions of ASCII and unicode art to
      avoid repeatedly adding character art elements, but to concatenate
      multiple character art elements in one go instead which is more
      efficient.
      
      In `tensor_algebra.py` and `free_module.py`, this also removes some
      breakpoints that seemed to be unintended. This might stem from
      misunderstanding that adding two character art elements always creates a
      breakpoint in between. (Arguably, this is a bad default.)
      
      {{{
      sage: R = NonCommutativeSymmetricFunctions(QQ).R()
      sage: Partitions.options(diagram_str="#", convention="french")
      sage: a = ascii_art(tensor((R[1,2], R[3,1,2]))); a
      R   # R
       #     ###
       ##      #
               ##
      sage: a._breakpoints
      [0, 3, 6]       # before (in particular the 0 is undesirable, the 3
      unnecessary)
      [6]             # after
      }}}
      
      Moreover, this ticket fixes the default implementation of
      `_unicode_art_` in `SageObject` (which is based on `_ascii_art_`) to
      preserve the ascii art element's breakpoints and baseline.
      
      URL: https://trac.sagemath.org/29202
      Reported by: gh-mwageringel
      Ticket author(s): Markus Wageringel
      Reviewer(s): Vincent Delecroix
      00620ace
    • Release Manager's avatar
      Trac #29201: housecleaning in algebras/ · a99660f1
      Release Manager authored
      mostly suggested by lgtm
      
      also one change in stats/
      
      URL: https://trac.sagemath.org/29201
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      a99660f1
    • Release Manager's avatar
      Trac #29140: sagedoc introspection removes all backslashes · da1cb1c8
      Release Manager authored
      The unconditional removal of backslashes leads to incorrect display of
      docstrings, for example:
      
      {{{
      sage: BinaryTree.to_full?
      ...
            sage: ascii_art(bt.to_full())
                 __o___
                /
              _o_       o
             /
            o     o
                 /
                o   o
      ...
      }}}
      
      The correct docstring should contain:
      {{{
                       __o___
                      /      \
                    _o_       o
                   /   \
                  o     o
                       / \
                      o   o
      }}}
      
      This affects both the command line and the jupyter notebook.
      
      A consequence of the change on this ticket is that unknown latex macros
      such as `\leftarrow` are rendered as is and are not converted to
      `leftarrow` anymore.
      
      URL: https://trac.sagemath.org/29140
      Reported by: gh-mwageringel
      Ticket author(s): Markus Wageringel
      Reviewer(s): Vincent Delecroix
      da1cb1c8
    • Release Manager's avatar
      Trac #26964: ./bootstrap: Format build/pkgs/SPKG/distros/ information to... · 5d008d89
      Release Manager authored
      Trac #26964: ./bootstrap: Format build/pkgs/SPKG/distros/ information to produce the apt-get/yum command lines shown in the installation manual
      
      When trying to build Sage on a very bare fedora install (e.g. a Docker
      container) the packages listed in the build instructions at:
      
      https://doc.sagemath.org/html/en/installation/source.html#linux-
      prerequisite-installation
      
      are insufficient.  At the very least it also needs `findutils` and
      `which`, and currently it also requires `python2`, though that should be
      fixed as part of  #26953. The need for `which` comes, at the very least,
      from MPIR's `configure` script, which uses `which` at least on Linux.
      
      With #29053, the necessary distribution packages for an installation are
      cataloged in `build/pkgs/fedora.txt`,
      `build/pkgs/SPKG/distros/fedora.txt` and similar for other
      distributions.
      
      In this ticket, we add to `bootstrap` some code to keep the `yum` (and
      `apt-get` for debian) command-lines in the  installation manual up to
      date. #29053 prepared this by isolating these command lines in separate
      .txt files in `src/doc`.
      
      URL: https://trac.sagemath.org/26964
      Reported by: embray
      Ticket author(s): Matthias Koeppe
      Reviewer(s): John Palmieri, Dima Pasechnik
      5d008d89
    • Release Manager's avatar
      Trac #22514: Constants in an InfinitePolynomialRing do not act like polynomials · 5d351aa9
      Release Manager authored
      Constants in an InfinitePolynomialRing are missing many expected
      methods.  For example:
      
      {{{
      sage: R.<x> = InfinitePolynomialRing(ZZ)
      sage: a = R(3)
      sage: b = 3 + x[0]
      sage: type(a)
      <class 'sage.rings.polynomial.infinite_polynomial_element.InfinitePolyno
      mial_sparse'>
      sage: type(b)
      <class 'sage.rings.polynomial.infinite_polynomial_element.InfinitePolyno
      mial_sparse'>
      sage: b.is_constant()
      False
      sage: a.is_constant()
      ------------------------------------------------------------------------
      ---
      AttributeError                            Traceback (most recent call
      last)
      <ipython-input-13-4b9a13af2a7a> in <module>()
      ----> 1 a.is_constant()
      
      /opt/sage/local/lib/python2.7/site-
      packages/sage/rings/polynomial/infinite_polynomial_element.pyc in
      __getattr__(self, s)
          409             return getattr(self._p,s)
          410         except AttributeError:
      --> 411             raise AttributeError('%s has no attribute
      %s'%(self.__class__, s))
          412
          413     def ring(self):
      
      AttributeError: <class 'sage.rings.polynomial.infinite_polynomial_elemen
      t.InfinitePolynomial_sparse'> has no attribute is_constant
      }}}
      
      Another example:
      {{{
      sage: b.constant_coefficient()
      3
      sage: a.constant_coefficient()
      ------------------------------------------------------------------------
      ---
      AttributeError                            Traceback (most recent call
      last)
      <ipython-input-14-2f3d9cae0a11> in <module>()
      ----> 1 a.constant_coefficient()
      
      /opt/sage/local/lib/python2.7/site-
      packages/sage/rings/polynomial/infinite_polynomial_element.pyc in
      __getattr__(self, s)
          409             return getattr(self._p,s)
          410         except AttributeError:
      --> 411             raise AttributeError('%s has no attribute
      %s'%(self.__class__, s))
          412
          413     def ring(self):
      
      AttributeError: <class 'sage.rings.polynomial.infinite_polynomial_elemen
      t.InfinitePolynomial_sparse'> has no attribute constant_coefficient
      }}}
      
      And another:
      {{{
      sage: b.degree()
      1
      sage: a.degree()
      ------------------------------------------------------------------------
      ---
      AttributeError                            Traceback (most recent call
      last)
      <ipython-input-10-1191944a72df> in <module>()
      ----> 1 a.degree()
      
      /opt/sage/local/lib/python2.7/site-
      packages/sage/rings/polynomial/infinite_polynomial_element.pyc in
      __getattr__(self, s)
          409             return getattr(self._p,s)
          410         except AttributeError:
      --> 411             raise AttributeError('%s has no attribute
      %s'%(self.__class__, s))
          412
          413     def ring(self):
      
      AttributeError: <class 'sage.rings.polynomial.infinite_polynomial_elemen
      t.InfinitePolynomial_sparse'> has no attribute degree
      }}}
      
      This appears to follow from the type of the ``_p`` field of the values:
      {{{
      sage: type(b._p)
      <type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_li
      bsingular'>
      sage: type(a._p)
      <type 'sage.rings.finite_rings.integer_mod.IntegerMod_int'>
      }}}
      
      URL: https://trac.sagemath.org/22514
      Reported by: msaaltink
      Ticket author(s): Mark Saaltink
      Reviewer(s): Vincent Delecroix, Travis Scrimshaw
      5d351aa9
    • Release Manager's avatar
      Trac #29213: another little enhancement for free Zinbiel algebras · aa556a76
      Release Manager authored
      to make so that this works
      {{{
      sage: A=algebras.FreeZinbiel(QQ,'z2,z3')
      sage: A
      Free Zinbiel algebra on generators (Z[z2], Z[z3]) over Rational Field
      sage: x,y=A.gens()
      sage: x*y
      Z[z2,z3]
      }}}
      
      URL: https://trac.sagemath.org/29213
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      aa556a76
    • Release Manager's avatar
      Trac #29150: DESTDIR support for coxeter3 · f7e35f26
      Release Manager authored
      Implements #24024 + #22509 for the optional package coxeter3.
      
      URL: https://trac.sagemath.org/29150
      Reported by: embray
      Ticket author(s): Erik Bray
      Reviewer(s): Travis Scrimshaw
      f7e35f26
    • Release Manager's avatar
      Trac #28781: Use Pari for computing decomposition groups · b9804c3c
      Release Manager authored
      We should use Pari's `idealramgroups` function for computing
      decomposition groups, inertia groups and higher ramification groups.
      
      URL: https://trac.sagemath.org/28781
      Reported by: roed
      Ticket author(s): David Roe
      Reviewer(s): Frédéric Chapoton, Peter Bruin
      b9804c3c
  4. 19 Feb, 2020 1 commit
    • Release Manager's avatar
      Trac #28964: sympy: Problem with integration/differentiation of symbolic functions. · b909f45b
      Release Manager authored
      This ticket fixes several problems related to the conversion of
      derivatives to and from sympy:
      
      - the derivative arguments were permuted when converting to sympy
      (comment:7)
      - the conversion from Sage to sympy did not account for the case of
      variables with multiple occurences (comment:1)
      - the first argument of the derivative was skipped when converting from
      sympy (comment:6)
      - sympy returns arguments of type `sympy.core.containers.Tuple` which
      was not handled
      - Sage's derivative does not accept tuples, so the arguments must be
      flattened
      - sympy's integer type is converted to Sage's rational type, but should
      be converted to Sage's integer type
      
      (Original description below.)
      
      ------
      
      Minimal case of a problem reported on
      [https://ask.sagemath.org/question/49384/simple-integration-problem/
      ask.sagemath.org].
      
      {{{
      sage: reset()
      sage: var("x,t")
      (x, t)
      sage: f=function("f") ## Note : no formal arguments
      sage: diff(f(x,t),x)
      diff(f(x, t), x)
      sage: diff(f(x,t),x).integrate(x)
      f(x, t)
      }}}
      
      As expected. But :
      
      {{{
      sage: diff(f(x,t),x).integrate(t)
      f(x, t)
      }}}
      
      No, no, no. And no.
      
      Slightly better:
      
      {{{
      sage: reset()
      sage: var("x,t")
      (x, t)
      sage: f=function("f")(x,t)  ## Note : specified formal arguments.
      sage: diff(f(x,t),x)
      diff(f(t, x), x)
      sage: diff(f(x,t),x).integrate(x)
      f(t, x)
      sage: diff(f(x,t),x).integrate(t)
      ------------------------------------------------------------------------
      ---
      ValueError                                Traceback (most recent call
      last)
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/all_cmdline.py in <module>()
      ----> 1 diff(f(x,t),x).integrate(t)
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/expression.pyx in
      sage.symbolic.expression.Expression.integral
      (build/cythonized/sage/symbolic/expression.cpp:64575)()
        12389                     R = ring.SR
        12390             return R(integral(f, v, a, b, **kwds))
      > 12391         return integral(self, *args, **kwds)
        12392
        12393     integrate = integral
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/integration/integral.py in integrate(expression,
      v, a, b, algorithm, hold)
          927         return integrator(expression, v, a, b)
          928     if a is None:
      --> 929         return indefinite_integral(expression, v, hold=hold)
          930     else:
          931         return definite_integral(expression, v, a, b, hold=hold)
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/function.pyx in
      sage.symbolic.function.BuiltinFunction.__call__
      (build/cythonized/sage/symbolic/function.cpp:12262)()
         1136             res = self._evalf_try_(*args)
         1137             if res is None:
      -> 1138                 res = super(BuiltinFunction, self).__call__(
         1139                         *args, coerce=coerce, hold=hold)
         1140
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/function.pyx in
      sage.symbolic.function.Function.__call__
      (build/cythonized/sage/symbolic/function.cpp:7039)()
          600                     (<Expression>args[0])._gobj, hold)
          601         elif self._nargs == 2:
      --> 602             res = g_function_eval2(self._serial,
      (<Expression>args[0])._gobj,
          603                     (<Expression>args[1])._gobj, hold)
          604         elif self._nargs == 3:
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/integration/integral.py in _eval_(self, f, x)
          100         for integrator in self.integrators:
          101             try:
      --> 102                 A = integrator(f, x)
          103             except (NotImplementedError, TypeError,
      AttributeError):
          104                 pass
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/integration/external.py in
      sympy_integrator(expression, v, a, b)
           66     else:
           67         result = sympy.integrate(ex, (v, a._sympy_(),
      b._sympy_()))
      ---> 68     return result._sage_()
           69
           70 def mma_free_integrator(expression, v, a=None, b=None):
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/interfaces/sympy.py in _sympysage_integral(self)
          307     """
          308     from sage.misc.functional import integral
      --> 309     f, limits = self.function._sage_(), list(self.limits)
          310     for limit in limits:
          311         if len(limit) == 1:
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/interfaces/sympy.py in _sympysage_derivative(self)
          333     f = self.args[0]._sage_()
          334     args = [[a._sage_() for a in arg] if isinstance(arg,tuple)
      else arg._sage_() for arg in self.args[2:]]
      --> 335     return derivative(f, *args)
          336
          337 def _sympysage_order(self):
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/calculus/functional.py in derivative(f, *args, **kwds)
          129     """
          130     try:
      --> 131         return f.derivative(*args, **kwds)
          132     except AttributeError:
          133         pass
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/expression.pyx in
      sage.symbolic.expression.Expression.derivative
      (build/cythonized/sage/symbolic/expression.cpp:25806)()
         4186             ValueError: No differentiation variable specified.
         4187         """
      -> 4188         return multi_derivative(self, args)
         4189
         4190     diff = differentiate = derivative
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/misc/derivative.pyx in
      sage.misc.derivative.multi_derivative
      (build/cythonized/sage/misc/derivative.c:3014)()
          217     if not args:
          218         # fast version where no arguments supplied
      --> 219         return F._derivative()
          220
          221     for arg in derivative_parse(args):
      
      /usr/local/sage-P3-2/local/lib/python3.7/site-
      packages/sage/symbolic/expression.pyx in
      sage.symbolic.expression.Expression._derivative
      (build/cythonized/sage/symbolic/expression.cpp:26148)()
         4248                 return self.gradient()
         4249             else:
      -> 4250                 raise ValueError("No differentiation variable
      specified.")
         4251         if not isinstance(deg, (int, long,
      sage.rings.integer.Integer)) \
         4252                 or deg < 1:
      
      ValueError: No differentiation variable specified.
      }}}
      
      No again. But at least, this is an explicit error, not a silently
      accepted wrong result.
      
      The problem seems to point to handling formal arguments of undefined
      functions. I do not (yet) understand this code...
      
      IMHO, at least the first case is critical (possibly blocker), because it
      silently returns a wrong result.
      
      Note that the handling of //defined// functions //seems// to be correct.
      For example:
      
      {{{
      sage: sin(t*x).diff(x)
      t*cos(t*x)
      sage: sin(t*x).diff(x).integrate(x)
      sin(t*x)
      sage: sin(t*x).diff(x).integrate(t)
      (t*x*sin(t*x) + cos(t*x))/x^2
      }}}
      
      URL: https://trac.sagemath.org/28964
      Reported by: charpent
      Ticket author(s): Markus Wageringel
      Reviewer(s): Vincent Delecroix
      b909f45b
  5. 18 Feb, 2020 2 commits
  6. 17 Feb, 2020 22 commits
    • Release Manager's avatar
      Trac #29203: character art: line wrapping for matrices · d3f8e715
      Release Manager authored
      This ticket adds breakpoints to the ASCII and unicode art
      representations of matrices, so that wide matrices are wrapped in a
      readable way:
      
      {{{
      sage: %display unicode_art 80
      sage: set_random_seed(0)
      sage: matrix.random(RDF, 3, 8)
      ⎛ -0.27440062056807446    0.5031965950979831 -0.001975438590219314
      ⎜ -0.35104242112828943    0.5084492941557279   0.19906256610645512
      ⎝ -0.20282268041839324    0.0728476884470246   -0.9938082549986424
      
         -0.9467802263760512    0.5056889961514748  -0.05461130074681608
          0.3242250183948632    0.6026443545751128   -0.9541798283979341
        0.004239223023573491   -0.6670085876677831    -0.635743483594841
      
       -0.033673314214051286   -0.9401270875197381⎞
         -0.8948790563276592   -0.5763034867990717⎟
          0.5778937006648461   -0.9007365327499568⎠
      }}}
      
      Previously, the output was completely scrambled if the matrix was wider
      than the window size:
      {{{
      ⎛ -0.27440062056807446    0.5031965950979831 -0.001975438590219314
      -0.94678022
      63760512    0.5056889961514748  -0.05461130074681608
      -0.033673314214051286   -0.
      9401270875197381⎞
      ⎜ -0.35104242112828943    0.5084492941557279   0.19906256610645512
      0.32422501
      83948632    0.6026443545751128   -0.9541798283979341
      -0.8948790563276592   -0.
      5763034867990717⎟
      ⎝ -0.20282268041839324    0.0728476884470246   -0.9938082549986424
      0.0042392230
      23573491   -0.6670085876677831    -0.635743483594841
      0.5778937006648461   -0.
      9007365327499568⎠
      }}}
      
      URL: https://trac.sagemath.org/29203
      Reported by: gh-mwageringel
      Ticket author(s): Markus Wageringel
      Reviewer(s): Vincent Delecroix
      d3f8e715
    • Release Manager's avatar
      Trac #29117: Implement a maximal chain for combinatorial polyhedron · 7d455b11
      Release Manager authored
      We implement a method that returns a maximal chain of the face lattice
      of a combinatorial polyhedron without empty face and universe.
      
      With this we can easily obtain vertices spanning the affine hull of a
      polytope.
      
      URL: https://trac.sagemath.org/29117
      Reported by: gh-kliem
      Ticket author(s): Jonathan Kliem
      Reviewer(s): Jean-Philippe Labbé, Laith Rastanawi
      7d455b11
    • Release Manager's avatar
      Trac #28672: Three.js: Camera viewpoint for scene · a72d2fde
      Release Manager authored
      This ticket will replicate the behavior described in this
      [https://trac.sagemath.org/ticket/22408#comment:70 comment]
      
      URL: https://trac.sagemath.org/28672
      Reported by: paulmasson
      Ticket author(s): Paul Masson
      Reviewer(s): Jean-Philippe Labbé
      a72d2fde
    • Release Manager's avatar
      Trac #28608: CombinatorialPolyhedron: abbrevations Hrepr -> Hrep etc. · 5cfbbfed
      Release Manager authored
      In Polyhedron the used abbreviation for representation is rep as in
      `Hrep_generator` etc.
      
      Accordingly, this abbreviation is adopted for `CombinatorialPolyhedron`.
      
      While we are at it we fix some instances of the typo `representaion`.
      
      We add a deprecation warning for the keyword `Vrepr` of
      `CombinatorialPolyhedron.__init__`.
      
      We remove a redefinition of a deprecated method (`n_Hrepr` of
      combinatorial face).
      
      URL: https://trac.sagemath.org/28608
      Reported by: gh-kliem
      Ticket author(s): Jonathan Kliem
      Reviewer(s): Laith Rastanawi
      5cfbbfed
    • Release Manager's avatar
      Trac #27278: sage.libs.ppl : Segmentation fault in Constraint creation · 3a761b6e
      Release Manager authored
      Trying to create a constraint from a constraint leads to a segfault.
      {{{
      sage: from sage.libs.ppl import *
      sage: x=Variable(0)
      sage: c = x == 0
      sage: type(c)
      <class 'sage.libs.ppl.Constraint'>
      sage: Constraint(c)
      }}}
      
      Report the fix done by Vincent Delecroix for pplpy (see:[https://gitlab.
      com/videlec/pplpy/commit/34572241b0bf60170462a4e71c980f578ed9e678
      34572241])
      
      URL: https://trac.sagemath.org/27278
      Reported by: vklein
      Ticket author(s): Vincent Klein
      Reviewer(s): Vincent Delecroix
      3a761b6e
    • Release Manager's avatar
      Trac #27199: infinite loop in ECM · ae1f3b15
      Release Manager authored
      [this was reported to me by Emmanuel Thomé]
      
      The following never returns with Sage 8.5:
      {{{
      sage: n=16262093986406371
      sage: f=ECM()
      sage: f.factor(n,B1=10)
      }}}
      Note that n factors as {{{1009^2 * 1733 * 3023 * 3049}}}, with a square.
      
      The top-level ECM.factor seems correct, and deals with exact powers.
      
      But for some reason, the B1=10 argument is not passed to find_factors,
      which uses B1=2000. This is too large, and with all seeds sigma, all
      factors are found simultaneously, and the loop which calls find_factors
      loops indefinitely.
      
      It is important to remove all small factors before calling ECM (and not
      only consider the size of the input).
      
      As a rule of thumb, when using ECM with say B1=2000, all factors below
      B1 should have been removed.
      
      URL: https://trac.sagemath.org/27199
      Reported by: zimmerma
      Ticket author(s): Paul Zimmermann
      Reviewer(s): Vincent Delecroix
      ae1f3b15
    • Release Manager's avatar
      Trac #27139: bug in term_order.py · 17ffbd0f
      Release Manager authored
      In Sage 8.6, typing
      {{{
      sage: R.<x,y,z,t>=PolynomialRing(AA,order='lex(2),lex(2)')
      sage: x>y
      }}}
      
      raises a `TypeError`. The error report boils down to
      
      {{{
      /usr/local/share/Sage/sage-8.6/local/lib/python2.7/site-
      packages/sage/rings/polynomial/term_order.pyc in sortkey_block(self, f)
         1138         for block in self:
         1139             r = getattr(block, "sortkey_" + block.name())(f[n:n
      + len(block)])
      -> 1140             key += r
         1141             n += len(block)
         1142         return key
      
      TypeError: Argument 'self' has incorrect type (expected
      sage.rings.polynomial.polydict.ETuple, got tuple)
      sage:
      }}}
      
      I have changed line 1140 in term_order.py to
      
      {{{
      -> 1140             key += tuple(r)
      }}}
      
      which works as expected. Noticing that sibling functions to
      `sortkey_block()` in term_order.py are all coerced to return `key` as a
      tuple, I think that this is a localized bug which may be corrected
      safely as above.
      
      The error appears only with lex being used in a block ordering.
      Obviously other block orderings do not trigger a call to
      `sortkey_block()`. This indicates some global design issue, which I do
      not feel competent to pursue.
      
      Denis
      
      URL: https://trac.sagemath.org/27139
      Reported by: gh-denissunko
      Ticket author(s): Denis Sunko
      Reviewer(s): Markus Wageringel
      17ffbd0f
    • Release Manager's avatar
      Trac #24345: Disallow boolean operations with Unknown · b2552558
      Release Manager authored
      The `Unknown` from `misc/unknown.py` incorrectly behaves like `False` in
      the context of boolean operations. It is mostly useless as long as
      Python has no tristate conditionals and logic operators. This ticket
      raises an error instead.
      
      As a consequence of this modification, Sage code is adapted as follows
      for a given tristate `troolean`
      {{{
      if troolean is True:
          ...
      elif troolean is False:
          ...
      else:
          ...
      }}}
      
      URL: https://trac.sagemath.org/24345
      Reported by: rws
      Ticket author(s): Ralf Stephan
      Reviewer(s): Vincent Delecroix
      b2552558
    • Release Manager's avatar
      Trac #18630: Doctest: Expression.is_positive/negative fixed · 0d09e98b
      Release Manager authored
      The two functions that query Pynac expressions' `info::flags` only work
      with `numeric`s and `symbol`s with domain. The rest simply returns
      `False`:
      {{{
      sage: (1-pi).is_negative()
      False
      sage: (log(1/2)).is_negative()
      False
      sage: e.is_positive()
      False
      sage: (e+1).is_positive()
      False
      sage: (2*e).is_positive()
      False
      sage: (e^3).is_positive()
      False
      }}}
      
      UPDATE: everything above but the first works now.
      
      URL: https://trac.sagemath.org/18630
      Reported by: rws
      Ticket author(s): Ralf Stephan
      Reviewer(s): Peleg Michaeli, Vincent Delecroix
      0d09e98b
    • Release Manager's avatar
      Trac #25790: Random failure in hyperelliptic_finite_field.py · accdd511
      Release Manager authored
      This happens occasionally, is a somewhat recent regression:
      {{{
      sage -t --long
      src/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py
      **********************************************************************
      File
      "src/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py",
      line 780, in sage.schemes.hyperelliptic_curves.hyperelliptic_finite_fiel
      d.HyperellipticCurve_finite_field.points
      Failed example:
          len(C.points())
      Exception raised:
          Traceback (most recent call last):
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-
      packages/sage/doctest/forker.py", line 573, in _run
              self.compile_and_execute(example, compiler, test.globs)
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-
      packages/sage/doctest/forker.py", line 983, in compile_and_execute
              exec(compiled, globs)
            File "<doctest sage.schemes.hyperelliptic_curves.hyperelliptic_fin
      ite_field.HyperellipticCurve_finite_field.points[5]>", line 1, in
      <module>
              len(C.points())
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages
      /sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py", line
      825, in points
              self.__points = self._points_fast_sqrt() # this is fast using
      Zech logarithms
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages
      /sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py", line
      675, in _points_fast_sqrt
              points.append(self.point([x, v+sqrtD, one], check=True))
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-
      packages/sage/schemes/projective/projective_subscheme.py", line 122, in
      point
              return self.point_homset()(v, check=check)
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-
      packages/sage/schemes/generic/homset.py", line 279, in __call__
              return Set_generic.__call__(self, *args, **kwds)
            File "sage/structure/parent.pyx", line 922, in
      sage.structure.parent.Parent.__call__
      (build/cythonized/sage/structure/parent.c:9761)
              return mor._call_with_args(x, args, kwds)
            File "sage/structure/coerce_maps.pyx", line 164, in
      sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
      (build/cythonized/sage/structure/coerce_maps.c:5093)
              raise
            File "sage/structure/coerce_maps.pyx", line 154, in
      sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args
      (build/cythonized/sage/structure/coerce_maps.c:4883)
              return C._element_constructor(x, **kwds)
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-
      packages/sage/schemes/generic/homset.py", line 653, in
      _element_constructor_
              return self.codomain()._point(self, v, **kwds)
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-
      packages/sage/schemes/projective/projective_point.py", line 1474, in
      __init__
              X.extended_codomain()._check_satisfies_equations(v)
            File "/home/vbraun/Code/sage.git/local/lib/python2.7/site-
      packages/sage/schemes/generic/algebraic_scheme.py", line 973, in
      _check_satisfies_equations
              raise TypeError("Coordinates %s do not define a point on
      %s"%(coords,self))
          TypeError: Coordinates [4*a + 9, 8*a + 5, 1] do not define a point
      on Hyperelliptic Curve over Finite Field in a of size 11^2 defined by
      y^2 + (x^2 + 2)*y = x^5 + x + 10
      **********************************************************************
      1 item had failures:
         1 of  13 in sage.schemes.hyperelliptic_curves.hyperelliptic_finite_fi
      eld.HyperellipticCurve_finite_field.points
          [373 tests, 1 failure, 91.08 s]
      }}}
      
      URL: https://trac.sagemath.org/25790
      Reported by: vbraun
      Ticket author(s): Volker Braun
      Reviewer(s): David Roe
      accdd511
    • Vincent Delecroix's avatar
      22514: a simplification · accc9619
      Vincent Delecroix authored
      accc9619
    • Mark Saaltink's avatar
      Fixed the formatting of a doctest block. · 3b5a5e07
      Mark Saaltink authored
      3b5a5e07
    • Mark Saaltink's avatar
    • Mark Saaltink's avatar
    • Mark Saaltink's avatar
      Fix first part of trac 22514. · 75f5b567
      Mark Saaltink authored
      Make sure constructed infinite polynomials have ._p a polynomial over the
      appropriate base ring.  This check is in the __init__ method of sparse and
      dense infinite polynomials.
      75f5b567
    • Markus Wageringel's avatar
      28964: fix conversion of integers from sympy to sage · 57a8e83d
      Markus Wageringel authored
      Note that sympy's Integer is a subtype of Rational.
      57a8e83d
    • Markus Wageringel's avatar
      237c4d78
    • Markus Wageringel's avatar
    • Markus Wageringel's avatar
      28964: fix sympy conversions of derivative · 42d400b3
      Markus Wageringel authored
      This fixes several problems related to the conversion of
      derivatives to and from sympy:
      
      - the derivative arguments were permuted when converting to sympy
      - the first argument of the derivative was skipped when converting from sympy
      - sympy returns arguments of type sympy.core.containers.Tuple which was not handled
      - Sage's derivative does not accept tuples, so the arguments must be flattened
      - sympy's derivative count is converted to rationals, so Sage's derivative must accept rational arguments
      42d400b3
    • Frédéric Chapoton's avatar
      af5c0b21
    • Vincent Delecroix's avatar
      24345: pyflakes cleaning · 96fd7a29
      Vincent Delecroix authored
      96fd7a29
    • Matthias Köppe's avatar
  7. 16 Feb, 2020 3 commits