where toterm is a conversion from constant terms in the structure
to rational numbers (e.g. rat_of_term for the reals), tonum is the opposite
(e.g. term_of_rat for the reals), EQ_CONV is an equality test conversion
(e.g. REAL_RAT_EQ_CONV), neg is negation, add is addition, sub is
subtraction, inv is multiplicative inverse, div is division, pow is
power, INTEGRAL_TH is an integrality theorem and FIELD_TH is a field
theorem (see below) and POLY_CONV is a polynomial normalization theorem for
the structure as returned by SEMIRING_NORMALIZERS_CONV (e.g. REAL_POLY_CONV
for the reals).
The integrality theorem essentially states that if a product is zero, so is one
of the factors (i.e. the structure is an integral domain), but this is stated
in an unnatural way to allow application to structures without negation. It is
permissible in this case to use boolean variables instead of operators such as
negation and subtraction. The precise form of the theorem (notation for natural
numbers, but this is supposed to be over the same structure):

The field theorem is of the following form. It is not logically necessary, and
if the structure is not a field you can just pass in TRUTH instead. However,
it is usually beneficial for performance to include it.

|- !x y. ~(x = y) <=> ?z. (x - y) * z = 1

It returns a proof procedure that will attempt to prove a formula that, after
suitable normalization, can be considered a universally quantified Boolean
combination of equations and inequations between terms of the right type. If
that formula holds in all integral domains, it will prove it. Any ``alien''
atomic formulas that are not natural number equations will not contribute to
the proof.

FAILURE CONDITIONS

Fails if the theorems are malformed.

EXAMPLE

The instantiation for the real numbers (in fact this is already available under
the name REAL_RING) could be coded as: