To understand the underlying mathematics of signature compilation, we
need to understand the algebraic structures of monoids, rings, quasi-rings, and semi-rings.
Definition 2
A monoid is a structure
such that:
is a set closed under : , for all
,
is an associative binary operator:
, for all , and
is an identity for :
for
all .
Definition 3
A quasi-ring is a structure
such that:
is a monoid,
is a monoid,
, is an annihilator of :
for all , and
distributes over :
and
, for all .
Definition 4
A ring is a quasi-ring with an additive inverse, i.e., for all
, there exists such that
.
If is a quasi-ring, then multiplication of matrices is
well-defined and has certain nice properties such as associativity and
the existence of an identity.
Definition 5
Given a quasi-ring,
, an matrix, , over , and an
matrix, , over , then (matrix multiplication)
is the matrix, over such that:
and
are both Boolean quasi-rings.
is also a Boolean ring;
is not.
is a closed Boolean semi-ring:
Definition 6
A closed semiring is a quasi-ring,
, such that:
is idempotent: , for all ,
is closed under countable infinite summaries,
, which are well-defined,
associativity, commutativity, and idempotence extend to infinite
summaries, and
distributes over infinite summaries.
In a Boolean semiring, corresponds to OR and
corresponds to AND. OR is idempotent, i.e., . This is
vital for ensuring that matrix multiplication can compute a transitive
closure, since transitively closed subsumption should not be `turned
off' by immediate subsumption chains on more than one subtyping
branch. So we need idempotence in the underlying Boolean quasi-ring.
XOR is not idempotent; so the Boolean ring is not the correct
structure to use.