This commit is contained in:
Burkhart Wolff 2022-02-08 21:26:30 +01:00
commit 676edd7d54
5 changed files with 287 additions and 77 deletions

View File

@ -100,7 +100,7 @@
,enhanced
,overlay={\node[draw,fill=isar!60!black,xshift=0pt,anchor=north
east,font=\bfseries\footnotesize\color{white}]
at (frame.north east) {Isar};}
at (frame.north east) {Isabelle code};}
}
%% </isar>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -17,20 +17,24 @@
%\author{<AUTHOR>}
\titlerunning{Proving Ontology-Relations, Testing Ontology Instances}
\author{Idir Ait-Sadoune}
{LMF, CentraleSupelec, Université Paris-Saclay, France}
{LMF, CentraleSupélec, Université Paris-Saclay, Paris, France}
{idir.aitsadoune@centralesupelec.fr}
{https://orcid.org/0000-0002-6484-8276}
{}
%\author{Nicolas Méric}
% {LMF, Université Paris-Saclay, France}
% {LMF, Université Paris-Saclay, Paris, France}
% {nicolas.meric@universite-paris-saclay.fr}
% {https://orcid.org/0000-0002-0756-7072}
% {}
%\author{Burkhart Wolff}
% {LMF, Université Paris-Saclay, France}
% {LMF, Université Paris-Saclay, Paris, France}
% {burkhart.wolff@universite-paris-saclay.fr}
% {}
% {}
\Copyright{Idir Ait-Sadoune, Nicolas Méric, and Burkhart Wolff}
\authorrunning{I. Ait-Sadoune, N. Méric and B. Wolff}
\keywords{Ontologies, Formal Documents, Formal Development, Isabelle/HOL, Ontology Mapping}
\ccsdesc{Computing methodologies~Ontology engineering}
\ccsdesc{Information systems~Ontologies}
\ccsdesc{Theory of computation~Interactive proof systems}
\ccsdesc{Theory of computation~Higher order logic}

View File

@ -36,6 +36,26 @@
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@MISC{atl,
title = {ATL - A model transformation technology},
note={\url{https://www.eclipse.org/atl/}},
author = {Eclipse Fondation}
}
@inproceedings{BGPP95,
author = {Yamine A{\"{\i}}t Ameur and
Frederic Besnard and
Patrick Girard and
Guy Pierra and
Jean{-}Claude Potier},
title = {Formal Specification and Metaprogramming in the {EXPRESS} Language},
booktitle = {SEKE'95, The 7th International Conference on Software Engineering
and Knowledge Engineering, June 22-24, 1995, Rockville, Maryland,
USA, Proceedings},
pages = {181--188},
publisher = {Knowledge Systems Institute},
year = {1995}
}
@MISC{owl2012,
title = {OWL 2 Web Ontology Language},
@ -51,7 +71,7 @@
}
@article{Nevzorova2014OntoMathPO,
title={OntoMath PRO Ontology: A Linked Data Hub for Mathematics},
title={Onto{Ma}th\textsuperscript{PRO} Ontology: {A} Linked Data Hub for Mathematics},
author={Olga Nevzorova and Nikita Zhiltsov and Alexander Kirillovich and Evgeny Konstantinovich Lipachev},
journal={ArXiv},
pdf = {\url{https://kpfu.ru/staff_files/F_438204284/OntoMathPro_ontology_KESW2014.pdf}},
@ -97,24 +117,6 @@ isbn="978-3-030-79876-5"
pages={30-36},
doi={10.1109/MC.1983.1654194}}
@article{DBLP:journals/corr/NevzorovaZKL14,
author = {Olga Nevzorova and
Nikita Zhiltsov and
Alexander Kirillovich and
Evgeny K. Lipachev},
title = {Onto{Ma}th\textsuperscript{PRO} Ontology: {A} Linked
Data Hub for Mathematics},
journal = {CoRR},
volume = {abs/1407.4833},
year = {2014},
url = {http://arxiv.org/abs/1407.4833},
eprinttype = {arXiv},
eprint = {1407.4833},
timestamp = {Fri, 21 Aug 2020 16:53:16 +0200},
biburl = {https://dblp.org/rec/journals/corr/NevzorovaZKL14.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@TechReport{ bsi:50128:2014,
type = {Standard},
key = {BS EN 50128:2011},
@ -407,7 +409,7 @@ and Maynard, Diana
and Mizoguchi, Riichiro
and Schreiber, Guus
and Cudr{\'e}-Mauroux, Philippe",
title="DBpedia: A Nucleus for a Web of Open Data",
title="{DB}pedia: A Nucleus for a Web of Open Data",
booktitle="The Semantic Web",
year="2007",
publisher="Springer Berlin Heidelberg",

View File

@ -79,9 +79,17 @@ setup\<open>(* std_text_antiquotation \<^binding>\<open>my_text\<close> #
title*[tit::title]\<open>A Framework for Proving Ontology-Relations and Runtime Testing Ontology Instances\<close>
author*[idir,email="\<open>idir.aitsadoune@lri.fr\<close>",affiliation="\<open>LMF, CentraleSupelec\<close>"]\<open>Idir Ait-Sadoune\<close>
author*[nic,email="\<open>nicolas.meric@lri.fr\<close>",affiliation="\<open>LRI, Université Paris-Saclay\<close>"]\<open>Nicolas Méric\<close>
author*[bu,email="\<open>wolff@lri.fr\<close>",affiliation = "\<open>LRI, Université Paris-Saclay\<close>"]\<open>Burkhart Wolff\<close>
author*[idir,
email ="\<open>idir.aitsadoune@centralesupelec.fr\<close>",
orcid ="''0000-0002-6484-8276''",
affiliation ="\<open>LMF, CentraleSupélec, Université Paris-Saclay, Paris, France\<close>"]\<open>Idir Ait-Sadoune\<close>
author*[nic,
email ="\<open>nicolas.meric@universite-paris-saclay.fr\<close>",
orcid ="''0000-0002-0756-7072''",
affiliation ="\<open>LMF, Université Paris-Saclay, Paris, France\<close>"]\<open>Nicolas Méric\<close>
author*[bu,
email ="\<open>wolff@universite-paris-saclay.fr\<close>",
affiliation = "\<open>LMF, Université Paris-Saclay, Paris, France\<close>"]\<open>Burkhart Wolff\<close>
abstract*[abs, keywordlist="[\<open>Ontologies\<close>,\<open>Formal Documents\<close>,\<open>Formal Development\<close>,\<open>\<^isabelle>\<close>,\<open>Ontology Mapping\<close>]"]
\<open> \<^dof> is a novel ontology framework on top of Isabelle
@ -405,7 +413,7 @@ types. The notation for terms and types is as follows:
\<^item> updates were denoted \<^theory_text>\<open>r\<lparr>x := a\<rparr>\<lparr>y := b\<rparr>\<close> or just \<^term>\<open>r\<lparr>x:=a, y:=b\<rparr>\<close>.
\<close>
text\<open> ... where the so-called more-field \<open>\<dots>\<close> is used to 'fill-in' record-extensions.
text\<open> ... where the so-called more-field \<open>\<dots>\<close> is used to ``fill-in'' record-extensions.
Schematic record types @{cite "naraschewski1998object"} allow for simulating object-oriented features such as
(single-)inheritance while maintaining a compositional style of verification:
it is possible to prove a property \<^term>\<open>P (a::'a T_scheme)\<close>
@ -586,15 +594,17 @@ text*[introduction2::myintroduction, authored_by = "{@{myauthor \<open>church\<c
text*[claimNotion::myclaim, authored_by = "{@{myauthor \<open>church\<close>}}", based_on= "[\<open>Notion1\<close>, \<open>Notion2\<close>]", level = "Some 0"]\<open>\<close>
\<close>}
\caption{Some instances of the classes of the ontology in the \autoref{fig-ontology-example}.}
\caption{Some instances of the classes of the ontology of \autoref{fig-ontology-example}.}
\label{fig-instances-example}
\end{figure}
In the instance \<^theory_text>\<open>introduction1\<close>, \<^term>\<open>@{myauthor \<open>church\<close>}\<close> denotes
the instance \<^theory_text>\<open>church\<close> of the class \<^typ>\<open>myauthor\<close>.
In the instance \<^theory_text>\<open>introduction1\<close>, the term antiquotation \<^theory_text>\<open>@{myauthor \<open>church\<close>}\<close>,
or its equivalent notation \<^term>\<open>@{myauthor \<open>church\<close>}\<close>, denotes
the instance \<^theory_text>\<open>church\<close> of the class \<^typ>\<open>myauthor\<close>,
where \<^theory_text>\<open>church\<close> is an \<^hol>-string.
One can now reference a class instance in a \<^theory_text>\<open>term*\<close> command.
In the command \<^theory_text>\<open>term*\<open>@{myauthor \<open>church\<close>}\<close>\<close>
the term \<^term>\<open>@{myauthor \<open>church\<close>}\<close> is type-checked, \<^ie>, the command \<^theory_text>\<open>term*\<close> checks that
\<^theory_text>\<open>church\<close> references a term of type \<^typ>\<open>myauthor\<close>
\<^theory_text>\<open>church\<close> references a term of type \<^typ>\<open>myauthor\<close> against the global context.
(see \<^side_by_side_figure>\<open>type-checking-example\<close>).
\<close>
@ -661,6 +671,11 @@ text\<open>
We can even compare class instances. \<^figure>\<open>term-context-equality-evaluation\<close>
shows that the two class instances \<^theory_text>\<open>resultProof\<close> and \<^theory_text>\<open>resultProof2\<close> are not equivalent
because their attribute \<^term>\<open>property\<close> differ.
When \<^theory_text>\<open>value*\<close> evaluates the term,
the term antiquotations \<^term>\<open>@{thm \<open>HOL.refl\<close>}\<close> and \<^term>\<open>@{thm \<open>HOL.sym\<close>}\<close> are checked
against the global context to validate that the \<^hol>-strings \<^term>\<open>\<open>HOL.refl\<close>\<close> and \<^term>\<open>\<open>HOL.sym\<close>\<close>
reference existing theorems.
\<close>
figure*[
@ -775,6 +790,108 @@ text\<open>
section*["morphisms"::technical,main_author="Some(@{docitem ''idir''}::author)"] \<open>Proving Morphisms on Ontologies\<close>
(*<*)
(* Mapped_PILIB_Ontology example *)
term\<open>fold (+) S 0\<close>
definition sum
where "sum S = (fold (+) S 0)"
datatype Hardware_Type =
Motherboard |
Expansion_Card |
Storage_Device |
Fixed_Media |
Removable_Media |
Input_Device |
Output_Device
(* Reference Ontology *)
onto_class Resource =
name :: string
onto_class Electronic = Resource +
provider :: string
manufacturer :: string
onto_class Component = Electronic +
mass :: int
dimensions :: "int list"
onto_class Simulation_Model = Electronic +
type :: string
onto_class Informatic = Resource +
description :: string
onto_class Hardware = Informatic +
type :: Hardware_Type
mass :: int
composed_of :: "Component list"
invariant c1 :: "mass \<sigma> = sum(map Component.mass (composed_of \<sigma>))"
onto_class R_Software = Informatic +
version :: int
(* Local Ontology *)
onto_class Item =
name :: string
onto_class Product = Item +
serial_number :: int
provider :: string
mass :: int
onto_class Computer_Software = Item +
version :: int
onto_class Electronic_Component = Product +
dimensions :: "int set"
onto_class Computer_Hardware = Product +
type :: Hardware_Type
composed_of :: "Product list"
invariant c2 :: "Product.mass \<sigma> = sum(map Product.mass (composed_of \<sigma>))"
definition Item_to_Resource_morphism :: "'a Item_scheme \<Rightarrow> Resource"
("_ \<langle>Resource\<rangle>\<^sub>I\<^sub>t\<^sub>e\<^sub>m" [1000]999)
where "\<sigma> \<langle>Resource\<rangle>\<^sub>I\<^sub>t\<^sub>e\<^sub>m = \<lparr> Resource.tag_attribute = 0::int ,
Resource.name = name \<sigma> \<rparr>"
definition Product_to_Component_morphism :: "'a Product_scheme \<Rightarrow> Component"
("_ \<langle>Component\<rangle>\<^sub>P\<^sub>r\<^sub>o\<^sub>d\<^sub>u\<^sub>c\<^sub>t" [1000]999)
where " \<sigma> \<langle>Component\<rangle>\<^sub>P\<^sub>r\<^sub>o\<^sub>d\<^sub>u\<^sub>c\<^sub>t = \<lparr> Resource.tag_attribute = 1::int ,
Resource.name = name \<sigma> ,
Electronic.provider = Product.provider \<sigma> ,
Electronic.manufacturer = ''no manufacturer'' ,
Component.mass = Product.mass \<sigma> ,
Component.dimensions = [] \<rparr>"
definition Computer_Hardware_to_Hardware_morphism :: "'a Computer_Hardware_scheme \<Rightarrow> Hardware"
("_ \<langle>Hardware\<rangle>\<^sub>C\<^sub>o\<^sub>m\<^sub>p\<^sub>u\<^sub>t\<^sub>e\<^sub>r\<^sub>H\<^sub>a\<^sub>r\<^sub>d\<^sub>w\<^sub>a\<^sub>r\<^sub>e" [1000]999)
where "\<sigma> \<langle>Hardware\<rangle>\<^sub>C\<^sub>o\<^sub>m\<^sub>p\<^sub>u\<^sub>t\<^sub>e\<^sub>r\<^sub>H\<^sub>a\<^sub>r\<^sub>d\<^sub>w\<^sub>a\<^sub>r\<^sub>e =
\<lparr> Resource.tag_attribute = 2::int ,
Resource.name = name \<sigma> ,
Informatic.description = ''no description'',
Hardware.type = Computer_Hardware.type \<sigma> ,
Hardware.mass = mass \<sigma> ,
Hardware.composed_of = map Product_to_Component_morphism
(Computer_Hardware.composed_of \<sigma>)
\<rparr>"
lemma inv_c2_preserved :
"c2_inv \<sigma> \<Longrightarrow> c1_inv (\<sigma> \<langle>Hardware\<rangle>\<^sub>C\<^sub>o\<^sub>m\<^sub>p\<^sub>u\<^sub>t\<^sub>e\<^sub>r\<^sub>H\<^sub>a\<^sub>r\<^sub>d\<^sub>w\<^sub>a\<^sub>r\<^sub>e)"
unfolding c1_inv_def c2_inv_def
Computer_Hardware_to_Hardware_morphism_def Product_to_Component_morphism_def
by (auto simp: comp_def)
lemma Computer_Hardware_to_Hardware_morphism_total :
"Computer_Hardware_to_Hardware_morphism ` ({X::Computer_Hardware. c2_inv X}) \<subseteq> ({X::Hardware. c1_inv X})"
using inv_c2_preserved
by auto
(*>*)
text\<open>
\<^dof> framework does not assume that all documents reference the same ontology.
Each document may build its local ontology without any external reference.
@ -785,14 +902,14 @@ More precisely, a class of a local ontology may be described as a consequence of
to one or several other class(es) defined in other ontologies. This means that each instance of the former can be
computed from one or more instances of the latter.
Thanks to the morphism relationship, the obtained class may either import properties (definitions are preserved)
or map properties (the properties are different but are semantically equivalent) that are defined in the referenced class(es).
It may also define additional properties.
\<close>
(*<*)
(* Reference Ontology *)
text\<open>
\begin{figure}
@{boxed_theory_text [display] \<open>
definition sum
where "sum S = (fold (+) S 0)"
@ -830,24 +947,28 @@ onto_class Hardware = Informatic +
onto_class R_Software = Informatic +
version :: int
\<close>}
\caption{An extract of a reference ontology.}
\label{fig-Reference-Ontology-example}
\end{figure}
(*>*)
text\<open>
To illustrate this process, we use the reference ontology (considered as a standard) described
in the listing X, defining the Resource, Electronic, Component, Informatic, Hardware and Software
concepts (or classes). Each class contains a set of attributes or properties and some local
invariants.
in the listing \autoref{fig-Reference-Ontology-example}, defining the \<^typ>\<open>Resource\<close>,
\<^typ>\<open>Electronic\<close>, \<^typ>\<open>Component\<close>, \<^typ>\<open>Informatic\<close>, \<^typ>\<open>Hardware\<close> and \<^typ>\<open>R_Software\<close>
concepts (or classes).
Each class contains a set of attributes or properties and some local invariants.
In our example, we focus on the Hardware class containing a mass attribute and composed of a list
of components with a mass attribute formalising the mass value of each component. The Hardware
class also contains a local invariant ''c1'' to define a constraint linking the global mass of
a Hardware object with the masses of its own components.
In our example, we focus on the \<^typ>\<open>Hardware\<close> class containing a \<^const>\<open>mass\<close> attribute
and composed of a list of components with a \<^const>\<open>mass\<close> attribute formalising
the mass value of each component.
The \<^typ>\<open>Hardware\<close> class also contains a local \<^theory_text>\<open>invariant c1\<close>
to define a constraint linking the global mass of a \<^typ>\<open>Hardware\<close> object
with the masses of its own components.
\<close>
(*<*)
(* Local Ontology *)
text\<open>
\begin{figure}
@{boxed_theory_text [display] \<open>
onto_class Item =
name :: string
@ -866,21 +987,103 @@ onto_class Computer_Hardware = Product +
type :: Hardware_Type
composed_of :: "Product list"
invariant c2 :: "Product.mass \<sigma> = sum(map Product.mass (composed_of \<sigma>))"
\<close>}
\caption{An extract of a local (user) ontology.}
\label{fig-Local-Ontology-example}
\end{figure}
For the needs of our document, we have defined a simple ontology to classify Software and Hardware
objects. This ontology is described in \autoref{fig-Local-Ontology-example} and
defines the \<^typ>\<open>Item\<close>, \<^typ>\<open>Product\<close>, \<^typ>\<open>Computer_Software\<close>
and \<^typ>\<open>Computer_Hardware\<close> concepts.
As for the reference ontology, we focus on the \<^typ>\<open>Computer_Hardware\<close>
class defined as a list of products characterised by their mass value.
This class contains a local \<^theory_text>\<open>invariant c2\<close> to guarantee that its own mass value
equals the sum of all the masses of the products composing the object.
\<close>
(*>*)
text\<open>
For the needs of our document, we have defined a simple ontology to classify Software and Hardware
objects. This ontology is described in listing X and defines the \<open>Item\<close>, \<open>Product\<close>, \<open>Computer_Software\<close>
and \<open>Computer_Hardware\<close> concepts. As for the reference ontology, we focus on the \<open>Computer_Hardware\<close>
class defined as a list of products characterised by their mass value. This class contains a local
invariant ''c2'' to guarantee that its own mass value equals the sum of all the masses of the products
composing the object.
\begin{figure}
@{boxed_theory_text [display] \<open>
definition Item_to_Resource_morphism :: "'a Item_scheme \<Rightarrow> Resource"
("_ \<langle>Resource\<rangle>\<^sub>I\<^sub>t\<^sub>e\<^sub>m" [1000]999)
where "\<sigma> \<langle>Resource\<rangle>\<^sub>I\<^sub>t\<^sub>e\<^sub>m = \<lparr> Resource.tag_attribute = 0::int ,
Resource.name = name \<sigma> \<rparr>"
definition Product_to_Component_morphism :: "'a Product_scheme \<Rightarrow> Component"
("_ \<langle>Component\<rangle>\<^sub>P\<^sub>r\<^sub>o\<^sub>d\<^sub>u\<^sub>c\<^sub>t" [1000]999)
where " \<sigma> \<langle>Component\<rangle>\<^sub>P\<^sub>r\<^sub>o\<^sub>d\<^sub>u\<^sub>c\<^sub>t = \<lparr> Resource.tag_attribute = 1::int ,
Resource.name = name \<sigma> ,
Electronic.provider = Product.provider \<sigma> ,
Electronic.manufacturer = '''' ,
Component.mass = Product.mass \<sigma> ,
Component.dimensions = [] \<rparr>"
definition Computer_Hardware_to_Hardware_morphism :: "'a Computer_Hardware_scheme \<Rightarrow> Hardware"
("_ \<langle>Hardware\<rangle>\<^sub>C\<^sub>o\<^sub>m\<^sub>p\<^sub>u\<^sub>t\<^sub>e\<^sub>r\<^sub>H\<^sub>a\<^sub>r\<^sub>d\<^sub>w\<^sub>a\<^sub>r\<^sub>e" [1000]999)
where "\<sigma> \<langle>Hardware\<rangle>\<^sub>C\<^sub>o\<^sub>m\<^sub>p\<^sub>u\<^sub>t\<^sub>e\<^sub>r\<^sub>H\<^sub>a\<^sub>r\<^sub>d\<^sub>w\<^sub>a\<^sub>r\<^sub>e =
\<lparr> Resource.tag_attribute = 2::int ,
Resource.name = name \<sigma> ,
Informatic.description = ''no description'',
Hardware.type = Computer_Hardware.type \<sigma> ,
Hardware.mass = mass \<sigma> ,
Hardware.composed_of = map Product_to_Component_morphism
(Computer_Hardware.composed_of \<sigma>)
\<rparr>"
\<close>}
\caption{An extract of a mapping definitions.}
\label{fig-mapping-example}
\end{figure}
To check the coherence of our local ontology, we define a relationship between the local ontology
and the reference ontology using morphism functions (or mapping rules as in ATL framework~@{cite "atl"}
or EXPRESS-X language~@{cite "BGPP95"}). These rules are applied to define the relationship
between one class of the local ontology to one or several other class(es) described in the reference
ontology.
For example, \<^const>\<open>Product_to_Component_morphism\<close> and \<^const>\<open>Computer_Hardware_to_Hardware_morphism\<close>
definitions, detailed in \autoref{fig-mapping-example},
specify how \<^typ>\<open>Product\<close> or \<^typ>\<open>Computer_Hardware\<close> objects are mapped to \<^typ>\<open>Component\<close>
or \<^typ>\<open>Hardware\<close> objects defined in the reference ontology.
This mapping shows that the structure of a (user) ontology may be quite different
from the one of a standard ontology it references.
\<close>
text\<open>
The advantage of using the \<^dof> framework compared to approaches like ATL or EXPRESS-X is
the possibility of formally validating the mapping rules and also of proving the preservation
of invariants, as we will demonstrate in the following example.\<close>
(* Bu, can you take care of commenting on these last lemmas? *)
text\<open>
\begin{figure}
@{boxed_theory_text [display] \<open>
lemma inv_c2_preserved :
"c2_inv \<sigma> \<Longrightarrow> c1_inv (\<sigma> \<langle>Hardware\<rangle>\<^sub>C\<^sub>o\<^sub>m\<^sub>p\<^sub>u\<^sub>t\<^sub>e\<^sub>r\<^sub>H\<^sub>a\<^sub>r\<^sub>d\<^sub>w\<^sub>a\<^sub>r\<^sub>e)"
unfolding c1_inv_def c2_inv_def
Computer_Hardware_to_Hardware_morphism_def Product_to_Component_morphism_def
by (auto simp: comp_def)
lemma Computer_Hardware_to_Hardware_morphism_total :
"Computer_Hardware_to_Hardware_morphism ` ({X::Computer_Hardware. c2_inv X}) \<subseteq> ({X::Hardware. c1_inv X})"
using inv_c2_preserved
by auto
\<close>}
\caption{xxxx.}
\label{fig-xxx}
\end{figure}
\<close>
section*[ontoexample::text_section,main_author="Some(@{docitem ''idir''}::author)"] \<open>Applications\<close>
subsection\<open>Engineering Example : An Extract from PLib\<close>
(* subsection\<open>Engineering Example : An Extract from PLib\<close>
Already done in the previous section
*)
subsection\<open>Mathematics Example : An Extract from OntoMath\textsuperscript{PRO}\<close>
@ -964,7 +1167,7 @@ onto_class assoc_Method_Problem =
(*>*)
text\<open>
The ontology \<^emph>\<open>OntoMath\textsuperscript{PRO}\<close> @{cite "DBLP:journals/corr/NevzorovaZKL14"}
The \<^emph>\<open>OntoMath\textsuperscript{PRO}\<close> ontology~@{cite "Nevzorova2014OntoMathPO"}
is an OWL ontology of mathematical knowledge concepts.
It posits the IS-A semantics for hierarchies of mathematical knowledge elements,
and defines these elements as two hierarchies of classes:
@ -974,9 +1177,10 @@ text\<open>
like \<^const>\<open>belongs_to\<close>, \<^const>\<open>contains\<close>, \<^const>\<open>defines\<close>, \<^const>\<open>is_defined_by\<close>, \<^const>\<open>solves\<close>,
\<^const>\<open>is_solved_by\<close>, and a symmetric transitive associative relation \<^const>\<open>see_also\<close>
between two mathematical knowledge objects.
It also represents links with external resources such as DBpedia
with annotations properties @{cite "Parsia:12:OWO"}.
\<^dof> covers a wide range of the OWL concepts used by the ontology OntoMath\textsuperscript{PRO}.
It also represents links with external resources
such as DBpedia~@{cite "10.1007/978-3-540-76298-0_52"}
with annotations properties~@{cite "Parsia:12:OWO"}.
\<^dof> covers a wide range of the OWL concepts used by the OntoMath\textsuperscript{PRO} ontology.
We can represent the annotations properties as datatypes and
then attach them as an attributes list to a class.
For example the declaration:
@ -1005,7 +1209,7 @@ onto_class Field_of_mathematics =
Here the \<^theory_text>\<open>invariant restrict_annotation_F\<close> forces the \<^typ>\<open>annotation\<close>s to be
a \<^const>\<open>label\<close> or a \<^const>\<open>comment\<close>.
Subsumption relation is straightforward.
The ontology OntoMath\textsuperscript{PRO} defines
The OntoMath\textsuperscript{PRO} ontology defines
a \<^typ>\<open>Problem\<close> and a \<^typ>\<open>Method\<close>
as subclasses of the class \<^typ>\<open>Mathematical_knowledge_object\<close>.
It gives in \<^dof>:
@ -1075,7 +1279,7 @@ subsection*[rw::related_work]\<open>Related Work\<close>
text\<open>There are a number of approaches to use ontologies for structuring the link between
information and knowledge, and to make it amenable to
"semantic" search in or consistency checking of documents:
``semantic'' search in or consistency checking of documents:
\<^item> The search engine \<^url>\<open>http://shinh.org/wfs\<close> uses a quite brute-force,
but practical approach. It is getting its raw-data from Wikipedia and PlanetMath
@ -1088,15 +1292,15 @@ information and knowledge, and to make it amenable to
developed six \<^emph>\<open>export\<close> functions from major ITP systems into it. The more difficult task to
develop \<^emph>\<open>import\<close> functions has not been addressed, not to mention the construction
of imported proofs in a native tactic proof format. Rather, the emphasis was put on building
a server infrastructure based on conventional, rather heavy-weight database- and OWL technology.
a server infrastructure based on conventional, rather heavy-weight database and OWL technology.
Our approach targets so far only one ITP system and its libraries, and emphasizes
type-safeness, expressive power and "depth" of meta-data, which is adapted
type-safeness, expressive power and ``depth'' of meta-data, which is adapted
to the specific needs of ITP systems and theory developments.
\<^item> There are meanwhile a number of proposals of ontologies targeting mathematics:
\<^item> \<open>OntoMath\<^sup>P\<^sup>R\<^sup>O\<close> @{cite "Nevzorova2014OntoMathPO"} proposes a
\<^item> OntoMath\textsuperscript{PRO} @{cite "Nevzorova2014OntoMathPO"} proposes a
``taxonomy of the fields of mathematics'' (pp 110). In total,
\<open>OntoMath\<^sup>P\<^sup>R\<^sup>O\<close> contains the daunting number of 3,449 classes, which is in part due to
OntoMath\textsuperscript{PRO} contains the daunting number of 3,449 classes, which is in part due to
the need to compensate the lack of general datatype definition methods for meta-data.
It is inspired from a translation of the Russian Federal Standard for Higher Education
on mathematics for master students \<^url>\<open>http://www.edu.ru/db-mon/mo/Data/d_10/prm40-1.pdf\<close>,
@ -1107,7 +1311,7 @@ information and knowledge, and to make it amenable to
and the more general ScienceWISE (see \<^url>\<open>http://sciencewise.info/ontology/\<close> linked to the
ArXiv.org project) that allows users to introduce their own category concepts.
Both suffer from the lack of deeper meta-data modeling, and the latter is still at the beginning
(ScienceWISE marks the Mathematics part as "under construction").
(ScienceWISE marks the Mathematics part as ``under construction'').
% \<^url>\<open>https://github.com/CLLKazan/OntoMathPro\<close>
%
@ -1124,8 +1328,8 @@ that will further increase the usability of our framework for the ontology-confo
of formal content, be it in the engineering or the mathematics domain.
\<^footnote>\<open>This paper has been edited in \<^dof>, of course.\<close>
Another line of future application is to increase the "depth" of build-in term antiquotations such
\<open>@{typ \<open>'\<tau>\<close>}\<close>, \<open>@{term \<open>a + b\<close>}\<close> and \<open>@{thm \<open>HOL.refl\<close>}\<close>, which are currently implemented just as
Another line of future application is to increase the ``depth'' of built-in term antiquotations such
as \<^theory_text>\<open>@{typ \<open>'\<tau>\<close>}\<close>, \<^term>\<open>@{term \<open>a + b\<close>}\<close> and \<^term>\<open>@{thm \<open>HOL.refl\<close>}\<close>, which are currently implemented just as
validations in the current logical context. In the future, they could optionally be expanded to
the types, terms and theorems (with proof objects attached) in a meta-model of the Isabelle Kernel
such as the one presented in @{cite "10.1007/978-3-030-79876-5_6"} (also available in the AFP).

View File

@ -124,7 +124,7 @@ definition Product_to_Component_morphism :: "'a Product_scheme \<Rightarrow> Com
where " \<sigma> \<langle>Component\<rangle>\<^sub>P\<^sub>r\<^sub>o\<^sub>d\<^sub>u\<^sub>c\<^sub>t = \<lparr> Resource.tag_attribute = 1::int ,
Resource.name = name \<sigma> ,
Electronic.provider = Product.provider \<sigma> ,
Electronic.manufacturer = '''' ,
Electronic.manufacturer = ''no manufacturer'' ,
Component.mass = Product.mass \<sigma> ,
Component.dimensions = [] \<rparr>"
@ -147,13 +147,10 @@ and the reference ontology using morphism functions (or mapping rules). These ru
define the relationship between one class of the local ontology to one or several other class(es)
described in the reference ontology.
For example,
\<close>
text\<open>
As shown by our example, the structure of a (user) ontology may be quite different from the one
of a standard ontology she references.
For example,\<open>Product_to_Component_morphism\<close> and \<open>Computer_Hardware_to_Hardware_morphism\<close> definitions,
detailed in the figure Z, specify how \<open>Product\<close> or \<open>Computer_Hardware\<close> objects are mapped to \<open>Component\<close>
or \<open>Hardware\<close> objects defined in the reference ontology. This mapping shows that the structure
of a (user) ontology may be quite different from the one of a standard ontology she references.
\<close>
@ -165,6 +162,7 @@ find_theorems Hardware.mass
find_theorems map "(o)"
lemma inv_c2_preserved :
"c2_inv \<sigma> \<Longrightarrow> c1_inv (\<sigma> \<langle>Hardware\<rangle>\<^sub>C\<^sub>o\<^sub>m\<^sub>p\<^sub>u\<^sub>t\<^sub>e\<^sub>r\<^sub>H\<^sub>a\<^sub>r\<^sub>d\<^sub>w\<^sub>a\<^sub>r\<^sub>e)"
unfolding c1_inv_def c2_inv_def
@ -177,6 +175,8 @@ lemma Computer_Hardware_to_Hardware_morphism_total :
by auto
declare[[invariants_checking]]
declare[[invariants_checking_with_tactics]]