Ask Your Question

the same function appears twice in the documentation

asked 2014-02-20 00:16:02 +0200

cjsh gravatar image

updated 2015-01-13 18:15:15 +0200

FrédéricC gravatar image

The functions base_field()/constant_base_field()/constant_field()/vector_space()/maximal_order()/random_element appear twice in the following document:

and what different with RationalFunctionField() and FunctionField()?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-06-29 13:49:01 +0200

vdelecroix gravatar image


Python is object oriented (see Python doc about classes) and what you call functions are actually methods, i.e. they belong to their class. The point is that you can have different implementation of the objects and keep the same interface. In this particular case, given any function field you will use

sage: K.base_field()

to get the base field.

For the existence of the two classes, it is explicitly said in the documentation:

  • FunctionField: The abstract base class for all function fields.
  • RationalFunctionField: A rational function field K(t) in one variable, over an arbitrary base field.


edit flag offensive delete link more


thank you very much!

cjsh gravatar imagecjsh ( 2014-07-07 11:22:36 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-02-20 00:16:02 +0200

Seen: 163 times

Last updated: Jul 07 '14