2.2.1 misc.functional - Functional notation

These are function so that you can write foo(x) instead of x.foo() in certain common cases.

The module misc.functional defines the following methods:

Ideal( R, [gens=True], [coerce=[]])

Create the ideal in ring with given generators.

INPUT:
    R -- a ring
    gens -- list of elements
    coerce -- bool (default: True); whether gens need to be coerced into
ring.

Alternatively, one can also call this function with the syntax
     Ideal(gens)
where gens is a nonempty list of generators or a single generator.
    
OUTPUT:
    The ideal of ring generated by gens.

additive_order( x)

Return the additive order of $ x$ .

arg( x)

Return the argument of a complex number $ x$ .

base_field( x)

Return the base field over which x is defined.

base_ring( x)

Return the base ring over which x is defined.

basis( x)

Return the fixed basis of x.

category( x)

Return the category of x.

charpoly( x)

Return the characteristic polynomia of x.

conductor( x)

Return the conductor of x.

cos( x)

Return the cosine of x.

decomposition( x)

Return the decomposition of x.

denominator( x)

Return the numerator of x.

derivative( x)

Return the derivative of x.

det( x)

Return the determinant of x.

dim( x)

Return the dimension of x.

dimension( x)

Return the dimension of x.

exp( x)

Return the value of the exponentation function at x.

factor( x)

Return the prime factorization of x.

factorisation( x)

Return the prime factorization of x.

factorization( x)

Return the prime factorization of x.

fcp( x)

Return the factorization of the characteristic polynomial of x.

gcd( a, [b=0])

The greatest commond divisor of a and b.

sage: GCD(97,100)
1
sage: GCD(97 * 10**15, 19**20 * 97**2)
97

gens( x)

Return the generators of x.

hecke_operator( x, n)

Return the n-th Hecke operator T_n acting on x.

ideal( x)

Return the ideal generated by x where x is an element or list.

imag( x)

Return the imaginary part of x.

image( x)

Return the image of x.

integral( x)

Return integrali of x.

is_even( x)

Return whether or not x is even, e.g., divisible by 2.

is_odd( x)

Return whether or not x is odd. This is by definition the complement of is_even.

isqrt( x)

Return an integer square root, i.e., the floor of a square root.

j_invariant( x)

Return the j_invariant of x.

kernel( x)

Return the kernel of x.

lcm( a, [b=None])

The least common multiple of a and b.

sage: LCM(97,100)
9700
sage: LCM(0,2)
0
sage: LCM(-3,-5)
15

log( x, [b=None])

Return the log of x to the base b. The default base is e.

INPUT:
    x -- number
    b -- base (default: None, which means natural log)
OUTPUT:
    number

WARNING: In MAGMA, the order of arguments is reversed from in SAGE, i.e., the base is given first. We use the opposite ordering, so the base can be viewed as an optional second argument.

minimal_polynomial( x)

Return the minimal polynomial of x.

modular_degree( E)

Return the modular degree of the elliptic curve E.

multiplicative_order( x)

Return the multiplicative order of self, if self is a unit, or raise ArithmeticError otherwise.

ngens( x)

Return the number of generators of x.

norm( x)

Return the norm of x.

numerator( x)

Return the numerator of x.

one( R)

Return the one element of the ring R.

order( x)

Return the order of x. If x is a ring or module element, this is the additive order of x.

parent( x)

Return x.parent() if defined, or type(x) if not.

sage: Z = parent(int(5))
sage: Z(17)
17
sage: Z
<type 'int'>

quo( x, y, [var=None])

Return the quotient object x/y, e.g., a quotient of numbers or of a polynomial ring x by the ideal generated by y, etc.

quotient( x, y, [var=None])

Return the quotient object x/y, e.g., a quotient of numbers or of a polynomial ring x by the ideal generated by y, etc.

rank( x)

Return the rank of x.

real( x)

Return the real part of x.

regulator( x)

Return the regulator of x.

sin( x)

Return the sin of x.

sqrt( x)

Return a square root of x.

square_free_part( x)

Return the product of the prime divisors of x.

square_root( x)

Return a square root of x with the same parent as x, if possible, otherwise raise a ValueError.

tan( x)

Return the tangent of x.

xgcd( a, b)

Returns triple of integers (g,s,t) such that g = s*a+t*b = gcd(a,b).

sage: xgcd(56, 44)
(4, 4, -5)
sage: 4*56 + (-5)*44
4

zero( R)

Return the zero element of the ring R.

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