Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the docstring for the associated_primes method on multivariate polynomial ideals is wrong #7959

Closed
williamstein opened this issue Jan 17, 2010 · 5 comments

Comments

@williamstein
Copy link
Contributor

The docstring for associated_primes claims it returns a list of pairs (I,P), but in fact it just returns the P. So this is wrong.

    @require_field
    @redSB
    def associated_primes(self, algorithm='sy'):
        r"""
        Return a list of primary ideals (and their associated primes) such
        that their intersection is `I` = ``self``.
        
        An ideal `Q` is called primary if it is a proper ideal of
        the ring `R` and if whenever `ab \in Q` and
        `a \not\in Q` then `b^n \in Q` for some
        `n \in \ZZ`.
        
        If `Q` is a primary ideal of the ring `R`, then the
        radical ideal `P` of `Q`, i.e.
        `P = \{a \in R, a^n \in Q\}` for some
        `n \in \ZZ`, is called the
        *associated prime* of `Q`.
        
        If `I` is a proper ideal of the ring `R` then there
        exists a decomposition in primary ideals `Q_i` such that
        
        
        -  their intersection is `I`
        
        -  none of the `Q_i` contains the intersection of the
           rest, and
        
        -  the associated prime ideals of `Q_i` are pairwise
           different.
        
        
        This method returns the associated primes of the `Q_i`.
        
        INPUT:
        
        
        -  ``algorithm`` - string:
        
        -  ``'sy'`` - (default) use the shimoyama-yokoyama algorithm
        
        -  ``'gtz'`` - use the gianni-trager-zacharias algorithm
        
        
        OUTPUT:
        
        -  ``list`` - a list of primary ideals and their
           associated primes [(primary ideal, associated prime), ...]
        
        EXAMPLES::
        
            sage: R.<x,y,z> = PolynomialRing(QQ, 3, order='lex')
            sage: p = z^2 + 1; q = z^3 + 2
            sage: I = (p*q^2, y-z^2)*R
            sage: pd = I.associated_primes(); pd
            [Ideal (z^3 + 2, y - z^2) of Multivariate Polynomial Ring in x, y, z over Rational Field,
             Ideal (z^2 + 1, y + 1) of Multivariate Polynomial Ring in x, y, z over Rational Field]

Component: commutative algebra

Author: Willem Jan Palenstijn

Reviewer: William Stein

Merged: sage-4.3.1.rc1

Issue created by migration from https://trac.sagemath.org/ticket/7959

@wjp
Copy link
Mannequin

wjp mannequin commented Jan 17, 2010

comment:1

Attachment: trac_7959.patch.gz

Your patch seems to leave the wrong objects in the docstring. I'm attaching a new patch that inverts that, and also changes a second occurence of the description of the output.

@wjp
Copy link
Mannequin

wjp mannequin commented Jan 17, 2010

comment:2

Attachment: 7959_associated_primes_docs.patch.gz

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 18, 2010

Author: Willem Jan Palenstijn

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 18, 2010

Merged: sage-4.3.1.rc1

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 18, 2010

Reviewer: William Stein

@rlmill rlmill mannequin removed the s: positive review label Jan 18, 2010
@rlmill rlmill mannequin closed this as completed Jan 18, 2010
@mwhansen mwhansen modified the milestones: sage-4.3.2, sage-4.3.1 Jan 19, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants