The following are a collection of functions which apply to p-adic rings and most apply to fields.
Assign names to the generators of P. The sequence can have at most two elements which must be strings. The first of these is assigned to the name of the prime. The second is effectively ignored (applicable only to local rings and fields).
The characteristic of the p-adic ring or field P.
The number of elements in P if P is a finite precision ring. The cardinality of a p-adic field is infinite regardless of whether the field has finite precision.Iterating over the elements of a p-adic ring is possible but it will take time in proportion to the cardinality of P. It is recommended only for "small" p-adic rings (precision must be very small for such a ring).
Return the kth generator of P.
Changes the maximum precision with which elements can be created to be r. The precision can be set to be infinite to gain a floating structure.
Returns whether or not the p-adic rings or fields are the same.
Returns whether or not the p-adic rings or fields are not the same.
> ChangePrecision(Zp, Infinity()); 5-adic Ring > Zp; 5-adic Ring mod p^20 > #Zp; 95367431640625 > ChangePrecision( Zp, Infinity()); > AssignNames( Zp, ["pi"]); > Zp.1; 5 > Zp`SeriesPrinting := true; > Zp.1; pi > p; p > Zp eq ChangePrecision(Zp, 10); false > RingOfIntegers(FieldOfFractions(Zp)) ne Zp; falseNote that p is an element of the original Zp with precision 20 which is why it retains its name to print with.