= M ({(← eq($i($ f ($e,$e)),
$ f ($b,$ f ($ f ($i($b),$i($a)),$a))))} ∪ Cs)
(Apply r
9
with θ
34
= {x/$i($b),y/$i($a), z/$a}
= M ({(← eq($i($ f ($e,$e)),
$ f ($b,$ f ($i($b), $ f ($i($a), $a)))))} ∪ Cs)
(Apply r
4
with θ
35
= {x/$e})
= M ({(← eq($i($e),
$ f ($b,$ f ($i($b), $ f ($i($a), $a)))))} ∪ Cs)
(Apply r
8
with θ
36
= {x/$a})
= M ({(← eq($i($e),
$ f ($b,$ f ($i($b), $e))))} ∪ Cs)
(Apply r
13
with θ
37
= {})
= M ({(← eq($e,$ f ($b,$ f ($i($b),$e))))}∪ Cs)
(Apply r
2
with θ
38
= {x/$i($b)}
= M ({(← eq($e,$ f ($b,$i($b))))}∪Cs)
(Apply r
6
with θ
39
= {x/$b})
= M ({(← eq($e,$e))} ∪ Cs)
(Remove the eq($e,$e) atom since it is true.)
= M ({(←)} ∪ Cs)
=
/
0.
In the last step of transformation, a constraint
solving rule for equality is used. This rule is not a
term rewriting rule. However, it obviously preserves
models. In our computation model, rules of logical
inference and term rewriting can be used together un-
der the principle of equivalent transformation.
8 CONCLUDING REMARKS
Term rewriting rules are used for computation
when the background knowledge contains equational
clauses. We can generate two term rewriting rules
directly from an equational clause. We apply to
an equational clause repeatedly (1) specialization by
a substitution for usual variables, and (2) applica-
tion of an already derived rewriting rule. We make
term rewriting rules directly from the resulting equa-
tional clauses. We have proved that the obtained term
rewriting rule is an ET rule. Since ET rules are re-
peatedly applied to the original problem, the result of
computation is also correct. Such guarantee of cor-
rectness is usually not clearly discussed in the theory
of term rewriting systems.
The informal method is procedural, i.e., seman-
tical structure is not discussed relating to rewriting
rules. Each term rewriting rule is constructed with-
out proving it to be semantically correct. Moreover,
correctness of computation result is guaranteed based
on the correctness of each rewriting rule.
First order logic is not sufficient for correctness-
based theory since it doesn’t have enough expressive
power, while KR-logic is sufficient due to the exis-
tence of function variables.
The theory in this paper is constructed on LPSF,
where KR-logic is used as a canonical logical struc-
ture, and term rewriting rules are used as ET rules.
The resolution rule and the unfolding rule are typi-
cal instances of rules in the domain of logic, while
term rewriting rules are typical instances of functional
rewriting. Hence, logical inference and functional
rewriting co-exist, both of them being instances of a
broader concept of equivalent transformation.
REFERENCES
Akama, K. and Nantajeewarawat, E. (2016). Model-
intersection problems with existentially quantified
function variables: Formalization and a solution
schema. In Proc. 8th International Joint Confer-
ence on Knowledge Discovery, Knowledge Engineer-
ing and Knowledge Management, volume 2, pages
52–63, Porto, Portugal.
Akama, K. and Nantajeewarawat, E. (2018). Solving query-
answering problems with constraints for function vari-
ables. Springer International Publishing AG, part of
Springer Nature 2018, N. T. Nguyen et al. (Eds.): ACI-
IDS 2018, LNAI 10751, pages 36–47.
Akama, K., Nantajeewarawat, E., and Akama, T. (2019a).
Logical problem solving framework. Springer Inter-
national Publishing AG, part of Springer Nature 2019,
N. T. Nguyen et al. (Eds.): ACIIDS 2019, LNAI 11431,
pages 28–40.
Akama, K., Nantajeewarawat, E., and Akama, T.
(2019b). Term rewriting that preserves models in kr-
logic. Springer International Publishing AG, part of
Springer Nature 2019, N. T. Nguyen et al. (Eds.): ACI-
IDS 2019, LNAI 11431, pages 41–52.
Bird, R. and Wadler, P. (1988). Prentice-Hall, Inc., New
Jersey.
Dershowitz, N. and Jouannaud, J.-P. (1990). pages 243–
320. MIT Press.
Logical Approach to Theorem Proving with Term Rewriting on KR-logic
289