Ticket #10270: 10270_proofpolynomial.patch

File 10270_proofpolynomial.patch, 2.2 KB (added by aapitzsch, 12 years ago)
  • sage/rings/polynomial/multi_polynomial_libsingular.pyx

    # HG changeset patch
    # User André Apitzsch <andre.apitzsch@st.ovgu.de>
    # Date 1289833878 -3600
    # Node ID 12b28349045146d67ceb9b675cd9b94729bd6222
    # Parent  470a408c7d96852070c8c0dc7ab70de1ed8d94b6
    trac 10270: proof.polynomial factor
    
    diff -r 470a408c7d96 -r 12b283490451 sage/rings/polynomial/multi_polynomial_libsingular.pyx
    a b  
    34693469
    34703470        return f
    34713471
    3472     def factor(self, proof=True):
     3472    def factor(self, proof=None):
    34733473        r"""
    34743474        Return the factorization of this polynomial.
    34753475
     
    35853585        parent = self._parent
    35863586        _ring = parent._ring
    35873587
     3588        if proof is None:
     3589            from sage.structure.proof.proof import get_flag
     3590            proof = get_flag(proof, "polynomial")
     3591
    35883592        if(_ring != currRing): rChangeCurrRing(_ring)
    35893593
    35903594        if p_IsConstant(self._poly, _ring):
  • sage/rings/polynomial/multi_polynomial_libsingular.pyx

    # HG changeset patch
    # User André Apitzsch <andre.apitzsch@st.ovgu.de>
    # Date 1289896398 -3600
    # Node ID a26d8bd06640465f4b3d54fb70b93cfc8a803c88
    # Parent  c4d6f992ad8791d3dadc2a83da0b7a98f4a81ec3
    trac 10270: add a test
    
    diff -r c4d6f992ad87 -r a26d8bd06640 sage/rings/polynomial/multi_polynomial_libsingular.pyx
    a b  
    35733573            Traceback (most recent call last):
    35743574            ...
    35753575            NotImplementedError: Factorization of multivariate polynomials over non-fields is not implemented.
     3576
     3577        This shows that ticket \#10270 is fixed::
     3578
     3579            sage: R.<x,y,z> = GF(3)[]
     3580            sage: f = x^2*z^2+x*y*z-y^2
     3581            sage: proof.polynomial(False)
     3582            sage: f.factor()
     3583            x^2*z^2 + x*y*z - y^2
     3584            sage: proof.polynomial(True)
     3585            sage: f.factor()
     3586            Traceback (most recent call last):
     3587            ...
     3588            NotImplementedError: proof = True factorization not implemented.  Call factor with proof=False.
    35763589        """
    35773590        cdef ring *_ring
    35783591        cdef poly *ptemp