he studied philosophy theology and canon law