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 """ return False def is_field(self,**kwds): """ Since Infinite Polynomial Rings must have at least one generator, they have infinitely many variables and thus never are fields. TESTS:: sage: R = InfinitePolynomialRing(GF(2)) sage: R Infinite polynomial ring in x over Finite Field of size 2 sage: R.is_field() False """ return False ## Auxiliary function for variable comparison def varname_cmp(self,x,y): """ """ return self._base.characteristic() def is_field(self): def is_field(self, proof=True): """ Return ``False``, since an infinite polynomial ring has at least one generator, hence, infinitely many variables. """ return False def is_integral_domain(self): def is_integral_domain(self, proof=True): """ An infinite polynomial ring is an integral domain if and only if the base ring is. sage: R.is_integral_domain() True """ return self._base.is_integral_domain() return self._base.is_integral_domain(proof=proof) def is_noetherian(self): """