The free algebra BB is a graded algebra: that
is, for each integer n 0n>=0 there is a homogeneous
subspace B_nB_n with
B_0=RB_0=R and
B=_n=0^B_n,andB_nB_mB_n+mfor all $m,n 0.$
omitted
The elements of _n 0B_nomitted are
called homogeneous and those of B_nB_n are
called homogenous of degree (or grade) n.
The grade of a term is the number of symbols in it. Thus the grade of
xxx and 4xxy is 3; the grade of a constant is zero.
Because the terms are stored in an implementation-specific way, the
grade of a multi-term object is a disord object.
The grade of the zero freealg object,
grade(as.freealg(0)), is defined to be zero, which ensures that
max(grades(abelianize(x))) <= max(grades(x)) is always satisfied.
However, a case for NULL could be made.