8 CONCLUSION
We covered the formalization of superposition of rect-
angular units in Isabelle/HOL. A unit is given a quali-
tative matrix representation. The superposition of two
units is regarded as superposition function applied to
their respective matrix representations. Function
pu-
ton
is defined to refine the result of superposition
by merging black regions. We defined properties of
success, effectiveness and validity, and explained our
proof strategy to tackle the numerous cases of super-
position. We can think of two directions for future
work of this research.
First, we plan to relax all the assumptions on the
unit structure that are enumerated in Sect. 5.1. We
would like to include more complex unit structures
such as the ones depicted in Fig. 9. To that end, we
need to extend the set of direction relations to ex-
press the locations of regions that are not directly con-
nected. The refinement to higher granularity level al-
lows representing any unit structure. We also plan to
formalize the generalization in Isabelle/HOL.
(a) (b) (c)
Figure 9: Unit structures whose qualitative representations
require extending direction relations.
Second, QSR theories, such as direction relations,
rely on composition tables that are relevant for de-
ciding whether QSR constraints are consistent (Renz,
2002; Frank, 1991). In order to construct the com-
position tables, the work presented in (Randell et al.,
1992a) uses OTTER proof system for first-order logic
to assist pen-and-paper proofs. The authors have enu-
merated the challenge of such proofs because of the
number of the entries of a composition table. We plan
to investigate the proof of the correctness of the com-
position tables using proof assistant.
ACKNOWLEDGEMENTS
This work is supported by JSPS KAKENHI Grant
No. 25330274.
REFERENCES
Avigad, J. and Harrison, J. (2014). Formally Verified Math-
ematics. Communications of the ACM, 57(4):66–75.
Bennett, B. (1996). The Application of Qualitative Spatial
Reasoning to GIS. In Proceedings of The 1st Inter-
national Conference on GeoComputation, volume I,
pages 44–47.
Chen, T., Schneider, M., Viswanathan, G., and Yuan, W.
(2010). The Objects Interaction Matrix for Modeling
Cardinal Directions in Spatial Databases. In Database
Systems for Advanced Applications, volume 5981 of
LNCS, pages 218–232. Springer Berlin Heidelberg.
Clementini, E., Felice, P. D., and Hern´andes, D. (1997).
Qualitative Representation of Positional Information.
Artificial Intelligence, 95(2):317 – 356.
Frank, A. U. (1991). Qualitative Spatial Reasoning about
Cardinal Directions. In Proceedings of the Inter-
national Symposium on Computer-Assisted Cartogra-
phy, pages 148–167. ACSM-ASPRS.
Konishi, T. and Takahashi, K. (2012). Superposition of
Rectangles with Visibility Requirement: A Qualita-
tive Approach. International Journal On Advances in
Software, 4(4):422–433.
Liu, J. and Daneshmend, L. (2004). Spatial Reasoning and
Planning: Geometry, Mechanisms, and Motion. Ad-
vanced Information Processing. Springer.
Nipkow, T., Paulson, L. C., and Wenzel, M. (2002).
Isabelle/HOL: A Proof Assistant for Higher-Order
Logic, volume 2283 of LNCS Tutorial. Springer.
Paulson, L. C. (2006). Defining Functions on Equivalence
Classes. ACM Transactions on Computational Logic,
7(4):658–675.
Randell, D. A., Cohn, A. G., and Cui, Z. (1992a). Comput-
ing Transitivity Tables: A Challenge for Automated
Theorem Provers. In Proceedings of Automated De-
duction (CADE-11), volume 607 of LNCS, pages 786–
790. Springer.
Randell, D. A., Cui, Z., and Cohn, A. G. (1992b). A Spatial
Logic based on Regions and Connection. In Proceed-
ings of the 3rd International Conference on Knowl-
edge Representation and Reasoning, pages 165–176.
Renz, J. (2002). Qualitative Spatial Reasoning with Topo-
logical Information, volume 2293 of LNCS. Springer.
Sternagel, C. and Thiemann, R. (2010). Executable
Matrix Operations on Matrices of Arbitrary Di-
mensions. In The Archive of Formal Proofs.
http://afp.sf.net/entries/Matrix.shtml.
Wenzel, M. (1999). Isar - A Generic Interpretative Ap-
proach to Readable Formal Proof Documents. In The-
orem Proving in Higher Order Logics, volume 1690
of LNCS, pages 167–183. Springer.
FormalizingtheQualitativeSuperpositionofRectanglesinProofAssistantIsabelle/HOL
539