On Fri, Feb 08, 2013 at 08:44:18PM +0000, Simon King wrote:
> I would like to change the FractionField construction functor, see
> #14084, so that its domain is what it should be: The category of
> integral domains, and not just the category of rings.
Sounds good.
> Problem: If we would do so, then some tests would fail, because Zp(p)
> and ZZ[['x']] do not know that they are integral domains. Similarly,
> Qp(p) is not initialised as a field:
>
> sage: Zp(7) in IntegralDomains()
> False
> sage: ZZ[['x']] in IntegralDomains()
> False
> sage: Qp(7).category()
> Category of commutative rings
> sage: Qp(7).is_field()
> True
> sage: Qp(7) in IntegralDomains()
> False
Hmm, fun indeed:
sage: Qp(7).category()
Category of commutative rings
sage: Qp(7) in IntegralDomains()
False
sage: Qp(7) in Fields()
True
sage: Qp(7).category()
Category of fields
sage: Qp(7) in IntegralDomains()
True
I agree that Qp(p) should be declared from the beginning in the Fields
category. And similarly ZZ[['x']] should be in IntegralDomains. This
costs nothing. Zp is a bit more complicated, since that depends on p,
and one may not want to test the primality of p right away (that was
discussed around 2009 on sage-devel).
> On a related note, isn't the power series ring over a field itself a
> field? Currently, it is not, in Sage:
>
> sage: (QQ[['x']]).is_field()
> False
Laurent power series form a field; however x is not invertible in
ZZ[['x']], right?
Cheers,
Nicolas
--
Nicolas M. Thi�ry "Isil" <
nth...@users.sf.net>
http://Nicolas.Thiery.name/