formal sum, or linear combination.
The formalsum is mathematically a finite sum of terms. The term consists of two parts: coefficient and base. The coefficients must be in a ring. The base is arbitrary.
Two formalsums can be added in the following way. If there are terms with common base, they are fused into a new term with the same base and coefficients added.
A coefficient can be looked up from the base. If the specified base does not appear in the formalsum, it is null.