From 2297236d5d80f9b0434b7841ede34dec33cd65a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Tue, 9 Jul 2024 17:30:07 +0200 Subject: [PATCH] fix mistake in category of fraction fields --- src/sage/rings/fraction_field.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/fraction_field.py b/src/sage/rings/fraction_field.py index 756cbbc9efc..148aa1f6ee4 100644 --- a/src/sage/rings/fraction_field.py +++ b/src/sage/rings/fraction_field.py @@ -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)