Modal Semirings with Operators for Knowledge Representation
Kim Solin
Dept. of Philosophy, Uppsala University, Uppsala, Sweden
Keywords:
Modal Semirings, Modal Algebra, Boolean Algebra with Operators, Modal Semirings with Operators,
Knowledge Representation, Dynamic Epistemic Logic.
Abstract:
Modal semirings are combined with modal algebra (Boolean algebra with operators) to form modal semirings
with operators. In turn, these are extended with a revision operator and used for knowledge representation.
1 INTRODUCTION
There are several ways of representing and reasoning
about changing knowledge. Two of these stand out.
First, one has the semiformal approach of Alchourron,
G
¨
ardenfors and Makinson (Alchourr
´
on et al., 1985),
which became a landmark in this field, and which
has spurred a colossal amount of research. Second,
one has a way of reasoning about changing knowl-
edge that is fully formal: dynamic epistemic logic,
see (van Ditmarsch et al., 2007) with references. But
this paper will be about a third style, namely, the alge-
braic. If one takes this approach, one strives to reason
about knowledge with the aid of algebra, see (Baltag
et al., 2007; Baltag et al., 2005; Baltag and Sadrzadeh,
2006; M
¨
oller, 2008; Solin, 2010; Panangaden and
Sadrzadeh, 2010). Why would one take the algebraic
approach? The answer is that there are many advan-
tages to algebra, in particular clear-cut reasoning, and
efficient automation and mechanisation (Aboul-Hosn
and Kozen, 2006; H
¨
ofner and Struth, 2007; Foster and
Struth, 2012).
The algebraic approach can be further subdi-
vided into a concrete and an abstract approach. The
concrete-algebraic approach means that one reasons
in a concrete algebra of, for example, relations. The
abstract-algebraic approach means that one via ax-
ioms defines an abstract algebra suited for one’s pur-
poses; the approach could also be called axiomatic-
algebraic. I shall focus on the abstract-algebraic de-
velopment that has its roots in Dexter Kozen’s work
on Kleene algebra (Kozen, 1994).
1.1 Background
Dexter Kozen conceived of Kleene algebra with tests
in the late 1990s (Kozen, 1997). This structure, which
is an idempotent semiring extended with Kleene star,
and embedded with a Boolean subalgebra of tests,
was later developed into Kleene algebra with domain
by Desharnais, M
¨
oller and Struth (Desharnais et al.,
2006). The last-mentioned structure allows the intro-
duction of modal operators in the sense of dynamic
logic (Harel et al., 2000), so it is also called modal
Kleene algebra.
Modal Kleene algebra was further augmented
with a revision operator (Solin, 2010) that allows
one to reason abstract-algebraically about chang-
ing knowledge in the style of dynamic epistemic
logic (van Ditmarsch et al., 2007). The tests were then
conceived of as actions that check whether the agent
believes some proposition or not. But since the tests
form a Boolean algebra, this had the unfortunate con-
sequence that ¬B¬p by double negation reduces to
p. In addition, one could not distinguish between the
agent’s beliefs and truth, since they were both mod-
elled by the same structure. Although this might be
all right in some circumstances, in others it is cer-
tainly not. The aim of this paper is to remedy that
situation by introducing the belief operator as an al-
gebraic operator in its own right, and to incorporate
that operator into modal Kleene algebra. I will focus
on the semiring reduct, that is, on modal semirings.
Since one has a Boolean subalgebra at hand in
any modal semiring, it is suitable to model the be-
lief operator with the aid of a Boolelan algebra with
operators. Boolean algebras with operators were
introduced by (J
´
onsson and Tarski, 1951; J
´
onsson
and Tarski, 1952) and independently, it seems
by (Lemmon, 1966a; Lemmon, 1966b). Lemmon
called them modal algebras. The work in this paper
will build mainly on Lemmon’s results. Indeed, I will
197
Solin K..
Modal Semirings with Operators for Knowledge Representation.
DOI: 10.5220/0004181001970202
In Proceedings of the 5th International Conference on Agents and Artificial Intelligence (ICAART-2013), pages 197-202
ISBN: 978-989-8565-39-6
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
propose that for modelling the belief operator one can
use what Lemmon calls a normal epistemic algebra.
The focus of this paper is the abstract algebra, and
not some specific set-theoretic model such as rela-
tions or hypertheories (Segerberg, 1999) that could
satisfy the axioms of the algebra; for appreciating the
paper, it is pivotal that the reader constantly bears this
in mind. The axioms that will be presented are mo-
tivated only by common sense, and there will not be
any model-theoretic justifications for them. The ab-
stract algebra is here considered as a first-class con-
ceputal tool, and not merely as a calucaltional aid for
a model.
1
Nevertheless, we shall throughout this pa-
per consider a simple relational model that will be
given below. It is a model with which many are fa-
miliar and that is useful for getting a more tangible
technical-mathematical understanding of the axioms.
But I want to emphasise, that this model is only a
heuristic aid and a technical tool. I shall only use the
model to prove technical results, such as the fact that
the tentative axioms do not contradict each other.
1.2 Structure of the Paper
The paper has the following structure. First, the the-
ory leading up to modal semirings is reviewed. Then
the parts of Lemmon’s work on modal algebra that
are needed for this paper are presented, upon which –
the main contribution of this paper – modal semirings
and modal algebra are combined; this structure we’ll
call a modal semiring with operators. After combin-
ing the two algebraic structures, a revision operator is
also proposed, yielding dynamic epistemic modal al-
gebra. Then some basic properties in the algebra are
considered, and the paper concludes with a number
of interesting themes for further investigation, theo-
retical as well as practical.
2 MODAL SEMIRINGS
An idempotent semiring is a structure over the sig-
nature (+, ;, 0, 1) that satisfies the following axioms
(a, b and c in the carrier set, and ; left implicit):
1
In contrast, (Solin, 2010) viewed the abstract algebra
as something of a calculational tool intended for existing
models. The models were the driving force behind the ax-
ioms of the algebra. The perspective in this paper is the
opposite: the abstract algebra here speaks for itself, the ax-
ioms are motivated only by common sense, and the various
models are considered secondary. – There will of course be
relations to set-theoretic models, but these will not be in-
vestigated in this paper. And, needless to say, the algebraic
formulation can itself be seen as a sort of axiomatically de-
fined set-theoretic model.
a + (b + c) = (a + b) + c, (1)
a + b = b + a, (2)
a + 0 = a, (3)
a + a = a, (4)
a(bc) = (ab)c, (5)
1a = a = a1, (6)
0a = 0 = a0, (7)
a(b + c) = ab + ac and (8)
(a + b)c = ac + bc. (9)
This means that (+, 0) is a commutative and idem-
potent monoid, and that (;, 1) is a monoid such that
; distributes over + , and that 0 annihilates to left
and right. The operator ; will often be left implicit.
The canonical order on a semiring is defined by
a b
def
a + b = b for all a and b in the carrier set.
By this, 0 is the least element, + is join, and ; and +
are both monotone (isotone).
A test semiring (Desharnais et al., 2006; Kozen,
1997) is a two-sorted algebra
(S, test(S), +, ; , ¬, 0, 1)
such that
(i) (S, +, ;, 0, 1) is an idempotent semiring,
(ii) (test(S), +, ;, ¬, 0, 1) is a Boolean algebra (BA)
and
(iii) test(S) S.
So join and meet in test(S) are + and ;, respectively,
and the complement is given by ¬. Naturally, 0 is
the least and 1 is the greatest element. For general
semiring elements it is the custom to use the notation
a, b, . . ., and for test elements p, q, . . . is the conven-
tion. On a test semiring one can axiomatise a domain
operator p : S test(S) by
a pa ; a, (10)
p(pa) p and (11)
p(apb) p(ab), (12)
for all a, b S and p test(S) (Desharnais et al.,
2006). It has been proved that (10) and (12) can be
strengthened to equalities.
A relational interpretation of domain and the other
operators is given below, and an epistemic interpreta-
tion will be given later (Section 5.1).
As mentioned in the introduction, one can define
modal operators with the aid of the domain operator
(Desharnais et al., 2006):
haip =
def
p(ap) and [a]p =
def
¬hap . (13)
This is why test semirings with a domain operator are
also called modal semirings. The diamond should be
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
198
read “it is possible to successfully perform a so that p
will hold” and the box as “after every successful way
of performing a it will be the case that p holds. In
the terminology of Dijkstra (Dijkstra, 1976), the box
is the weakest liberal precondition of a with respect
to p: if a terminates, p will hold. What is here called
‘successful’ corresponds to what Dijkstra calls ‘ter-
minating’.
Let us list some basic properties of this structure
(Desharnais et al., 2006). One has stability of tests,
pp = p , (14)
and additivity,
p(a + b) = pa + pb . (15)
Of course, isotony of domain is immediate from addi-
tivity. If one lets the operator p q be the syntactic
equivalent of ¬p + q, then
(p q = 1) p q
obtains.
2.1 A Relational Model
Below follows a concrete algebra that forms a rela-
tional model for the above axioms.
Let S, T Σ × Σ, and define the binary operators ;
and +, and the unary operator p as follows:
(x, y) (S;T )
def
z Σ
(x, z) S
and (z, y) T,
(x, y) (S + T )
def
(x, y) S or (x, y) T,
(x, x) pS
def
(x, y) S for some y Σ.
Now let the identity relation be denoted by and the
empty relation by Ø, and let ¬ be the complement
relative to . Then the structure
((Σ × Σ),(), +, ;, ¬, p , Ø, )
is a modal semiring (Desharnais et al., 2006).
The following example from (Solin, 2010) is in-
formative when figuring out how the modal operators
work in this heuristic model. But keep in mind that
the model is only a technical tool in this paper, since
the axioms are motivated primarily by the common-
sense interpretation found in Section 5.1.
Example 2.1. To the letter from (Solin, 2010). Let
Σ = {1, 2, 3, 4, 5}, let
S = {(1, 2), (2, 2), (2, 5), (4, 3)}
and let
P = {(2, 2), (3, 3)}.
Think of Σ as a set of states, S as a state-changing
action and P as a predicate determining the states 2
and 3. According to the definitions above we then
have
hSiP = {(1, 1), (2, 2), (4, 4)}
and
[S]P = {(1, 1), (3, 3), (4, 4), (5, 5)}.
Note that both hSiP and [S]P are predicates. It is thus
possible to use the action S to reach one of the states
prescribed by P if the action is performed from one
of the states 1, 2 or 4; but it is not guaranteed since
from state 2 we could also end up in 5. From the
states 1, 3, 4 and 5 we are guaranteed to end up in
a state prescribed by P as long as the action is per-
formed successfully – but from states 3 and 5 there is
no succesful way of performing the action.
3 MODAL ALGEBRA
A modal algebra is defined by (Lemmon, 1966a) in
the following way.
Definition 3.1. A structure (M, , , ¬, 0, 1, P) is a
modal algebra iff M is a set of elements closed under
operations , , ¬, and P such that:
(i) M is a Boolean algebra with respect to
, , ¬, 0, 1;
(ii) for x, y M, P(x y) = Px Py.
C
This is a Boolean algebra with operators in
J
´
onsson and Tarski’s sense, when the Boolean alge-
bra is endowed with only one function (J
´
onsson and
Tarski, 1951). The operator P may be read as ”pos-
sible”, and with it one can define the operator N for
”necessary” by Nx =
def
¬P¬x.
Lemmon calls a modal algebra that satisfies the
postulate
(iii) P1 = 1
a deontic algebra, and a modal algebra that satisfies
the postulate
(iv) x Px
an epistemic algebra. A modal algebra is normal if it
satisfies the postulate
(v) P0 = 0.
As Lemmon shows, it is easy to establish the follow-
ing proposition.
Proposition 1. All epistemic algebras are deontic,
and in a normal epistemic algebra it is the case that
(Nx Px) = 1 (16)
ModalSemiringswithOperatorsforKnowledgeRepresentation
199
and
(Nx x) = 1 (17)
hold.
It is a normal epistemic algebra that will be used
later.
3.1 The Model
In the relational model, one can simply take the
Boolean algebra of
((), , , ¬, Ø, )
and let P be the identity function. This does not do
anything for intuition, but that is also not the inten-
tion, as explained above. Letting P be the identity
function is useful for proving the soundness of the
proposed axiomatisation, which will be made clear
below.
4 THE TWO COMBINED:
MODAL SEMIRINGS WITH
OPERATORS
The structure
(M, test(M), +, ; , ¬, p , P, 0, 1),
where
(M, test(M), +, ; , ¬, p 0, 1)
is a modal semiring, and
(test(M), +, ; , ¬, P, 0, 1)
is a modal algebra, we shall call a modal semiring
with one operator.
This structure can be generalised to form modal
semirings with multiple operators, which in turn can
be extended to modal Kleene algebra with multiple
operators. If a modal operator is normal, epistemic
or deontic, respectively, we shall use the terminology
modal semiring with a normal, epistemic, or deontic
operator, respectively.
2
2
The mathematical properties of these structures are, to
the best of my knowledge, completely uninvestigated, and
deserve proper attention along the lines of (J
´
onsson and
Tarski, 1951; J
´
onsson and Tarski, 1952; Lemmon, 1966a;
Lemmon, 1966b). I hope to return to this in future work.
5 ADDING A REVISION
OPERATOR
In this section we add a belief-revision operator to a
modal semiring with a normal epistemic operator. As
will be shown, this makes reasoning about dynamic
epistemic properties possible.
5.1 Intended Interpretation
This is how the constituents of the below algebra are
intended to be understood. The semiring axioms in
Section 2 are all to be interpreted against this back-
ground; the reader might want to have the axioms at
hand. The elements of the carrier set should be seen
as actions upon which the operators (a sort of meta-
actions) work. The operator + has the agent choose
between performing either the left or the right action,
and the operator ; has the agent perform the left action
first, and then the right action. The constant 0 always
fails (creates a disaster) and the idle action 1 leaves
everything as it is. Tests are seen as actions checking
if some proposition is true. So 0 checks if the con-
tradiction holds, which it never does, so it fails, and
1 checks if the tautology holds, which it always does,
so why bother. The domain operator applied to an ac-
tion gives a test that is true whenever it is possible to
successfully perform the action. The modal operators
are interpreted as above (page 2).
A belief operator B will be given as the modal op-
erator of a normal epistemic algebra. For saying that
some proposition holds, one writes p = 1. For saying
that the agent believes that a proposition holds, one
writes B p = 1. In (Solin, 2010) it was not possible
to make this distinction, which amongst other things
meant that ¬B¬p couldn’t be expressed properly. Fi-
nally, ~p is an action that revises the agent’s beliefs
by p.
5.2 Dynamic Epistemic Modal Algebra
We are now ready to state the formal definition of a
dynamic epistemic modal algebra. It should be noted
that the axioms for the revision operator are only ten-
tative and that, depending on one’s goals, they can be
modified at will. The main point of this definition is to
show what something like a dynamic epistemic modal
algebra should look like. The axioms are inspired by
those of (Solin, 2010).
Definition 5.1. A dynamic epistemic modal algebra
(DEMA) is a two-sorted algebra
(D, test(D), +, ; , ¬, ~, p , B, 0, 1)
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
200
such that
(D, test(D), +, ; , ¬, p , B, 0, 1)
is a modal semiring with a normal epistemic operator,
and ~ : test(D) D satisfies
Bp ~p, (18)
~p;~p ~p, (19)
~p;Bq ~(p;q), (20)
~(p + q);Bp = ~p, (21)
~p ~q p q, (22)
p~p = 1, when p 6= 0. (23)
This concludes the definition. C
The axioms for the revision operator can all be jus-
tified according to the interpretation given in Sec-
tion 5.1.
3
5.3 The Model and Soundness
We can now use our relational model to show that the
above axioms will not contradict each other, and the
that the axiomatisation is sound in that sense. In the
relational model, let ~P =
def
;P, for any relation
P (), where = Σ × Σ. Now, if one lets all
the operators of the modal semiring be interpreted as
suggested above, and lets the modal operator B be in-
terpreted as the identity, then the resulting relational
structure is exactly that of (Solin, 2010, Section 4).
From this, it follows that the above axiomatisation is
sound, in the sense that the axioms will not lead to
contradictions (granted that the relational structure is
noncontradictory, which shouldn’t be controversial).
A completeness theorem for this model would not be
very interesting in our context, since the model is not
what justifies the axioms.
6 A FEW CLASSICAL
PROPERTIES
In the algebra, it is easy to prove some classical prop-
erties that stem from formal reasoning about belief
change (Alchourr
´
on et al., 1985; Segerberg, 1999;
Cantwell, 2000; van Ditmarsch et al., 2007). The
proofs closely follow those for dynamic epistemic
semirings (Solin, 2010), but the modal operator B
must be taken into account.
The next proposition is one of Segerberg’s success
conditions (Segerberg, 1999). After successfully re-
vising by p, the agent believes p.
3
Cf. also (Solin, 2010, p. 598).
Proposition 2. In any DEMA the property
[~p]Bp = 1 (24)
holds.
The following property is an encoding of one of
the AGM axioms (Alchourr
´
on et al., 1985; Cantwell,
2000). If the agent believes q after successfully revis-
ing by p, then the agent believes that q follows from
p.
Proposition 3. In any DEMA the property
[~p]Bq B(p q) (25)
holds.
The proposition below, which also relates to an
AGM axiom, says that a successful revision will never
have the agent believe a contradiction.
Proposition 4. In any DEMA the property
[~p]¬B0 = 1 (26)
holds.
From the proof of the last proposition, it is evident
that a successful revision (or any successul action)
will never stop the agent from believing the tautology.
7 CONCLUSIONS
This paper opens up a wealth of interesting themes to
investigate.
7.1 Theoretical Themes
On the purely mathematical side, the general modal
semirings with operators deserve proper attention
along the lines of (J
´
onsson and Tarski, 1951; J
´
onsson
and Tarski, 1952; Lemmon, 1966a; Lemmon, 1966b).
Another interesting theme is the investigation of dif-
ferent forms of dynamic epistemic modal algebras, in
which, for example, a different axiomatisation of re-
vision is given, or in which only a deontic operator is
embedded. As in (Solin, 2010), iteration could be in-
troduced as Kleene star. And it would be interesting
to sort out the connections between modal semirings,
modal algebras and the systems employed by (Baltag
et al., 2005; Baltag et al., 2007; Baltag and Sadrzadeh,
2006; Panangaden and Sadrzadeh, 2010).
How these algebras relate to various set-theoretic
models for belief revision and the alike could also
be investigated, following Lemmon’s investigation of
correspondences between his algebras and the stan-
dard models for modal logic – but as noted in earlier,
such an investigation is in no way a prerequisite for
using the abstract algebra as a conceptual tool.
ModalSemiringswithOperatorsforKnowledgeRepresentation
201
7.2 Practical Themes
As shown by (H
¨
ofner and Struth, 2007; Foster and
Struth, 2012), the level of abstraction that semirings
and Kleene algebra provide is very well-suited for au-
tomation. It would therefore be very interesting to
mechanise and automate the algebraic theory of this
paper. With the aid of such a mechanisation, more
elaborate applications of the algebra would become
feasible.
I have emphasised earlier, that the abstract algebra
is the pivot of the framework presented in this paper
not a model (a conrete algebra). The axioms were jus-
tified by common sense, and the relational model was
only used for proving technical results. Reasoning in
this framework is therefore genuinely about pushing
symbols, especially since the operators in Kleene al-
gebra and semirings all have a low, fixed arity.
4
This
means that a robot, say, that would be constructed on
the basis of the theory in this paper, would not have a
sole, involved model as its theoretical underpinning,
but just the axioms of a very simple abstract algebra,
and with them the whole associated class of models
(such as sets with only a few members, the relational
model, etc.). In combination with the tools avail-
able for automated proof and counterexample genera-
tion, this could make for very efficient and pragmatic
knowledge engineering.
ACKNOWLEDGEMENTS
Most of this work was done at the Department of Phi-
losophy, Uppsala University, but some was done at the
Computing Department, Macquarie University, Syd-
ney, and a significant part at the University of Queens-
land. A grant from Sven och Dagmar Sal
´
ens Stif-
telse made the stay in Sydney possible. The work
in Queensland was supported by the Australian Re-
search Council (ARC) Discovery Grant DP0987452.
REFERENCES
Aboul-Hosn, K. and Kozen, D. (2006). KAT-ML: an inter-
active theorem prover for Kleene algebra with tests.
Journal of Applied Non-Classical Logics, 16(1-2):9–
34.
Alchourr
´
on, C., G
¨
ardenfors, P., and Makinson, D. (1985).
On the logic of theory change: partial meet con-
traction and revision functions. Journal of Symbolic
Logic, 50(2):510–530.
4
This stands in contrast to a quantale, for instance, that
has an operator over a possibly infinite index set; an opera-
tor that sometimes requires careful thought when applied.
Baltag, A., Coecke, B., and Sadrzadeh, M. (2005). Algebra
and sequent calculus for epistemic actions. Electronic
Notes in Theoretical Computer Science, 126:27–52.
Baltag, A., Coecke, B., and Sadrzadeh, M. (2007). Epis-
temic actions as resources. Journal of Logic and Com-
putation, 17(3):555–585.
Baltag, A. and Sadrzadeh, M. (2006). The algebra of multi–
agent dynamic belief revision. Electronic Notes in
Theoretical Computer Science, 157(4):37–56.
Cantwell, J. (2000). Non-Linear Belief Revision: Founda-
tions and Applications. Acta Universitatis Upsalien-
sis. Dissertation.
Desharnais, J., M
¨
oller, B., and Struth, G. (2006). Kleene
algebra with domain. ACM Transactions on Compu-
tational Logic, 7(4):798–833.
Dijkstra, E. W. (1976). A Discipline of Programming.
Prentice-Hall.
Foster, S. and Struth, G. (2012). Automated analysis of reg-
ular algebra. In Gramlich, B., Miller, D., and Sattler,
U., editors, IJCAR, volume 7364 of Lecture Notes in
Computer Science, pages 271–285. Springer.
Harel, D., Kozen, D., and Tiurun, J. (2000). Dynamic Logic.
MIT Press.
H
¨
ofner, P. and Struth, G. (2007). Automated reasoning in
Kleene algebra. In Pfenning, F., editor, CADE, volume
4603 of Lecture Notes in Computer Science, pages
279–294. Springer.
J
´
onsson, B. and Tarski, A. (1951). Boolean algebra with
operators. Part I. American Journal of Mathematics,
73(4):891–939.
J
´
onsson, B. and Tarski, A. (1952). Boolean algebra with
operators. Part II. American Journal of Mathematics,
74(1):127–939.
Kozen, D. (1994). A completeness theorem for Kleene al-
gebras and the algebra of regular events. Inf. Comput.,
110(2):366–390.
Kozen, D. (1997). Kleene algebra with tests. ACM
Transactions on Programming Languages and Sys-
tems, 19(3):427–443.
Lemmon, E. J. (1966a). Algebraic semantics for modal log-
ics I. The Journal of Symbolic Logic, 31(1):46–65.
Lemmon, E. J. (1966b). Algebraic semantics for modal log-
ics II. The Journal of Symbolic Logic, 31(1):191–218.
M
¨
oller, B. (2008). Knowledge and games in modal semir-
ings. In Berghammer, R., M
¨
oller, B., and Struth, G.,
editors, RelMiCS, volume 4988 of Lecture Notes in
Computer Science, pages 320–336. Springer.
Panangaden, P. and Sadrzadeh, M. (2010). Learning in a
changing world, an algebraic modal logical approach.
In Johnson, M. and Pavlovic, D., editors, AMAST,
volume 6486 of Lecture Notes in Computer Science,
pages 128–141. Springer.
Segerberg, K. (1999). Two traditions in the logic of belief:
bringing them together. In Ohlback, H. and Reyle, U.,
editors, Logic, Language and Reasoning, pages 134–
147. Kluwer.
Solin, K. (2010). A sketch of a dynamic epistemic semiring.
Inf. Comput., 208(5):594–604.
van Ditmarsch, H., van der Hoek, W., and Kooi, B. (2007).
Dynamic Epistemic Logic. Springer.
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
202