Ticket #9108: trac_9108-mark_long_doctests_in_symmetric_ideal.patch

File trac_9108-mark_long_doctests_in_symmetric_ideal.patch, 2.5 KB (added by leif, 11 years ago)

Marks the offending lines with # long time. Based on 4.4.3.alpha0.

  • sage/rings/polynomial/symmetric_ideal.py

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1275403412 -7200
    # Node ID d7686100bc95d57234760f3ce78ed8deb0c07c44
    # Parent  21acdff220a43f77712cd51cbd047e2184ae2f51
    #9108 Marks time-consuming examples/doctests in symmetric_ideal.py with "long time".
    
    Actually only two examples/lines time out on older/slower machines, but many other lines
    depend on their results.
    
    diff -r 21acdff220a4 -r d7686100bc95 sage/rings/polynomial/symmetric_ideal.py
    a b  
    113113
    114114    The default ordering is lexicographic. We now compute a Groebner basis::
    115115   
    116         sage: J=I.groebner_basis()
    117         sage: J
     116        sage: J=I.groebner_basis() ; J # long time
    118117        [y_1^5 + y_1^3, y_2*y_1^2 - y_1^3, y_2^2 - y_1^2, x_1*y_1^2 - y_1^4, x_1*y_2 - y_1^3, x_1^2 + y_1^2, x_2*y_1 - y_1^3]
    119118
    120119    Ideal membership in ``I`` can now be tested by commuting symmetric reduction modulo ``J``::
    121120
    122         sage: I.reduce(J)
     121        sage: I.reduce(J) # depends on long time example above
    123122        Symmetric Ideal (0, 0) of Infinite polynomial ring in x, y over Rational Field
    124123
    125124    Note that the Groebner basis is not point-wise invariant under permutation. However, any element
    126125    of ``J`` has symmetric reduction zero even after applying a permutation::
    127126
    128127        sage: P=Permutation([1, 4, 3, 2])
    129         sage: J[2]
     128        sage: J[2] # depends on long time example above
    130129        y_2^2 - y_1^2
    131         sage: J[2]^P
     130        sage: J[2]^P # depends on long time example above
    132131        y_4^2 - y_1^2
    133         sage: J.__contains__(J[2]^P)
     132        sage: J.__contains__(J[2]^P) # depends on long time example above
    134133        False
    135         sage: [[(p^P).reduce(J) for p in J] for P in Permutations(4)]
     134        sage: [[(p^P).reduce(J) for p in J] for P in Permutations(4)] # long time
    136135        [[0, 0, 0, 0, 0, 0, 0],
    137136         [0, 0, 0, 0, 0, 0, 0],
    138137         [0, 0, 0, 0, 0, 0, 0],
     
    161160    Since ``I`` is not a Groebner basis, it is no surprise that it can not detect
    162161    ideal membership::
    163162
    164         sage: [p.reduce(I) for p in J]
     163        sage: [p.reduce(I) for p in J] # depends on long time example above
    165164        [y_1^5 + y_1^3, y_2*y_1^2 - y_1^3, y_2^2 - y_1^2, x_1*y_1^2 - y_1^4, x_1*y_2 - y_1^3, -y_2^2 + y_1^2, x_2*y_1 - y_1^3]
    166165
    167166    Note that we give no guarantee that the computation of a symmetric Groebner basis will terminate in