@RubenVerg Do you have a specific collection of operations you want to support? I doubt it's possible to do that if you allow any expressible set operation, but a restricted collection could work.
@RubenVerg if you want to reason about infinite sets you probably want to look into constraint logic
one way or another it's going to look veeeery different from a traditional hashmappy representation of finite sets
...or maybe not specifically constraint programming, maybe more like proof assistants...? it probably does depend a lot on intended use cases
but yeah if you want to research existing approaches you might get more results if you consider your sets as non-black-box boolean predicates (paired with a universe set, presumably just implicitly all members of a given type) and your set operations as operations that have to pick those predicates apart
because if you look up set impl in a pl context you're just going to get stuff about finite sets lol