25.1 Introduction to the $ p$ -adics

Module: sage.rings.padics.tutorial

Introduction to the $ p$ -adics

This tutorial outlines what you need to know in order to use $ p$ -adics in SAGE effectively.

Our goal is to create a rich structure of different options that will reflect the mathematical structures of the $ p$ -adics. This is very much a work in progress: some of the classes that we eventually intend to include have not yet been written, and some of the functionality for classes in existence has not yet been implemented. In addition, while we strive for perfect code, bugs (both subtle and not-so-subtle) continue to evade our clutches. As a user, you serve an important role. By writing non-trivial code that uses the $ p$ -adics, you both give us insight into what features are actually used and also expose problems in the code for us to fix.

Our design philosophy has been to create a robust, usable interface working first, with simple-minded implementations underneath. We want this interface to stabilize rapidly, so that users' code does not have to change. Once we get the framework in place, we can go back and work on the algorithms and implementations underneath. All of the current $ p$ -adic code is currently written in pure Python, which means that it does not have the speed advantage of compiled code. Thus our $ p$ -adics can be painfully slow at times when you're doing real computations. However, finding and fixing bugs in Python code is far easier than finding and fixing errors in the compiled alternative within SAGE (SageX), and Python code is also faster and easier to write. We thus have significantly more functionality implemented and working than we would have if we had chosen to focus initially on speed. And at some point in the future, we will go back and improve the speed. Any code you have written on top of our $ p$ -adics will then get an immediate performance enhancement.

If you do find bugs, have feature requests or general comments, please email sage-support@groups.google.com or roed@math.harvard.edu.

See About this document... for information on suggesting changes.