Îõ³h$%û$s5      !"#$%&'()*+,-./01234None -/ÇÉÖ×upadicTypeclass for p-adic numbers.padicA type for p-adic unit.padicïA type for digits of p-adic expansion. Associated type allows to assure that digits will agree with the radix p of the number.padic"Returns the precision of a number. Examples:precision (123 :: Z 2)20precision (123 :: Z' 2 40)40padicReturns the radix of a number Examples:radix (5 :: Z 13)13radix (-5 :: Q' 3 40)3padic1Constructor for a digital object from it's digitspadic"Returns digits of a digital object Examples:digits (123 :: Z 10)Ñ[(3 `modulo` 10),(2 `modulo` 10),(1 `modulo` 10),(0 `modulo` 10),(0 `modulo` 10)]take 5 $ digits (-123 :: Z 2)Ì[(1 `modulo` 2),(0 `modulo` 2),(1 `modulo` 2),(0 `modulo` 2),(0 `modulo` 2)]take 5 $ digits (1/300 :: Q 10)Ñ[(7 `modulo` 10),(6 `modulo` 10),(6 `modulo` 10),(6 `modulo` 10),(6 `modulo` 10)]padicReturns lifted digits Examples:lifted (123 :: Z 10)123lifted (-123 :: Z 10)+9999999999999999999999999999999999999999877padic/Creates digital object from it's lifted digits. padic4Creates p-adic number from given unit and valuation.fromUnit (u, v) = u * p^v padic-Splits p-adic number into unit and valuation.splitUnit (u * p^v) = (u, v) padicReturns True: for a p-adic number which is multiplicatively invertible. padicßPartial multiplicative inverse of p-adic number (defined both for integer or rational p-adics). padicÕType family for p-adic numbers with precision defined by reconstructable number type.123456 :: Padic Int 71022634 toInteger it1234568toRational (12345678987654321 :: Padic (Ratio Word16) 3)Ð537143292837 % 5612526479 -- insufficiend precision for proper reconstruction!!2toRational (12345678987654321 :: Padic Rational 3)12345678987654321 % 1padicÏPrecision sufficient for rational reconstruction of number belonging to a type num(. Used in a type declaration as follows:Ëx = 1 `div` 1234567898765432123456789 :: Z 2 (Sufficientprecision Word32 2) toRational x+13822228938088947473 % 12702006275138148709Èx = 1 `div` 1234567898765432123456789 :: Z 2 (Sufficientprecision Int 2) toRational x1 % 1234567898765432123456789padicÐConstraint for known valid radix of p-adic number as well as it's lifted radix.padic>Radix of the internal representation of integer p-adic number.padic&Constraint for valid radix of a numberpadic>> firstDigit (123 :: Z 10) -- (3 modulo. 10) -- >>> firstDigit (123 :: Z 257) -- (123 modulo 257)padic%Returns p-adic number reduced modulo preduce (123 :: Z 10) :: Mod 100(23 `modulo` 100)padic#Returns the p-adic unit of a number Examples:unit (120 :: Z 10)12unit (75 :: Z 5)3 padic&Returns a p-adic valuation of a number Examples:valuation (120 :: Z 10)1valuation (75 :: Z 5)2/Valuation of zero is equal to working precisionvaluation (0 :: Q 2)64valuation (0 :: Q 10)21 padic+Returns a rational p-adic norm of a number |x|_p. Examples:norm (120 :: Z 10)0.1norm (75 :: Z 5)4.0e-2padicèAdjusts unit and valuation of p-adic number, by removing trailing zeros from the right-side of the unit. Examples:»> x = 2313 + 1387 :: Q 10x3700.0 splitUnit x(3700,0)splitUnit (normalize x)(37,2) padicReturns TrueÄ for a p-adic number which is equal to zero (within it's precision).padicFor given radix p and natural number mô returns precision sufficient for rational reconstruction of fractions with numerator and denominator not exceeding m. Examples:'sufficientPrecision 2 (maxBound :: Int)64'sufficientPrecision 3 (maxBound :: Int)41(sufficientPrecision 10 (maxBound :: Int)20  56None?ÉÖ×à!6padic6Unfolds a number to a list of digits (integers modulo p). padic(Folds a list of digits (integers modulo p) to a number.padic4Extracts p-adic unit from integer number. For radix p and integer n returns pair (u, k) such that n = u \cdot p^k. Examples:getUnitZ 10 120(12,1)getUnitZ 2 120(15,3)getUnitZ 3 120(40,1)padic7Extracts p-adic unit from a rational number. For radix p and rational number x returns pair (r/s, k) such that 3x = r/s \cdot p^k,\quad \gcd(r, s) = \gcd(s, p) = 1 and  p \nmid r. Examples:getUnitQ 3 (75/157) (25 % 157, 1)getUnitQ 5 (75/157) (3 % 157, 2)getUnitQ 157 (75/157) (75 % 1, -1)getUnitQ 10 (1/60) (5 % 3, -2)padicÕFor a given list extracts prefix and a cycle, limiting length of prefix and cycle by len.. Uses the modified tortiose-and-hare method. padic2Returns p-adic solutions (if any) of the equation f(x) = 02 using Hensel lifting method. First, solutions of f(x) = 0\ \mathrm{mod}\ pí are found, then by Newton's method this solution is get lifted to p-adic number (up to specified precision). Examples:2henselLifting (\x -> x*x - 2) (\x -> 2*x) :: [Z 7]-[¦@64112011266421216213,¦@02554655400245450454]5henselLifting (\x -> x*x - x) (\x -> 2*x-1) :: [Q 10]1[0,1,¦@92256259918212890625,¦@07743740081787109376]!padic!Returns solution of the equation f(x) = 0\ \mathrm{mod}\ p% in p-adics. Used as a first step if  + function and is usefull for introspection.(findSolutionMod (\x -> x*x - 2) :: [Z 7][3,4])findSolutionMod (\x -> x*x - x) :: [Q 10][0.0,1.0,5.0,6.0]"padic(Returns a list of m-th roots of unity. #padicÐReturns p-adic exponent function, calculated via Taylor series. For given radix p0 converges for numbers which satisfy inequality:|x|_p < p^\frac{1}{1-p}.$padicÑReturns p-adic logarithm function, calculated via Taylor series. For given radix p0 converges for numbers which satisfy inequality: |x|_p < 1.%padic×Returns p-adic hyperbolic sine function, calculated via Taylor series. For given radix p0 converges for numbers which satisfy inequality:|x|_p < p^\frac{1}{1-p}.&padic>Returns p-adic inverse hyperbolic sine function, calculated as.\mathrm{sinh}^{ -1} x = \log(x + \sqrt{x^2+1})#with convergence, corresponding to $ and / functions.'padicÙReturns p-adic hyperbolic cosine function, calculated via Taylor series. For given radix p0 converges for numbers which satisfy inequality:|x|_p < p^\frac{1}{1-p}.(padicÀReturns p-adic inverse hyperbolic cosine function, calculated as0\mathrm{cosh}^{ -1}\ x = \log(x + \sqrt{x^2-1}),#with convergence, corresponding to $ and / functions.)padic5Returns p-adic hyperbolic tan function, calculated as=\mathrm{tanh}\ x = \frac{\mathrm{sinh}\ x}{\mathrm{cosh}\ x},#with convergence, corresponding to % and ' functions.*padic=Returns p-adic inverse hyperbolic tan function, calculated asÊ\mathrm{tanh}^{ -1 }\ x = \frac{1}{2} \log\left(\frac{x + 1}{x - 1}\right)#with convergence, corresponding to $ function.+padicÙReturns p-adic hyperbolic cosine function, calculated via Taylor series. For given radix p0 converges for numbers which satisfy inequality:|x|_p < p^\frac{1}{1-p}.,padicÎReturns p-adic cosine function, calculated via Taylor series. For given radix p0 converges for numbers which satisfy inequality:|x|_p < p^\frac{1}{1-p}.-padicÏReturns p-adic arcsine function, calculated via Taylor series. For given radix p0 converges for numbers which satisfy inequality: |x|_p < 1..padicÑReturns p-adic square root, calculated for odd radix via Hensel lifting, and for p=2 by recurrent product./padic0Exponentiation for p-adic numbers, calculated as x^y = e^{y \log x}, #with convergence, corresponding to # and $ functions.7padicReturns True2 for p-adics with square residue as a first digit. padicFunction to be vanished.padicDerivative of the function.padic The result.89 !:;"<#$%&'()*+,-.=/7None/>ÀÉ×"\0padic:Integer p-adic number with explicitly specified precision.1padic%Integer p-adic number (an element of  \mathbb{Z}_p) with default precision.2padic1Integer power function (analog of (^) operator ) >?0@12None/É×#.3padic;Rational p-adic number with explicitly specified precision.4padic&Rational p-adic number (an element of  \mathbb{Q}_p) with default precision.AB3C4DE5Representation and simple algebra for p-adic numbers.(c) Sergey Samoylenko, 2022GPL-3samsergey@yandex.ru experimentalPOSIXNone#Õ5   !"#$%&'()*+,-./0123451043   ! "./2#$+,%')-&(* Safe-Inferred$fFGHIJKLMÎ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEE7FF:GHIJKLMNOPÑpadic-0.1.0.0-inplaceMath.NumberTheory.PadicMath.NumberTheory.Padic.Types Math.NumberTheory.Padic.AnalysisMath.NumberTheory.Padic.Integer Math.NumberTheory.Padic.Rational Paths_padicPadicNumUnitDigit precisionradix fromDigitsdigitsliftedmkUnitfromUnit splitUnit isInvertibleinversePadicSufficientPrecisionRadix LiftedRadix KnownRadix ValidRadix firstDigitreduceunit valuationnorm normalizeisZerosufficientPrecisiontoRadix fromRadixgetUnitZgetUnitQ findCycle henselLiftingfindSolutionMod unityRootspExppLogpSinhpAsinhpCoshpAcoshpTanhpAtanhpSinpCospAsinpSqrtpPowZ'ZzPowQ'Q liftedRadixilogisSquareResidue extEuclid tortoiseHare newtonsMethoditerateMpSignumpSqrt2RDelaypUndefinedError fromEitherversiongetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDir