Hi,
I have worked on a package for discrete (pseudo-)valuations in Sage. The
package focuses on valuations on number fields, padic fields, function
fields, and polynomial rings over such fields. The heavy lifting is done
by an implementation of the algorithms described in [1,2]. Most
importantly it lets you compute all the extensions of a valuation from
one field to a finite extension field. This can then be used as the
basis for an implementation of general extensions of p-adic rings (I
also have a basic prototype of that but it is not part of this package.)
The package should work with Sage 7.4 or later:
https://github.com/saraedum/sage/releases
The code is already quite polished and I would like to integrate it into
Sage. However, I am not sure if there is much interest in it, (i.e.,
interested reviewers.) Please let me know if you are interested in
getting this into Sage. I can then create a small number of tickets for
this.
julian
[1] Mac Lane, S. (1936). A construction for prime ideals as absolute
values of an algebraic field. Duke Mathematical Journal, 2(3), 492-510.
[2] Mac Lane, S. (1936). A construction for absolute values in
polynomial rings. Transactions of the American Mathematical Society,
40(3), 363-395.
PS: If you want to have a look at the code and see some examples of what
you can do with it, here is a quick overview:
https://github.com/saraedum/sage/tree/experimental/src/sage/rings/valuation
contains all the generic discrete valuation code.
https://github.com/saraedum/sage/blob/experimental/src/sage/rings/padics/padic_valuation.py
contains the code that is specific to p-adics and number fields
https://github.com/saraedum/sage/blob/experimental/src/sage/rings/function_field/function_field_valuation.py
contains the code that is specific to function fields
https://github.com/saraedum/sage/blob/experimental/mac_lane/__init__.py
contains a bunch of monkey-patches to work around a few rather trivial
bugs in Sage.