You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One common use model of Sage is to use tab completion to identify methods of a given object. For Sage integers, this will currently fail to reveal many standard functions such as the following.
I propose to add methods to the class of Sage integers. In the process, perhaps one can add a few standard functions which are missing even from the class of bare functions, like sum_of_divisors ("sigma(n)").
I doubt the general usefulness of such an undertaking. The notion that functions that take an object as parameter should be equivalent to member functions of that object is too broad.
I agree that the notion is too broad, but not in the way you have in mind: in Python, one generally tries to avoid clogging up the global namespace with things that really should be member functions of a particular class. So if I were starting from scratch, I would strongly consider implementing these functions exclusively as member functions of Sage integers; but I don't think it's appropriate to move in that direction now.
In any case, this case is much more special than the general discussion, because arithmetic functions are distinguished by the property of multiplicativity: if gcd(m,n) == 1 then f(m*n) = f(m)*f(n). So in a sense, they are more deeply linked to the class of integers than, say, the binomial or factorial functions.
One common use model of Sage is to use tab completion to identify methods of a given object. For Sage integers, this will currently fail to reveal many standard functions such as the following.
I propose to add methods to the class of Sage integers. In the process, perhaps one can add a few standard functions which are missing even from the class of bare functions, like sum_of_divisors ("sigma(n)").
CC: @kcrisman
Component: number theory
Keywords: arithmetic functions
Issue created by migration from https://trac.sagemath.org/ticket/14401
The text was updated successfully, but these errors were encountered: