Opened 11 years ago

Closed 11 years ago

# InfinitePolynomialRing_sparse.is_field lacks `proof=...` option

Reported by: Owned by: mmezzarobba malb major sage-duplicate/invalid/wontfix commutative algebra Marc Mezzarobba Mike Hansen N/A

### Description

The class `InfinitePolynomialRing_sparse` defines two methods called `is_field()`. The second definition rejects keyword arguments. This prevents from creating polynomial rings over infinite polynomial rings:

```\$ ./sage
----------------------------------------------------------------------
| Sage Version 4.5, Release Date: 2010-07-16                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: InfinitePolynomialRing(QQ, 'a')['x']
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/marc/opt/sage-4.5/<ipython console> in <module>()

/home/marc/opt/sage-4.5/local/lib/python2.6/site-packages/sage/rings/ring.so in sage.rings.ring.Ring.__getitem__ (sage/rings/ring.c:2550)()

/home/marc/opt/sage-4.5/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.pyc in PolynomialRing(base_ring, arg1, arg2, sparse, order, names, name, implementation)
341                 raise TypeError, "if second arguments is a string with no commas, then there must be no other non-optional arguments"
342             name = arg1
--> 343             R = _single_variate(base_ring, name, sparse, implementation)
344         else:
345             # 2-4. PolynomialRing(base_ring, names, order='degrevlex'):

/home/marc/opt/sage-4.5/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.pyc in _single_variate(base_ring, name, sparse, implementation)
421
--> 422         elif base_ring.is_field(proof = False):
423             R = m.PolynomialRing_field(base_ring, name, sparse, implementation=implementation)
424

TypeError: is_field() got an unexpected keyword argument 'proof'
```

There is a similar issue with is_integral_domain, too.

### comment:1 follow-up: ↓ 2 Changed 11 years ago by mmezzarobba

Please disregard (or better, delete) the previous attachment.

### comment:2 in reply to: ↑ 1 Changed 11 years ago by mmezzarobba

• Authors set to Marc Mezzarobba
• Status changed from new to needs_review

Please disregard (or better, delete) the previous attachment.

I have now replaced it with the correct file. (It seems that for some reason, unprivilegied trac users are allowed to replace attached files but not to delete them??!)

### comment:3 follow-up: ↓ 4 Changed 11 years ago by mhansen

• Reviewers set to Mike Hansen
• Status changed from needs_review to needs_work

You probably don't want the line

```print "coucou"
```

in the patch.

### comment:4 in reply to: ↑ 3 Changed 11 years ago by mmezzarobba

• Status changed from needs_work to needs_review

You probably don't want the line

```print "coucou"
```

in the patch.

Sorry--I was sure I had double-checked that it wasn't in the patch after uploading it... :-/ Thanks for spotting my blunder.

### comment:5 Changed 11 years ago by mhansen

• Status changed from needs_review to needs_work

In is_integral_domain, we should pass on the keywords to self._base.is_integral_domain() so that that can take a proof option.

### comment:6 Changed 11 years ago by fwclarke

• Resolution set to duplicate
• Status changed from needs_work to closed

This has been fixed by #9443

### comment:7 Changed 11 years ago by mvngu

• Milestone changed from sage-4.6.1 to sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.