Topological Fantasy

There should be a short story or mathematical fantasy book about people that can perform topological transforms on their world simply by thinking through the math. They could fight in topological wars, where quickly finding the inverse is essential to survival. The fiction should be reminiscent of Jorge Luis Borges.