This is the closest thing. It is only in the development version of SymPy,
but 1.10 will be released with it soon.
https://docs.sympy.org/dev/modules/polys/numberfields.html#p-adic-valuation

Depending on what you want to do you can easily define your own by
subclassing Function and defining the appropriate methods.

Aaron Meurer

On Sun, Feb 13, 2022 at 12:37 AM Luna Tuna <[email protected]>
wrote:

> Hi, googling turns up nothing.
>
> Was wondering if Sympy has a v_2(n) function such that it's part of the
> expression tree and so Sympy knows about rules such as v_2's complete
> additivity, i.e. v_2(xy) = v_2(x) + v_2(y) and so on and can thus simplify
> expressions involving it if possible.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/9c96f1ca-9d63-4e02-8f53-4f2ba6e81293n%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/9c96f1ca-9d63-4e02-8f53-4f2ba6e81293n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6KUcQvaHfZFySig%2BV8PWHaDbsbLAm7q%2B4qnswLyXGVb%3DQ%40mail.gmail.com.

Reply via email to