Like many classic science fiction "novels", including Foundation, Poul Anderson's Operation Chaos is really a collection of linked novellas.

The last one has the hero and heroine recruiting the spirit of Lobachevsky to help them recover their daughter from non-Euclidean hell.