# Ticket #4528: krull.patch

File krull.patch, 3.5 KB (added by cremona, 14 years ago)
• ## sage/rings/number_field/order.py

```# HG changeset patch
# User John Cremona <john.cremona@gmail.com>
# Date 1226767828 0
# Node ID 4f6c26438fae4cb8b985f9cd51159464c2491f6d
# Parent  5e45f3ee796ad08b6a3467a21f4809ba9e2d69dc
Implement Krull dimension for orders in number fields

diff -r 5e45f3ee796a -r 4f6c26438fae sage/rings/number_field/order.py```
 a """ return self.is_maximal() def krull_dimension(self): """ Return the Krull dimension of this order, which is 1. EXAMPLES: sage: K. = QuadraticField(5) sage: OK = K.maximal_order() sage: OK.krull_dimension() 1 sage: O2 = K.order(2*a) sage: O2.krull_dimension() 1 """ return ZZ(1) def integral_closure(self): """ Return the integral closure of this order.
• ## sage/rings/ring.pyx

`diff -r 5e45f3ee796a -r 4f6c26438fae sage/rings/ring.pyx`
 a False """ return True def krull_dimension(self): """ Return the Krull dimension if this commutative ring. Return the Krull dimension of this commutative ring. The Krull dimension is the length of the longest ascending chain of prime ideals. \code{krull_dimension} is not implemented for generic commutative rings. Fields and PIDs, with Krull dimension equal to 0 and 1, respectively, have naive implementations of \code{krull_dimension} Orders in number fields also have Krull dimension 1. sage: R = CommutativeRing(ZZ) sage: R.krull_dimension() Traceback (most recent call last): All orders in number fields have Krull dimension 1, including non-maximal orders: sage: K. = QuadraticField(-1) sage: R = K.maximal_order(); R Maximal Order in Number Field in i with defining polynomial x^2 + 1 sage: R.krull_dimension() 1 sage: R = K.order(2*i); R Order in Number Field in i with defining polynomial x^2 + 1 sage: R.is_maximal() False sage: R.krull_dimension() 1 """ raise NotImplementedError sage: K = NumberField(x^2 + 1, 's') sage: OK = K.ring_of_integers() sage: OK.krull_dimension() Traceback (most recent call last): ... NotImplementedError 1 The following are not Dedekind domains but have a \code{krull_dimension} function. Multivariate Polynomial Ring in x, y, z over Integer Ring sage: U.krull_dimension() 4 sage: K. = QuadraticField(-1) sage: R = K.order(2*i); R Order in Number Field in i with defining polynomial x^2 + 1 sage: R.is_maximal() False sage: R.krull_dimension() 1 """ return 1