Skip to content

Commit

Permalink
sagemathgh-38343: fix mistake in category of fraction fields
Browse files Browse the repository at this point in the history
    
This is fixing wrong code used to determine the category of fraction
fields.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#38343
Reported by: Frédéric Chapoton
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Jul 20, 2024
2 parents 8855e58 + 2297236 commit ac80949
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/sage/rings/fraction_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,20 @@ def __init__(self, R,
sage: Frac(QQ['x,y']).variable_names()
('x', 'y')
sage: category(Frac(QQ['x']))
Category of quotient fields
Category of infinite quotient fields
TESTS::
sage: F = FractionField(QQ['x'])
sage: F.cardinality()
+Infinity
"""
self._R = R
self._element_class = element_class
cat = category
if self in Rings().Infinite():
if R in Rings().Infinite():
cat = cat.Infinite()
elif self in Rings().Finite():
elif R in Rings().Finite():
cat = cat.Finite()
Parent.__init__(self, base=R, names=R._names, category=cat)

Expand Down

0 comments on commit ac80949

Please sign in to comment.