GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

  1. 03 Feb, 2015 1 commit
  2. 29 Jan, 2015 14 commits
    • Volker Braun's avatar
      Updated Sage version to 6.5.rc0 · d27f8497
      Volker Braun authored
      d27f8497
    • Release Manager's avatar
      Trac #14786: Add lattice of flats to Matroid class · 39ebc7de
      Release Manager authored
      The new Matroid class has functions for flats but there is not
      implementation of the lattice of flats.
      
      URL: http://trac.sagemath.org/14786
      Reported by: ahmorales
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      39ebc7de
    • Release Manager's avatar
      Trac #14894: Fix PARI error handling · 7576573f
      Release Manager authored
      Instead of catching whatever PARI writes to `pariErr`, we should use a
      callback function `cb_pari_err_handle`. That way, we don't need special
      tricks for warnings anymore.
      
      Moreover, we also get access to the "error data" (a `t_ERROR` object)
      which we store in the exception.
      
      URL: http://trac.sagemath.org/14894
      Reported by: vbraun
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Peter Bruin
      7576573f
    • Release Manager's avatar
      Trac #17671: gcd and xgcd over fields, PID and UFD · 0792516a
      Release Manager authored
      As reported on [https://groups.google.com/forum/#!topic/sage-
      support/AYDqdxy5fTw sage-support], gcd and xgcd disagree on fraction
      fields
      {{{
      sage: gcd(6/1,2/1)
      2
      sage: xgcd(6/1,2/1)
      (1, 1/6, 0)
      }}}
      
      In this ticket we:
      1. Ensure that `gcd` and `xgcd` are compatible over quotient fields by
      implementing the `xgcd` in the appropriate place. In particular, with
      that branch we have
        {{{
        sage: xgcd(6/1,2/1)
        (2, 0, 1)
        sage: xgcd(5/2, 3/4)
        (1/4, -1/2, 2)
        }}}
      2. We fix the `xgcd` for trivial cases in
      `rings.polynomial.polynomial_element_generic.Polynomial_generic_field`
      in order that `gcd` and `xgcd` agree for them.
      3. We introduce a generic test `_test_gcd_vs_xgcd` in the category
      `PrincipalIdealDomains` to ensure the compatibility of `gcd` and `xgcd`.
      4. Modify the previous behavior for real numbers
        {{{
        sage: gcd(2.0, 4.0)
        2
        sage: gcd(2.0, 4.0).parent()
        Integer Ring
        }}}
        The only difference is that now, Sage returns floating point with the
      same parent
        {{{
        sage: gcd(2.0, 4.0)
        2.00000000000000
        sage: gcd(2.0, 4.0).parent()
        Real Field with 53 bits of precision
        }}}
        And the same kind of behavior will also hold for lcm and xgcd.
      
      Note:
      
      There is a method `xgcd` implemented for univariate polynomial over ZZ.
      ~~This is not a proper name since it has nothing to do with `gcd`~~ This
      might not be the best name since the first term is not the gcd in
      general (see [https://groups.google.com/forum/#!topic/sage-
      devel/JV8fCPUqTzo this sage-devel thread] and #17674)
      
      URL: http://trac.sagemath.org/17671
      Reported by: vdelecroix
      Ticket author(s): Vincent Delecroix
      Reviewer(s): Bruno Grenet
      0792516a
    • Release Manager's avatar
      Trac #14567: Refactor continued fractions · 33ecd5e8
      Release Manager authored
      Continued fractions (in sage.rings.contfrac) do not do what we expect:
      
       1. categories are not properly initialized nor used.
       2. all arithmetic operations go back and forth with the underlying
      rational (there are much more direct solutions for taking the negative,
      inverse and to compare two continued fractions)
       3. it only deals with rational numbers
       4. there is no dedicated method for numerical approximations (which is
      one of the first aim of continued fractions)
       5. there is no bridge with quadratic numbers (see also #11345)
       6. there is no bridge with words (sage.combinat.words)
       7. continued fractions are not included in the documentation
      
      The patch proposed here develop some general design for dealing with
      continued fractions and solve all issues above.
      
      With the patch applied we can do
      {{{
      sage: (117/253).continued_fraction()
      [0; 2, 6, 6, 3]
      
      sage: K.<sqrt2> = QuadraticField(2)
      sage: cff = (sqrt2/3 + 1/4).continued_fraction(); cff
      [0; 1, (2, 1, 1, 2, 3, 2, 1, 1, 2, 5, 1, 1, 14, 1, 1, 5)*]
      sage: cff.period()
      (2, 1, 1, 2, 3, 2, 1, 1, 2, 5, 1, 1, 14, 1, 1, 5)
      sage: cff.preperiod()
      (0, 1)
      sage: cff.value()
      1/3*sqrt2 + 1/4
      sage: cff.n(digits=50)
      0.72140452079103168293389624140323269285655729179232
      
      sage: cf_pi = continued_fraction(pi)
      [3; 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, ...]
      sage: cf_pi.quotient(1500)
      1
      
      sage: cf_fib = continued_fraction(words.FibonacciWord([1,2]))
      sage: cf_fib
      [1; 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2...]
      sage: cf_fib.n(digits=42)
      1.38795458796714233691931385987318547787815
      }}}
      In particular we solve the question in #11345.
      
      URL: http://trac.sagemath.org/14567
      Reported by: vdelecroix
      Ticket author(s): Vincent Delecroix
      Reviewer(s): Ralf Stephan, Thierry Monteil
      33ecd5e8
    • Release Manager's avatar
      Trac #17603: disc() inconsistent for rational and integer polynomials · 3b47a808
      Release Manager authored
      Integer polynomials do not define a method {{{disc()}}}, yet rational
      polynomials do.
      
      {{{
      sage: R.<x>=ZZ[]
      sage: f=x^2+4
      sage: f.discriminant()
      -16
      sage: f.disc()
      AttributeError
      
      sage: g=f.change_ring(QQ)
      sage: g.disc()
      -16
      }}}
      
      Adding {{{disc()}}} to the respective file for integer polynomials.
      
      URL: http://trac.sagemath.org/17603
      Reported by: boerner
      Ticket author(s): Michel Boerner
      Reviewer(s): Benjamin Hackl
      3b47a808
    • Release Manager's avatar
      Trac #17573: Wrap Gap Structure Description · e2ac7e6f
      Release Manager authored
      See [http://math.stackexchange.com/questions/1084341 this math.sx
      question].
      
           G.gap().StructureDescription()
      
      URL: http://trac.sagemath.org/17573
      Reported by: kcrisman
      Ticket author(s): Sergey Bykov
      Reviewer(s): Nathann Cohen
      e2ac7e6f
    • Release Manager's avatar
      Trac #17067: Canonical height over number fields for projective morphisms · 70893d01
      Release Manager authored
      Enable compute canonical height over number fields for points and
      morphisms defined over number fields. The method will be to extend the
      local height computations (green's functions) to include number field
      places.
      
      URL: http://trac.sagemath.org/17067
      Reported by: bhutz
      Ticket author(s): Ben Hutz
      Reviewer(s): Paul Fili
      70893d01
    • Release Manager's avatar
      Trac #17685: Wrong shell test for "sage -n=..." · 31ea709c
      Release Manager authored
      As reported on [http://ask.sagemath.org/question/25624/sagetex-hyphen-
      in-filename-forbidden/ this ask question], the command `sage <filename>`
      is understood as `sage -n=...` command if `<filename>` contains `-n`.
      This is due to a wrong use of shell regex.
      
      {{{
      $ sage file-name.py
      CRITICAL:root:unknown notebook: None
      Error, notebook must be one of default, ipython, sagenb but got None
      }}}
      
      URL: http://trac.sagemath.org/17685
      Reported by: tmonteil
      Ticket author(s): Thierry Monteil
      Reviewer(s): François Bissey
      31ea709c
    • Release Manager's avatar
      Trac #17683: Subgraph of Hasse Diagram gives error · 711cdcdf
      Release Manager authored
      {{{
      sage: Poset({0:[1]})._hasse_diagram.subgraph([0])
      NotImplementedError: An immutable graph does not change name
      }}}
      
      This same error has already been corrected from several other places.
      
      (This will be needed for #17173, I guess.)
      
      URL: http://trac.sagemath.org/17683
      Reported by: jmantysalo
      Ticket author(s): Nathann Cohen
      Reviewer(s): Travis Scrimshaw
      711cdcdf
    • Release Manager's avatar
      Trac #17665: Change binary_matrix data type to use bitset · b38de514
      Release Manager authored
      This patch changes the data structure {{{binary_matrix_t}}} to use one
      bitset per row. This enables us to use directly operations on bitsets
      without casts. It also moves the files to {{{data_structures}}}.
      Currently, this data structure is only used for operations on graphs.
      
      URL: http://trac.sagemath.org/17665
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Jeroen Demeyer, Nathann Cohen
      b38de514
    • Release Manager's avatar
      Trac #17616: Cleanup in the thematic tutorials · 7785566d
      Release Manager authored
      This branch reorders the index of thematic tutorials.
      
      http://www.sagemath.org/doc/thematic_tutorials/
      
      Currently, the hierarchy is not very clear between section/subsections,
      and very big titles have one or two entries (like "geometry").
      
      This branch flattens it a bit, and reorders it:
      
      - "Programming and Design" is renamed to "Introduction to Sage" (right
      after 'Introduction to Python')
      
      - 'coding theory' is moved to 'combinatorics' (it had a section of its
      own before)
      
      - 'Modeling mathematics on a computer' is renamed to
      '!Parents/!Elements, Categories and algebraic structures' (the whole of
      Sage is about modelling mathematics, from symbolics to graph theory)
      
      - A short table of contents is added in the "categories primer"
        http://www.sagemath.org/doc/reference/categories/sage/categories/prime
      r.html
      
      - Same for "group theory"
        http://www.sagemath.org/doc/thematic_tutorials/group_theory.html
      #group-theory
      
      - Importantly, all doctests of the "coding theory" tutorial were
      disabled for they began with "Sage :". I changed that, but there are
      many broken doctests that I cannot fix myself. This is ticket #17617.
      
      Nathann
      
      URL: http://trac.sagemath.org/17616
      Reported by: ncohen
      Ticket author(s): Nathann Cohen
      Reviewer(s): Marc Mezzarobba
      7785566d
    • Release Manager's avatar
      Trac #13682: No coercion map with quotients of ring quotients · 913c6356
      Release Manager authored
      If you take the quotient ring of a quotient ring, I would expect there
      to be a coercion map corresponding to the natural surjection. However
      this does not occur:
      {{{
      sage: R.<x,y> = PolynomialRing(QQ)
      sage: S = R.quotient_ring(x^2+y^2)
      sage: S
      Quotient of Multivariate Polynomial Ring in x, y over Rational Field by
      the ideal (x^2 + y^2)
      sage: S.has_coerce_map_from(R)
      True
      sage: T = S.quotient_ring(x^3 - y)
      sage: T
      Quotient of Multivariate Polynomial Ring in x, y over Rational Field by
      the ideal (-x*y^2 - y, x^2 + y^2)
      sage: T.has_coerce_map_from(R)
      True
      sage: T.has_coerce_map_from(S) # this should be true
      False
      }}}
      
      I suspect the following does not occur either (and is where the problem
      lies). If an ideal `I` is contained in an ideal `J`, there is not a
      coercion from `R/I -> R/J`.
      
      URL: http://trac.sagemath.org/13682
      Reported by: tscrim
      Ticket author(s): Travis Scrimshaw
      Reviewer(s): Michel Boerner, Julian Rueth
      913c6356
    • Release Manager's avatar
      Trac #17675: xgcd(2,2) hangs forever in ZZ['x'] · 8cc7bedb
      Release Manager authored
      On sage-6.5.beta6 we have
      {{{
      sage: R.<x> = ZZ['x']
      sage: R(2).xgcd(R(2))   # be prepared to wait
      }}}
      It is a problem in our way to use the FLINT function `fmpz_poly_xgcd`.
      As Bill reported on [https://groups.google.com/forum/#!topic/sage-
      devel/pDXdjGVvap8 this sage-devel thread] it does not work for input
      which are constant polynomials (note that it is already a bit more
      general that what is indicated in FLINT documentation: ''the function
      assumes that f and g are primitive (have Gaussian content equal to 1).
      The result is undefined otherwise.'')
      
      See also this [https://github.com/wbhart/flint2/issues/112 FLINT bug
      report].
      
      URL: http://trac.sagemath.org/17675
      Reported by: vdelecroix
      Ticket author(s): Vincent Delecroix
      Reviewer(s): Ralf Stephan
      8cc7bedb
  3. 28 Jan, 2015 19 commits
  4. 27 Jan, 2015 6 commits
    • Release Manager's avatar
      Trac #10074: special values of lesser hyperbolic functions · 2bca2760
      Release Manager authored
      Even though Maxima can evaluate `sech(0)`, Sage does this:
      {{{
      sage: cosh(0)
      1
      sage: sech(0)
      sech(0)
      }}}
      It seems reasonable to fix this.  Part of this is probably that `sech`
      is not a !GiNaC function.
      
      URL: http://trac.sagemath.org/10074
      Reported by: kcrisman
      Ticket author(s): Ralf Stephan
      Reviewer(s): Frédéric Chapoton
      2bca2760
    • Release Manager's avatar
      Trac #17663: Clean up sparse matrices · bacf687d
      Release Manager authored
      Big cleaning (and speedup x1.5)
      
      URL: http://trac.sagemath.org/17663
      Reported by: vdelecroix
      Ticket author(s): Vincent Delecroix
      Reviewer(s): Martin von Gagern
      bacf687d
    • Vincent Delecroix's avatar
      trac #17675: doc typo · f0d7ca3a
      Vincent Delecroix authored
      f0d7ca3a
    • Vincent Delecroix's avatar
    • Release Manager's avatar
      Trac #17615: Move bordeaux_2008 into thematic_tutorials · e85dcb4c
      Release Manager authored
      Like for #17614, the document entitled "Three Lectures about Explicit
      Methods in Number Theory Using Sage" is a document of its own though it
      is literally a thematic tutorial. This branch moves it where it belongs.
      
      Note: in order to look at this branch's diff you should use `git diff -M
      HEAD ^develop`. Otherwise you will see files being added/removed while
      they are only renamed. The -M option makes this clear.
      
      Nathann
      
      URL: http://trac.sagemath.org/17615
      Reported by: ncohen
      Ticket author(s): Nathann Cohen
      Reviewer(s): Karl-Dieter Crisman, David Coudert
      e85dcb4c
    • Release Manager's avatar
      Trac #16585: improved PolynomialSequence · 4bdbaeda
      Release Manager authored
      This now works:
      
      {{{#!python
      sage: sr = mq.SR(1,1,2,4, gf2=True)
      sage: F,s = sr.polynomial_system()
      sage: I = F.ideal()
      sage: I.random_element(degree=3) # new: return some funny distribution,
      #11850
      k100*k102*x102 + k100*k102*x110 + ...
      
      sage: I.random_element(degree=3, compute_gb=True, terms=True) # new:
      uniformly random up to degree 3
      k100*k101*w112 + k100*k102*k110 + k100*k102*w102 + k100*k103*w111 + ...
      
      sage: F.is_groebner() # new: PolynomialSequence.is_groebner, cf. #10856
      False
      
      sage: F.maximal_degree() # new: PolynomialSequence.maximal_degree, cf.
      2
      
      sage: gb = F.groebner_basis(algorithm='magma') # new: this used to fail
      sage: gb.is_groebner()
      True
      
      sage: gb.maximal_degree()
      1
      
      sage: M = Sequence([f.lm() for f in F]) # new: this used to fail cf.
      #10680
      sage: M.maximal_degree()
      2
      
      sage: F.reduced() # new: interreduced_basis() moved to Sequence
      Polynomial Sequence with 60 Polynomials in 36 Variables
      }}}
      
      This ticket replaces #11850, #10856, #10680
      
      URL: http://trac.sagemath.org/16585
      Reported by: malb
      Ticket author(s): Martin Albrecht
      Reviewer(s): Jakob Kroeker
      4bdbaeda