Ticket #9821: trac_9821.patch

File trac_9821.patch, 1.9 KB (added by fwclarke, 11 years ago)
  • sage/rings/polynomial/infinite_polynomial_ring.py

    # HG changeset patch
    # User Francis Clarke <F.Clarke@Swansea.ac.uk>
    # Date 1282910122 -3600
    # Node ID b179b3ccd107c0d8636901d8bddf785b89d2682e
    # Parent  d1332380b8b389ff99cbcdf33591c81a764b73e7
    #9821: fix is_field and is_integral_domain for infinite polynomial rings
    
    diff -r d1332380b8b3 -r b179b3ccd107 sage/rings/polynomial/infinite_polynomial_ring.py
    a b  
    11121112        """
    11131113        return False
    11141114
    1115     def is_field(self,**kwds):
    1116         """
    1117         Since Infinite Polynomial Rings must have at least one
    1118         generator, they have infinitely many variables and thus never
    1119         are fields.
    1120 
    1121         TESTS::
    1122 
    1123             sage: R = InfinitePolynomialRing(GF(2))
    1124             sage: R
    1125             Infinite polynomial ring in x over Finite Field of size 2
    1126             sage: R.is_field()
    1127             False
    1128 
    1129         """
    1130         return False
    1131 
    11321115    ## Auxiliary function for variable comparison
    11331116    def varname_cmp(self,x,y):
    11341117        """
     
    12871270        """
    12881271        return self._base.characteristic()
    12891272
    1290     def is_field(self):
     1273    def is_field(self, proof=True):
    12911274        """
    12921275        Return ``False``, since an infinite polynomial ring has at least one
    12931276        generator, hence, infinitely many variables.
     
    13001283        """
    13011284        return False
    13021285
    1303     def is_integral_domain(self):
     1286    def is_integral_domain(self, proof=True):
    13041287        """
    13051288        An infinite polynomial ring is an integral domain if and only if the
    13061289        base ring is.
     
    13111294            sage: R.is_integral_domain()
    13121295            True
    13131296        """
    1314         return self._base.is_integral_domain()
     1297        return self._base.is_integral_domain(proof=proof)
    13151298
    13161299    def is_noetherian(self):
    13171300        """