24.7 LeadingExponent

LeadingExponent( g )

LeadingExponent returns the leading exponent of an ag word g as integer.

Let G be the parent group of g and (g_1, ..., g_n) the AG system of G and let o_i be the relative order of g_i. Then the element g can be expressed uniquely in the form g_1^{nu_1}* ...* g_n^{nu_n} for integers nu_i such that 0 leq nu_i < o_i. The leading exponent of g is the first nonzero nu_i.

If g is the identity 0 is returned.

Although ExponentAgWord( g, Depth( g ) ) returns the leading exponent of g, too, this function is faster and is able to handle the identity.

Note that LeadingExponent allows records that mimic ag words as arguments.

    gap> LeadingExponent( a * b^2 * c^2 * d );
    1
    gap> LeadingExponent( b^2 * c^2 * d );
    2 

Previous Up Top Next
Index

GAP 3.4.4
April 1997