Emergence and complex systems have been the topic of many papers and are still disputed concepts in many fields. This lack of consensus hinders the use of these concepts in practice, particularly in modelling. All definitions of emergence imply the existence of a hierarchical system: a system that can be observed, measured and analysed at both macroscopic and microscopic levels. We argue that such systems are well described by mathematical graphs and, using graph theory, we propose an ontology (i.e. a set of consistent, formal concept definitions) of dynamic hierarchical systems capable of displaying emergence. Using graph theory enables formal definitions of system macro-state, micro-state and dynamic structural changes. From these definitions, we identify four major families of emergence that match existing definitions from the literature. All but one depend on the relation between the observer and the system, and remind us that a major feature of most supposedly complex systems is our inability to describe them in full. The fourth definition is related to causality, in particular, to the ability of the system itself to create sources of change, independent from other external or internal sources. Feedback loops play a key role in this process. We propose that their presence is a necessary condition for a hierarchical system to be qualified as complex.