1. 18 Oct, 2019 1 commit
  2. 12 Oct, 2019 3 commits
    • Release Manager's avatar
      Updated SageMath version to 9.0.beta1 · 0f20b37c
      Release Manager authored
      0f20b37c
    • Release Manager's avatar
      Trac #28582: some cleaning for is_ring · 58fd34e0
      Release Manager authored
      as a first step towards deprecation
      
      URL: https://trac.sagemath.org/28582
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      58fd34e0
    • Release Manager's avatar
      Trac #28579: Wedge Product with Scalar Fields · 6369d2b8
      Release Manager authored
      The wedge product of differential forms was not compatible with scalar
      fields:
      
      {{{
      sage: M = Manifold(2, 'M')
      sage: c_cart.<x,y> = M.chart()
      sage: a = M.diff_form(1, [x, y], name='a')
      sage: f = M.scalar_field(x^2, name='f')
      sage: a.wedge(f)
      AttributeError                            Traceback (most recent call
      last)
      <ipython-input-1-039619b3382c> in <module>()
            3 a = M.diff_form(Integer(1), [x, y], name='a')
            4 f = M.scalar_field(x**Integer(2), name='f')
      ----> 5 a.wedge(f)
      ...
      AttributeError: 'DiffScalarFieldAlgebra_with_category.element_class'
      object has no attribute '_ambient_domain'
      }}}
      
      In this ticket, this gets fixed.
      
      This ticket is part of the metaticket #28519.
      
      URL: https://trac.sagemath.org/28579
      Reported by: gh-DeRhamSource
      Ticket author(s): Michael Jung
      Reviewer(s): Eric Gourgoulhon
      6369d2b8
  3. 11 Oct, 2019 1 commit
    • Release Manager's avatar
      Trac #28571: pass 'macaulay2' as argument to '_macaulay2_init_()' · 28965d24
      Release Manager authored
      This gives access to the Macaulay2 interpreter in the
      `_macaulay2_init_()` function, so it can also return `Macaulay2Elements`
      rather than just strings. The `_macaulay2_init_()` function is used for
      initializing Macaulay2 elements and is usually called by `_macaulay2_()`
      which then takes care of caching.
      
      The magma interface also does this, but it had not been correctly set up
      until now.
      
      URL: https://trac.sagemath.org/28571
      Reported by: gh-mwageringel
      Ticket author(s): Markus Wageringel
      Reviewer(s): Franco Saliola
      28965d24
  4. 10 Oct, 2019 8 commits
    • Release Manager's avatar
      Trac #28566: improve conversions between Macaulay2 and Sage · 36c8efff
      Release Manager authored
      This ticket implements and improves conversions between Macaulay2 and
      Sage:
      
      • vectors/free module elements
      
      • matrices: The function `InterfaceElement._matrix_()` is implemented to
      allow for this syntax:
        {{{
        sage: A = macaulay2('matrix {{1,2},{3,4}}')
        sage: matrix(QQ, A)
        [1 2]
        [3 4]
        }}}
        This ticket also fixes an issue where the elements are not promoted to
      the correct ring:
        {{{
        sage: R.<x,y> = QQ[]
        sage: m = macaulay2(matrix(R, [[1, 2], [3, 4]]))
        sage: m.ring()  # should be R
        ZZ
        }}}
      
      • finite fields: An issue is fixed where the generator names are not
      preserved:
        {{{
        sage: K = GF(49, 'b')
        sage: K.gens(), macaulay2(K).gens()  # should be the same
        ((b,), {a})
        }}}
      
      URL: https://trac.sagemath.org/28566
      Reported by: gh-mwageringel
      Ticket author(s): Markus Wageringel
      Reviewer(s): Franco Saliola
      36c8efff
    • Release Manager's avatar
      Trac #28532: fix a bunch of warnings · 90948f45
      Release Manager authored
      In this ticket, we fix most of the compilation warnings that can be seen
      while running `./sage -b` after touching
      `sage/data_structures/bitset.pxi`.
      
      URL: https://trac.sagemath.org/28532
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Dima Pasechnik
      90948f45
    • Release Manager's avatar
      Trac #28525: use smaller doctests in PasechnikGraph to avoid memory errors in patchbots · 1ff91fe9
      Release Manager authored
      Many patch bots are reported memory errors with doctests using
      `graphs.PasechnikGraph(9)` and
      `graphs.SquaredSkewHadamardMatrixGraph(9)`.  Actually, these graphs have
      a lot of edges
      {{{
      sage: for i in range(1, 10):
      ....:     G = graphs.PasechnikGraph(i)
      ....:     print(i, G.order(), G.size(),
      G.is_strongly_regular(parameters=True))
      (1, 9, 9, (9, 2, 1, 0))
      (2, 49, 441, (49, 18, 7, 6))
      (3, 121, 3025, (121, 50, 21, 20))
      (4, 225, 11025, (225, 98, 43, 42))
      (5, 361, 29241, (361, 162, 73, 72))
      (6, 529, 64009, (529, 242, 111, 110))
      (7, 729, 123201, (729, 338, 157, 156))
      (8, 961, 216225, (961, 450, 211, 210))
      (9, 1225, 354025, (1225, 578, 273, 272))
      sage: for i in range(1, 10):
      ....:     G = graphs.SquaredSkewHadamardMatrixGraph(i)
      ....:     print(i, G.order(), G.size(),
      G.is_strongly_regular(parameters=True))
      (1, 9, 18, (9, 4, 1, 2))
      (2, 49, 588, (49, 24, 11, 12))
      (3, 121, 3630, (121, 60, 29, 30))
      (4, 225, 12600, (225, 112, 55, 56))
      (5, 361, 32490, (361, 180, 89, 90))
      (6, 529, 69828, (529, 264, 131, 132))
      (7, 729, 132678, (729, 364, 181, 182))
      (8, 961, 230640, (961, 480, 239, 240))
      (9, 1225, 374850, (1225, 612, 305, 306))
      }}}
      
      and we have
      {{{
      sage: %timeit
      graphs.PasechnikGraph(3).is_strongly_regular(parameters=True)
      10 loops, best of 3: 21.8 ms per loop
      sage: %timeit
      graphs.PasechnikGraph(4).is_strongly_regular(parameters=True)
      10 loops, best of 3: 53.4 ms per loop
      sage: %timeit
      graphs.PasechnikGraph(5).is_strongly_regular(parameters=True)
      10 loops, best of 3: 151 ms per loop
      sage: %timeit
      graphs.PasechnikGraph(9).is_strongly_regular(parameters=True)
      1 loop, best of 3: 2.36 s per loop
      }}}
      
      So, let us use smaller graphs for these doctests.
      
      We also now check that input parameter is at least 1.
      
      URL: https://trac.sagemath.org/28525
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Dima Pasechnik, Frédéric Chapoton
      1ff91fe9
    • Release Manager's avatar
      Trac #26105: Support base_morphism for hom(im_gens) · f8f5ac24
      Release Manager authored
      Currently, the method `.hom(im_gens)` on parents allows you to define
      the images of the generators of a structure. This is assuming that the
      coefficients of these generators can be sent to the codomain with some
      canonical coercion.
      
      This is often insufficient, e.g., in the case of polynomial rings where
      you would also like to define a map that translate the ring of
      coefficients non-canonically. Note that function fields already have a
      specialized `.hom()` implementation that supports this feature.
      
      See #26103 for a followup.
      
      URL: https://trac.sagemath.org/26105
      Reported by: saraedum
      Ticket author(s): Julian Rüth, David Roe
      Reviewer(s): David Roe, Julian Rüth, Xavier Caruso
      f8f5ac24
    • Release Manager's avatar
      Trac #25508: Implement reconstruction of binary quintics · 19bda2ac
      Release Manager authored
      Implement a function that given a set of values of invariants of a
      binary quintic, finds a quintic that attains these values up to scaling.
      
      A general framework for reconstruction is implemented for quintics
      defined over fields of characteric different from 2, 3 and 5. This is
      placed in the new invariants folder created in ticket #26370.
      
      For fields of characteristic 2, 3 and 5, see ticket #26786.
      
      This ticket requires binary quintics for computations and doctests, so
      depends on #25395.
      
      URL: https://trac.sagemath.org/25508
      Reported by: jnoordsij
      Ticket author(s): Jesper Noordsij
      Reviewer(s): Frédéric Chapoton
      19bda2ac
    • Release Manager's avatar
      Trac #17468: Strange integration error/hang with log(abs(sin(x))) · 8d0a41bd
      Release Manager authored
      Here is something that hangs.
      {{{
      sage: var('u')
      u
      sage: integral(log(abs(2*sin(u))), u, 0, pi/3)
      }}}
      Interestingly, we get
      {{{
      sage: maxima_calculus('integrate(log(abs(2*sin(u))), u, 0, %pi/3)')
      #0: extra_integrate(q=(g93030^2+1)*(4*g93030/((g93030^2+1)*abs(g93030))-
      8*g93030*abs(g93030)/(g93030^2+1)^2)/abs(g93030),x=g93030)
      ------------------------------------------------------------------------
      ---
      TypeError
      }}}
      but in the shell, we get
      {{{
      (%i1) integrate(log(abs(2*sin(u))),u,0,%pi/3);
                       sqrt(3) %i + 1                sqrt(3) %i + 1
      (%o1) (18 %i li (--------------) + 18 %i li (- --------------) - 3 %pi
      log(3)
                     2       2                   2         2
            2
                                                         2       %pi log(3)
      %i %pi
                                               + 2 %i %pi )/18 + ---------- -
      -------
                                                                     6
      12
      }}}
      
      The problem in Sage directly is
      {{{
      
      (%i1) load(abs_integrate);
      (%o1) /Users/karl.crisman/Downloads/sage/local/share/maxima/5.34.1/share
      /contr\
      ib/integration/abs_integrate.mac
      (%i2) integrate(log(abs(2*sin(u))),u,0,%pi/3);
      
      log: encountered log(0).
      }}}
      after which it hangs, and I'll report that upstream.  But I don't know
      what the error in `maxima_calculus` is!
      
      URL: https://trac.sagemath.org/17468
      Reported by: kcrisman
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Peter Bruin
      8d0a41bd
    • Release Manager's avatar
      Trac #28570: fix matrix inversion over ZZ · 77423c72
      Release Manager authored
      This was broken by #28189.
      
      Probably due to the new "inverse_of_unit" method taking over the
      existing one.
      
      This cause the following to never stop:
      {{{
      sage: P = posets.TamariLattice(7)
      sage: H = P._hasse_diagram
      sage: M = H._leq_matrix
      sage: M.inverse_of_unit()
      }}}
      
      URL: https://trac.sagemath.org/28570
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Vincent Delecroix, John Palmieri
      77423c72
    • Frédéric Chapoton's avatar
      56ff2bbd
  5. 09 Oct, 2019 4 commits
  6. 08 Oct, 2019 6 commits
  7. 07 Oct, 2019 8 commits
  8. 06 Oct, 2019 9 commits
    • saliola's avatar
      simplify some doctests · ce241862
      saliola authored
      ce241862
    • Release Manager's avatar
      Trac #28568: implement _install_hints method for the Macaulay2 interface · 75019f2f
      Release Manager authored
      {{{macaulay2._install_hints}}} should return a string providing
      information about how to set up Macaulay2 to work with SageMath. See
      {{{gap3._install_hints}}} for a detailed example of how this works.
      
      URL: https://trac.sagemath.org/28568
      Reported by: saliola
      Ticket author(s): Anton Leykin
      Reviewer(s): Franco Saliola
      75019f2f
    • Release Manager's avatar
      Trac #28565: improve introspection of Macaulay2 interface · 847bba42
      Release Manager authored
      This ticket improves the introspection for the Macaulay2 interface:
      
      • `help` is now called with a Macaulay2 string instead of a symbol, as
      this works in more generality, for example for global variables:
        {{{
        sage: macaulay2.errorDepth?
        }}}
      
      • The class `Macaulay2FunctionElement` of functions with applied first
      argument is implemented. This allows to make the help and source code
      more specific by taking into account the first argument. For example the
      following only shows the relevant output for `Ideal`, but not for
      `Matrix` or `Module`.
        {{{
        sage: I = macaulay2('ideal 4')
        sage: I.resolution?
        sage: I.resolution??
        }}}
      
        The `__getattr__` of `Macaulay2` is removed as it is not needed
      anymore since `_function_class` is implemented.
      
      • The `_sage_src_` of `Macaulay2Function` is simplified. This also fixes
      an issue where all the lines are shown with a special end character `^M`
      when inspecting Macaulay2 source code as in:
        {{{
        sage: macaulay2.matrix??
        code(methods matrix)^M
        ^M
        o1000000008 = -- code for method: matrix(List)^M
        ...
        }}}
      
      • The `nodetex` and `noreplace` directives for Sage documentation are
      added to avoid reformatting of the Macaulay2 documentation. Previously
      one would get
        {{{
        sage: macaulay2.matrix?
        ...
        +------------------------------+
        | i1 : matrix{{1,2,3},{4,5,6}} |
        | o1 = | 1 2 3 | 4 5 6 |  2    |
        | 3  o1 : Matrix ZZ  <--- ZZ   |
        +------------------------------+
        ...
        }}}
        instead of
        {{{
        +----------------------------+
        |i1 : matrix{{1,2,3},{4,5,6}}|
        |                            |
        |o1 = | 1 2 3 |              |
        |     | 4 5 6 |              |
        |                            |
        |              2        3    |
        |o1 : Matrix ZZ  <--- ZZ     |
        +----------------------------+
        }}}
      
      URL: https://trac.sagemath.org/28565
      Reported by: gh-mwageringel
      Ticket author(s): Markus Wageringel
      Reviewer(s): Franco Saliola
      847bba42
    • Release Manager's avatar
      Trac #28560: Ignore newlines in three.js version search · fcc11d6e
      Release Manager authored
      The regexp-based version number search for three.js introduced in #28086
      doesn't work for three.js version r109. The reason is that in the
      compiled three.min.js there is a line break right in the middle of the
      regexp match.
      
      This patch strips newline characters from the file before extracting the
      version number
      
      URL: https://trac.sagemath.org/28560
      Reported by: arojas
      Ticket author(s): Antonio Rojas
      Reviewer(s): Frédéric Chapoton
      fcc11d6e
    • Release Manager's avatar
      Trac #28459: spkg-configure.m4 for glpk · 819f21a5
      Release Manager authored
      the external install should have `glpsol` and `libglpk`
      
      On debian they are in `glpk-utils` and `libglpk-dev` packages.
      
      `4ti2` needs to know its prefix (or probably just `--with-glpk` should
      be there).
      Anyhow, we introduce a new env. var. `SAGE_GLPK_PREFIX`
      which is `''` for system's `glpk` and `SAGE_LOCAL` otherwise.
      
      `cvxopt` for its `glpk` extension needs to know the (non-standard)
      include directory and
      library directory of `glpk`, so they can be made blank
      for the stanard locations --- but as in particular libPython comes from
      `SAGE_LOCAL`, this should be left unchanged for the time being.
      
      ---------
      Sage's `glpk` needs a specific patch which is not upstreamed, so we need
      to work this out, too.
      
      URL: https://trac.sagemath.org/28459
      Reported by: dimpase
      Ticket author(s): Dima Pasechnik
      Reviewer(s): Isuru Fernando
      819f21a5
    • Release Manager's avatar
      Trac #28492: another wave of typos · 91a18d88
      Release Manager authored
      after #28491
      
      URL: https://trac.sagemath.org/28492
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Jori Mäntysalo
      91a18d88
    • Release Manager's avatar
      Trac #28484: Implement Orlik-Terao algebras · 66fdef51
      Release Manager authored
      Another interesting class of algebras that comes from hyperplane
      arrangements that can be applied to any linear matroid.
      
      URL: https://trac.sagemath.org/28484
      Reported by: tscrim
      Ticket author(s): Travis Scrimshaw
      Reviewer(s): Frédéric Chapoton, Darij Grinberg
      66fdef51
    • saliola's avatar
      Merge branch 'develop' into u/gh-mwageringel/28565 · 4ae76efe
      saliola authored
      * develop: (205 commits)
        Updated SageMath version to 9.0.beta0
        we need to destroy buckets after use to not leak memory
        added some comments
        Also use sBuckets in unpickler and elsewhere.
        Better approach via singular's "sBucket"s
        fix accidental merge with #28402
        28189: fix doctest in judson-abstract-algebra book
        28189: prefer R in Fields() rather than R.is_field()
        Trac 25890: reviewer patch
        correct signed/unsigned types in bitset.pxi
        trac #14614: return certificate
        trac #14614: faster is_triangle_free using static_dense_graph
        de-duplicate RT1975
        moved references from comparability.pyx to index.rst
        moved references from generic_graph.py to index.rst
        moved references from graph_generators.py to index.rst
        moved references from strongly_regular_db.pyx to index.rst
        moved references from spanning_tree.pyx to index.rst
        moved references from trees.pyx to index.rst
        moved references from graph_decompositions/rankwidth.pyx to index.rst
        ...
      4ae76efe
    • saliola's avatar
      delete trailing whitespace · 30d99924
      saliola authored
      30d99924