I have a question, and maybe it is already something that exists. But I do not know and hence asking here (also kind of food for thought). I was wondering if there is any language which has been designed from ground up to make mathematical formalism as a first class citizen. Precisely I was thinking some kind of way to write set builder notation and then built-in functions to perform and generate (here the generate word is used in a double meaning, think about generators, as some of those operations can generate infinite data) basic operations, such that intersection, union, sigma algebra, and such?
It is something I am thinking. As having something like this will open up doors to programming into a lot of mathematical domains pretty accessible. Topology, Measure theory, Order Theory, Category Theory etc. etc.