1 | initial version |

The method class_number gives you the answer, there is no need for further methods

```
sage: QuadraticField(2).class_number()
1
sage: QuadraticField(-5).class_number()
2
```

For a number field, the fractional ideals form a group under multiplication. The class number is the number of elements in the quotient of this ring by the principal ideals. Hence, the class number is 1 if and only if the number field is a PID.

see also: http://en.wikipedia.org/wiki/Ideal_class_group

2 | No.2 Revision |

The method class_number gives you the answer, there is no need for further methods

```
sage: QuadraticField(2).class_number()
1
sage: QuadraticField(-5).class_number()
2
```

For a number ~~field, ~~field K, the fractional ideals form a group under multiplication. The class number of K is the number of elements in the quotient of this ring by the principal ideals. ~~Hence, ~~In particular, the class number is 1 if and only if the ~~number field ~~ring of integers of K is a PID.

see also: http://en.wikipedia.org/wiki/Ideal_class_group

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.