Ontological Theory of Learning