GRÖBNER is designed "polymorphically", i.e. in such a way that the implementation of algorithms for a domain is totally independent of the subdomains involved. For example, the domain of monomials naturally involves two subdomains, the domain of coefficients and the domain of power products. In the spirit of polymorphism, the code for monomial multiplication (``componentwise multiplication'') should be independent of the names for coefficient multiplication and power product multiplication. It should be avoided to have an extra implementation for monomial multiplication for each combination of a coefficient domain and a power product domain.
In GRÖBNER, polymorphism is accomplished by introducing a virtual domain as an additional layer between a domain and any of its subdomains. Instead of calling a routine of a subdomain directly, a routine of the corresponding virtual domain is called. For each possible concrete subdomain, we supply a coercion unit , which replaces each call to the virtual domain by a call to the concrete subdomain. The virtual domains together with their coercion units describe the interface between a domain and its subdomains. We will explain this mechanism in more detail in the subsequent sections.