Abstract
The sustenance of reasoning is knowledge as it provides the environment for theactivity of reasoning to derive new information. While a lack of knowledge does notfairly represent the strengths of reasoning, an overly abundance of knowledge leadsto information overload due to the limitations of the biological brain. A promisingway to overcome this problem is the use of machines with reasoning capabilities toreason over large information stores in the form of knowledge graphs. This dissertationdemonstrates the suitability of dependent type theory and assisted theorem provingtechnologies to develop the important reasoning and explanability aspects of queryinga knowledge graph.The first goal of the research described here is to show possibility of the queriesas-types interpretation. We demonstrate this fact by using record types to form queriesfor dependently typed knowledge graphs – knowledge graph represented by inductivetypes. By using powerful machine-tactics, the answer and corresponding proof for thequery can be constructed directly or by traversing through an intermediate node; wealso show how automation of such queries is possible with custom tactics.The second contribution of our work generalizes the result of the first by buildinghierarchical structures for knowledge graphs. To do so, knowledge graphs are representedas a universe of nodes that prevents fragile theorems from being proved, and arealso designed as parameters of our theories to keep the reasoning component separatefrom the knowledge graphs. These hierarchical structures provide the subtyping andquerying in knowledge graphs, and are instantiated by predicates which hold the intentof the type to be expressed. Furthermore, we see that predicates with enumeration arecompatible for doing queries, relying on machine-tactics provide assisted reasoning;users are only tasked with the responsibility to make critical decisions that eventuallydetermines the final answer.The final contribution extends the second work with a reflection mechanism for intentand enumeration representations. Our enumeration reflection, motivated by theboolean reflection in Mathematical Components, allows a query to be expressed as eitheran intent type or an enumeration function. The intent type verifies the answerto the query and the enumeration provides the function used for computing the completesequence of answers to the query. In addition to showing its usage to obtainingthe terms of a subtype, we extend its usage to composite queries which returns theconcatenation of the answers obtained by traversing different reasoning paths.