Skip to content
Snippets Groups Projects
Commit 81388a13 authored by Andreas Schärtl's avatar Andreas Schärtl
Browse files

report: review Q1

parent 2127bd46
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
\centering \centering
\small \small
\begin{subfigure}[]{0.9\textwidth} \begin{subfigure}[]{0.9\textwidth}
\begin{flushleft}
\texttt{check-time} \texttt{defines} \texttt{definition} \texttt{check-time} \texttt{defines} \texttt{definition}
\texttt{derived} \texttt{experimental} \texttt{derived} \texttt{experimental}
\texttt{external-size} \texttt{function} \texttt{external-size} \texttt{function}
...@@ -12,11 +13,13 @@ ...@@ -12,11 +13,13 @@
\texttt{specified-in} \texttt{specifies} \texttt{specified-in} \texttt{specifies}
\texttt{statement} \texttt{theory} \texttt{type} \texttt{statement} \texttt{theory} \texttt{type}
\texttt{unimportant} \texttt{universe} \texttt{uses} \texttt{unimportant} \texttt{universe} \texttt{uses}
\end{flushleft}
\caption{ULO predicates used in the Isabelle exports.}\label{fig:used} \caption{ULO predicates used in the Isabelle exports.}\label{fig:used}
\end{subfigure} \end{subfigure}
\vspace{0.5cm} \vspace{0.5cm}
\begin{subfigure}[]{.9\textwidth} \begin{subfigure}[]{.9\textwidth}
\begin{flushleft}
\texttt{action-times} \texttt{aligned-with} \texttt{action-times} \texttt{aligned-with}
\texttt{alternative-for} \texttt{antonym} \texttt{alternative-for} \texttt{antonym}
\texttt{automatically-proved} \texttt{axiom} \texttt{automatically-proved} \texttt{axiom}
...@@ -41,11 +44,13 @@ ...@@ -41,11 +44,13 @@
\texttt{similar-to} \texttt{size-properties} \texttt{similar-to} \texttt{size-properties}
\texttt{superseded-by} \texttt{theorem} \texttt{typedec} \texttt{superseded-by} \texttt{theorem} \texttt{typedec}
\texttt{uses-implementation} \texttt{uses-interface} \texttt{uses-implementation} \texttt{uses-interface}
\end{flushleft}
\caption{ULO predicates \emph{not} used in the Isabelle exports.}\label{fig:used} \caption{ULO predicates \emph{not} used in the Isabelle exports.}\label{fig:used}
\end{subfigure} \end{subfigure}
\vspace{0.5cm} \vspace{0.5cm}
\begin{subfigure}[]{.9\textwidth} \begin{subfigure}[]{.9\textwidth}
\begin{flushleft}
\texttt{axiom} \texttt{definition} \texttt{axiom} \texttt{definition}
\texttt{derived} \texttt{example} \texttt{file} \texttt{derived} \texttt{example} \texttt{file}
\texttt{folder} \texttt{internal-size} \texttt{folder} \texttt{internal-size}
...@@ -54,11 +59,13 @@ ...@@ -54,11 +59,13 @@
\texttt{proposition} \texttt{revision} \texttt{proposition} \texttt{revision}
\texttt{statement} \texttt{theory} \texttt{type} \texttt{statement} \texttt{theory} \texttt{type}
\texttt{uses} \texttt{uses}
\end{flushleft}
\caption{ULO predicates used in the Coq exports.}\label{fig:used} \caption{ULO predicates used in the Coq exports.}\label{fig:used}
\end{subfigure} \end{subfigure}
\vspace{0.5cm} \vspace{0.5cm}
\begin{subfigure}[]{.9\textwidth} \begin{subfigure}[]{.9\textwidth}
\begin{flushleft}
\texttt{action-times} \texttt{aligned-with} \texttt{action-times} \texttt{aligned-with}
\texttt{alternative-for} \texttt{antonym} \texttt{alternative-for} \texttt{antonym}
\texttt{automatically-proved} \texttt{check-time} \texttt{automatically-proved} \texttt{check-time}
...@@ -92,6 +99,7 @@ ...@@ -92,6 +99,7 @@
\texttt{typedec} \texttt{unimportant} \texttt{typedec} \texttt{unimportant}
\texttt{universe} \texttt{uses-implementation} \texttt{universe} \texttt{uses-implementation}
\texttt{uses-interface} \texttt{uses-interface}
\end{flushleft}
\caption{ULO predicates \emph{not} used in the Coq exports.}\label{fig:used} \caption{ULO predicates \emph{not} used in the Coq exports.}\label{fig:used}
\end{subfigure} \end{subfigure}
\vspace{0.5cm} \vspace{0.5cm}
......
...@@ -74,67 +74,71 @@ feels particularly applicable to an ULO data set. ...@@ -74,67 +74,71 @@ feels particularly applicable to an ULO data set.
\subsection{Querying for Tetrapodal Search}\label{sec:tetraq} \subsection{Querying for Tetrapodal Search}\label{sec:tetraq}
\emph{ulo-storage} was started with the goal of making organizational Various queries for a tetrapodal search system were previously
knowledge available for tetrapodal search. We will first take a look suggested in literature~\cite{tetra}. We investigated how some of them
at how ULO/RDF performs at this task. Conveniently, various queries can be realized with ULO data sets and where other data sources are
for a tetrapodal search system were suggested in~\cite{tetra}; we will required. Where possible, we evaluate proof of concept
investigate how some of them can be realized with ULO/RDF data sets implementations.
and where other data sources are required. Where possible, we evaluate
proof of concept implementations.
\begin{itemize} \begin{itemize}
\item \textbf{$\mathcal{Q}_1$ ``Find theorems with non-elementary \item \textbf{$\mathcal{Q}_1$ ``Find theorems with non-elementary
proofs.''} Elementary proofs are those that are considered easy and proofs.''} Elementary proofs are those that are considered easy
obvious. In consequence,~$\mathcal{Q}_1$ asks for all proofs and obvious~\cite{elempro}. In consequence,~$\mathcal{Q}_1$ has
which are more difficult and not trivial. Of course, just like the to search for all proofs which are not trivial. Of course, just
distinction between ``theorem'' and ``corollary'' is arbitrary, so like the distinction between ``theorem'' and ``corollary'' is
is any judgment about whether a proof is elementary or not. arbitrary, so is any judgment about whether a proof is easy or
not.
\textbf{Organizational Aspect} A first working hypothesis might be \textbf{Organizational Aspect} A first working hypothesis might be
to assume that easy proofs are short. In that case, the size, that to assume that easy proofs are short. In that case, the size, that
is the number of bytes to store the proof, is our first indicator is the number of bytes to store the proof, is our first indicator
of proof complexity. ULO/RDF offers the \texttt{ulo:external-size} of proof complexity. {ULO} offers the \texttt{ulo:external-size}
predicate which will allow us to sort by file size. Maybe small predicate which will allow us to sort by file size. Maybe small
file size also leads to quick check times in proof assistants and file size also leads to quick check times in proof assistants and
automatic theorem provers. With this assumption in mind we could automatic theorem provers. With this assumption in mind we could
use the \texttt{ulo:check-time} predicate. Correlating proof use the \texttt{ulo:check-time} predicate. Correlating proof
complexity with file size allows us to answer this query with complexity with file size allows us to define one indicator of
organizational data based on {ULO/RDF}. proof complexity based on organizational knowledge alone.
\textbf{Other Aspects} A tetrapodal search system should probably \textbf{Other Aspects} A tetrapodal search system should probably
also take symbolic knowledge into account. Based on some kind of also take symbolic knowledge into account. Based on some kind of
measure of formula complexity, different proofs could be measure of formula complexity, different proofs could be
rated. Similarly, with narrative knowledge available to us, we rated. Similarly, with narrative knowledge available to us, we
could count the number of words, references and so on to rate the could count the number of words, references and so on to rate the
narrative complexity of a proof. This shows that combining narrative complexity of a proof. Combining symbolic knowledge,
symbolic knowledge, narrative knowledge and organizational narrative knowledge and organizational knowledge allows us to
knowledge could allow us to service~$\mathcal{Q}_1$ in a find proofs which are probably straight forward.
heuristic fashion.
\textbf{Implementation} Implementing a naive version of the \textbf{Implementation} Implementing a naive version of the
organizational aspect can be as simple as querying for all proofs, organizational aspect can be as simple as querying for all
ordered by size (or check time). theorems justified by proofs, ordered by size (or check time).
\begin{lstlisting} \begin{lstlisting}
PREFIX ulo: <https://mathhub.info/ulo#> PREFIX ulo: <https://mathhub.info/ulo#>
SELECT ?proof ?size SELECT ?theorem ?proof ?size
WHERE { WHERE {
?proof ulo:proof ?o . ?theorem ulo:theorem ?i .
?proof ulo:justifies ?theorem .
?proof ulo:proof ?j .
?proof ulo:external-size ?size . ?proof ulo:external-size ?size .
} }
ORDER BY DESC(?size) ORDER BY DESC(?size)
\end{lstlisting} \end{lstlisting}
Maybe we want to go one step further and calculate a rating that Maybe we want to go one step further and calculate a rating that
assigns each proof some numeric value of complexity. We can assigns each proof some numeric score of complexity based on a
achieve this in SPARQL as recent versions support arithmetic number of properties. We can achieve this in SPARQL as recent
as part of the SPARQL specification. versions support arithmetic as part of the SPARQL specification.
\begin{lstlisting} \begin{lstlisting}
PREFIX ulo: <https://mathhub.info/ulo#> PREFIX ulo: <https://mathhub.info/ulo#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?proof ?size (xsd:float(?size) + xsd:float(?checktime) as ?rating) SELECT ?theorem ?proof ?size (
xsd:float(?size) + xsd:float(?checktime) as ?rating
)
WHERE { WHERE {
?proof ulo:proof ?o . ?theorem ulo:theorem ?i .
?proof ulo:justifies ?theorem .
?proof ulo:proof ?j .
?proof ulo:external-size ?size . ?proof ulo:external-size ?size .
?proof ulo:check-time ?checktime . ?proof ulo:check-time ?checktime .
} }
......
...@@ -35,13 +35,14 @@ organizational knowledge. ...@@ -35,13 +35,14 @@ organizational knowledge.
A previously proposed way to structure such organizational data is the A previously proposed way to structure such organizational data is the
\emph{upper level ontology} (ULO)~\cite{ulo}. ULO takes the form of an \emph{upper level ontology} (ULO)~\cite{ulo}. ULO takes the form of an
OWL~ontology and as such all organization information is stored as OWL~ontology~\cite{uloonto} and as such all organization information
RDF~triplets with a unified schema of ULO~predicates~\cite{owl}. Some is stored as RDF~triplets with a unified schema of
effort has been made to export existing databases of formal ULO~predicates~\cite{owl}. Some effort has been made to export
mathematical knowledge to {ULO}. In particular, there exist exports existing databases of formal mathematical knowledge to {ULO}. In
from Isabelle and Coq libraries~\cite{uloisabelle, ulocoq}. The particular, there exist exports from Isabelle and Coq
resulting data set is already quite large, the Isabelle export alone libraries~\cite{uloisabelle, ulocoq}. The resulting data set is
containing more than 200~million triplets. already quite large, the Isabelle export alone containing more than
200~million triplets.
Existing exports from Isabelle and Coq result in single or multiple Existing exports from Isabelle and Coq result in single or multiple
RDF~files. This is a convenient format for exchange and easily RDF~files. This is a convenient format for exchange and easily
......
...@@ -171,3 +171,18 @@ ...@@ -171,3 +171,18 @@
booktitle={RIAO}, booktitle={RIAO},
year={2007} year={2007}
} }
@online{elempro,
title = {The Definitive Glossary of Higher Mathematical Jargon},
organization = {Math Vault},
urldate = {2020-07-07},
url = {https://mathvault.ca/math-glossary/#elementary}
}
@online{uloonto,
title = {ulo},
organization = {MathHub},
date = {2019},
urldate = {2020-07-07},
url = {https://gl.mathhub.info/ulo/ulo}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment